:root {
    --bg: #f5efe5;
    --panel: rgba(255, 252, 247, 0.9);
    --ink: #16313a;
    --muted: #5f6e73;
    --line: rgba(22, 49, 58, 0.12);
    --blue: #1d5c7a;
    --green: #507c57;
    --gold: #b87c23;
    --rose: #9d4d45;
    --navy: #2f3b76;
    --navy-dark: #233160;
    --shadow: 0 20px 50px rgba(22, 49, 58, 0.08);
    --topbar-bg: linear-gradient(180deg, var(--navy) 0%, #39427e 100%);
    --topbar-shadow: 0 16px 40px rgba(25, 39, 77, 0.22);
    --body-bg: radial-gradient(circle at top left, rgba(29, 92, 122, 0.16), transparent 28%), radial-gradient(circle at bottom right, rgba(184, 124, 35, 0.16), transparent 24%), linear-gradient(180deg, #f8f2e8 0%, #f2ebdf 100%);
    --topbar-link-bg: rgba(255, 255, 255, 0.06);
    --topbar-link-border: rgba(255, 255, 255, 0.1);
    --topbar-session-bg: rgba(16, 28, 63, 0.72);
    --topbar-session-border: rgba(255, 255, 255, 0.12);
    --input-bg: #fffdf8;
    --placeholder-bg: rgba(22,49,58,0.08);
}
[data-theme="dark"] {
    --bg: #11161e;
    --panel: rgba(22, 29, 40, 0.92);
    --ink: #edf2f7;
    --muted: #a8b5c7;
    --line: rgba(237, 242, 247, 0.12);
    --blue: #5fa8d3;
    --green: #79b88c;
    --gold: #d8aa57;
    --rose: #d28b83;
    --navy: #151c2d;
    --navy-dark: #0d1321;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
    --topbar-bg: linear-gradient(180deg, #12192a 0%, #1a2440 100%);
    --topbar-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    --body-bg: radial-gradient(circle at top left, rgba(95, 168, 211, 0.12), transparent 26%), radial-gradient(circle at bottom right, rgba(216, 170, 87, 0.12), transparent 22%), linear-gradient(180deg, #10151d 0%, #161d28 100%);
    --topbar-link-bg: rgba(255, 255, 255, 0.08);
    --topbar-link-border: rgba(255, 255, 255, 0.12);
    --topbar-session-bg: rgba(255, 255, 255, 0.08);
    --topbar-session-border: rgba(255, 255, 255, 0.16);
    --input-bg: #171f2b;
    --placeholder-bg: rgba(255,255,255,0.06);
}
* { box-sizing: border-box; }
body {
    margin: 0; font-family: Georgia, 'Times New Roman', serif; color: var(--ink);
    background: var(--body-bg);
}
code { font-family: Consolas, monospace; }
.app-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar {
    display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 28px;
    padding: 18px 34px; color: #f8f2e8; background: var(--topbar-bg);
    box-shadow: var(--topbar-shadow);
}
.topbar-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-logo { width: 90px; height: 90px; object-fit: contain; flex: 0 0 auto; }
.topbar h1 { margin: 2px 0 0; font-size: 2.35rem; line-height: 0.95; text-transform: uppercase; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem; opacity: 0.72; }
.topbar-eyebrow { color: rgba(248, 242, 232, 0.82); }
.muted { color: var(--muted); }
.topbar-toggle {
    display: none; width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.08); padding: 0; gap: 5px;
}
.topbar-toggle span { width: 20px; height: 2px; background: #fff; display: block; border-radius: 999px; }
.topbar-menu { display: contents; }
.topbar-nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.topbar-nav a, .button-link, .pagination a, .table-link, .inline-link, .topbar-login { text-decoration: none; }
.topbar-nav a {
    color: #f8f2e8; padding: 10px 16px; border-radius: 999px;
    background: var(--topbar-link-bg); border: 1px solid var(--topbar-link-border);
    display: inline-flex; align-items: center; gap: 10px; font-weight: bold;
}
.topbar-nav a svg { width: 18px; height: 18px; fill: currentColor; }
.topbar-session { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.logout-form { margin: 0; }
.topbar-login {
    color: #f8f2e8; padding: 12px 18px; border-radius: 14px; background: var(--topbar-session-bg);
    border: 1px solid var(--topbar-session-border); font-weight: bold;
}
.content { padding: 34px; max-width: 1680px; width: 100%; margin: 0 auto; }
.app-footer {
    display: flex;
    justify-content: center;
    padding: 0 16px 24px;
}
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.theme-toggle-track {
    position: relative;
    width: 64px;
    height: 34px;
    border-radius: 999px;
    background: rgba(22, 49, 58, 0.12);
}
.theme-toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(22, 49, 58, 0.18);
    transition: transform 0.28s ease;
}
.theme-toggle.is-dark .theme-toggle-thumb { transform: translateX(30px); }
.theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.theme-toggle-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.theme-toggle-sun { color: var(--gold); }
.theme-toggle-moon { color: var(--blue); }
.hero, .panel, .metric-card, .auth-card { backdrop-filter: blur(10px); background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.65); box-shadow: var(--shadow); }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-radius: 28px; padding: 26px 30px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.compact-hero { padding: 22px 26px; }
.hero h2, .panel h3, .auth-card h2 { margin: 6px 0; }
.button-link, button { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 999px; padding: 12px 18px; background: var(--ink); color: #fff; font-weight: bold; cursor: pointer; }
.button-link.secondary { background: rgba(22, 49, 58, 0.08); color: var(--ink); }
.danger-button { background: var(--rose); }
.cards-grid, .panel-grid, .detail-grid, .form-grid, .contacts-grid, .charts-grid { display: grid; gap: 18px; margin-bottom: 22px; }
.cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel-grid, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-detail-grid { grid-template-columns: 320px 1fr; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contacts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card, .panel, .auth-card { border-radius: 24px; padding: 22px; }
.wide-panel { min-width: 0; }
.metric-card span { display: block; color: var(--muted); margin-bottom: 14px; }
.metric-card strong { font-size: 2.3rem; line-height: 1; }
.accent-blue { border-top: 4px solid var(--blue); }
.accent-green { border-top: 4px solid var(--green); }
.accent-gold { border-top: 4px solid var(--gold); }
.accent-rose { border-top: 4px solid var(--rose); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.subline { display: block; margin-top: 6px; color: var(--muted); font-size: 0.92rem; }
.subline-plain { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.list-actions-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.list-actions-row select { width: auto; min-width: 180px; }
.directory-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; width: 100%; align-items: center; }
.directory-hero-copy { display: grid; gap: 14px; min-width: 0; }
.directory-page { display: grid; gap: 18px; align-items: start; }
.directory-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.directory-top-row { display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.search-panel { padding: 18px 22px; }
.switches-panel { display: flex; align-items: center; }
.search-form { display: grid; gap: 10px; }
.search-panel-label { color: var(--muted); font-size: 0.92rem; font-weight: bold; }
.search-panel-meta { margin: 0; color: var(--muted); font-weight: bold; }
.list-inline-actions { margin-top: -4px; margin-bottom: 4px; }
.directory-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-switches { align-items: stretch; justify-content: flex-start; width: 100%; }
.switch-button {
    position: relative; display: inline-flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 50px;
    width: min(100%, 240px); padding: 8px 14px; border-radius: 18px; background: rgba(255, 252, 247, 0.96); color: var(--ink);
    border: 1px solid rgba(22, 49, 58, 0.12); box-shadow: var(--shadow); font-weight: bold;
}
.switch-track {
    position: relative; width: 60px; height: 32px; border-radius: 999px; background: rgba(22, 49, 58, 0.12);
    transition: background 0.25s ease; flex: 0 0 auto;
}
.switch-thumb {
    position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
    background: #fff; box-shadow: 0 8px 18px rgba(22, 49, 58, 0.18); transition: transform 0.28s ease;
}
.switch-button.is-on .switch-track { background: rgba(29, 92, 122, 0.26); }
.switch-button.is-on .switch-thumb { transform: translateX(28px); }
.switch-copy { display: grid; gap: 2px; text-align: left; }
.switch-label-on, .switch-label-off { font-size: 0.9rem; line-height: 1.1; text-align: left; text-decoration: none; }
.switch-button.is-on .switch-label-off, .switch-button:not(.is-on) .switch-label-on { color: var(--muted); font-size: 0.82rem; }
.switch-button.is-on .switch-label-on, .switch-button:not(.is-on) .switch-label-off { color: var(--ink); }
.switch-button:link, .switch-button:visited, .switch-button:hover, .switch-button:active { text-decoration: none; }
.filter-sidebar {
    position: static; max-height: none; overflow: auto; min-width: 0;
    transition: max-height 0.28s ease, opacity 0.2s ease, padding 0.2s ease, transform 0.24s ease;
}
.filter-sidebar.collapsed { max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; opacity: 0; border-width: 0; transform: translateY(-10px); }
.filter-section { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.filter-summary-value { color: var(--muted); font-size: 0.88rem; font-weight: normal; text-align: right; }
.filter-section-body { display: grid; gap: 10px; padding-bottom: 14px; }
.hover-filter-menu {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    min-height: 420px;
    background: var(--panel);
}
.hover-filter-nav {
    display: grid;
    align-content: start;
    background: rgba(22, 29, 40, 0.9);
    padding: 12px 0;
}
.hover-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #f5f0e7;
    font-weight: bold;
    text-align: left;
}
.hover-filter-trigger::after {
    content: '›';
    font-size: 1.25rem;
    opacity: 0.6;
}
.hover-filter-trigger .filter-summary-value {
    color: rgba(245, 240, 231, 0.72);
    margin-left: auto;
}
.hover-filter-trigger.active,
.hover-filter-trigger:hover,
.hover-filter-trigger:focus-visible {
    background: rgba(66, 129, 235, 0.9);
    outline: none;
}
.hover-filter-panels {
    position: relative;
    min-height: 100%;
    background: rgba(255, 255, 255, 0.72);
    padding: 26px 28px;
}
[data-theme="dark"] .hover-filter-panels {
    background: rgba(17, 23, 34, 0.82);
}
.hover-filter-panel {
    display: none;
    gap: 18px;
    align-content: start;
}
.hover-filter-panel.active { display: grid; }
.hover-filter-panel-head {
    display: grid;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.hover-filter-panel-head h4 {
    margin: 0;
    font-size: 1.85rem;
    font-weight: normal;
}
.hover-filter-panel-head p {
    margin: 0;
    color: var(--muted);
}
.hover-filter-panel .filter-section-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    padding-bottom: 0;
}
.hover-filter-panel .filter-section-body.single-column { grid-template-columns: 1fr; }
.filter-option { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); cursor: pointer; }
.filter-option input { width: auto; margin-top: 3px; }
.filter-link-option {
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(22, 49, 58, 0.06);
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: bold;
}
.filter-link-option:hover,
.filter-link-option.selected {
    background: rgba(29, 92, 122, 0.12);
    border-color: rgba(29, 92, 122, 0.18);
}
.stacked-tabs { display: grid; }
.sidebar-actions { padding-top: 4px; }
.directory-results, .dashboard-results { display: grid; gap: 18px; min-width: 0; }
.results-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-weight: bold; }
.student-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.student-card { display: grid; gap: 16px; padding: 18px; border-radius: 24px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: var(--shadow); }
.student-card, .contact-card, .json-box { color: var(--ink); }
.student-card-photo-wrap { display: flex; justify-content: center; align-items: center; min-height: 210px; border-radius: 20px; background: linear-gradient(180deg, rgba(29, 92, 122, 0.12), rgba(255, 255, 255, 0.6)); overflow: hidden; }
.student-card-photo-button { width: 100%; }
.student-list-photo-link { display: flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.student-card-photo { width: 100%; height: 210px; object-fit: cover; display: block; }
.student-card-photo-placeholder { color: var(--muted); font-weight: bold; min-height: 210px; width: 100%; }
.student-card-body { display: grid; gap: 10px; }
.student-card-name { color: var(--ink); font-size: 1.1rem; font-weight: bold; text-decoration: none; }
.student-card-meta { margin: 0; color: var(--muted); font-size: 0.95rem; }
.student-card-data { display: grid; gap: 10px; margin: 0; }
.student-card-data div { display: grid; gap: 2px; }
.student-card-data dt { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.student-card-data dd { margin: 0; font-weight: bold; }
.student-card-contact-row { display: flex; gap: 12px; align-items: center; }
.contact-icon-link { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; text-decoration: none; }
.contact-icon-link svg { width: 22px; height: 22px; fill: currentColor; }
.whatsapp-link { background: rgba(80, 124, 87, 0.14); color: #1d7f47; }
.email-link { background: rgba(29, 92, 122, 0.14); color: var(--blue); }
.document-link { background: rgba(184, 124, 35, 0.16); color: var(--gold); }
.student-document-link {
    width: auto;
    height: auto;
    border-radius: 16px;
    gap: 10px;
    padding: 12px 16px;
    align-self: flex-start;
}
.student-document-link span { font-weight: bold; }
.student-card-contact-text { display: grid; gap: 4px; color: var(--muted); font-size: 0.92rem; }
.empty-state-card { min-height: 180px; display: grid; place-items: center; text-align: center; }
input, select, textarea {
    width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
    background: var(--input-bg); color: var(--ink);
}
.field-block.full { grid-column: 1 / -1; }
.field-block label { display: block; margin-bottom: 8px; font-size: 0.92rem; color: var(--muted); }
.detail-list { display: grid; gap: 14px; }
.detail-list div { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; }
.detail-list dd { margin: 0; }
.pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; align-items: center; }
.pagination a, .table-link { color: var(--blue); font-weight: bold; }
.pagination-bar {
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(22, 29, 40, 0.94);
    color: #dbe5f5;
}
.pagination-per-page,
.pagination-pages {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pagination-label {
    font-size: 0.9rem;
    color: rgba(219, 229, 245, 0.78);
    margin-right: 4px;
}
.pagination-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    color: #86afff;
    background: transparent;
    text-decoration: none;
}
.pagination-bar a:hover,
.pagination-bar a.active {
    background: rgba(134, 175, 255, 0.14);
    color: #ffffff;
}
.pagination-next { margin-left: 8px; }
.json-box { padding: 16px; border-radius: 18px; background: var(--input-bg); border: 1px solid var(--line); overflow-x: auto; font-family: Consolas, monospace; font-size: 0.92rem; }
.mode-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.mode-tab { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; background: rgba(22, 49, 58, 0.08); color: var(--ink); font-weight: bold; }
.mode-tab.active { background: var(--ink); color: #fff; }
.filter-counter { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 999px; background: rgba(22, 49, 58, 0.08); color: var(--ink); font-weight: bold; font-size: 0.9rem; }
.messages { display: grid; gap: 10px; margin-bottom: 18px; }
.message { padding: 14px 16px; border-radius: 16px; font-weight: bold; }
.message.success { background: rgba(80, 124, 87, 0.14); color: var(--green); }
.message.error { background: rgba(157, 77, 69, 0.14); color: var(--rose); }
.message.info { background: rgba(29, 92, 122, 0.14); color: var(--blue); }
.auth-card { max-width: 520px; margin: 8vh auto 0; }
.stack-form { display: grid; gap: 18px; }
.chart-panel canvas { width: 100%; background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(245,239,229,0.6)); border-radius: 18px; }
.contact-card { padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.student-photo { width: 100%; max-width: 260px; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow); }
.student-photo-button { padding: 0; border: none; background: transparent; align-self: flex-start; cursor: zoom-in; }
.photo-zoom-trigger { padding: 0; border: none; background: transparent; cursor: zoom-in; }
.list-photo { width: 52px; height: 52px; object-fit: cover; border-radius: 14px; box-shadow: 0 8px 20px rgba(22,49,58,0.14); }
.lightbox-open { overflow: hidden; }
.photo-lightbox { display: none; position: fixed; inset: 0; z-index: 9999; }
.photo-lightbox.active { display: block; }
.photo-lightbox-backdrop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 18, 22, 0.88); cursor: zoom-out; }
.photo-lightbox-image { display: block; max-width: min(92vw, 1400px); max-height: 92vh; width: auto; height: auto; border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38); background: #fffdf8; object-fit: contain; }
.photo-panel { display: grid; gap: 18px; align-content: start; }
.photo-placeholder { display: grid; place-items: center; min-height: 260px; border-radius: 22px; background: var(--placeholder-bg); color: var(--muted); text-align: center; padding: 18px; }
ul.errorlist { margin: 6px 0 0; padding-left: 18px; color: var(--rose); }

@media (max-width: 1200px) {
    .cards-grid, .panel-grid, .detail-grid, .photo-detail-grid, .form-grid, .contacts-grid, .directory-controls { grid-template-columns: 1fr; }
    .directory-page, .directory-controls, .directory-top-row { gap: 18px; }
    .directory-top-row { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; max-height: none; }
    .hover-filter-menu { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .topbar {
        grid-template-columns: 1fr auto; align-items: start; gap: 16px; padding: 18px 16px;
    }
    .topbar-brand { min-width: 0; }
    .topbar-logo { width: 64px; height: 64px; }
    .topbar h1 { font-size: 1.7rem; }
    .topbar-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .topbar-menu {
        display: none; grid-column: 1 / -1; width: 100%; gap: 16px; padding-top: 6px;
    }
    .topbar-menu.open { display: grid; }
    .topbar-nav { width: 100%; display: grid; grid-template-columns: 1fr; justify-content: stretch; }
    .topbar-nav a { width: 100%; justify-content: flex-start; }
    .topbar-session { width: 100%; display: grid; justify-content: stretch; gap: 10px; }
    .topbar-login { width: 100%; justify-content: center; }
    .content { padding: 18px 14px; }
    .hero { flex-direction: column; align-items: flex-start; }
    .directory-hero-grid { grid-template-columns: 1fr; }
    .hero-switches { justify-content: flex-start; width: 100%; }
    .results-head { flex-direction: column; align-items: flex-start; }
    .hover-filter-menu { grid-template-columns: 1fr; min-height: 0; }
    .hover-filter-nav { padding: 8px 0; }
    .hover-filter-panels { padding: 20px 18px; }
    .pagination-bar { align-items: flex-start; }
}
@media (max-width: 640px) {
    .content { padding: 14px; }
    .panel, .metric-card, .auth-card { padding: 16px; }
    .hero, .compact-hero { padding: 18px; border-radius: 22px; }
    .student-card-grid { grid-template-columns: 1fr; }
    .student-card { padding: 14px; border-radius: 20px; }
    .student-card-photo-wrap { min-height: 180px; }
    .student-card-photo { height: 180px; }
    .student-card-name { font-size: 1rem; }
    .student-card-contact-text { font-size: 0.86rem; word-break: break-word; }
    .filter-sidebar { padding: 14px; }
    .directory-toolbar { align-items: stretch; }
    .hero-switches { flex-direction: column; }
    .switch-button { width: 100%; justify-content: flex-start; }
    input, select, textarea { padding: 11px 12px; }
    .filter-summary-value { max-width: 45%; font-size: 0.8rem; }
    .hover-filter-trigger {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    .hover-filter-panel-head h4 { font-size: 1.35rem; }
    .hover-filter-panel .filter-section-body { grid-template-columns: 1fr; }
    .pagination-per-page,
    .pagination-pages { width: 100%; }
    .photo-lightbox-backdrop { padding: 12px; }
    .photo-lightbox-image { max-width: 96vw; max-height: 90vh; border-radius: 18px; }
}

.app-dashboard-active-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.app-dashboard-filter-chip {
    display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
    border: 1px solid rgba(74, 127, 184, 0.24); background: rgba(74, 127, 184, 0.12);
    padding: 10px 14px; font-size: 0.88rem; font-weight: bold; color: var(--ink);
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.app-dashboard-filter-chip:hover { transform: translateY(-1px); background: rgba(74, 127, 184, 0.18); border-color: rgba(74, 127, 184, 0.34); }
.app-dashboard-filter-chip--quiet { border-color: rgba(148, 163, 184, 0.24); background: rgba(255, 255, 255, 0.56); color: var(--muted); }
.app-dashboard-action {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-radius: 20px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.62); padding: 16px 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.app-dashboard-action:hover {
    transform: translateY(-2px); border-color: rgba(74, 127, 184, 0.26);
    background: rgba(255, 255, 255, 0.88); box-shadow: 0 18px 34px rgba(22, 49, 58, 0.1);
}
.app-dashboard-action__label { display: block; font-size: 0.95rem; font-weight: bold; color: var(--ink); }
.app-dashboard-action__description { margin: 4px 0 0; font-size: 0.84rem; line-height: 1.45; color: var(--muted); }
.app-dashboard-action__value { font-size: 1.9rem; line-height: 1; color: var(--ink); }
.app-dashboard-kpi { min-height: 100%; }
.app-echart { min-height: 288px; width: 100%; }
.app-dashboard-table-button {
    display: inline-flex; align-items: center; border-radius: 999px; background: rgba(74, 127, 184, 0.1);
    padding: 8px 14px; font-size: 0.88rem; font-weight: bold; color: #2f3b76;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.app-dashboard-table-button:hover { transform: translateY(-1px); background: rgba(74, 127, 184, 0.18); }
.app-dashboard-table-button.is-active { background: rgba(184, 135, 48, 0.18); color: #8a5d1d; }
.is-dashboard-loading { opacity: 0.9; }
.is-dashboard-loading .app-panel, .is-dashboard-loading .app-panel-soft, .is-dashboard-loading .app-panel-strong, .is-dashboard-loading .app-kpi-card { opacity: 0.72; }
[data-theme="dark"] .app-dashboard-filter-chip { border-color: rgba(125, 211, 252, 0.2); background: rgba(56, 189, 248, 0.12); color: #e2e8f0; }
[data-theme="dark"] .app-dashboard-filter-chip--quiet { border-color: rgba(71, 85, 105, 0.82); background: rgba(15, 23, 42, 0.58); color: #cbd5e1; }
[data-theme="dark"] .app-dashboard-action { border-color: rgba(51, 65, 85, 0.9); background: rgba(15, 23, 42, 0.74); }
[data-theme="dark"] .app-dashboard-action:hover { border-color: rgba(74, 127, 184, 0.34); background: rgba(15, 23, 42, 0.92); box-shadow: 0 20px 40px rgba(2, 6, 23, 0.36); }
[data-theme="dark"] .app-dashboard-action__label, [data-theme="dark"] .app-dashboard-action__value { color: #f8fafc; }
[data-theme="dark"] .app-dashboard-action__description { color: #94a3b8; }
[data-theme="dark"] .app-dashboard-table-button { background: rgba(56, 189, 248, 0.12); color: #bae6fd; }
[data-theme="dark"] .app-dashboard-table-button.is-active { background: rgba(184, 135, 48, 0.2); color: #fcd34d; }
@media (max-width: 640px) {
    .app-dashboard-action { gap: 12px; padding: 14px 15px; }
    .app-dashboard-action__value { font-size: 1.5rem; }
    .app-echart { min-height: 240px; }
}
