:root {
    --primary: #5943e6;
    --primary-dark: #4739cc;
    --primary-deep: #3a2fb0;
    --primary-soft: #eeecfd;
    --primary-rgb: 89, 67, 230;
    --violet: #7e3cee;
    --violet-light: #a453f6;
    --violet-soft: #f1e8fe;
    --green: #0ba775;
    --green-dark: #06976a;
    --green-light: #0fb780;
    --green-soft: #d9f5ea;
    --ink: #14162b;
    --navy: #14162b;
    --navy-light: #2a2c4a;
    --accent: #5943e6;
    --accent-dark: #4739cc;
    --accent-soft: #eeecfd;
    --accent-rgb: 89, 67, 230;
    --purple: #7e3cee;
    --purple-soft: #f1e8fe;
    --blue: #4f6bf0;
    --blue-soft: #e6eaff;
    --amber: #d97706;
    --amber-soft: #fef3c7;
    --grey-bg: #f5f6fb;
    --white: #ffffff;
    --text: #2a2d45;
    --text-muted: #62677f;
    --border: #e6e8f2;
    --danger: #e5484d;
    --danger-soft: #fde8e9;
    --warning: #f5a524;
    --info: #5943e6;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(35, 31, 90, 0.04), 0 8px 24px rgba(35, 31, 90, 0.06);
    --shadow-hover: 0 12px 32px rgba(35, 31, 90, 0.12);
    --hero: linear-gradient(135deg, #4739cc 0%, #573cd5 55%, #6d40e0 100%);
    --grad-green: linear-gradient(90deg, #06976a 0%, #0fb780 100%);
    --grad-violet: linear-gradient(90deg, #7e3cee 0%, #a453f6 100%);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-head: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--grey-bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); letter-spacing: -0.01em; }
::selection { background: var(--primary-soft); color: var(--primary-deep); }
* { scrollbar-width: thin; scrollbar-color: #cfd2e6 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cfd2e6; border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: #b3b7d4; }
a { color: inherit; text-decoration: none; }

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

.sidebar {
    width: 262px;
    background: var(--white);
    border-right: 1px solid var(--border);
    color: #5b6478;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 16px; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px;
    background: var(--hero); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-weight: 800; font-size: 17px; flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
}
.brand-text { font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--primary); letter-spacing: -0.02em; }

.sidebar nav { padding: 6px 12px 14px; flex: 1; }
.nav-group-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: #9aa0bb; padding: 18px 12px 6px; font-weight: 700;
}
a.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 500;
    color: #5b6478; margin-bottom: 3px;
    transition: background 0.12s ease, color 0.12s ease;
}
a.nav-link:hover { background: var(--primary-soft); color: var(--primary-dark); }
a.nav-link.active {
    background: var(--hero); color: var(--white); font-weight: 600;
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.32);
}

.user-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); background: #fafaff; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-meta strong { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta .user-role { font-size: 11.5px; color: var(--text-muted); }
.logout {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--danger); background: var(--danger-soft); flex-shrink: 0;
}
.logout:hover { background: #fbd3d5; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 20px; margin: 0; font-weight: 800; color: var(--ink); }
.topbar-date { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.content { padding: 28px 32px 64px; animation: content-fade-in 0.25s ease; }
@keyframes content-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.hero {
    background: var(--hero);
    border-radius: 24px;
    color: var(--white);
    padding: 28px 32px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(var(--primary-rgb), 0.28);
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.hero::after {
    content: ''; position: absolute; right: -60px; top: -80px;
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}
.hero h2 { margin: 0 0 6px; font-size: 28px; font-weight: 800; color: var(--white); }
.hero p { margin: 0 0 16px; color: rgba(255,255,255,0.85); font-size: 14.5px; max-width: 460px; line-height: 1.5; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stat { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.18); border-radius: 16px; padding: 12px 18px; min-width: 130px; }
.hero-stat span { display: block; font-size: 12px; color: rgba(255,255,255,0.8); font-weight: 600; margin-bottom: 4px; }
.hero-stat strong { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--white); }
.btn-white { background: var(--white); color: var(--primary-dark); box-shadow: 0 8px 18px rgba(20, 22, 43, 0.18); }
.btn-white:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(20, 22, 43, 0.26); }

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #eceef7;
    padding: 24px;
    margin-bottom: 22px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card > h3:first-child, .card > div > h3:first-child { margin-top: 0; }
.card h3 { font-size: 17px; font-weight: 800; }

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-schedule-trend { grid-template-columns: 2.3fr 1fr; margin-bottom: 20px; }

@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-schedule-trend { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -280px; z-index: 100; transition: left 0.2s; height: 100vh; }
    .sidebar.open { left: 0; box-shadow: 8px 0 32px rgba(20, 22, 43, 0.25); }
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .topbar h1 { font-size: 17px; }
    .card { padding: 18px; margin-bottom: 14px; border-radius: 18px; }
    .hero { padding: 22px 20px; border-radius: 20px; }
    .hero h2 { font-size: 23px; }
    .btn { padding: 10px 15px; font-size: 13.5px; }
    table { font-size: 13px; }
    thead th { padding: 9px 8px; font-size: 10.5px; }
    tbody td { padding: 10px 8px; }
    .grid { gap: 12px; }
}
@media (max-width: 420px) {
    .content { padding: 10px; }
    .card { padding: 14px; border-radius: 16px; }
    .stat-card .value { font-size: 23px; }
    .stat-card .label { font-size: 12px; }
    .topbar h1 { font-size: 15.5px; }
    .topbar-date { display: none; }
    table { font-size: 12px; }
}
@media (max-width: 480px) { div[style*="display:flex"] { flex-wrap: wrap; } }

.stat-card { display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
.stat-card.stat-blue::before { background: var(--blue); }
.stat-card.stat-green::before { background: var(--green); }
.stat-card.stat-purple::before { background: var(--violet); }
.stat-card.stat-amber::before { background: var(--amber); }
.stat-card .label { color: var(--text-muted); font-size: 13px; padding-left: 6px; font-weight: 600; }
.stat-card .value { font-family: var(--font-head); font-size: clamp(18px, 1.55vw, 25px); font-weight: 800; color: var(--ink); padding-left: 6px; letter-spacing: -0.02em; }
.stat-card .delta { font-size: 12px; color: var(--green-dark); padding-left: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
    text-align: left; color: #7a7fa0; font-weight: 700; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 12px 14px; background: #f7f7fd; border-bottom: 1px solid var(--border);
}
thead th:first-child { border-radius: 12px 0 0 12px; }
thead th:last-child { border-radius: 0 12px 12px 0; }
tbody td { padding: 14px; border-bottom: 1px solid #f0f1f8; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: #fafaff; }
tbody td a:not(.btn) { color: var(--primary-dark); font-weight: 600; }
tbody td a:not(.btn):hover { text-decoration: underline; }
.table-responsive { overflow-x: auto; }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-success { background: var(--green-soft); color: #06795a; }
.badge-warning { background: var(--amber-soft); color: #92400e; }
.badge-danger { background: var(--danger-soft); color: #b91c1c; }
.badge-info { background: var(--primary-soft); color: var(--primary-dark); }
.badge-secondary { background: #eceef5; color: #5b6478; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 20px; border-radius: 12px; border: none;
    font-size: 14px; font-weight: 700; font-family: var(--font-body); cursor: pointer; text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--hero); color: var(--white); box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.3); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.42); }
.btn-success { background: var(--grad-green); color: var(--white); box-shadow: 0 8px 18px rgba(11, 167, 117, 0.3); }
.btn-success:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(11, 167, 117, 0.42); }
.btn-violet { background: var(--grad-violet); color: var(--white); box-shadow: 0 8px 18px rgba(126, 60, 238, 0.3); }
.btn-violet:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(126, 60, 238, 0.42); }
.btn-outline { background: var(--white); border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: #d13a3f; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--ink); }
.form-control {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 12px;
    font-size: 14px; background: var(--white); color: var(--text); font-family: inherit;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.form-control:hover { border-color: #cfd2e6; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12); }
textarea.form-control { resize: vertical; }
select.form-control { cursor: pointer; }

.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; }
.kanban-col { min-width: 264px; background: #eef0fa; border-radius: var(--radius); padding: 14px; }
.kanban-col h3 { font-size: 12.5px; margin: 0 0 10px; color: var(--ink); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 800; }
.kanban-card {
    background: var(--white); border-radius: 14px; padding: 14px; margin-bottom: 10px;
    box-shadow: var(--shadow); font-size: 13px; border-left: 3px solid var(--primary);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.kanban-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.kanban-card .name { font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.kanban-card .phone { color: var(--text-muted); }

.alert {
    padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; font-weight: 500;
    border-left: 4px solid transparent; display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: var(--green-soft); color: #06795a; border-left-color: var(--green); }
.alert-danger { background: var(--danger-soft); color: #b91c1c; border-left-color: var(--danger); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); font-size: 14px; }
.empty-state::before { content: "○"; display: block; font-size: 24px; margin-bottom: 8px; color: #cfd2e6; }

.mobile-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink); }
@media (max-width: 640px) { .mobile-toggle { display: block; } }

.schedule-card { position: relative; }
.schedule-tab-radio { position: absolute; top: -9999px; left: -9999px; opacity: 0; width: 1px; height: 1px; }
.schedule-daytabs { display: none; gap: 6px; overflow-x: auto; padding-bottom: 10px; }
.schedule-tab {
    flex-shrink: 0; padding: 7px 15px; border-radius: 999px; background: var(--primary-soft);
    color: var(--primary-dark); font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.schedule-table-wrap { overflow: auto; max-height: clamp(360px, 62vh, 680px); border: 1px solid var(--border); border-radius: 16px; }
.schedule-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; min-width: 760px; }
.schedule-table thead th {
    position: sticky; top: 0; z-index: 2; background: #f3f2fd; color: var(--primary-dark);
    font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 11px 6px; text-align: center; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: 0;
}
.schedule-table thead th:first-child { border-left: none; }
.schedule-table .schedule-time-col { width: 92px; }
.schedule-table td { border-left: 1px solid var(--border); border-bottom: 1px solid #f0f1f8; padding: 0; }
.schedule-table td:first-child { border-left: none; }
.schedule-table tr.schedule-hour-start td { border-top: 1px solid rgba(89, 67, 230, 0.16); }
.schedule-time { background: #fafaff; color: var(--primary-dark); font-weight: 700; font-size: 11px; text-align: center; white-space: nowrap; padding: 7px 4px !important; vertical-align: middle; }
.schedule-event-cell { vertical-align: top; padding: 6px 8px !important; text-align: left; }
.schedule-event-cell strong { display: block; font-size: 11.5px; color: var(--ink); line-height: 1.3; }
.schedule-event-cell span { display: block; font-size: 10px; color: var(--text-muted); line-height: 1.3; }
.lesson-color-0 { background: #e6e3fc; }
.lesson-color-1 { background: var(--green-soft); }
.lesson-color-2 { background: var(--amber-soft); }
.lesson-color-3 { background: var(--violet-soft); }
.lesson-color-4 { background: #ffe4ec; }
.schedule-gap-row td.schedule-gap { text-align: center; color: var(--text-muted); font-size: 12px; letter-spacing: 0.3em; padding: 4px !important; background: #fafaff; border-left: none !important; }
@media (max-width: 780px) {
    .schedule-daytabs { display: flex; }
    .schedule-day-col { visibility: collapse; }
    .schedule-table { min-width: 0; }
    .schedule-table-wrap { overflow-x: auto; }
}

.status-summary { display: flex; flex-direction: column; gap: 12px; }
.status-card { background: var(--white); border: 1px solid #eceef7; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow 0.2s ease; }
.status-card:hover { box-shadow: var(--shadow-hover); }
.status-card summary { list-style: none; cursor: pointer; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; transition: background 0.12s ease; }
.status-card summary::-webkit-details-marker { display: none; }
.status-card summary:hover { background: #fafaff; }
.status-card .count-wrap { display: flex; align-items: center; gap: 14px; }
.status-card .count { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.status-card .label { font-size: 14px; font-weight: 700; color: var(--ink); }
.status-card .chevron { color: var(--text-muted); transition: transform 0.15s ease; }
.status-card[open] .chevron { transform: rotate(180deg); }
.status-card .status-panel { padding: 0 22px 18px; }

.lead-status-form { margin-top: 8px; }
.lead-status-form select { padding: 5px 8px; font-size: 12px; width: 100%; }

.student-search-result { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }
.student-search-result:last-child { border-bottom: none; }
.student-search-result .info strong { color: var(--ink); }
.student-search-result .info div { font-size: 12.5px; color: var(--text-muted); }

.trend-chart { display: flex; align-items: flex-end; gap: 8px; height: clamp(220px, 42vh, 400px); padding-top: 10px; }
.trend-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.trend-bar-value { font-size: 10px; font-weight: 700; color: var(--ink); margin-bottom: 4px; white-space: nowrap; }
.trend-bar { width: 100%; max-width: 30px; background: linear-gradient(180deg, #7a58e1 0%, #4739cc 100%); border-radius: 8px 8px 3px 3px; transition: height 0.3s ease; min-height: 4px; }
.trend-bar-label { margin-top: 8px; font-size: 11px; color: var(--text-muted); font-weight: 600; }

.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.page-header h2 { margin: 0; font-size: 18px; color: var(--ink); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
.input-group { position: relative; }
.input-group .input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-group .form-control { padding-left: 38px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.info-card { background: var(--primary-soft); border: 1px solid #d9d5fb; border-radius: 14px; padding: 13px 18px; font-size: 13.5px; color: var(--primary-deep); margin-bottom: 16px; }

.att-present { color: var(--green-dark); font-weight: 700; }
.att-absent { color: var(--danger); font-weight: 700; }
.att-late { color: var(--amber); font-weight: 700; }
.att-excused { color: var(--primary); font-weight: 700; }

.progress-wrap { background: #e6e1f9; border-radius: 999px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4739cc 0%, #6d40e0 100%); transition: width 0.4s ease; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eceef5; color: var(--text-muted); }
.chip-green { background: var(--green-soft); color: #06795a; }
.chip-blue { background: var(--primary-soft); color: var(--primary-dark); }
.chip-amber { background: var(--amber-soft); color: #92400e; }
.chip-red { background: var(--danger-soft); color: #b91c1c; }
.chip-violet { background: var(--violet-soft); color: #6d28d9; }

.table-actions { display: flex; gap: 6px; align-items: center; }
.pagination { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.page-btn { padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--border); background: var(--white); color: var(--text); cursor: pointer; text-decoration: none; transition: border-color 0.12s, background 0.12s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.page-btn.active { background: var(--hero); color: var(--white); border-color: transparent; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.nav-badge { margin-left: auto; background: var(--violet); color: var(--white); font-size: 10.5px; font-weight: 800; min-width: 19px; height: 19px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.empty-state-icon { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state-icon svg { margin-bottom: 12px; color: var(--border); }
.empty-state-icon p { margin: 0; font-size: 14px; }
.empty-state-icon small { font-size: 12.5px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.form-card { max-width: 600px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.notif-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--grey-bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: background 0.12s; }
.notif-btn:hover { background: var(--border); }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--white); }

.modal-overlay { position: fixed; inset: 0; background: rgba(20, 22, 43, 0.55); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.modal-overlay.open { display: flex; animation: modal-fade 0.18s ease; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box { background: var(--white); border-radius: 24px; width: 100%; max-width: 640px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(20, 22, 43, 0.35); animation: modal-pop 0.2s ease; }
@keyframes modal-pop { from { transform: translateY(14px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { background: var(--hero); color: var(--white); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; color: var(--white); font-size: 18px; }
.modal-head .modal-sub { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 3px; }
.modal-close { background: rgba(255,255,255,0.18); border: none; color: var(--white); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; flex-shrink: 0; }
.modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: #fafaff; }

.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-tab { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-muted); background: #eceef7; text-decoration: none; transition: background 0.12s, color 0.12s; }
.pill-tab:hover { background: var(--primary-soft); color: var(--primary-dark); }
.pill-tab.active { background: var(--hero); color: var(--white); box-shadow: 0 6px 14px rgba(var(--primary-rgb), 0.28); }
.pill-tab span { display: inline-block; margin-left: 5px; padding: 1px 8px; border-radius: 999px; background: rgba(89, 67, 230, 0.12); font-size: 11.5px; }
.pill-tab.active span { background: rgba(255,255,255,0.22); }
.avatar { width: 42px; height: 42px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 15px; flex-shrink: 0; }
.avatar-violet { background: var(--violet-soft); color: var(--violet); }
.avatar-green { background: var(--green-soft); color: var(--green-dark); }
.text-muted { color: var(--text-muted); }

.kpi-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.kpi-filters .form-control { width: auto; min-width: 160px; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--white); }
.auth-panel {
    background: var(--hero); color: var(--white); padding: 56px 64px;
    display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.auth-panel::before { content: ''; position: absolute; right: -120px; top: -140px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%); }
.auth-panel::after { content: ''; position: absolute; left: -100px; bottom: -160px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(164,83,246,0.5) 0%, rgba(164,83,246,0) 70%); }
.auth-panel > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 44px; }
.auth-brand-mark { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.auth-brand-name { font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.auth-panel h2 { color: var(--white); font-size: 36px; line-height: 1.2; margin: 0 0 16px; font-weight: 800; }
.auth-panel p { color: rgba(255,255,255,0.85); font-size: 16px; line-height: 1.6; max-width: 440px; margin: 0 0 28px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.auth-points li::before { content: '✓'; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--grey-bg); }
.auth-form-box { width: 100%; max-width: 420px; background: var(--white); border-radius: 24px; padding: 38px 34px; box-shadow: var(--shadow-hover); border: 1px solid #eceef7; }
.auth-form-box h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; }
.auth-sub { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 0 0 22px; }
.auth-submit { width: 100%; padding: 14px; font-size: 15px; margin-top: 6px; }
.auth-footnote { color: var(--text-muted); font-size: 12.5px; text-align: center; margin: 20px 0 0; line-height: 1.5; }
@media (max-width: 860px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-panel { padding: 32px 24px; }
    .auth-panel h2 { font-size: 26px; }
    .auth-points { display: none; }
}

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--hero); }
.login-box { width: 100%; max-width: 440px; background: var(--white); border-radius: 24px; padding: 34px; box-shadow: 0 30px 80px rgba(20, 22, 43, 0.35); }
.login-box h1, .login-box h2 { margin-top: 0; }
