/* ===================================================================
   FUTURES BROKER CRM - Premium Fintech Design System
   Palette: Navy (#0B1F3A) + Gold (#C9A227) + White/Light Gray
   =================================================================== */

:root {
    /* Brand Colors */
    --navy-primary: #0B1F3A;
    --navy-secondary: #142A4F;
    --navy-light: #1E3A6B;
    --navy-lighter: #28477A;

    --gold-primary: #C9A227;
    --gold-light: #E0B84C;
    --gold-dark: #A88818;
    --gold-gradient: linear-gradient(135deg, #C9A227 0%, #E0B84C 100%);

    /* Neutral Colors */
    --bg-page: #F8F9FC;
    --bg-card: #FFFFFF;
    --bg-sidebar: #0B1F3A;
    --bg-sidebar-hover: #1E3A6B;
    --bg-header: #FFFFFF;

    --text-primary: #1A2236;
    --text-secondary: #5A6B85;
    --text-muted: #8A95AC;
    --text-on-dark: #E8EDF5;
    --text-on-dark-muted: #95A5C2;
    --text-on-gold: #0B1F3A;

    --border-color: #E4E8F0;
    --border-light: #F0F2F7;
    --border-dark: #1E3A6B;

    /* Status Colors */
    --success: #1B8754;
    --success-bg: #E8F7EF;
    --warning: #B97A00;
    --warning-bg: #FFF5E5;
    --danger: #C8323B;
    --danger-bg: #FCEEEE;
    --info: #1971C2;
    --info-bg: #E7F1FB;
    --neutral: #6C757D;
    --neutral-bg: #F1F3F5;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --card-radius: 12px;
    --btn-radius: 8px;
    --input-radius: 8px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.05);
    --shadow-card: 0 2px 8px rgba(11, 31, 58, 0.06), 0 1px 3px rgba(11, 31, 58, 0.04);
    --shadow-lg: 0 10px 30px rgba(11, 31, 58, 0.08), 0 4px 12px rgba(11, 31, 58, 0.06);
    --shadow-gold: 0 4px 14px rgba(201, 162, 39, 0.3);

    /* Typography */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===================================================================
   BASE
   =================================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--navy-light);
    text-decoration: none;
}

a:hover {
    color: var(--gold-primary);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0 0 8px 0;
}

/* ===================================================================
   LAYOUT
   =================================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-on-dark);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1030;
    overflow-y: auto;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-logo {
    width: 40px;
    height: 40px;
    background: var(--gold-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-primary);
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow-gold);
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand .brand-name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-brand .brand-sub {
    color: var(--gold-light);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-section {
    padding: 12px 0;
}

.sidebar-section-title {
    padding: 8px 24px;
    color: var(--text-on-dark-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 2px 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-on-dark-muted);
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
    text-decoration: none;
}

.sidebar-nav a:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
    text-decoration: none;
}

.sidebar-nav a.active {
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    font-weight: 600;
    box-shadow: var(--shadow-gold);
}

.sidebar-nav a i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-nav a .badge-nav {
    margin-left: auto;
    background: var(--gold-primary);
    color: var(--navy-primary);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-on-dark-muted);
    font-size: 11px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}

.top-header {
    background: var(--bg-header);
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--shadow-sm);
}

.top-header .header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-header .header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.top-header .header-search input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0 16px 0 40px;
    font-size: 13px;
    background: var(--bg-page);
    transition: all 0.15s;
}

.top-header .header-search input:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.top-header .header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
}

.header-icon-btn:hover {
    background: var(--bg-page);
    color: var(--navy-primary);
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    border: 2px solid #fff;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 24px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s;
}

.header-user:hover {
    border-color: var(--gold-primary);
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    background: var(--gold-gradient);
    color: var(--navy-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.header-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.content-area {
    padding: 24px;
    min-height: calc(100vh - var(--header-height));
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy-primary);
    margin: 0;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===================================================================
   CARDS
   =================================================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--gold-primary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    background: var(--bg-page);
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 12px;
}

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    padding: 18px;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-page);
    color: var(--navy-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.stat-card-icon.gold {
    background: var(--gold-gradient);
    color: var(--navy-primary);
}

.stat-card-icon.navy {
    background: var(--navy-primary);
    color: var(--gold-light);
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-card-sub {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card-trend {
    font-size: 11px;
    font-weight: 600;
}

.stat-card-trend.up { color: var(--success); }
.stat-card-trend.down { color: var(--danger); }

/* Stat color variants */
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: var(--info); }
.stat-card.gold::before { background: var(--gold-gradient); }

/* ===================================================================
   BUTTONS
   =================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--btn-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--navy-primary);
    color: #fff;
    border-color: var(--navy-primary);
}

.btn-primary:hover {
    background: var(--navy-secondary);
    color: #fff;
}

.btn-gold {
    background: var(--gold-gradient);
    color: var(--navy-primary);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    background: var(--gold-dark);
    color: var(--navy-primary);
}

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

.btn-outline:hover {
    background: var(--bg-page);
    color: var(--navy-primary);
    border-color: var(--gold-primary);
}

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #157045; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #a8262e; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #946200; color: #fff; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* ===================================================================
   BADGES
   =================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    line-height: 1.4;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-gold { background: rgba(201, 162, 39, 0.15); color: var(--gold-dark); }
.badge-navy { background: var(--navy-primary); color: #fff; }

/* ===================================================================
   TABLES
   =================================================================== */

.table-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 20px;
}

.table-card .table-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-card .table-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy-primary);
    margin: 0;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.table th {
    background: var(--bg-page);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--bg-page);
}

.table .text-right { text-align: right; }
.table .text-center { text-align: center; }
.table .text-muted { color: var(--text-muted); }
.table .font-weight-bold { font-weight: 600; }
.table .font-weight-700 { font-weight: 700; }
.table .text-navy { color: var(--navy-primary); }
.table .text-gold { color: var(--gold-primary); }
.table .text-success { color: var(--success); }
.table .text-danger { color: var(--danger); }
.table .text-warning { color: var(--warning); }

/* ===================================================================
   FORMS
   =================================================================== */

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    transition: all 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    height: auto;
    padding: 10px 14px;
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%235A6B85' d='M8 11L3 6h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .input-group-text {
    padding: 0 12px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--input-radius) 0 0 var(--input-radius);
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.input-group .form-control {
    border-radius: 0 var(--input-radius) var(--input-radius) 0;
}

/* ===================================================================
   LOGIN PAGE
   =================================================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, var(--navy-primary) 0%, #142A4F 100%);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
}

.auth-left-content {
    max-width: 540px;
    color: var(--text-on-dark);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.auth-brand .brand-logo-lg {
    width: 56px;
    height: 56px;
    background: var(--gold-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-primary);
    font-weight: 800;
    font-size: 24px;
    box-shadow: var(--shadow-gold);
}

.auth-brand .brand-name-lg {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.auth-brand .brand-sub-lg {
    font-size: 12px;
    color: var(--gold-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.auth-headline {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.auth-headline .highlight {
    color: var(--gold-primary);
}

.auth-subheadline {
    font-size: 15px;
    color: var(--text-on-dark-muted);
    line-height: 1.6;
    margin-bottom: 40px;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-on-dark);
    font-size: 14px;
    padding: 10px 0;
}

.auth-features li i {
    color: var(--gold-primary);
    font-size: 20px;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy-primary);
    margin-bottom: 8px;
}

.auth-card-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 28px;
}

.auth-card .btn-gold {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
}

.auth-demo-credentials {
    background: var(--bg-page);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.auth-demo-credentials summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy-primary);
}

.auth-demo-credentials details[open] summary {
    margin-bottom: 8px;
}

.auth-demo-credentials .demo-user {
    padding: 4px 0;
    font-family: var(--font-mono);
    font-size: 11px;
}

.auth-demo-credentials .demo-user strong {
    color: var(--navy-primary);
}

/* ===================================================================
   ALERTS
   =================================================================== */

.alert {
    padding: 12px 16px;
    border-radius: var(--btn-radius);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    border: 1px solid transparent;
}

.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(27, 135, 84, 0.2); }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(200, 50, 59, 0.2); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(185, 122, 0, 0.2); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: rgba(25, 113, 194, 0.2); }

.alert i {
    font-size: 16px;
    margin-top: 1px;
}

/* ===================================================================
   CHARTS
   =================================================================== */

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-container-sm {
    position: relative;
    height: 200px;
    width: 100%;
}

/* ===================================================================
   TREE (IB Network)
   =================================================================== */

.ib-tree {
    padding: 8px 0;
}

.tree-node {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
}

.tree-node::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.tree-node:last-child::before {
    height: 18px;
}

.tree-node::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 18px;
    width: 18px;
    height: 2px;
    background: var(--border-color);
}

.tree-node-root {
    padding-left: 0;
}

.tree-node-root::before, .tree-node-root::after {
    display: none;
}

.tree-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--gold-primary);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.15s;
}

.tree-card:hover {
    box-shadow: var(--shadow-card);
}

.tree-card.main-ib { border-left-color: var(--gold-primary); }
.tree-card.master-ib { border-left-color: var(--info); }
.tree-card.sub-ib { border-left-color: var(--success); }

.tree-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tree-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--navy-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.tree-name {
    font-weight: 600;
    color: var(--navy-primary);
    font-size: 13px;
}

.tree-code {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.tree-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.tree-stats .stat-item {
    text-align: center;
}

.tree-stats .stat-value {
    font-weight: 700;
    color: var(--navy-primary);
    font-size: 14px;
}

.tree-stats .stat-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
}

/* ===================================================================
   EMPTY STATE
   =================================================================== */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 40px;
    color: var(--border-color);
    margin-bottom: 12px;
    display: block;
}

.empty-state h4 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 12px;
    margin: 0;
}

/* ===================================================================
   TOAST NOTIFICATIONS
   =================================================================== */

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}

.toast {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--info);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast i {
    font-size: 18px;
    margin-top: 1px;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--navy-primary);
    font-size: 13px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--text-secondary);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===================================================================
   UTILITY CLASSES
   =================================================================== */

.text-navy { color: var(--navy-primary) !important; }
.text-gold { color: var(--gold-primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.bg-navy { background: var(--navy-primary) !important; color: #fff; }
.bg-gold { background: var(--gold-gradient) !important; color: var(--navy-primary); }
.bg-success { background: var(--success-bg) !important; }
.bg-warning { background: var(--warning-bg) !important; }
.bg-danger { background: var(--danger-bg) !important; }

.font-weight-bold { font-weight: 700 !important; }
.font-weight-600 { font-weight: 600 !important; }
.font-mono { font-family: var(--font-mono); }

.fs-11 { font-size: 11px !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-14 { font-size: 14px !important; }
.fs-16 { font-size: 16px !important; }
.fs-18 { font-size: 18px !important; }
.fs-20 { font-size: 20px !important; }
.fs-24 { font-size: 24px !important; }
.fs-32 { font-size: 32px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }

.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 16px !important; }

.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-uppercase { text-transform: uppercase !important; }

.cursor-pointer { cursor: pointer; }

/* ===================================================================
   GRID
   =================================================================== */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    padding: 0 8px;
    flex: 1;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
    }
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        flex: 1;
    }

    .content-area {
        padding: 16px;
    }

    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
}

@media (max-width: 576px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .header-search {
        display: none;
    }

    .header-user-info {
        display: none;
    }

    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}

.mobile-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--navy-primary);
    font-size: 20px;
    cursor: pointer;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 31, 58, 0.5);
    z-index: 1029;
}

.sidebar-backdrop.show {
    display: block;
}

/* Avatar */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--navy-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: 16px 0;
}

/* Tabs */
.tab-list {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    overflow-x: auto;
}

.tab-list .tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.tab-list .tab:hover {
    color: var(--navy-primary);
}

.tab-list .tab.active {
    color: var(--navy-primary);
    border-bottom-color: var(--gold-primary);
}

/* Progress */
.progress {
    height: 6px;
    background: var(--bg-page);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gold-gradient);
    transition: width 0.3s ease;
}
