:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #162033;
    --muted: #6b7280;
    --primary: #123c69;
    --primary-2: #0f766e;
    --danger: #dc2626;
    --line: #e5e7eb;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; transition: grid-template-columns .22s ease; }
.sidebar { min-width: 0; background: #0f2742; color: #fff; padding: 24px 18px; transition: transform .22s ease, opacity .18s ease, padding .22s ease; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 8px;
    background: #0f766e; color: #fff; font-weight: 800;
}
.brand-logo { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #fff; }
.brand strong { display: block; }
.brand span { display: block; color: #b7c4d5; font-size: 13px; margin-top: 2px; }
.nav { display: grid; gap: 14px; margin-top: 28px; }
.nav-group { display: grid; gap: 5px; }
.nav-group summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; border-radius: 8px; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: '⌄'; color: #b7c4d5; font-size: 16px; line-height: 1; transition: transform .18s ease; }
.nav-group[open] summary::after { transform: rotate(180deg); }
.nav-group summary:hover { background: rgba(255,255,255,.08); }
.nav-group-links { display: grid; gap: 5px; }
.nav a { padding: 11px 12px; border-radius: 8px; color: #dbe7f4; }
.nav a:hover { background: rgba(255,255,255,.08); }
.main { padding: 24px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar p { margin: 4px 0 0; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }
.mobile-menu-button { display: inline-flex; gap: 7px; }
.sidebar-overlay { display: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stats-grid.compact .stat-card strong { font-size: 20px; }
.monthly-income-grid { margin-bottom: 0; }
.stat-card, .panel, .form-panel {
    background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 39, 66, .05);
}
.stat-card { padding: 18px; }
.stat-card span { color: var(--muted); font-size: 14px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 24px; }
.stat-card.danger strong { color: var(--danger); }
.panel, .form-panel { padding: 18px; }
.main > section:not(.stats-grid) + section { margin-top: 18px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.panel-header h2 { margin: 0; font-size: 18px; }
.table-wrap { overflow: auto; max-height: min(68vh, 720px); }
.table-wrap thead th { position: sticky; top: 0; z-index: 2; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--muted); font-weight: 700; background: #fafafa; }
.right { text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 700; }
.badge.muted { background: #f3f4f6; color: #4b5563; }
.badge.action-create { background: #dbeafe; color: #1d4ed8; }
.badge.action-update { background: #fef3c7; color: #b45309; }
.badge.action-delete, .badge.action-critical { background: #fee2e2; color: #b91c1c; }
.badge.action-info { background: #ccfbf1; color: #0f766e; }
.badge.status-pending { background: #fef3c7; color: #92400e; }
.badge.status-approved { background: #dbeafe; color: #1d4ed8; }
.badge.status-shipped { background: #ede9fe; color: #6d28d9; }
.badge.status-received { background: #dcfce7; color: #166534; }
.badge.status-rejected, .badge.status-cancelled { background: #fee2e2; color: #b91c1c; }
.payment-student { display: grid; gap: 6px; justify-items: start; }
.payment-input-role { padding: 3px 7px; font-size: 10px; line-height: 1.2; }
.payment-input-role.role-super-admin { background: #ede9fe; color: #6d28d9; }
.payment-input-role.role-admin { background: #dbeafe; color: #1d4ed8; }
.import-download-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.import-template-grid { align-items: end; }
.legacy-import-panel summary { cursor: pointer; list-style-position: inside; }
.import-status-valid { background: #dcfce7; color: #166534; }
.import-status-duplicate, .import-status-stale, .import-status-review { background: #fef3c7; color: #92400e; }
.import-status-error { background: #fee2e2; color: #b91c1c; }
.import-problem-panel { border-color: #fed7aa; }
.import-report-actions { margin: 0; flex-wrap: wrap; }
.import-problem-report { min-height: 260px; resize: vertical; background: #fffbeb; border-color: #fed7aa; color: #422006; font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.55; }
.success-badge { background: #dcfce7; color: #166534; }
.button {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
    background: #fff; color: var(--text); cursor: pointer; font-weight: 700;
}
.button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button:disabled { cursor: not-allowed; opacity: .65; }
.button.ghost { background: transparent; }
.danger-button { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.button.small { padding: 8px 10px; font-size: 13px; }
.icon-button { width: 36px; height: 36px; padding: 0; font-size: 19px; line-height: 1; flex: 0 0 36px; }
.wa-icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 4px; border: 0; border-radius: 50%; background: transparent; color: #22c55e; cursor: pointer; line-height: 1; transition: color .18s ease, background-color .18s ease, transform .18s ease; }
.wa-icon-button svg { display: block; width: 32px; height: 32px; overflow: visible; }
.wa-icon-button .wa-icon-bubble { fill: currentColor; }
.wa-icon-button .wa-icon-phone { fill: #fff; }
.wa-icon-button:hover { color: #16a34a; background: #ecfdf5; transform: scale(1.05); }
.wa-icon-button:focus-visible { outline: 3px solid rgba(34, 197, 94, .3); outline-offset: 2px; }
.filter-actions { display: flex; align-items: end; gap: 8px; }
.button.full { width: 100%; }
.copyable-ip { color: var(--primary); cursor: copy; }
.copyable-ip:hover { text-decoration: underline; }
.copy-toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 40px)); padding: 10px 14px; border-radius: 8px; background: #162033; color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .28s ease, transform .35s cubic-bezier(.22,.8,.3,1); }
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; }
.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.note-box { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); color: #475569; line-height: 1.5; }
.notif-header { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.notif-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.notif-filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.notif-filters::-webkit-scrollbar { display: none; }
.notif-filter { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-size: 14px; white-space: nowrap; }
.notif-filter:hover { border-color: #b6c3d4; }
.notif-filter.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.notif-filter-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #eef2f7; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.notif-filter-count.is-unread { background: #dbeafe; color: var(--primary); }
.notif-filter.is-active .notif-filter-count { background: rgba(255,255,255,.2); color: #fff; }
.notif-day { margin: 14px 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.notif-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.notification-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.notif-list .notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: #f8fafc; }
.notification-item.unread { background: #eff6ff; border-left-color: var(--primary); }
.notification-item.unread:hover { background: #e3eefc; }
.notif-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #eef2f7; color: var(--muted); font-size: 13px; font-weight: 800; }
.notif-payment .notif-icon { background: #dcfce7; color: #166534; }
.notif-void .notif-icon { background: #fee2e2; color: #b91c1c; }
.notif-summary .notif-icon { background: #e0e7ff; color: #3730a3; font-size: 16px; }
.notif-book .notif-icon { background: #fef3c7; color: #92400e; }
.notif-body { display: grid; gap: 3px; min-width: 0; }
.notif-body strong { font-size: 14px; line-height: 1.35; }
.notification-item:not(.unread) .notif-body strong { font-weight: 600; }
.notif-message { color: var(--muted); font-size: 13px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.notif-new { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.notif-time { color: var(--muted); font-size: 12px; white-space: nowrap; padding-top: 2px; font-variant-numeric: tabular-nums; }
.notif-panel .pager { margin-top: 14px; }
@media (max-width: 640px) {
    .notification-item { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 12px; }
    .notif-icon { width: 32px; height: 32px; font-size: 12px; }
    .notif-time { grid-column: 2; padding-top: 0; }
}
.void-modal { width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 14px; color: var(--text); box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
.void-modal::backdrop { background: rgba(15, 23, 42, .58); backdrop-filter: blur(2px); }
.proof-modal { width: min(760px, calc(100% - 28px)); max-height: min(88vh, 860px); padding: 0; border: 0; border-radius: 14px; color: var(--text); box-shadow: 0 24px 70px rgba(15,23,42,.28); }
.proof-modal::backdrop { background: rgba(15,23,42,.68); backdrop-filter: blur(2px); }
.proof-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.proof-modal-header h2 { margin: 0; font-size: 18px; }
.proof-modal-body { display: grid; place-items: center; padding: 16px; background: #f8fafc; max-height: min(68vh, 680px); overflow: auto; }
.proof-modal-body img { display: block; max-width: 100%; max-height: min(64vh, 640px); width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.proof-modal-actions { display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.proof-current { display: grid; gap: 9px; color: var(--muted); font-size: 14px; font-weight: 700; }
.proof-thumbnail-button { width: 150px; height: 104px; padding: 0; overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.proof-thumbnail-button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.void-modal form { display: grid; gap: 18px; padding: 22px; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-header h2 { margin: 3px 0 0; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.modal-close { border: 0; background: #f1f5f9; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 24px; line-height: 1; color: #475569; }
.void-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.void-summary div { display: grid; gap: 3px; min-width: 0; }
.void-summary span { color: var(--muted); font-size: 12px; }
.void-summary strong { overflow-wrap: anywhere; }
.void-warning { margin: 0; }
.void-modal textarea { resize: vertical; min-height: 84px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.logout-modal { width: min(480px, calc(100% - 28px)); }
.logout-agreement { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 1px solid #dbe4ef; border-radius: 10px; background: #f8fafc; font-weight: 600; cursor: pointer; }
.logout-agreement input { width: 17px; height: 17px; accent-color: var(--primary); }
.stat-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.trend-chart { display: grid; gap: 12px; }
.trend-item { display: grid; grid-template-columns: 82px minmax(120px, 1fr) 120px; align-items: center; gap: 12px; font-size: 13px; }
.trend-track { height: 18px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.trend-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.pagination { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.log-detail-content { display: grid; gap: 16px; padding: 22px; }
.log-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.log-compare h3 { margin: 0 0 8px; font-size: 14px; }
.log-compare pre { max-height: 360px; overflow: auto; margin: 0; padding: 12px; border-radius: 8px; background: #0f172a; color: #e2e8f0; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.error-row { background: #fef2f2; color: #b91c1c; }
.muted-text { color: var(--muted); margin: 4px 0 0; }
code { white-space: pre-wrap; font-size: 12px; color: #334155; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; }
.filter-actions { display: flex; align-items: stretch; align-self: end; gap: 12px; flex-wrap: nowrap; }
.filter-actions .button { min-height: 42px; margin: 0; white-space: nowrap; }
.filter-actions .button + .button { margin-left: 0; }
.schedule-filter { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; max-width: 680px; }
.schedule-date-field { flex: 0 1 190px; min-width: 145px; }
.schedule-branch-field { flex: 1 1 250px; min-width: 150px; }
.schedule-date-field, .schedule-branch-field, .schedule-submit { min-height: 42px; margin: 0; }
.schedule-submit { flex: 0 0 auto; width: max-content; }
label { display: grid; gap: 7px; color: #374151; font-size: 14px; font-weight: 700; }
.check-label { display: flex; flex-direction: row; align-items: center; gap: 10px; padding-top: 28px; }
.check-label input { width: auto; }
input, select, textarea {
    width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 11px 12px;
    font: inherit; background: #fff; color: var(--text);
}
.span-2 { grid-column: span 2; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.section-gap { margin-top: 18px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.logo-preview { margin-top: 16px; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.logo-preview img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0 0 6px; min-width: 420px; }
.inline-form input { min-width: 110px; }
.inline-details { position: relative; display: inline-block; }
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.details-menu { position: absolute; z-index: 12; min-width: 180px; right: 0; padding: 8px; background: #fff; border: 1px solid #dce3ee; border-radius: 8px; box-shadow: 0 8px 20px rgba(15, 38, 64, .15); }
.details-menu .button { display: block; margin: 3px 0; white-space: nowrap; }
.inline-fields { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(92px, 1fr) minmax(92px, 1fr); gap: 6px; }
.shortcut-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cash-chart { display: grid; gap: 14px; }
.chart-row { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: center; }
.chart-label strong { display: block; }
.chart-label span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.chart-bars { display: grid; gap: 7px; }
.bar { min-width: max-content; max-width: 100%; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: flex-end; padding: 0 12px; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bar.income { background: #0f766e; }
.bar.expense { background: #dc2626; }
.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden;
    background:
        linear-gradient(145deg, rgba(15, 39, 66, .86), rgba(18, 60, 105, .72)),
        url('/assets/login-bg.png') center/cover no-repeat;
}
.login-page::before {
    content: ""; position: absolute; inset: 0;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(2px);
}
.login-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 420px;
    background: rgba(255, 255, 255, .28);
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 8px; padding: 26px; display: grid; gap: 16px;
    box-shadow: 0 24px 70px rgba(15, 39, 66, .42);
    backdrop-filter: blur(22px) saturate(140%);
}
.login-card label,
.login-card .login-brand strong { color: #fff; text-shadow: 0 1px 12px rgba(15, 39, 66, .35); }
.login-card input {
    background: rgba(255, 255, 255, .76);
    border-color: rgba(255, 255, 255, .7);
}
.password-field { position: relative; display: block; margin-top: 6px; }
.password-field input { width: 100%; padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 7px; color: #475569; background: transparent; cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { color: #0f766e; background: rgba(15, 118, 110, .12); outline: none; }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.public-registration-link { display: block; margin-top: 2px; color: #fff; font-size: 14px; font-weight: 700; text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.public-registration-page {
    min-height: 100vh; padding: 28px clamp(18px, 3vw, 48px); position: relative; isolation: isolate;
    background:
        linear-gradient(145deg, rgba(15, 39, 66, .86), rgba(18, 60, 105, .72)),
        url('/assets/login-bg.png') center/cover fixed no-repeat;
}
.public-registration-page::before { content: ""; position: fixed; z-index: -1; inset: 0; background: rgba(255,255,255,.08); backdrop-filter: blur(3px); }
.public-registration-shell { position: relative; z-index: 1; width: min(1280px, 100%); margin: 0 auto; }
.public-registration-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.public-registration-header .login-brand strong { color: #fff; text-shadow: 0 1px 12px rgba(15,39,66,.42); }
.public-registration-header .login-brand span { color: rgba(255,255,255,.84); }
.public-registration-header .button { color: #fff; border-color: rgba(255,255,255,.62); background: rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.public-intro { max-width: 1080px; margin: 30px 0 24px; }
.public-intro h1 { text-wrap: balance; }
.public-intro h1, .public-success-card h1 { margin: 7px 0 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.08; }
.public-intro .eyebrow, .public-intro h1 { color: #fff; text-shadow: 0 2px 18px rgba(15,39,66,.38); }
.public-intro > p:last-child { color: rgba(255,255,255,.88); line-height: 1.65; }
.public-success-card > p { color: var(--muted); line-height: 1.65; }
.public-card, .public-success-card { padding: 22px; border: 1px solid rgba(255,255,255,.64); border-radius: 14px; background: rgba(255,255,255,.90); box-shadow: 0 18px 52px rgba(15,39,66,.20); backdrop-filter: blur(18px) saturate(125%); }
.public-card + .public-card { margin-top: 18px; }
.public-card h2 { margin: 0 0 14px; font-size: 19px; }
.public-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.public-program-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.public-program-card { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.public-program-card:has(input:checked) { border-color: var(--primary-2); background: #ecfdf5; transform: translateY(-1px); }
.public-program-card input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary-2); flex: 0 0 auto; }
.public-program-card span { display: grid; gap: 5px; }
.public-program-card small { color: var(--muted); font-weight: 500; }
.public-estimate { display: grid; gap: 5px; margin-top: 16px; padding: 15px; border-radius: 12px; background: #eff6ff; color: #1e3a5f; }
.public-estimate small { color: var(--muted); }
.public-book-catalog summary { cursor: pointer; color: var(--primary); font-weight: 800; }
.public-book-catalog .table-wrap { margin-top: 12px; max-height: 360px; }
.public-consent { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 14px; border-radius: 10px; background: #f8fafc; }
.public-consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--primary); }
.public-success-card { width: min(620px, 100%); margin: min(12vh, 100px) auto 0; text-align: center; }
.public-success-card > .brand-mark { margin: 0 auto 16px; font-size: 24px; }
.public-success-card .actions { justify-content: center; }
.public-reference { display: grid; gap: 6px; margin: 22px 0; padding: 18px; border: 1px dashed #93c5fd; border-radius: 12px; background: #eff6ff; }
.public-reference span { color: var(--muted); font-size: 13px; }
.public-reference strong { font-size: 24px; letter-spacing: .04em; }
.public-interest-fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.public-interest-fieldset legend { padding: 0 7px; color: #374151; font-size: 14px; font-weight: 700; }
.standalone-error-card { max-width: 520px; text-align: center; }
.standalone-error-card .login-brand { text-align: left; }
.standalone-error-code { width: fit-content; margin: 0 auto; padding: 6px 12px; border: 1px solid rgba(255,255,255,.48); border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.standalone-error-card h1 { margin: 0; color: #fff; font-size: clamp(25px, 5vw, 34px); line-height: 1.15; text-wrap: balance; text-shadow: 0 2px 18px rgba(15,39,66,.38); }
.standalone-error-card > p { margin: 0; color: rgba(255,255,255,.9); line-height: 1.6; }
.standalone-error-actions { display: grid; gap: 10px; }
.standalone-back-button { color: #fff; border-color: rgba(255,255,255,.56); background: rgba(255,255,255,.12); }
.login-brand { margin-bottom: 8px; }
.login-brand span { color: rgba(255, 255, 255, .82); }
.login-cooldown { min-height: 18px; color: rgba(255, 255, 255, .9); text-align: center; line-height: 1.4; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 8px; background: rgba(255,255,255,.76); }
.recovery-codes code { padding: 8px; border-radius: 5px; background: #f1f5f9; text-align: center; font-weight: 800; letter-spacing: .06em; }
.two-factor-qr { display: grid; place-items: center; width: fit-content; margin: 2px auto; padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 10px 24px rgba(15,39,66,.18); }
.two-factor-qr img, .two-factor-qr canvas { display: block; }

@media (min-width: 901px) {
    body.sidebar-collapsed .app-shell { grid-template-columns: 0 1fr; }
    body.sidebar-collapsed .sidebar {
        padding-left: 0; padding-right: 0; opacity: 0;
        overflow: hidden; pointer-events: none; transform: translateX(-100%);
    }
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 1001;
        width: min(86vw, 320px); height: 100dvh; padding: 20px 18px;
        overflow-y: auto; transform: translateX(-102%);
        transition: transform .22s ease; box-shadow: 18px 0 45px rgba(15, 39, 66, .28);
    }
    body.menu-open { overflow: hidden; }
    body.menu-open .sidebar { transform: translateX(0); }
    .sidebar-overlay {
        position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%;
        border: 0; padding: 0; background: rgba(15, 23, 42, .52); cursor: pointer;
    }
    body.menu-open .sidebar-overlay { display: block; }
    .mobile-menu-button { display: inline-flex; gap: 7px; }
    .nav { grid-template-columns: 1fr; margin-top: 22px; gap: 16px; }
    .nav-group { grid-template-columns: 1fr; }
    .main { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chart-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .topbar { align-items: flex-start; gap: 12px; }
    .topbar-actions { flex-direction: column; align-items: stretch; }
    .topbar-actions .button { width: 100%; }
    .stats-grid, .form-grid, .filter-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .inline-fields { grid-template-columns: 1fr; }
    .void-modal { width: calc(100% - 18px); max-height: calc(100dvh - 18px); }
    .void-modal form { padding: 17px; gap: 14px; }
    .void-summary { grid-template-columns: 1fr; max-height: 220px; overflow-y: auto; }
    .modal-actions { display: grid; grid-template-columns: 1fr; }
    .modal-actions .button { width: 100%; }
    .log-compare { grid-template-columns: 1fr; }
    .trend-item { grid-template-columns: 1fr; gap: 5px; }
    .schedule-filter { width: 100%; gap: 7px; }
    .schedule-date-field { min-width: 128px; }
    .schedule-branch-field { min-width: 0; }
    .schedule-submit { padding-inline: 10px; }
    .public-registration-page { padding: 18px 12px; }
    .public-registration-header { align-items: flex-start; }
    .public-registration-header .button { padding: 8px 10px; font-size: 12px; }
    .public-program-grid { grid-template-columns: 1fr; }
    .public-card { padding: 17px; }
}

/* ===== Penyesuaian proporsi & responsif (2026-10-09) ===== */
:root { --control-h: 44px; }
label { align-content: start; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select { min-height: var(--control-h); line-height: 1.25; }
input[type="file"] { min-height: var(--control-h); padding: 8px 10px; }
textarea { min-height: 88px; line-height: 1.45; resize: vertical; }
input[readonly] { background: #f8fafc; color: #334155; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
input:disabled, select:disabled { background: #f1f5f9; color: #64748b; }
.button { min-height: var(--control-h); gap: 6px; line-height: 1.2; text-align: center; }
.button.small { min-height: 36px; }
.icon-button { min-height: 36px; }
.badge { white-space: nowrap; align-items: center; }
.nowrap { white-space: nowrap; }
.field-hint { color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.45; }
.field-hint.warning { color: #b45309; font-weight: 700; }
label small, label .muted { font-weight: 500; line-height: 1.45; }
.text-link { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.check-label.span-2 { padding-top: 4px; }
.check-label.compact { padding-top: 0; gap: 8px; font-weight: 600; white-space: nowrap; }
.details-menu form { display: grid; gap: 6px; min-width: 220px; }
td { vertical-align: middle; }
.table-wrap td > input:not([type="checkbox"]), .table-wrap td > select { min-width: 130px; }
.table-wrap td > input[type="number"] { min-width: 110px; }
.row-actions { flex-wrap: nowrap; }
.filter-actions .button { min-height: var(--control-h); }
.reactivate-button { white-space: nowrap; }

/* Kotak akun di pojok kiri bawah sidebar */
.sidebar { display: flex; flex-direction: column; }
.nav { flex: 1 1 auto; align-content: start; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: rgba(255, 255, 255, .06); }
.sidebar-user-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-2); color: #fff; font-size: 14px; font-weight: 800; }
.sidebar-user-text { display: grid; gap: 2px; min-width: 0; }
.sidebar-user-text strong { overflow: hidden; color: #fff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-text small { color: #b7c4d5; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }

/* Filter kelas: kolom cari lebih lebar */
#class-filter { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
#class-filter > label:first-child { grid-column: span 2; }

/* Form aktifkan kembali */
.reactivate-list { display: grid; gap: 14px; }
.reactivate-card { display: grid; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdff; min-width: 0; }
.reactivate-card legend { padding: 0 6px; font-weight: 800; color: var(--primary); }
.reactivate-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.reactivate-meta div { display: grid; gap: 3px; min-width: 0; }
.reactivate-meta dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.reactivate-meta dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

@media (min-width: 901px) {
    .sidebar { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; }
}

@media (max-width: 900px) {
    .sidebar { box-shadow: none; }
    body.menu-open .sidebar { box-shadow: 18px 0 45px rgba(15, 39, 66, .28); }
    .table-wrap table { min-width: 720px; }
}

@media (max-width: 640px) {
    .topbar { align-items: center; margin-bottom: 16px; }
    .topbar h1 { font-size: 20px; line-height: 1.25; }
    .topbar-actions { flex-direction: row; align-items: center; gap: 8px; }
    .topbar-actions .button { width: auto; min-height: 38px; padding: 8px 10px; font-size: 13px; }
    .panel, .form-panel { padding: 14px; }
    .panel-header { flex-wrap: wrap; align-items: flex-start; }
    .actions { flex-wrap: wrap; }
    .actions .button { flex: 1 1 auto; white-space: nowrap; }
    .filter-actions .button { flex: 1 1 0; }
    .table-wrap table { min-width: 660px; }
    th, td { padding: 10px 8px; font-size: 13px; }
    #class-filter { grid-template-columns: 1fr 1fr; }
    #class-filter > label:first-child { grid-column: 1 / -1; }
    .reactivate-meta { grid-template-columns: 1fr; }
    .check-label.compact { white-space: normal; }
}

/* Sidebar: judul grup vs isi menu + penanda halaman aktif (2026-10-09) */
.nav-group summary { color: #8fa6c1; font-size: 11px; letter-spacing: .09em; padding: 8px 12px 6px; }
.nav-group summary::after { color: #8fa6c1; }
.nav-group.has-active > summary { color: #fff; }
.nav-group-links { margin: 2px 0 2px 14px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .14); gap: 2px; }
.nav-group-links a { padding: 9px 12px; font-size: 14px; }
.nav-group-single > a { font-weight: 700; color: #fff; }
.nav a { position: relative; display: flex; align-items: center; gap: 8px; transition: background-color .15s ease, color .15s ease; }
.nav a.is-active { background: rgba(45, 212, 191, .16); color: #fff; font-weight: 700; }
.nav a.is-active::before { content: ''; position: absolute; left: -11px; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: #2dd4bf; }
.nav-group-single > a.is-active::before { left: 0; }
.nav-group-single > a.is-active { padding-left: 15px; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }

/* Paginasi tabel (10 baris per halaman) */
tr[data-pager-hidden], tr[data-filter-out] { display: none; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.pager[hidden] { display: none; }
.pager-info { color: var(--muted); font-size: 13px; }
.pager-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.pager-btn { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; text-decoration: none; }
.pager-btn:hover:not([disabled]):not([aria-disabled]):not(.is-current) { border-color: #9fb3c8; background: #f1f5f9; }
.pager-btn.is-current { border-color: var(--primary); background: var(--primary); color: #fff; cursor: default; }
.pager-btn[disabled], .pager-btn[aria-disabled] { opacity: .45; cursor: not-allowed; }
.pager-gap { padding: 0 2px; color: var(--muted); }
@media (max-width: 600px) {
    .pager { justify-content: center; }
    .pager-info { width: 100%; text-align: center; }
    .pager-buttons { margin-left: 0; justify-content: center; }
}
@media print {
    tr[data-pager-hidden] { display: table-row; }
    .pager { display: none; }
}

/* Petunjuk upload foto bukti (2026-10-11) */
.upload-hint { display: block; margin-top: 6px; }
.upload-hint.is-error { color: var(--danger); font-weight: 700; }

/* Status peserta kelas (2026-10-14) */
.badge.enrollment-pending { background: #fef3c7; color: #92400e; }
.badge.enrollment-partial { background: #dbeafe; color: #1d4ed8; }
.badge.enrollment-paid { background: #dcfce7; color: #166534; }
.class-actions { display: grid; gap: 8px; min-width: 260px; }
.class-actions form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.class-actions select, .class-actions input { min-width: 0; flex: 1 1 140px; }
.status-note { display: block; margin-top: 4px; }
.class-action-buttons { flex-wrap: wrap; gap: 6px; }
.class-action-buttons .button { white-space: nowrap; }
.locked-modal label { display: grid; gap: 6px; font-weight: 700; }
.locked-modal .alert { margin: 0; }

/* Rekap siswa per cabang (2026-10-15) */
.badge.student-active { background: #dcfce7; color: #166534; }
.badge.student-stopped { background: #fee2e2; color: #991b1b; }
.badge.student-graduated { background: #dbeafe; color: #1d4ed8; }
.recap-panel { margin-bottom: 20px; }
.recap-panel .panel-header h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recap-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.recap-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.recap-table td { white-space: nowrap; }
.recap-table th { white-space: normal; vertical-align: bottom; }
.recap-table td.right, .recap-table th.right { min-width: 76px; font-variant-numeric: tabular-nums; }
.recap-wrap { max-height: none; }
.recap-table tfoot td { font-weight: 700; border-top: 2px solid var(--text); background: #f8fafc; }
.recap-total { font-weight: 700; }
.recap-num { color: var(--primary); font-weight: 700; text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.recap-num:hover, .recap-num:focus-visible { background: #e0f2fe; text-decoration: underline; }
.recap-zero { color: #9ca3af; }
.recap-table .recap-zero { padding: 2px 6px; }
.recap-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: #9ca3af; }
.recap-dot.dot-active { background: #16a34a; }
.recap-dot.dot-cuti { background: #d97706; }
.recap-dot.dot-berhenti { background: #dc2626; }
.recap-dot.dot-lulus { background: #2563eb; }
.recap-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; margin: 14px 0 0; font-size: 13px; }
.recap-legend dt { font-weight: 700; }
.recap-legend dd { margin: 2px 0 0; color: var(--muted); }
.recap-flag { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; white-space: nowrap; }
.recap-list td { vertical-align: top; }
.print-only { display: none; }
@media print {
    .sidebar, .sidebar-overlay, .topbar, .no-print, .flash, .alert { display: none !important; }
    .app-shell { display: block; }
    .main { padding: 0; }
    body { background: #fff; }
    .print-only { display: block; }
    .print-heading { margin-bottom: 12px; }
    .print-heading strong { display: block; font-size: 18px; }
    .print-heading span { color: #444; font-size: 12px; }
    .recap-panel { box-shadow: none; border: 0; padding: 0; }
    .recap-num { color: inherit; padding: 0; }
    .table-wrap { overflow: visible; }
}
@media (max-width: 640px) {
    .table-wrap table.recap-stack { min-width: 0; }
    .recap-stack thead { display: none; }
    .recap-stack, .recap-stack tbody, .recap-stack tfoot { display: block; width: 100%; }
    .recap-stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
    .recap-stack td { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border: 0; white-space: normal; min-width: 0; }
    .recap-stack td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 400; text-align: left; }
    .recap-stack td.recap-branch { grid-column: 1 / -1; font-weight: 700; font-size: 15px; }
    .recap-stack td.recap-branch::before { content: none; }
    .recap-stack tfoot tr { background: #f8fafc; border-top: 2px solid var(--text); border-bottom: 0; padding: 10px 8px; }
    .recap-stack tfoot td { border-top: 0; background: transparent; }
    .recap-table td.right, .recap-table th.right { min-width: 0; }
}

/* Laporan: 5 kotak ringkasan dalam satu baris (2026-10-21) */
.stats-grid.stats-five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stats-grid.stats-five .stat-card { padding: 14px 16px; min-width: 0; }
.stats-grid.stats-five .stat-card strong { font-size: 19px; overflow-wrap: anywhere; }
@media (max-width: 1199px) {
    .stats-grid.stats-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .stats-grid.stats-five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stats-grid.stats-five .stat-card:first-child { grid-column: 1 / -1; }
    .stats-grid.stats-five .stat-card strong { font-size: 17px; }
}

/* Aplikasi di HP (PWA) & notifikasi, 2026-10-28 */
.pwa-install-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 18px; min-height: 42px; padding: 10px 12px; border: 1px dashed rgba(255, 255, 255, .45); border-radius: 10px; background: rgba(15, 118, 110, .35); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pwa-install-button:hover, .pwa-install-button:focus-visible { background: rgba(15, 118, 110, .6); }
.pwa-install-button[hidden] { display: none; }
.push-panel .panel-header { flex-wrap: wrap; }
.push-status { margin: 12px 0; padding: 10px 12px; border-radius: 8px; background: #f1f5f9; color: var(--text); font-size: 14px; }
.push-status[data-tone="ok"] { background: #dcfce7; color: #166534; }
.push-status[data-tone="warn"] { background: #fef3c7; color: #92400e; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-actions .button[hidden] { display: none; }
@media (display-mode: standalone) {
    .pwa-install-button { display: none; }
}
@media (max-width: 900px) {
    /* Tanda bayangan di tepi tabel: menandakan tabel bisa digeser ke samping. */
    .table-wrap {
        background:
            linear-gradient(to right, var(--panel) 30%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
            linear-gradient(to left, var(--panel) 30%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
            radial-gradient(farthest-side at 0 50%, rgba(15, 39, 66, .2), transparent) left center / 12px 100% no-repeat scroll,
            radial-gradient(farthest-side at 100% 50%, rgba(15, 39, 66, .2), transparent) right center / 12px 100% no-repeat scroll;
    }
}
@media (max-width: 640px) {
    /* Kotak angka 2 kolom di HP agar halaman tidak terlalu panjang. */
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stats-grid .stat-card { padding: 14px; min-width: 0; }
    .stats-grid .stat-card strong { font-size: 18px; overflow-wrap: anywhere; }
    .stats-grid .stat-card span { font-size: 13px; }
}

/* ===== Panduan Staff (/guide) ===== */
.guide { max-width: 1180px; }
.guide .print-only { display: none; }
.guide-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.guide-toolbar strong { display: block; font-size: 16px; }
.guide-toolbar span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.guide-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.guide-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 10px 10px; }
.guide-toc summary { padding: 0 8px 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; }
.guide-toc summary::-webkit-details-marker { display: none; }
.guide-toc summary::after { content: ' ▾'; }
.guide-toc details[open] summary::after { content: ' ▴'; }
.guide-figure a { display: block; cursor: zoom-in; }
.guide-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.guide-toc li { counter-increment: toc; }
.guide-toc a { display: flex; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 14px; line-height: 1.35; color: var(--text); }
.guide-toc a::before { content: counter(toc) "."; min-width: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.guide-toc a:hover { background: #f1f5f9; }
.guide-toc a.is-current { background: #e8eff7; color: var(--primary); font-weight: 700; }
.guide-content { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 34px 34px; font-size: 15px; line-height: 1.65; }
.guide-chapter { padding-top: 26px; scroll-margin-top: 12px; }
.guide-chapter + .guide-chapter { border-top: 1px solid var(--line); margin-top: 26px; }
.guide-chapter h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 24px; line-height: 1.25; color: var(--primary); }
.guide-chapter h2 span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 17px; }
.guide-chapter h3 { margin: 28px 0 8px; font-size: 18px; line-height: 1.35; scroll-margin-top: 12px; }
.guide-content p { margin: 0 0 12px; }
.guide-content ul, .guide-content ol { margin: 0 0 14px; padding-left: 22px; }
.guide-content li { margin: 4px 0; }
.guide-steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.guide-steps > li { counter-increment: step; position: relative; padding-left: 38px; margin: 8px 0; }
.guide-steps > li::before { content: counter(step); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e8eff7; color: var(--primary); font-weight: 800; font-size: 13px; }
.guide-figure { margin: 16px 0 22px; }
.guide-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 39, 66, .08); background: #f5f7fb; }
.guide-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.guide-figure-narrow { max-width: 380px; margin-left: auto; margin-right: auto; }
.guide-figure-row { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 22px; }
.guide-figure-row .guide-figure { max-width: none; margin: 10px 0 18px; }
.guide-callout { margin: 14px 0 18px; padding: 12px 14px 12px 16px; border-radius: 8px; border-left: 4px solid; font-size: 14px; line-height: 1.6; }
.guide-callout ul { margin: 4px 0 0; }
.guide-callout.tip { background: #ecfdf5; border-color: #10b981; color: #064e3b; }
.guide-callout.warn { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.guide-callout.info { background: #eff6ff; border-color: #3b82f6; color: #1e3a8a; }
.guide-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; line-height: 1.5; }
.guide-table th, .guide-table td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.guide-table th { background: #f8fafc; font-weight: 700; }
.guide-table td:first-child { white-space: nowrap; font-weight: 600; }
.guide-terms { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; }
.guide-terms dt { font-weight: 700; }
.guide-terms dd { margin: 0; }
.guide-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 0 16px; }
.guide-flow > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.guide-flow strong { display: block; margin-bottom: 6px; color: var(--primary); }
.guide-flow span { display: block; font-size: 14px; }
.guide-faq dt { margin-top: 14px; font-weight: 700; }
.guide-faq dd { margin: 4px 0 0; }
@media (max-width: 1100px) {
    .guide-layout { grid-template-columns: 1fr; }
    .guide-toc { position: static; max-height: none; }
    .guide-toc summary { padding-bottom: 0; }
    .guide-toc details[open] summary { padding-bottom: 8px; }
}
@media (max-width: 640px) {
    .guide-content { padding: 4px 16px 22px; font-size: 15px; }
    .guide-chapter h2 { font-size: 20px; }
    .guide-chapter h2 span { min-width: 30px; height: 30px; font-size: 15px; }
    .guide-figure-row { grid-template-columns: 1fr; }
    .guide-terms { grid-template-columns: 1fr; gap: 2px; }
    .guide-terms dd { margin-bottom: 8px; }
    .guide-flow { grid-template-columns: 1fr; }
    .guide-table { display: block; overflow-x: auto; }
    .guide-table td:first-child { white-space: normal; }
}
@media print {
    @page { size: A4; margin: 16mm 14mm 16mm; }
    body { background: #fff; }
    .app-shell { display: block; }
    .sidebar, .sidebar-overlay, .topbar, .alert, .guide .no-print, .pager, .pwa-install-button { display: none !important; }
    .main { padding: 0 !important; }
    .guide { max-width: none; }
    .guide .print-only { display: block; }
    .guide-cover { height: 250mm; display: flex; align-items: center; justify-content: center; text-align: center; break-after: page; }
    .guide-cover-eyebrow { font-size: 13pt; letter-spacing: .12em; text-transform: uppercase; color: #475569; margin: 0 0 10px; }
    .guide-cover h1 { font-size: 30pt; color: #123c69; margin: 0 0 12px; }
    .guide-cover-sub { font-size: 14pt; margin: 0 0 40px; }
    .guide-cover-date { font-size: 11pt; color: #475569; }
    .guide-layout { display: block; }
    .guide-toc { position: static; border: 0; padding: 0; max-height: none; overflow: visible; break-after: page; }
    .guide-toc summary::after { content: none; }
    .guide-toc summary { font-size: 16pt; color: #123c69; text-transform: none; letter-spacing: 0; padding: 0 0 10px; }
    .guide-toc a { font-size: 12pt; padding: 5px 0; }
    .guide-toc a.is-current { background: none; color: inherit; font-weight: 400; }
    .guide-content { border: 0; padding: 0; font-size: 10.5pt; line-height: 1.5; }
    .guide-chapter { break-before: page; padding-top: 0; border-top: 0 !important; margin-top: 0 !important; }
    .guide-chapter h2 { font-size: 18pt; }
    .guide-chapter h3 { font-size: 12.5pt; break-after: avoid; }
    .guide-figure, .guide-callout, .guide-table tr, .guide-flow > div, .guide-faq dt, .guide-faq dd { break-inside: avoid; }
    .guide-figure img { box-shadow: none; max-height: 120mm; width: auto; max-width: 100%; margin: 0 auto; }
    .guide-figure-row { grid-template-columns: repeat(2, 1fr); }
    .guide-figure-row .guide-figure img { max-height: 95mm; }
    .guide-figure-narrow img { max-height: 85mm; }
}
