:root {
    --bg-0: #020617;
    --bg-1: #071426;
    --bg-2: #0b1b33;
    --surface: rgba(15, 23, 42, .72);
    --surface-strong: rgba(15, 23, 42, .92);
    --surface-soft: rgba(255, 255, 255, .07);
    --surface-hover: rgba(255, 255, 255, .12);
    --line: rgba(148, 163, 184, .20);
    --line-strong: rgba(148, 163, 184, .34);
    --text: #f8fafc;
    --text-soft: #dbeafe;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --cyan: #38bdf8;
    --cyan-2: #22d3ee;
    --blue: #2563eb;
    --green: #22c55e;
    --emerald: #10b981;
    --amber: #f59e0b;
    --red: #ef4444;
    --violet: #8b5cf6;
    --pink: #ec4899;
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --shadow-lg: 0 26px 80px rgba(0, 0, 0, .42);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, .30);
    --glow-cyan: 0 0 36px rgba(56, 189, 248, .22);
    --nav-height: 86px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 2%, rgba(56,189,248,.26), transparent 28rem),
        radial-gradient(circle at 90% 16%, rgba(139,92,246,.20), transparent 25rem),
        radial-gradient(circle at 80% 98%, rgba(16,185,129,.20), transparent 26rem),
        linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 46%, #04111f 100%);
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
    opacity: .42;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(2,6,23,.24) 54%, rgba(2,6,23,.72) 100%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: calc(var(--nav-height) + 24px);
}
.content { padding: 12px 16px 20px; }

.decor-blob {
    position: fixed;
    z-index: 0;
    border-radius: 999px;
    filter: blur(24px);
    opacity: .55;
    pointer-events: none;
}
.blob-one { width: 180px; height: 180px; left: calc(50% - 330px); top: 70px; background: rgba(56,189,248,.18); }
.blob-two { width: 220px; height: 220px; right: calc(50% - 340px); bottom: 90px; background: rgba(16,185,129,.14); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 16px 12px;
    background: linear-gradient(180deg, rgba(2,6,23,.94), rgba(2,6,23,.58) 82%, transparent);
    backdrop-filter: blur(18px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-mark {
    width: 46px;
    height: 46px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #03101f;
    font-weight: 950;
    letter-spacing: -.04em;
    background: linear-gradient(145deg, #67e8f9, #38bdf8 48%, #22c55e);
    box-shadow: 0 18px 45px rgba(34, 211, 238, .22), inset 0 1px 0 rgba(255,255,255,.6);
}
.topbar h1 { margin: 0; font-size: clamp(22px, 5vw, 30px); line-height: 1.08; letter-spacing: -.04em; }
.eyebrow {
    margin: 0 0 6px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: .17em;
    font-size: 11px;
    font-weight: 900;
}
.page-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); margin: 6px 0; }
.text-soft { color: var(--text-soft); }

.icon-btn {
    border: 0;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    background: rgba(255,255,255,.08);
    color: #f8fafc;
    cursor: pointer;
    border: 1px solid var(--line);
    box-shadow: 0 14px 32px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.08);
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.icon-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.12); border-color: var(--line-strong); }

.panel,
.hero-card,
.history-card,
.stat-card,
.brand-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,.115), rgba(255,255,255,.055)),
        rgba(15, 23, 42, .68);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(22px);
}
.panel::before,
.hero-card::before,
.history-card::before,
.stat-card::before,
.brand-panel::before {
    content: "";
    position: absolute;
    left: -45%;
    top: -65%;
    width: 120%;
    height: 80%;
    transform: rotate(14deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
    pointer-events: none;
}
.panel > *, .hero-card > *, .history-card > *, .stat-card > *, .brand-panel > * { position: relative; z-index: 1; }
.panel h2, .panel h3 { margin-top: 0; letter-spacing: -.035em; }
.panel h2 { font-size: 26px; margin-bottom: 10px; }
.panel h3 { font-size: 22px; margin-bottom: 6px; }

.login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 16px 24px;
}
.brand-card { text-align: center; margin-bottom: 20px; }
.logo-circle {
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
    border-radius: 32px;
    display: grid;
    place-items: center;
    color: #020617;
    font-weight: 950;
    font-size: 30px;
    background:
        radial-gradient(circle at 30% 22%, rgba(255,255,255,.9), transparent 20%),
        linear-gradient(145deg, #67e8f9, #38bdf8 46%, #22c55e);
    box-shadow: 0 24px 70px rgba(56,189,248,.32), 0 0 0 10px rgba(255,255,255,.045);
}
.brand-card h1 { margin: 0; font-size: clamp(34px, 8vw, 44px); line-height: 1; letter-spacing: -.065em; }
.brand-card p { color: var(--muted); margin: 12px auto 0; max-width: 340px; line-height: 1.6; }
.login-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0 0;
}
.login-meta span {
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.055);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 800;
}

label { display: block; margin: 14px 0 8px; color: #e0f2fe; font-size: 14px; font-weight: 850; }
input, select, textarea {
    width: 100%;
    padding: 16px 17px;
    border-radius: 18px;
    border: 1px solid var(--line);
    outline: none;
    background: rgba(2, 6, 23, .58);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder { color: #64748b; }
input:focus, select:focus, textarea:focus {
    border-color: rgba(56,189,248,.85);
    box-shadow: 0 0 0 4px rgba(56,189,248,.14), inset 0 1px 0 rgba(255,255,255,.06);
    background: rgba(2, 6, 23, .72);
}
select option { color: #020617; background: #f8fafc; }
.check-row { display: flex; align-items: center; gap: 10px; }
.check-row input { width: auto; accent-color: var(--cyan); }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; line-height: 1.5; }
.demo-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed rgba(56,189,248,.34);
    border-radius: 18px;
    background: rgba(56,189,248,.07);
}

.btn {
    border: 0;
    border-radius: 18px;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 900;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    min-height: 50px;
    transition: transform .16s ease, filter .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 14px 30px rgba(0,0,0,.18);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; filter: none; }
.btn.primary { background: linear-gradient(135deg, #67e8f9, #38bdf8 48%, #22d3ee); color: #02111d; box-shadow: 0 18px 38px rgba(56,189,248,.26), inset 0 1px 0 rgba(255,255,255,.65); }
.btn.secondary { background: rgba(255,255,255,.09); border: 1px solid var(--line); }
.btn.dark { background: #020617; border: 1px solid rgba(255,255,255,.16); }
.btn.danger { background: linear-gradient(135deg, #fb7185, #ef4444); color: #fff; }
.btn.success { background: linear-gradient(135deg, #34d399, #22c55e); color: #02120c; }
.btn.full { width: 100%; margin-top: 14px; }
.btn.small { min-height: unset; padding: 9px 12px; border-radius: 14px; font-size: 13px; }
.btn.linkish { background: transparent; box-shadow: none; color: var(--cyan); padding-inline: 0; }

.alert {
    margin: 10px 16px 2px;
    padding: 14px 16px;
    border-radius: 18px;
    font-weight: 820;
    line-height: 1.45;
    box-shadow: 0 14px 34px rgba(0,0,0,.20);
}
.alert.success { background: rgba(16,185,129,.16); color: #d1fae5; border: 1px solid rgba(16,185,129,.28); }
.alert.danger { background: rgba(239,68,68,.16); color: #fee2e2; border: 1px solid rgba(239,68,68,.30); }

.hero-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 24px;
    min-height: 146px;
    background:
        radial-gradient(circle at 86% 18%, rgba(56,189,248,.22), transparent 13rem),
        linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
}
.hero-card h2 { margin: 0; font-size: clamp(28px, 7vw, 38px); line-height: 1.02; letter-spacing: -.06em; }
.time-box {
    width: 92px;
    height: 82px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    color: #e0f7ff;
    font-size: 20px;
    font-weight: 950;
    background: linear-gradient(145deg, rgba(56,189,248,.26), rgba(56,189,248,.10));
    border: 1px solid rgba(56,189,248,.20);
    box-shadow: var(--glow-cyan), inset 0 1px 0 rgba(255,255,255,.10);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { min-height: 128px; }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 750; }
.stat-card strong { display: block; font-size: 38px; line-height: 1; margin: 12px 0 7px; letter-spacing: -.06em; }
.stat-card small { color: var(--muted); }
.stat-card.warning strong { color: var(--amber); }
.stat-card.success strong { color: #4ade80; }
.status-panel { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.status-panel h3 { margin: 0; }
.status-dot {
    display: inline-flex;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    margin-right: 7px;
    background: var(--cyan);
    box-shadow: 0 0 0 6px rgba(56,189,248,.12);
}
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.quick-action {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,.07);
    border: 1px solid var(--line);
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 900;
}
.quick-action i, .nav-ico, .card-icon {
    font-style: normal;
    width: 38px;
    height: 38px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(56,189,248,.14);
    color: #e0f7ff;
    border: 1px solid rgba(56,189,248,.18);
}

.camera-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    margin: 16px 0;
    border: 1px solid rgba(148,163,184,.26);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 18px 46px rgba(0,0,0,.28);
}
.camera-wrap::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 22px;
    border: 1px solid rgba(56,189,248,.28);
    pointer-events: none;
    box-shadow: 0 0 0 999px rgba(2,6,23,.04);
}
video, canvas { width: 100%; height: 100%; object-fit: cover; }
.hidden { display: none !important; }
.scan-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scan-actions .btn { min-height: 58px; padding: 10px 8px; font-size: 13px; border-radius: 18px; }
.mini-info {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 17px;
    color: var(--muted);
    margin-top: 10px;
    background: rgba(255,255,255,.06);
    font-size: 13px;
    line-height: 1.45;
}
.mini-info.ok { color: #d1fae5; border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.12); }
.mini-info.warning { color: #ffedd5; border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.12); }
.mini-info.danger { color: #fee2e2; border-color: rgba(239,68,68,.38); background: rgba(239,68,68,.13); }
.map-frame {
    width: 100%;
    height: 240px;
    border: 0;
    border-radius: 24px;
    margin-top: 14px;
    background: #0f172a;
    filter: saturate(1.05) contrast(1.02);
}
.action-panel { display: grid; gap: 0; }

.history-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
}
.history-card strong { display: block; font-size: 17px; margin-bottom: 4px; }
.history-card p { margin: 5px 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.history-time {
    display: grid;
    gap: 7px;
    text-align: right;
    font-size: 13px;
    color: #dbeafe;
    white-space: nowrap;
}
.time-pill, .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-transform: capitalize;
}
.time-pill { background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.status-present, .status-hadir { background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.28); }
.status-late, .status-terlambat { background: rgba(245,158,11,.14); color: #fcd34d; border: 1px solid rgba(245,158,11,.28); }
.status-alpha, .status-gagal, .status-di_luar_lokasi { background: rgba(239,68,68,.14); color: #fca5a5; border: 1px solid rgba(239,68,68,.30); }
.status-izin, .status-sakit { background: rgba(59,130,246,.14); color: #93c5fd; border: 1px solid rgba(59,130,246,.28); }

.row-between { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.menu-list { padding: 8px; }
.menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    color: #eaf6ff;
    font-weight: 850;
    transition: background .18s ease, transform .18s ease;
}
.menu-list a:hover { background: rgba(255,255,255,.08); transform: translateX(2px); }

.filter-form { display: grid; gap: 12px; margin-top: 16px; }
.report-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.report-card { align-items: flex-start; }
.thumb {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    object-fit: cover;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.table-scroll { overflow-x: auto; margin-top: 14px; border-radius: 20px; border: 1px solid var(--line); }
.report-table { width: 100%; min-width: 820px; border-collapse: collapse; background: rgba(2,6,23,.25); }
.report-table th, .report-table td { padding: 14px; border-bottom: 1px solid rgba(148,163,184,.16); text-align: left; vertical-align: top; color: #e5e7eb; }
.report-table th { color: var(--cyan); font-size: 12px; letter-spacing: .10em; text-transform: uppercase; }
.report-table small { color: var(--muted); }
.empty-text { text-align: center; color: var(--muted); padding: 22px !important; }
.pagination-wrap { color: var(--muted); padding: 12px 0; }
.pagination-wrap nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination-wrap svg { width: 18px; }

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    z-index: 30;
    transform: translateX(-50%);
    width: min(528px, calc(100% - 24px));
    min-height: 72px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px;
    border-radius: 28px;
    background: rgba(2, 6, 23, .78);
    border: 1px solid rgba(148, 163, 184, .24);
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 70px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.08);
}
.bottom-nav a {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    padding: 8px 4px 7px;
    border-radius: 22px;
    font-weight: 900;
    font-size: 18px;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.bottom-nav a span { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: -.02em; }
.bottom-nav a.active {
    color: #ecfeff;
    background: linear-gradient(145deg, rgba(56,189,248,.28), rgba(56,189,248,.10));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 12px 26px rgba(56,189,248,.10);
}
.bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #67e8f9;
    box-shadow: 0 0 16px #67e8f9;
}

@media (max-width: 430px) {
    .content { padding-inline: 14px; }
    .panel, .hero-card, .history-card, .stat-card, .brand-panel { border-radius: 26px; padding: 18px; }
    .hero-card { grid-template-columns: 1fr; }
    .time-box { width: 100%; height: 62px; }
    .status-panel { grid-template-columns: 1fr; }
    .scan-actions { grid-template-columns: repeat(3, 1fr); }
    .quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
    .grid-2 { grid-template-columns: 1fr; }
    .scan-actions { grid-template-columns: 1fr; }
    .history-card { grid-template-columns: 1fr; }
    .history-time { text-align: left; }
    .bottom-nav { grid-template-columns: repeat(5, 1fr); }
    .bottom-nav a span { font-size: 9px; }
}
@media print {
    body { background: #fff !important; color: #000 !important; }
    body::before, body::after, .bottom-nav, .topbar, .report-actions, .filter-form { display: none !important; }
    .app-shell { width: 100%; padding: 0; }
    .content { padding: 0; }
    .panel, .history-card { background: #fff !important; color: #000 !important; border: 1px solid #ddd !important; box-shadow: none !important; }
    .report-table th, .report-table td { color: #000 !important; border-bottom: 1px solid #ddd !important; }
}

/* === Policy / settings update === */
.policy-panel h2 { margin-bottom: 12px; }
.policy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.form-stack {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.form-stack input,
.form-stack select,
.form-stack textarea,
.filter-form input,
.filter-form select {
    width: 100%;
    min-height: 54px;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 18px;
    background: rgba(2, 6, 23, .48);
    color: #f8fafc;
    padding: 14px 16px;
    outline: none;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.form-stack textarea {
    resize: vertical;
    min-height: 92px;
    line-height: 1.5;
}
.form-label {
    display: block;
    margin: 0 0 8px;
    color: #bae6fd;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.toggle-list {
    display: grid;
    gap: 12px;
}
.toggle-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 15px;
    border-radius: 20px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(148,163,184,.16);
}
.toggle-card.compact { margin-top: 0; }
.toggle-card input {
    width: 22px;
    height: 22px;
    accent-color: #22d3ee;
}
.toggle-card strong {
    display: block;
    color: #f8fafc;
    font-size: 15px;
}
.toggle-card small,
.small-note {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.45;
    margin-top: 3px;
}
.shared-attendance-options {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(56,189,248,.06);
    border: 1px solid rgba(56,189,248,.16);
}
.shared-attendance-options.outside-mode {
    background: rgba(245,158,11,.08);
    border-color: rgba(245,158,11,.22);
}
.holiday-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}
.holiday-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border-radius: 22px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(148,163,184,.16);
}
.holiday-card p { margin: 5px 0; color: #e5e7eb; }
.holiday-card small { color: var(--muted); }
.btn.tiny {
    min-height: auto;
    padding: 9px 11px;
    border-radius: 13px;
    font-size: 12px;
}
.btn.danger {
    background: rgba(239,68,68,.16);
    color: #fecaca;
    border: 1px solid rgba(239,68,68,.30);
}
.mini-info.warning {
    background: rgba(245,158,11,.10);
    border-color: rgba(245,158,11,.24);
    color: #fde68a;
}
.status-outside_duty {
    background: rgba(14,165,233,.14);
    color: #7dd3fc;
    border: 1px solid rgba(14,165,233,.30);
}
@media (max-width: 430px) {
    .policy-grid,
    .holiday-card {
        grid-template-columns: 1fr;
    }
    .holiday-card .row-actions {
        justify-content: stretch;
    }
    .holiday-card .row-actions form,
    .holiday-card .row-actions button {
        width: 100%;
    }
}

/* === One tap attendance update === */
.auto-camera-wrap {
    position: relative;
    overflow: hidden;
}
.camera-guide {
    pointer-events: none;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(226, 232, 240, .78);
    font-weight: 900;
    text-align: center;
    letter-spacing: -.02em;
    opacity: .88;
}
.camera-guide p {
    position: absolute;
    bottom: 18px;
    left: 18px;
    right: 18px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, .58);
    border: 1px solid rgba(148, 163, 184, .18);
    backdrop-filter: blur(10px);
    font-size: 13px;
}
.face-ring {
    width: min(58vw, 245px);
    aspect-ratio: 1 / 1.18;
    border-radius: 48% 48% 45% 45%;
    border: 2px dashed rgba(103, 232, 249, .74);
    box-shadow: 0 0 32px rgba(34, 211, 238, .18), inset 0 0 26px rgba(34, 211, 238, .08);
    animation: facePulse 1.8s ease-in-out infinite;
}
.camera-guide.active .face-ring {
    border-style: solid;
    border-color: rgba(34, 197, 94, .82);
    box-shadow: 0 0 38px rgba(34, 197, 94, .22), inset 0 0 26px rgba(34, 197, 94, .10);
}
@keyframes facePulse {
    0%, 100% { transform: scale(1); opacity: .72; }
    50% { transform: scale(1.035); opacity: 1; }
}
.one-tap-box {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}
.one-tap-btn {
    min-height: 72px;
    border-radius: 24px;
    font-size: 20px;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 18px 42px rgba(34, 211, 238, .20), inset 0 1px 0 rgba(255,255,255,.20);
}
.one-tap-btn:disabled {
    opacity: .68;
    cursor: not-allowed;
    filter: grayscale(.18);
}
.auto-flow-info {
    text-align: center;
    font-weight: 800;
}
.hidden-submit-form {
    display: none !important;
}
.scan-panel .mini-info {
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
@media (max-width: 430px) {
    .one-tap-btn {
        min-height: 68px;
        font-size: 18px;
        border-radius: 22px;
    }
    .camera-guide p {
        font-size: 12px;
        bottom: 12px;
    }
}

/* === Dynamic theme by day / holiday === */
body.theme-day-1 {
    --theme-a-rgb: 56, 189, 248;
    --theme-b-rgb: 34, 211, 238;
    --theme-c-rgb: 37, 99, 235;
    --cyan: #38bdf8;
    --cyan-2: #22d3ee;
}
body.theme-day-2 {
    --theme-a-rgb: 99, 102, 241;
    --theme-b-rgb: 56, 189, 248;
    --theme-c-rgb: 139, 92, 246;
    --cyan: #818cf8;
    --cyan-2: #38bdf8;
}
body.theme-day-3 {
    --theme-a-rgb: 16, 185, 129;
    --theme-b-rgb: 34, 197, 94;
    --theme-c-rgb: 20, 184, 166;
    --cyan: #34d399;
    --cyan-2: #2dd4bf;
}
body.theme-day-4 {
    --theme-a-rgb: 14, 165, 233;
    --theme-b-rgb: 6, 182, 212;
    --theme-c-rgb: 59, 130, 246;
    --cyan: #0ea5e9;
    --cyan-2: #06b6d4;
}
body.theme-day-5 {
    --theme-a-rgb: 245, 158, 11;
    --theme-b-rgb: 34, 197, 94;
    --theme-c-rgb: 20, 184, 166;
    --cyan: #f59e0b;
    --cyan-2: #22c55e;
}
body.theme-day-6 {
    --theme-a-rgb: 168, 85, 247;
    --theme-b-rgb: 236, 72, 153;
    --theme-c-rgb: 99, 102, 241;
    --cyan: #a855f7;
    --cyan-2: #ec4899;
}
body.theme-day-0 {
    --theme-a-rgb: 239, 68, 68;
    --theme-b-rgb: 249, 115, 22;
    --theme-c-rgb: 244, 63, 94;
    --cyan: #fb7185;
    --cyan-2: #f97316;
}
body.theme-tanggal-merah {
    --theme-a-rgb: 239, 68, 68;
    --theme-b-rgb: 244, 63, 94;
    --theme-c-rgb: 249, 115, 22;
    --cyan: #fb7185;
    --cyan-2: #ef4444;
    --green: #f59e0b;
}
body.theme-cuti-bersama {
    --theme-a-rgb: 245, 158, 11;
    --theme-b-rgb: 244, 63, 94;
    --theme-c-rgb: 236, 72, 153;
    --cyan: #fbbf24;
    --cyan-2: #fb7185;
    --green: #f59e0b;
}
body[class*="theme-"] {
    background:
        radial-gradient(circle at 8% 1%, rgba(var(--theme-a-rgb), .30), transparent 29rem),
        radial-gradient(circle at 92% 15%, rgba(var(--theme-b-rgb), .24), transparent 25rem),
        radial-gradient(circle at 80% 98%, rgba(var(--theme-c-rgb), .20), transparent 26rem),
        linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 46%, #04111f 100%);
    transition: background .35s ease;
}
body[class*="theme-"] .blob-one { background: rgba(var(--theme-a-rgb), .22); }
body[class*="theme-"] .blob-two { background: rgba(var(--theme-b-rgb), .16); }
body[class*="theme-"] .app-mark,
body[class*="theme-"] .logo-circle,
body[class*="theme-"] .btn.primary,
body[class*="theme-"] .one-tap-btn {
    background: linear-gradient(145deg, rgba(255,255,255,.88), rgb(var(--theme-a-rgb)) 22%, rgb(var(--theme-b-rgb)) 68%, rgb(var(--theme-c-rgb)) 100%);
    color: #020617;
    box-shadow: 0 22px 56px rgba(var(--theme-a-rgb), .26), inset 0 1px 0 rgba(255,255,255,.62);
}
body[class*="theme-"] .bottom-nav a.active {
    color: #fff;
    background: linear-gradient(145deg, rgba(var(--theme-a-rgb), .34), rgba(var(--theme-b-rgb), .12));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 30px rgba(var(--theme-a-rgb), .14);
}
body[class*="theme-"] .bottom-nav a.active::before {
    background: rgb(var(--theme-a-rgb));
    box-shadow: 0 0 16px rgb(var(--theme-a-rgb));
}
body[class*="theme-"] .eyebrow,
body[class*="theme-"] .btn.linkish,
body[class*="theme-"] .report-table th {
    color: rgb(var(--theme-a-rgb));
}
body[class*="theme-"] input:focus,
body[class*="theme-"] select:focus,
body[class*="theme-"] textarea:focus {
    border-color: rgba(var(--theme-a-rgb), .85);
    box-shadow: 0 0 0 4px rgba(var(--theme-a-rgb), .14), inset 0 1px 0 rgba(255,255,255,.06);
}
body[class*="theme-"] .demo-box {
    border-color: rgba(var(--theme-a-rgb), .34);
    background: rgba(var(--theme-a-rgb), .07);
}
.theme-chip {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: min(300px, 58vw);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(var(--theme-a-rgb, 56, 189, 248), .30);
    background: rgba(var(--theme-a-rgb, 56, 189, 248), .10);
    color: #e0f2fe;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    vertical-align: middle;
}
.theme-chip strong {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .11em;
    white-space: nowrap;
}
.theme-chip small {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.theme-chip.is-holiday {
    background: rgba(var(--theme-a-rgb, 239, 68, 68), .17);
    border-color: rgba(var(--theme-a-rgb, 239, 68, 68), .42);
}
.theme-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgb(var(--theme-a-rgb, 56, 189, 248));
    box-shadow: 0 0 14px rgb(var(--theme-a-rgb, 56, 189, 248));
}
.theme-holiday-banner {
    margin: 0 16px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 20px;
    border: 1px solid rgba(var(--theme-a-rgb, 239, 68, 68), .34);
    background: linear-gradient(135deg, rgba(var(--theme-a-rgb, 239, 68, 68), .18), rgba(var(--theme-b-rgb, 244, 63, 94), .08));
    box-shadow: 0 16px 34px rgba(var(--theme-a-rgb, 239, 68, 68), .10), inset 0 1px 0 rgba(255,255,255,.08);
}
.theme-holiday-banner > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(var(--theme-a-rgb, 239, 68, 68), .24);
    color: rgb(var(--theme-a-rgb, 239, 68, 68));
    font-size: 14px;
}
.theme-holiday-banner strong {
    display: block;
    font-size: 14px;
    letter-spacing: -.01em;
}
.theme-holiday-banner small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    line-height: 1.35;
}
.theme-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.theme-sample {
    min-height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 950;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 14px 26px rgba(0,0,0,.18);
}
.theme-sample.monday { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.theme-sample.friday { background: linear-gradient(135deg, #f59e0b, #22c55e); }
.theme-sample.weekend { background: linear-gradient(135deg, #a855f7, #ec4899); }
.theme-sample.holiday { background: linear-gradient(135deg, #ef4444, #f97316); }
@media (max-width: 430px) {
    .theme-chip { max-width: 50vw; }
    .theme-chip small { display: none; }
    .theme-preview-grid { grid-template-columns: 1fr; }
}
@media print {
    .theme-chip,
    .theme-holiday-banner,
    .theme-preview-panel {
        display: none !important;
    }
}


/* Branding sekolah */
.app-mark {
    padding: 0;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.82));
}

.app-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    display: block;
}

.logo-circle.school {
    width: 130px;
    height: 130px;
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,255,255,.88));
    box-shadow: 0 24px 70px rgba(56,189,248,.22), 0 0 0 10px rgba(255,255,255,.045);
    padding: 10px;
}

.logo-circle.school img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.topbar-left .eyebrow {
    margin-bottom: 4px;
}

.brand-card h1 {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 420px) {
    .logo-circle.school {
        width: 116px;
        height: 116px;
    }
    .topbar h1 {
        font-size: 24px;
    }
    .topbar-left {
        align-items: flex-start;
    }
}
