/* ==========================================================
   STOCKARTH CUSTOM THEME — Metronic v8.29 Override
   Author: ChatGPT x Stockarth
   Theme: Dark + Yellow Financial Style
   ========================================================== */

/* ---------- GLOBAL VARIABLES ---------- */
:root {
    --stk-primary: #f8c10f;
    --stk-primary-light: #ffcf33;
    --stk-bg: #0d0d0d;
    --stk-card: #1a1a1a;
    --stk-text: #ffffff;
    --stk-muted: #bfbfbf;
    --stk-border: #2c2c2c;
    --stk-danger: #ff4d4d;
}

/* ---------- BODY & APP BASE ---------- */
body {
    background-color: var(--stk-bg) !important;
    color: var(--stk-text) !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Remove default Metronic white backgrounds */
.app-wrapper,
.app-main,
.app-container {
    background-color: var(--stk-bg) !important;
    color: var(--stk-text) !important;
}

/* ---------- SIDEBAR (ASIDE) ---------- */
#kt_aside.aside-dark {
    background: linear-gradient(180deg, #121212 0%, #141414 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.bg-dark {
    background: linear-gradient(180deg, #121212 0%, #141414 100%) !important;
}

#kt_aside_logo {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

#kt_aside_logo .logo {
    height: 40px;
}

#kt_aside_logo span {
    color: var(--stk-primary) !important;
    font-weight: 600;
}

#kt_aside .menu {
    background: transparent !important;
    padding: 0.75rem 0;
}

#kt_aside .menu-item .menu-link {
    color: #ddd !important;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.25s ease;
}

#kt_aside .menu-item .menu-link:hover,
#kt_aside .menu-item .menu-link.active {
    background-color: rgba(248, 193, 15, 0.1) !important;
}

#kt_aside .menu-item .menu-link.active .menu-title {
    color: var(--stk-primary) !important;
}

#kt_aside .menu-item .menu-icon i,
#kt_aside .menu-item .menu-icon svg {
    color: var(--stk-primary) !important;
}

/* Drawer overlay on mobile */
[data-kt-drawer-overlay="true"]::before {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* ---------- HEADER / TOPBAR ---------- */
#kt_header,
.app-header,
.app-navbar {
    background: linear-gradient(90deg, rgba(22, 22, 22, 1) 0%, rgba(14, 14, 14, 1) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-header .btn,
.app-header .btn-icon {
    color: var(--stk-primary) !important;
}

/* ---------- CARDS ---------- */
.card,
.card-body {
    background-color: var(--stk-card) !important;
    border: 1px solid var(--stk-border) !important;
    border-radius: 12px !important;
    color: var(--stk-text) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

.card-title,
.card-header-title {
    color: var(--stk-primary) !important;
    font-weight: 600;
}

/* ---------- FORMS ---------- */


.form-control,
.form-select {
    background-color: var(--stk-border) !important;
    color: var(--stk-text) !important;
    border: 1px solid var(--stk-border) !important;
    border-radius: 8px !important;
}


.form-control::placeholder {
    color: #888 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--stk-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(248, 193, 15, 0.15) !important;
}

/* ---------- BUTTONS ---------- */
.btn-primary,
.btn.btn-primary {
    background-color: var(--stk-primary) !important;
    border-color: var(--stk-primary) !important;
    color: #000 !important;
    font-weight: 600 !important;
}

.btn-primary:hover {
    background-color: var(--stk-primary-light) !important;
    border-color: var(--stk-primary-light) !important;
}

.btn-outline-primary {
    color: var(--stk-primary) !important;
    border-color: var(--stk-primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background-color: rgba(248, 193, 15, 0.1) !important;
    color: var(--stk-primary-light) !important;
}

/* Neutral buttons */
.btn-light {
    background-color: #1a1a1a !important;
    color: var(--stk-primary) !important;
    border: 1px solid var(--stk-border) !important;
}

.btn-light:hover {
    background-color: rgba(248, 193, 15, 0.08) !important;
    color: var(--stk-primary-light) !important;
}

/* ---------- TABLES ---------- */
.table {
    color: #ddd !important;
    border-color: var(--stk-border) !important;
}

.table thead th {
    color: var(--stk-primary) !important;
    border-bottom: 1px solid var(--stk-border) !important;
}

.table tbody tr:hover {
    background-color: rgba(248, 193, 15, 0.05) !important;
}

/* ---------- BADGES & ALERTS ---------- */
.badge {
    background-color: rgba(248, 193, 15, 0.15) !important;
    color: var(--stk-primary) !important;
}

.alert {
    background-color: #141414 !important;
    border: 1px solid var(--stk-border) !important;
    color: var(--stk-text) !important;
}

/* ---------- MODALS ---------- */
.modal-content {
    background-color: var(--stk-card) !important;
    color: var(--stk-text) !important;
    border: 1px solid var(--stk-border) !important;
    border-radius: 12px;
}

/* ---------- AUTH PAGES (Login/Register) ---------- */
.app-blank,
.auth-bg {
    background-color: var(--stk-bg) !important;
}

.auth-card {
    background: var(--stk-card) !important;
    box-shadow: 0 0 25px rgba(248, 193, 15, 0.15) !important;
    border-radius: 12px !important;
    padding: 2rem;
}


/* ---------- PROFILE DROPDOWN ---------- */
.dropdown-menu {
    background-color: #1a1a1a !important;
    border: 1px solid var(--stk-border) !important;
}

.dropdown-item {
    color: #ddd !important;
}

.dropdown-item:hover {
    background-color: rgba(248, 193, 15, 0.1) !important;
    color: var(--stk-primary) !important;
}

/* ---------- SCROLLBARS ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(248, 193, 15, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(248, 193, 15, 0.35);
}

/* ---------- UTILITIES ---------- */
.text-yellow {
    color: var(--stk-primary) !important;
}

.bg-yellow {
    background-color: var(--stk-primary) !important;
    color: #000 !important;
}

.error-text {
    color: var(--stk-danger) !important;
    font-size: 0.85rem;
}

.text-muted {
    color: var(--stk-muted) !important;
}

.border-yellow {
    border-color: var(--stk-primary) !important;
}

/* ---------- RESPONSIVE SIDEBAR BEHAVIOR ---------- */
@media (max-width: 991.98px) {
    #kt_aside {
        background: linear-gradient(180deg, #121212 0%, #141414 100%) !important;
    }

    [data-kt-drawer-overlay="true"]::before {
        background-color: rgba(0, 0, 0, 0.6) !important;
    }
}

.auth-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(248, 193, 15, 0.2);
    padding: 2rem;
}

/* =====================================================
   STOCKARTH THEME FIX (v3)
   Force text colors to be visible on dark backgrounds
===================================================== */

/* ---------- HEADINGS ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #ffffff !important;
    font-weight: 600;
}

/* ---------- LABELS ---------- */
label,
.form-label {
    color: #ffffff !important;
}

/* ---------- GENERAL TEXT ---------- */
p,
span,
div,
strong,
b,
small {
    color: #e0e0e0;
}

/* ---------- Override Metronic gray utilities ---------- */
.text-gray-100,
.text-gray-200,
.text-gray-300,
.text-gray-400,
.text-gray-500,
.text-gray-600,
.text-gray-700,
.text-gray-800,
.text-gray-900,
.text-dark {
    color: #ffffff !important;
}

/* ---------- Muted text ---------- */
.text-muted,
.text-gray-600 {
    color: #bdbdbd !important;
}

/* ---------- Card / Section Titles ---------- */
.card-title,
.card-header-title,
.section-title {
    color: #f8c10f !important;
}

/* ---------- Input placeholders ---------- */
.form-control::placeholder {
    color: #9f9f9f !important;
}

/* ---------- Dropdown text ---------- */
.dropdown-item,
.menu-link {
    color: #e6e6e6 !important;
}

/* ---------- Breadcrumbs / Subtitles ---------- */
.breadcrumb-item,
.page-heading,
.page-title,
.page-heading .text-muted {
    color: #fff !important;
}

/* ---------- Table text ---------- */
.table th,
.table td {
    color: #e6e6e6 !important;
}

/* ---------- Prevent conflict with buttons ---------- */
.btn,
.nav-link,
a {
    color: inherit;
}