:root {
    --bg: #070b12;
    --card: #101820;
    --line: rgba(212, 175, 55, 0.38);
    --gold: #e8c860;
    --cyan: #8ec4dc;
    --text: #f4f1e8;
    --muted: #94a3b8;
}
* { box-sizing: border-box; }
html, body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(232, 200, 96, 0.08), transparent 50%), #070b12;
    color: var(--text);
    font-family: "Segoe UI", system-ui, sans-serif;
}
.hide { display: none !important; }
.boot-overlay {
    position: fixed; inset: 0; z-index: 80;
    display: grid; place-items: center;
    background: #070b12;
}
.boot-spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid rgba(232, 200, 96, 0.2);
    border-top-color: var(--gold);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-text { margin-top: 12px; color: var(--muted); font-size: .85rem; }

.screen { min-height: 100vh; }
.login-card {
    width: min(420px, calc(100% - 32px));
    margin: 12vh auto 0;
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(165deg, #182232, #0c121c);
}
.login-kicker, .app-kicker {
    margin: 0;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: .68rem;
    font-weight: 800;
    color: var(--cyan);
}
.login-card h1, .app-head h1 {
    margin: 6px 0 4px;
    font-size: 1.45rem;
    letter-spacing: .08em;
}
.login-sub, .whoami { margin: 0 0 18px; color: var(--muted); font-size: .82rem; }
.login-form { display: grid; gap: 12px; }
.login-form label, .modal-card label {
    display: grid; gap: 6px;
    font-size: .75rem; font-weight: 700; color: var(--muted);
}
.field, input, select, textarea, .login-form input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(142, 196, 220, 0.28);
    background: #0b1118;
    color: var(--text);
    font: inherit;
}
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    filter: invert(1);
    width: 18px;
    height: 18px;
}
textarea { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; resize: vertical; }
.btn-gold, .btn-cyan, .btn-ghost {
    border: 0; cursor: pointer; border-radius: 10px;
    padding: 10px 14px; font-weight: 800; letter-spacing: .04em;
}
.btn-gold {
    background: linear-gradient(135deg, #fde68a, #d4af37);
    color: #1a1408;
}
.btn-cyan {
    background: linear-gradient(135deg, #8ec4dc, #c5d7e8);
    color: #0b1118;
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255,255,255,.18);
    text-decoration: none;
    display: inline-flex; align-items: center;
}
.login-error { color: #fca5a5; font-size: .8rem; }

.app-head {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 18px 20px 8px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.head-actions { display: flex; gap: 8px; align-items: flex-start; }
.toolbar { padding: 16px 20px 10px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.title-row h2 { margin: 0; font-size: 1.05rem; letter-spacing: .06em; }
.title-row i { color: var(--gold); margin-right: 8px; }
.sync-pill {
    font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: #0b1118; background: var(--gold); border-radius: 999px; padding: 4px 10px;
}
.toolbar-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field.grow { flex: 1; min-width: 180px; }
.toolbar-row .field { width: auto; min-width: 140px; }

.sheet-wrap {
    margin: 0 16px 24px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0a0e16;
    max-height: calc(100vh - 220px);
}
.sheet {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: .68rem;
    text-align: center;
}
.sheet th, .sheet td {
    border: 1px solid rgba(212,175,55,.28);
    padding: 6px 4px;
    white-space: nowrap;
}
.sheet th { position: sticky; top: 0; background: #121a28; z-index: 2; }
.sheet .name { text-align: left; padding-left: 10px; position: sticky; left: 0; background: #101820; min-width: 160px; z-index: 1; }
.sheet th.name { z-index: 3; }
.cat td {
    background: rgba(232,200,96,.12);
    font-weight: 900;
    letter-spacing: .12em;
    color: var(--gold);
}
.shift-cell { cursor: pointer; font-weight: 800; min-width: 34px; }
.shift-pagi { background: #1d4ed8; color: #fff; }
.shift-malam { background: #92400e; color: #fff; }
.shift-tiga { background: #6d28d9; color: #fff; }
.shift-empat { background: #0f766e; color: #fff; }
.shift-half { background: #ca8a04; color: #111; }
.shift-off { background: #7f1d1d; color: #fff; }
.shift-cuti { background: #365314; color: #fff; }

.modal {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(0,0,0,.55);
    display: grid; place-items: center; padding: 16px;
}
.modal-card {
    width: min(640px, 100%);
    background: #121a28;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    display: grid; gap: 10px;
}
.modal-card h3 { margin: 0; }
.hint { margin: 0; color: var(--muted); font-size: .78rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    background: #e8c860; color: #1a1408;
    padding: 10px 16px; border-radius: 10px; font-weight: 800; z-index: 90;
}
