/* ═══════════════════════════════════════════════
   Credbusiness — PRISMA Design System
   Modern Premium Theme · 2026
   Indigo + Emerald · Glassmorphism · Inter Font
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens ── */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(99,102,241,.18);

    --accent: #10b981;
    --accent-hover: #059669;
    --accent-light: #ecfdf5;

    --sidebar-bg: #0c0a1d;
    --sidebar-surface: rgba(255,255,255,.04);
    --sidebar-w: 270px;
    --sidebar-text: #7c7c9a;
    --sidebar-hover: rgba(255,255,255,.06);
    --sidebar-active-bg: rgba(99,102,241,.12);
    --sidebar-active-text: #a5b4fc;
    --sidebar-border: rgba(255,255,255,.06);

    --bg: #f4f2ee;
    --bg2: #eae7e1;
    --surface: #ffffff;
    --surface2: #fafaf9;
    --border: #e7e5e4;
    --border-light: #f5f5f4;

    --text: #1c1917;
    --text2: #57534e;
    --text3: #a8a29e;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;

    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-md: 0 8px 16px -4px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
    --shadow-lg: 0 20px 40px -8px rgba(0,0,0,.12);
    --shadow-primary: 0 4px 14px rgba(99,102,241,.25);
    --shadow-accent: 0 4px 14px rgba(16,185,129,.25);

    --transition: .2s cubic-bezier(.4,0,.2,1);
    --transition-fast: .15s ease;

    --header-h: 64px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { text-decoration: none; color: var(--primary); transition: var(--transition-fast); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
ul { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; color: var(--text); line-height: 1.3; }

/* ═══════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════ */
#app { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    left: 0; top: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 200px;
    background: linear-gradient(180deg, rgba(99,102,241,.08) 0%, transparent 100%);
    pointer-events: none;
}
.sidebar-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sidebar-brand .brand-icon {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-brand .brand-icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
}
.sidebar-brand h1 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}
.sidebar-brand h1 span { font-weight: 300; opacity: .35; }
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    position: relative;
    z-index: 1;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

.nav-section { padding: 0 16px; margin-bottom: 2px; }
.nav-section-title {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.2);
    padding: 18px 12px 8px;
}
.nav-item { margin-bottom: 1px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: .85rem;
    font-weight: 450;
    transition: all .15s;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}
.nav-link i {
    width: 20px;
    text-align: center;
    font-size: .9rem;
    opacity: .55;
    flex-shrink: 0;
}
.nav-link:hover {
    background: var(--sidebar-hover);
    color: #d4d4d8;
}
.nav-link:hover i { opacity: .85; }
.nav-item.active > .nav-link {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 500;
}
.nav-item.active > .nav-link i {
    opacity: 1;
    color: var(--sidebar-active-text);
}
.nav-item.active > .nav-link::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}
.nav-link .arrow {
    margin-left: auto;
    font-size: .65rem;
    transition: transform .2s;
    opacity: .3;
}
.nav-item.open > .nav-link .arrow { transform: rotate(90deg); }

/* Submenu */
.submenu { display: none; padding: 2px 0 6px 0; }
.nav-item.open > .submenu { display: block; }
.submenu .nav-link {
    padding: 7px 14px 7px 48px;
    font-size: .8rem;
    font-weight: 400;
}
.submenu .nav-item.active > .nav-link::before { display: none; }
.submenu .nav-item.active > .nav-link {
    color: var(--sidebar-active-text);
    background: transparent;
    font-weight: 500;
}
.submenu .nav-item.active > .nav-link::after {
    content: '';
    position: absolute;
    left: 32px;
    top: 50%; transform: translateY(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--primary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s;
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-user img {
    width: 36px; height: 36px;
    border-radius: 10px;
    object-fit: cover;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .name { font-size: .82rem; color: #e4e4e7; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .role { font-size: .7rem; color: var(--sidebar-text); }

/* ── Main Wrapper ── */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin .3s ease;
}

/* ── Header ── */
.top-header {
    height: var(--header-h);
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--text2);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: var(--bg2); }
.header-breadcrumb {
    font-size: .85rem;
    color: var(--text3);
}
.header-breadcrumb span { color: var(--text); font-weight: 600; }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-btn {
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text2);
    font-size: .95rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}
.header-btn:hover { background: var(--bg2); color: var(--text); }
.header-btn .dot {
    position: absolute;
    top: 6px; right: 6px;
    min-width: 16px; height: 16px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface);
    font-size: .6rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* ── Notification Dropdown ── */
.notification-wrapper { position: relative; }
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}
.notification-dropdown.show { display: flex; }
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.notif-list {
    overflow-y: auto;
    max-height: 360px;
    flex: 1;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.notif-item:hover { background: var(--bg2); }
.notif-item.unread { background: var(--primary-light); }
.notif-item i:first-child { font-size: 1rem; margin-top: 3px; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: .82rem; color: var(--text); margin-bottom: 2px; }
.notif-msg { font-size: .78rem; color: var(--text2); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: .7rem; color: var(--text3); margin-top: 3px; }
.notif-dismiss {
    position: absolute;
    top: 8px; right: 8px;
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: .7rem;
    padding: 4px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity .15s;
}
.notif-item:hover .notif-dismiss { opacity: 1; }
.notif-dismiss:hover { color: var(--danger); }
.notif-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: .8rem;
}
.notif-footer a { color: var(--primary); text-decoration: none; }
.notif-footer a:hover { text-decoration: underline; }

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--accent) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background .15s;
    margin-left: 4px;
    border: 1px solid transparent;
}
.user-menu:hover { background: var(--bg2); border-color: var(--border); }
.user-menu img {
    width: 34px; height: 34px;
    border-radius: 10px;
    border: 2px solid var(--border);
}
.user-menu .name { font-size: .85rem; font-weight: 600; color: var(--text); }
.user-menu .level-tag {
    font-size: .65rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1;
    letter-spacing: .3px;
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: calc(var(--header-h) - 2px);
    right: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 210px;
    display: none;
    z-index: 200;
    overflow: hidden;
    padding: 6px;
}
.dropdown.show { display: block; }
.dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text2);
    font-size: .85rem;
    font-weight: 450;
    border-radius: var(--radius);
    transition: background .1s;
}
.dropdown a:hover { background: var(--bg); color: var(--text); }
.dropdown a i { width: 18px; text-align: center; font-size: .85rem; }
.dropdown .divider { height: 1px; background: var(--border); margin: 4px 6px; }

/* ── Content ── */
.content { flex: 1; padding: 32px; }

/* ── Footer ── */
.main-footer {
    padding: 18px 32px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: .78rem;
    color: var(--text3);
    background: var(--surface);
}

/* ═══════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════ */

/* ── Page Header ── */
.page-header { margin-bottom: 28px; }
.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -.3px;
}
.page-header p { color: var(--text3); font-size: .875rem; }
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header h3 {
    font-size: .95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-header h3 i { color: var(--text3); font-size: .85rem; }
.card-body { padding: 22px; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    background: var(--surface2);
    font-size: .82rem;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity .2s;
}
.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.stat-card:hover::before { opacity: 1; }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.stat-icon.blue   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
.stat-icon.green  { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #16a34a; }
.stat-icon.purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
.stat-icon.orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: #ea580c; }
.stat-icon.cyan   { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0891b2; }
.stat-icon.red    { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626; }
.stat-icon.yellow { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.stat-icon.indigo { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4f46e5; }
.stat-info { flex: 1; }
.stat-info h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -.3px; }
.stat-info p { font-size: .8rem; color: var(--text3); margin-top: 2px; font-weight: 450; }
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -.3px; color: var(--text); }
.stat-label { display: block; font-size: .8rem; color: var(--text3); margin-top: 2px; font-weight: 450; }
.stat-info .trend { font-size: .75rem; font-weight: 600; margin-top: 4px; }
.stat-info .trend.up { color: var(--success); }
.stat-info .trend.down { color: var(--danger); }

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; } .mt-20 { margin-top: 20px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: -4px; padding: 4px; }
table, .table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
    background: var(--surface2);
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface2); }
tbody tr:last-child td { border-bottom: none; }
.table-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--text3);
}
.table-empty i { font-size: 2.2rem; display: block; margin-bottom: 12px; opacity: .3; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .2px;
}
.badge-green, .badge-success   { background: var(--success-bg); color: var(--success); }
.badge-red, .badge-danger      { background: var(--danger-bg); color: var(--danger); }
.badge-yellow, .badge-warning  { background: var(--warning-bg); color: var(--warning); }
.badge-blue, .badge-info       { background: var(--info-bg); color: var(--info); }
.badge-cyan                    { background: #ecfeff; color: #0891b2; }
.badge-purple                  { background: #ede9fe; color: #7c3aed; }
.badge-gray, .badge-secondary  { background: #f5f5f4; color: #78716c; }
.badge-orange                  { background: #fff7ed; color: #ea580c; }
.badge-indigo                  { background: #eef2ff; color: #4f46e5; }
.badge-primary                 { background: var(--primary-light); color: var(--primary); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 550;
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: -.1px;
}
.btn:active { transform: scale(.97); }
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    box-shadow: 0 6px 20px rgba(99,102,241,.35);
    transform: translateY(-1px);
}
.btn-accent {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: var(--shadow-accent);
}
.btn-accent:hover { background: linear-gradient(135deg, #34d399, #10b981); }
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}
.btn-success:hover { background: linear-gradient(135deg, #34d399, #10b981); }
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #dc2626; }
.btn-warning {
    background: var(--warning);
    color: #fff;
}
.btn-warning:hover { background: #d97706; }
.btn-outline {
    background: var(--surface);
    color: var(--text2);
    border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); border-color: var(--text3); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text2); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 14px; font-size: .78rem; border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 8px; font-size: .72rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius); }
.btn-icon.sm { width: 30px; height: 30px; font-size: .8rem; }
.btn-group { display: flex; gap: 4px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 550;
    color: var(--text2);
    margin-bottom: 7px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text3); }
textarea.form-control { min-height: 80px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-hint { font-size: .75rem; color: var(--text3); margin-top: 4px; }
.input-group { position: relative; }
.input-group .form-control { padding-right: 42px; }
.input-group-btn {
    position: absolute;
    right: 2px; top: 2px; bottom: 2px;
    width: 38px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── Tabs ── */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 22px;
    gap: 0;
}
.tab {
    padding: 10px 22px;
    font-size: .875rem;
    font-weight: 550;
    color: var(--text3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
    white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Progress Bar ── */
.progress-bar {
    height: 8px;
    background: var(--bg2);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-fill.orange { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ── Level Cards ── */
.level-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all .25s;
}
.level-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.level-card.current {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-primary);
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--surface) 60%);
}
.level-card .level-icon { font-size: 2.5rem; margin-bottom: 10px; }
.level-card h4 { font-size: 1rem; margin-bottom: 4px; }
.level-card p { font-size: .78rem; color: var(--text3); }
.level-badge { position: absolute; top: 10px; right: 10px; font-size: .65rem; }

/* ── Plan Cards ── */
.plan-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    transition: all .3s;
    position: relative;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-light), var(--surface));
}
.plan-card .plan-name { font-size: .82rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
.plan-card .plan-price { font-size: 2.2rem; font-weight: 800; margin: 14px 0; letter-spacing: -1px; }
.plan-card .plan-price small { font-size: .82rem; font-weight: 400; color: var(--text3); }
.plan-card .plan-features { list-style: none; margin: 22px 0; text-align: left; }
.plan-card .plan-features li {
    padding: 8px 0;
    font-size: .85rem;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-light);
}
.plan-card .plan-features li:last-child { border: none; }
.plan-card .plan-features li i { color: var(--accent); font-size: .8rem; }
.plan-recommended {
    position: absolute;
    top: -1px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 0 0 var(--radius) var(--radius);
    letter-spacing: .3px;
}

/* ── Package Cards ── */
.pkg-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all .25s;
}
.pkg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pkg-card .pkg-name { font-size: 1.05rem; font-weight: 650; margin-bottom: 4px; }
.pkg-card .pkg-desc { font-size: .82rem; color: var(--text3); margin-bottom: 16px; }
.pkg-card .pkg-points { font-size: .85rem; color: var(--primary); font-weight: 600; margin-bottom: 12px; }
.pkg-card .pkg-price { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -.3px; }
.pkg-card .pkg-price small { font-size: .8rem; font-weight: 400; color: var(--text3); }

/* ── Activity List ── */
.activity-list { list-style: none; }
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border: none; }
.activity-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
}
.activity-info { flex: 1; }
.activity-info .title { font-size: .85rem; font-weight: 500; }
.activity-info .desc { font-size: .78rem; color: var(--text3); }
.activity-info .time { font-size: .72rem; color: var(--text3); }

/* ── Tree View ── */
.tree-container { overflow-x: auto; }
.tree-view ul { padding-left: 28px; position: relative; }
.tree-view > ul { padding-left: 0; }
.tree-view li { position: relative; padding: 4px 0; }
.tree ul { padding-left: 28px; position: relative; }
.tree > ul { padding-left: 0; }
.tree li { position: relative; padding: 4px 0; }
.tree-node {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .85rem;
    transition: all .15s;
}
.tree-node:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.tree-node strong { font-weight: 600; }
.tree-node .node-level { font-size: .65rem; }

/* ── FAQ ── */
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .2s;
}
.faq-item.open { border-color: var(--primary); }
.faq-q {
    padding: 16px 20px;
    font-weight: 550;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background .15s;
}
.faq-q:hover { background: var(--surface2); }
.faq-q i { transition: transform .25s; color: var(--text3); }
.faq-item.open .faq-q i { transform: rotate(180deg); color: var(--primary); }
.faq-a {
    display: none;
    padding: 0 20px 16px;
    font-size: .85rem;
    color: var(--text2);
    line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ── News / Info ── */
.news-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}
.news-item:last-child { border: none; }
.news-item .news-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.news-item h4 { font-size: .95rem; margin-bottom: 4px; }
.news-item p { font-size: .85rem; color: var(--text2); line-height: 1.6; }

/* ── Event Cards ── */
.event-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all .2s;
}
.event-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.event-date {
    width: 60px;
    text-align: center;
    flex-shrink: 0;
    padding-top: 4px;
}
.event-date .day { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; }
.event-date .month { font-size: .72rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.event-info h4 { font-size: .95rem; margin-bottom: 4px; }
.event-info p { font-size: .82rem; color: var(--text2); margin-bottom: 6px; }
.event-info .event-meta { font-size: .78rem; color: var(--text3); display: flex; gap: 12px; }
.event-info .event-meta i { margin-right: 4px; }

/* ── Video Grid ── */
.video-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .25s;
}
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.video-thumb {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    position: relative;
}
.video-thumb .duration {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: .72rem;
    font-weight: 600;
}
.video-card .video-info { padding: 14px; }
.video-card .video-info h4 { font-size: .9rem; margin-bottom: 4px; }
.video-card .video-info p { font-size: .78rem; color: var(--text3); }

/* ── Financial Summary ── */
.fin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all .2s;
}
.fin-card:hover { box-shadow: var(--shadow-sm); }
.fin-card .fin-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.fin-card h4 { font-size: .78rem; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.fin-card .amount { font-size: 1.4rem; font-weight: 700; letter-spacing: -.3px; }

/* ── Consultation Cards ── */
.consult-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all .25s;
}
.consult-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--primary); }
.consult-card .consult-icon {
    width: 68px; height: 68px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}
.consult-card h4 { font-size: 1rem; margin-bottom: 6px; }
.consult-card p { font-size: .82rem; color: var(--text3); margin-bottom: 18px; }

/* ═══════════════════════════════════════
   MODAL
   ═══════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12,10,29,.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 95%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(24px) scale(.96);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 650; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text3);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.modal-close:hover { color: var(--text); background: var(--bg); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--surface2);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: .875rem;
    font-weight: 450;
    min-width: 300px;
    animation: toastIn .35s cubic-bezier(.4,0,.2,1);
    transition: opacity .3s;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.success i { color: var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.error i { color: var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.warning i { color: var(--warning); }
.toast.info { border-left: 4px solid var(--info); }
.toast.info i { color: var(--info); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ═══════════════════════════════════════
   OVERLAY
   ═══════════════════════════════════════ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
}
.overlay.show { display: block; }

/* ═══════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text3);
}
.empty-state i { font-size: 3rem; opacity: .25; margin-bottom: 16px; display: block; }
.empty-state p { font-size: .95rem; font-weight: 450; }
.empty-state small { display: block; margin-top: 6px; font-size: .82rem; }

/* ═══════════════════════════════════════
   LOGIN / AUTH PAGES
   ═══════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('Fundo/Fundo.jpg') center/cover no-repeat fixed;
    padding: 20px;
    position: relative;
}
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: blur(2px);
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 44px 40px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #10b981);
}
.login-brand {
    text-align: center;
    margin-bottom: 32px;
}
.login-brand .brand-icon {
    display: inline-block;
    margin-bottom: 20px;
}
.login-brand .brand-icon img {
    height: 72px;
    width: auto;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(99,102,241,.2);
}
.login-brand h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.3px; margin-top: 4px; }
.login-brand p { color: var(--text3); font-size: .875rem; margin-top: 4px; }
.login-footer { margin-top: 28px; text-align: center; font-size: .82rem; color: var(--text3); }
.login-footer a { color: var(--primary); font-weight: 600; }

/* Legacy login-left/login-right support */
.login-page .login-left { display: none; }
.login-page .login-right {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 44px 40px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.login-page .login-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #10b981);
}
.login-right h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.3px; }
.login-right .subtitle { color: var(--text3); margin-bottom: 32px; font-size: .875rem; }
.login-right .form-group label { font-size: .85rem; }
.login-right .btn { width: 100%; padding: 12px; font-size: .95rem; }

/* Auth tabs (login) */
.auth-tabs {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 28px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: .85rem;
    font-weight: 550;
    color: var(--text3);
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .2s;
}
.auth-tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

/* ═══════════════════════════════════════
   ADMIN EXTRAS
   ═══════════════════════════════════════ */
.admin-sidebar .sidebar-brand .brand-icon {
    /* admin uses same logo */
}
.admin-sidebar::before {
    background: linear-gradient(180deg, rgba(239,68,68,.06) 0%, transparent 100%);
}
.admin-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239,68,68,.1);
    color: #fca5a5;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .3px;
}
.admin-badge-tag i { color: #fbbf24; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .menu-toggle { display: flex; }
    .grid-2, .form-row { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .content { padding: 20px 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-header h2 { font-size: 1.25rem; }
    .top-header { padding: 0 16px; }
    .form-row-3 { grid-template-columns: 1fr; }
    .tabs { overflow-x: auto; }
    .event-card { flex-direction: column; }
}
@media (max-width: 480px) {
    .content { padding: 16px 12px; }
    .stat-card { padding: 16px; }
    .user-menu .name { display: none; }
    .login-card { padding: 32px 24px; }
    .login-page .login-right { padding: 32px 24px; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text3) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-accent { color: var(--accent) !important; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.d-flex { display: flex; } .align-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.flex-1 { flex: 1; } .w-full { width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }

/* ── Selection ── */
::selection { background: var(--primary-light); color: var(--primary-dark); }
