@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --bg: #f3f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --surface-raised: #ffffff;
    --text: #15231f;
    --muted: #6b7c76;
    --line: #dce5e1;
    --line-soft: #eaf0ed;
    --primary: #0f766e;
    --primary-strong: #0a5b55;
    --primary-soft: #e4f4f1;
    --secondary: #173c36;
    --success: #16865f;
    --success-soft: #e5f7ef;
    --warning: #b7791f;
    --warning-soft: #fff5db;
    --danger: #c33f4a;
    --danger-soft: #fdecee;
    --info: #2e6fb1;
    --info-soft: #eaf3fc;
    --shadow-sm: 0 1px 2px rgba(18, 38, 32, .05), 0 6px 18px rgba(18, 38, 32, .04);
    --shadow-md: 0 18px 45px rgba(18, 38, 32, .10);
    --sidebar-width: 264px;
    --radius: 14px;
    --radius-sm: 9px;
}

:root[data-theme="dark"] {
    --bg: #0d1513;
    --surface: #131f1c;
    --surface-soft: #172622;
    --surface-raised: #182722;
    --text: #edf5f2;
    --muted: #9aada6;
    --line: #2a3a35;
    --line-soft: #22322d;
    --primary: #43b9a7;
    --primary-strong: #75d2c4;
    --primary-soft: #163f38;
    --secondary: #dcebe6;
    --success: #59c897;
    --success-soft: #183b2e;
    --warning: #e4b45c;
    --warning-soft: #3f331b;
    --danger: #ef7a83;
    --danger-soft: #431f24;
    --info: #79ace2;
    --info-soft: #1b3048;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 18px rgba(0, 0, 0, .15);
    --shadow-md: 0 18px 45px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { display: block; }

.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: #102b26;
    color: #eaf5f1;
    border-right: 1px solid rgba(255,255,255,.06);
    overflow-y: auto;
    scrollbar-width: thin;
}
.sidebar-brand {
    min-height: 76px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
    width: 41px;
    height: 41px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #58c8b7, #1c8b7e);
    box-shadow: 0 8px 25px rgba(37, 176, 157, .25);
    color: #062e28;
    font-family: Manrope, sans-serif;
    font-weight: 800;
    letter-spacing: -.5px;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-family: Manrope, sans-serif; font-size: 17px; letter-spacing: .3px; }
.brand-copy span { color: #9cb8b1; font-size: 11px; margin-top: 4px; }
.sidebar-close { display: none !important; margin-left: auto; color: #b8cec8 !important; }

.campus-card {
    margin: 16px 14px 5px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    background: rgba(255,255,255,.045);
}
.campus-symbol {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: rgba(88, 200, 183, .14);
    color: #73d8c9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .4px;
}
.campus-card div:last-child { min-width: 0; display: grid; }
.campus-card span { color: #88a9a1; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.campus-card strong { margin-top: 2px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav { padding: 10px 12px 24px; flex: 1; }
.nav-caption {
    padding: 16px 10px 7px;
    color: #71968d;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nav-link {
    position: relative;
    min-height: 43px;
    margin: 3px 0;
    padding: 10px 11px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-radius: 10px;
    color: #b9cec8;
    transition: .18s ease;
}
.nav-link svg { width: 19px; height: 19px; flex: 0 0 auto; opacity: .9; }
.nav-link span:not(.nav-count) { font-weight: 500; }
.nav-link:hover { color: #f5fffc; background: rgba(255,255,255,.06); }
.nav-link.active {
    color: #f6fffd;
    background: linear-gradient(90deg, rgba(66, 190, 171, .22), rgba(66, 190, 171, .08));
    box-shadow: inset 3px 0 0 #4ac3b1;
}
.nav-link.active svg { color: #60d3c1; }
.nav-count {
    margin-left: auto;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #07342e;
    background: #5ed0be;
    font-size: 10px;
    font-weight: 800;
}
.sidebar-profile {
    margin: 0 12px 14px;
    padding: 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    border-radius: 11px;
}
.sidebar-profile-copy { min-width: 0; display: grid; flex: 1; }
.sidebar-profile-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-copy span { color: #89aaa2; font-size: 10px; }
.sidebar-profile .icon-btn { background: transparent; border-color: transparent; }

.main-panel { min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 35;
    min-height: 76px;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topbar-left h1 { margin: 1px 0 0; font-family: Manrope, sans-serif; font-size: 18px; letter-spacing: -.3px; }
.breadcrumb { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 10px; }
.breadcrumb strong { color: var(--primary); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.mobile-menu { display: none !important; }
.icon-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface);
    cursor: pointer;
    transition: .17s ease;
}
.icon-btn:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); background: var(--primary-soft); }
.period-chip {
    height: 42px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
}
.period-chip small, .period-chip strong { display: block; line-height: 1.3; }
.period-chip small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .5px; }
.period-chip strong { font-size: 11px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 16%, transparent); }
.notification-button { position: relative; }
.notification-button > span { position: absolute; top: -5px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--surface); border-radius: 9px; display: grid; place-items: center; background: var(--danger); color: white; font-size: 8px; font-weight: 800; }
.topbar-user { margin-left: 3px; padding-left: 11px; display: flex; align-items: center; gap: 9px; border-left: 1px solid var(--line); }
.topbar-user > div:last-child { display: grid; line-height: 1.25; max-width: 160px; }
.topbar-user strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.topbar-user span { color: var(--muted); font-size: 9px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.avatar-sm { width: 34px; height: 34px; font-size: 10px; }
.avatar-md { width: 44px; height: 44px; font-size: 13px; }
.avatar-lg { width: 70px; height: 70px; font-size: 20px; }

.content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 26px 28px 42px; flex: 1; }
.app-footer { padding: 18px 28px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line-soft); font-size: 10px; }
.page-head { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-head h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 23px; letter-spacing: -.55px; }
.page-head p { max-width: 700px; margin: 5px 0 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .8fr); }
.span-2 { grid-column: span 2; }

.card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.card-header { min-height: 59px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line-soft); }
.card-header h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 14px; letter-spacing: -.15px; }
.card-header p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.card-body { padding: 18px; }
.card-footer { padding: 13px 18px; border-top: 1px solid var(--line-soft); background: var(--surface-soft); border-radius: 0 0 var(--radius) var(--radius); }
.card-link { color: var(--primary); font-size: 11px; font-weight: 700; }
.card-link:hover { text-decoration: underline; }

.stat-card { position: relative; min-height: 132px; padding: 18px; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; width: 86px; height: 86px; right: -27px; top: -29px; border-radius: 50%; background: var(--primary-soft); opacity: .65; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-icon { width: 37px; height: 37px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); position: relative; z-index: 1; }
.stat-value { margin-top: 11px; font-family: Manrope, sans-serif; font-size: 27px; font-weight: 800; line-height: 1; letter-spacing: -.9px; }
.stat-meta { margin-top: 8px; color: var(--muted); font-size: 10px; }
.stat-meta strong { color: var(--text); }

.btn {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .17s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { color: white; background: var(--primary); border-color: var(--primary); box-shadow: 0 7px 17px color-mix(in srgb, var(--primary) 22%, transparent); }
.btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); transform: translateY(-1px); }
.btn-secondary { color: var(--text); background: var(--surface); border-color: var(--line); }
.btn-secondary:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); background: var(--primary-soft); }
.btn-success { color: white; background: var(--success); border-color: var(--success); }
.btn-danger { color: white; background: var(--danger); border-color: var(--danger); }
.btn-warning { color: #332407; background: #efc667; border-color: #efc667; }
.btn-ghost { color: var(--muted); background: transparent; border-color: transparent; }
.btn-ghost:hover { color: var(--primary); background: var(--primary-soft); }
.btn-sm { min-height: 31px; padding: 5px 9px; border-radius: 8px; font-size: 10px; }
.btn-lg { min-height: 46px; padding: 11px 18px; font-size: 13px; }
.btn-block { width: 100%; }
.action-row { display: flex; flex-wrap: wrap; gap: 7px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-group { min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); font-size: 11px; font-weight: 700; }
.form-group label small { color: var(--muted); font-weight: 400; }
.required { color: var(--danger); }
.form-control, .form-select, .form-textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: var(--surface);
    transition: .17s ease;
}
.form-textarea { min-height: 105px; resize: vertical; }
.form-control:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); }
.form-control:disabled, .form-select:disabled { opacity: .65; cursor: not-allowed; background: var(--surface-soft); }
.form-hint { margin-top: 5px; color: var(--muted); font-size: 9px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: 9px 0 0 9px; }
.input-group .input-addon { min-width: 48px; padding: 0 10px; border: 1px solid var(--line); border-left: 0; border-radius: 0 9px 9px 0; display: grid; place-items: center; color: var(--muted); background: var(--surface-soft); font-size: 10px; }
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 74px; }
.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; color: var(--primary); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.form-actions { margin-top: 20px; padding-top: 17px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-soft); }
.inline-fields { display: flex; gap: 8px; align-items: center; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.radio-card { cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span { min-height: 62px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; text-align: center; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 700; }
.radio-card input:checked + span { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 10%, transparent); }

.file-drop { position: relative; min-height: 115px; padding: 18px; border: 1.5px dashed var(--line); border-radius: 11px; display: grid; place-items: center; text-align: center; color: var(--muted); background: var(--surface-soft); transition: .17s ease; }
.file-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop svg { margin: 0 auto 7px; color: var(--primary); }
.file-drop strong { display: block; color: var(--text); font-size: 11px; }
.file-drop small { display: block; margin-top: 3px; font-size: 9px; }
.score-preview { min-height: 40px; padding: 9px 12px; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; background: var(--primary-soft); color: var(--primary); }
.score-preview span { font-size: 10px; font-weight: 600; }
.score-preview strong { font-family: Manrope, sans-serif; font-size: 17px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.table th { padding: 11px 13px; text-align: left; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); font-size: 9px; text-transform: uppercase; letter-spacing: .45px; font-weight: 800; }
.table td { padding: 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 11px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 35%, transparent); }
.table .wrap { white-space: normal; min-width: 230px; }
.table-title { display: block; color: var(--text); font-size: 11px; font-weight: 700; }
.table-subtitle { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.table-user { display: flex; align-items: center; gap: 9px; }
.table-actions { display: flex; justify-content: flex-end; gap: 5px; }
.table-empty { padding: 40px 18px !important; text-align: center; color: var(--muted); }
.table-empty svg { margin: 0 auto 10px; color: var(--line); }
.table-empty strong { display: block; color: var(--text); }
.table-empty span { display: block; margin-top: 3px; font-size: 10px; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.fw-bold { font-weight: 700; }
.nowrap { white-space: nowrap; }

.badge { min-height: 23px; padding: 3px 8px; border-radius: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-warning { color: var(--warning); background: var(--warning-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }
.badge-info { color: var(--info); background: var(--info-soft); }
.badge-neutral { color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line-soft); }
.domain-badge { padding: 4px 8px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 700; }

.filter-bar { margin-bottom: 18px; padding: 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.filter-search { position: relative; flex: 1; min-width: 180px; }
.filter-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filter-search .form-control { padding-left: 37px; }
.filter-bar .form-select { width: auto; min-width: 150px; }
.filter-summary { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }

.progress { width: 100%; height: 7px; border-radius: 6px; overflow: hidden; background: var(--line-soft); }
.progress-bar { height: 100%; border-radius: inherit; background: var(--primary); transition: width .4s ease; }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-meta { margin-bottom: 6px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.progress-meta strong { color: var(--text); }
.domain-list { display: grid; gap: 15px; }
.domain-row { display: grid; gap: 6px; }
.domain-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.domain-row-head span { font-size: 10px; font-weight: 600; }
.domain-row-head strong { font-family: Manrope, sans-serif; font-size: 12px; }

.alert { margin-bottom: 15px; padding: 12px 13px; border: 1px solid; border-radius: 10px; display: flex; align-items: flex-start; gap: 10px; box-shadow: var(--shadow-sm); }
.alert-icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 auto; }
.alert > div:nth-child(2) { flex: 1; padding-top: 2px; font-size: 11px; }
.alert-close { border: 0; color: inherit; background: transparent; cursor: pointer; font-size: 18px; line-height: 1; opacity: .7; }
.alert-success { color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, var(--line)); background: var(--success-soft); }
.alert-warning { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, var(--line)); background: var(--warning-soft); }
.alert-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); background: var(--danger-soft); }
.alert-info { color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, var(--line)); background: var(--info-soft); }
.alert-icon { background: color-mix(in srgb, currentColor 13%, transparent); }

.empty-state { padding: 45px 20px; text-align: center; }
.empty-state-icon { width: 54px; height: 54px; margin: 0 auto 13px; border-radius: 16px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); }
.empty-state h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 15px; }
.empty-state p { max-width: 420px; margin: 6px auto 16px; color: var(--muted); font-size: 11px; }

.pagination { margin-top: 17px; display: flex; justify-content: center; gap: 5px; }
.pagination a { width: 33px; height: 33px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 700; }
.pagination a:hover, .pagination a.active { color: white; border-color: var(--primary); background: var(--primary); }

.profile-summary { padding: 20px; text-align: center; }
.profile-summary .avatar { margin: 0 auto 11px; }
.profile-summary h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 15px; }
.profile-summary p { margin: 4px 0 12px; color: var(--muted); font-size: 10px; }
.info-list { display: grid; }
.info-row { padding: 10px 0; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); font-size: 10px; }
.info-row strong { text-align: right; font-size: 10px; }

.detail-hero { margin-bottom: 18px; padding: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--primary-soft) 65%, var(--surface))); }
.detail-hero h2 { margin: 8px 0 4px; font-family: Manrope, sans-serif; font-size: 21px; line-height: 1.3; }
.detail-hero p { margin: 0; color: var(--muted); }
.detail-score { min-width: 130px; padding: 14px; border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line)); border-radius: 12px; text-align: center; background: var(--surface); }
.detail-score span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .6px; }
.detail-score strong { display: block; margin-top: 4px; color: var(--primary); font-family: Manrope, sans-serif; font-size: 28px; }
.description-box { padding: 14px; border-radius: 10px; color: var(--muted); background: var(--surface-soft); white-space: pre-line; }
.file-list { display: grid; gap: 8px; }
.file-item { padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; display: flex; align-items: center; gap: 10px; }
.file-type { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.file-item > div:nth-child(2) { min-width: 0; flex: 1; display: grid; }
.file-item strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.file-item span { color: var(--muted); font-size: 9px; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 18px 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: 4px; top: 3px; width: 15px; height: 15px; border: 3px solid var(--surface); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--line); }
.timeline-item strong { font-size: 10px; }
.timeline-item span { display: block; color: var(--muted); font-size: 9px; }
.timeline-note { margin-top: 5px; padding: 8px 10px; border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 10px; }

.metric-ring { --value: 0; width: 126px; height: 126px; margin: 5px auto 16px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--value) * 1%), var(--line-soft) 0); position: relative; }
.metric-ring::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.metric-ring > div { position: relative; z-index: 1; text-align: center; }
.metric-ring strong { display: block; font-family: Manrope, sans-serif; font-size: 24px; line-height: 1; }
.metric-ring span { color: var(--muted); font-size: 9px; }
.grade-pill { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: white; background: var(--primary); font-family: Manrope, sans-serif; font-size: 18px; font-weight: 800; }

.notice { padding: 13px; border-left: 3px solid var(--primary); border-radius: 0 9px 9px 0; color: var(--muted); background: var(--primary-soft); font-size: 10px; }
.kpi-line { padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line-soft); }
.kpi-line:last-child { border-bottom: 0; }
.kpi-line span { color: var(--muted); font-size: 10px; }
.kpi-line strong { font-family: Manrope, sans-serif; font-size: 13px; }

.auth-body { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 42%) 1fr; background: var(--surface); }
.auth-panel { padding: 44px clamp(28px, 5vw, 74px); display: flex; flex-direction: column; justify-content: center; }
.auth-brand { position: absolute; top: 30px; left: clamp(28px, 5vw, 74px); display: flex; align-items: center; gap: 11px; }
.auth-brand .brand-mark { width: 38px; height: 38px; }
.auth-brand div:last-child { display: grid; line-height: 1.15; }
.auth-brand strong { font-family: Manrope, sans-serif; font-size: 15px; }
.auth-brand span { color: var(--muted); font-size: 9px; }
.auth-box { width: 100%; max-width: 420px; margin: 40px auto 0; }
.auth-kicker { color: var(--primary); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.auth-box h1 { margin: 8px 0 7px; font-family: Manrope, sans-serif; font-size: clamp(27px, 3vw, 38px); line-height: 1.15; letter-spacing: -1.25px; }
.auth-box > p { margin: 0 0 25px; color: var(--muted); }
.auth-form { display: grid; gap: 15px; }
.auth-form .btn { margin-top: 5px; }
.auth-footer { margin-top: 24px; color: var(--muted); text-align: center; font-size: 9px; }
.auth-visual { position: relative; padding: 50px; display: flex; align-items: flex-end; overflow: hidden; color: white; background: #0f2e29; }
.auth-visual::before { content: ''; position: absolute; width: 680px; height: 680px; right: -190px; top: -230px; border-radius: 50%; border: 110px solid rgba(78, 196, 178, .08); }
.auth-visual::after { content: ''; position: absolute; width: 320px; height: 320px; left: -100px; bottom: -130px; border-radius: 50%; background: rgba(78, 196, 178, .07); }
.visual-grid { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 42px 42px; }
.visual-content { position: relative; z-index: 2; width: 100%; max-width: 650px; }
.visual-content h2 { margin: 0 0 11px; font-family: Manrope, sans-serif; font-size: clamp(31px, 4vw, 54px); line-height: 1.08; letter-spacing: -1.8px; }
.visual-content > p { max-width: 530px; margin: 0; color: #a9c8c1; font-size: 15px; }
.visual-stats { margin-top: 35px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.visual-stat { padding: 16px; border: 1px solid rgba(255,255,255,.11); border-radius: 13px; background: rgba(255,255,255,.06); backdrop-filter: blur(10px); }
.visual-stat strong { display: block; color: #65d6c4; font-family: Manrope, sans-serif; font-size: 22px; }
.visual-stat span { color: #9ebdb6; font-size: 9px; text-transform: uppercase; letter-spacing: .6px; }
.demo-accounts { margin-top: 16px; padding: 12px; border-radius: 9px; color: var(--muted); background: var(--surface-soft); font-size: 9px; }
.demo-accounts strong { color: var(--text); }

.install-body { min-height: 100vh; padding: 35px 20px; background: var(--bg); }
.install-shell { width: min(980px, 100%); margin: 0 auto; }
.install-head { margin-bottom: 22px; display: flex; align-items: center; gap: 13px; }
.install-head h1 { margin: 0; font-family: Manrope, sans-serif; font-size: 21px; }
.install-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.install-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.install-side { padding: 18px; align-self: start; }
.install-steps { display: grid; gap: 13px; }
.install-step { display: flex; gap: 10px; color: var(--muted); }
.install-step span { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 800; }
.install-step strong { display: block; color: var(--text); font-size: 10px; }
.install-step small { font-size: 9px; }
.requirement-list { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-soft); display: grid; gap: 7px; }
.requirement { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.requirement b.ok { color: var(--success); }
.requirement b.fail { color: var(--danger); }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.error-card { width: min(440px, 100%); padding: 35px; border: 1px solid var(--line); border-radius: 18px; text-align: center; background: var(--surface); box-shadow: var(--shadow-md); }
.error-code { color: var(--primary); font-family: Manrope, sans-serif; font-size: 70px; font-weight: 800; line-height: 1; }
.error-card h1 { margin: 12px 0 6px; font-family: Manrope, sans-serif; }
.error-card p { margin: 0 0 20px; color: var(--muted); }

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main-side { grid-template-columns: minmax(0, 1.4fr) minmax(285px, .8fr); }
    .topbar-user > div:last-child { display: none; }
    .topbar-user { padding-left: 8px; }
}

@media (max-width: 1100px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-md); transition: transform .25s ease; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 45; visibility: hidden; opacity: 0; background: rgba(3, 15, 12, .58); transition: .25s ease; }
    .sidebar-open .sidebar-overlay { visibility: visible; opacity: 1; }
    .sidebar-close, .mobile-menu { display: inline-grid !important; }
    .main-panel { margin-left: 0; }
    .auth-body { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

@media (max-width: 850px) {
    .content { padding: 20px 18px 36px; }
    .topbar { padding: 11px 18px; }
    .period-chip { display: none; }
    .grid-3, .grid-main-side { grid-template-columns: 1fr; }
    .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .install-layout { grid-template-columns: 1fr; }
    .install-side { display: none; }
    .detail-hero { flex-direction: column; }
    .detail-score { width: 100%; }
}

@media (max-width: 650px) {
    .topbar-left h1 { font-size: 15px; }
    .breadcrumb { display: none; }
    .topbar-user { display: none; }
    .content { padding: 17px 12px 30px; }
    .topbar { min-height: 63px; padding: 9px 12px; }
    .page-head { align-items: stretch; flex-direction: column; }
    .page-head h2 { font-size: 20px; }
    .page-actions { justify-content: stretch; }
    .page-actions .btn { flex: 1; }
    .grid-2, .grid-4, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .filter-bar .form-select { width: 100%; }
    .filter-summary { margin-left: 0; }
    .radio-cards { grid-template-columns: 1fr; }
    .app-footer { padding: 15px 12px; flex-direction: column; gap: 3px; }
    .auth-panel { padding: 30px 20px; }
    .auth-brand { top: 22px; left: 20px; }
    .auth-box { margin-top: 65px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .visual-stats { grid-template-columns: 1fr; }
}

@media print {
    .sidebar, .topbar, .app-footer, .page-actions, .filter-bar, .no-print { display: none !important; }
    .main-panel { margin: 0; }
    .content { max-width: none; padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
}
