/* =====================================================================
   HE5 ONLY — Sistem Absensi Digital
   Design language: glassmorphism + coral/magenta gradient, mobile-first
   ===================================================================== */

:root {
    /* Brand */
    --brand-1: #FF2D87;          /* magenta-pink */
    --brand-2: #FF5470;          /* coral */
    --brand-3: #FF8A4C;          /* soft orange */
    --brand-grad: linear-gradient(135deg, #FF2D87 0%, #FF5470 50%, #FF8A4C 100%);
    --brand-grad-soft: linear-gradient(135deg, rgba(255,45,135,.12) 0%, rgba(255,138,76,.10) 100%);

    /* Accents */
    --accent: #5B5BD6;
    --info: #3B82F6;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Light surfaces */
    --bg: #F4F1F8;
    --bg-2: #ECE7F5;
    --surface: #FFFFFF;
    --surface-2: #F9F7FC;
    --surface-glass: rgba(255,255,255,.65);
    --border: rgba(20, 20, 40, .07);
    --border-strong: rgba(20, 20, 40, .14);

    /* Text */
    --text: #15172B;
    --text-2: #4B4F66;
    --text-muted: #8B90A8;
    --text-on-grad: #FFFFFF;

    /* Effects */
    --shadow-sm: 0 4px 14px rgba(20,20,40,.06);
    --shadow: 0 10px 30px rgba(20,20,40,.08);
    --shadow-lg: 0 24px 60px rgba(20,20,40,.12);
    --shadow-brand: 0 14px 40px rgba(255,45,135,.35);

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --radius-pill: 999px;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', Menlo, monospace;
}

[data-theme="dark"] {
    --bg: #0E0F1F;
    --bg-2: #16182C;
    --surface: #1A1C32;
    --surface-2: #232540;
    --surface-glass: rgba(26,28,50,.65);
    --border: rgba(255,255,255,.06);
    --border-strong: rgba(255,255,255,.14);

    --text: #F2F3FA;
    --text-2: #C5C8DC;
    --text-muted: #8B90A8;

    --shadow-sm: 0 4px 14px rgba(0,0,0,.35);
    --shadow: 0 10px 30px rgba(0,0,0,.45);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
    --shadow-brand: 0 14px 40px rgba(255,45,135,.45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    /* iOS notch / Dynamic Island / Home indicator safe area */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
a { color: var(--brand-1); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }

/* Decorative background blobs */
body::before, body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
}
body::before {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(255,45,135,.45), transparent 70%);
    top: -120px; left: -100px;
}
body::after {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(91,91,214,.35), transparent 70%);
    bottom: -160px; right: -120px;
}
[data-theme="dark"] body::before { opacity: .35; }
[data-theme="dark"] body::after  { opacity: .35; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* ---------- Layout ---------- */
.shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 96px;
}
.shell--sm { max-width: 480px; }
.shell--md { max-width: 760px; }

/* ---------- Topbar ---------- */
.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px 22px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.01em;
}
.brand-mark {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: var(--brand-grad);
    display: grid; place-items: center;
    color: #fff; font-weight: 800;
    box-shadow: var(--shadow-brand);
}
.brand-name { font-size: 15px; line-height: 1.1; }
.brand-name small { display:block; color: var(--text-muted); font-weight: 500; font-size: 11px; }

.topbar-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.icon-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    display: grid; place-items: center;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, color .2s ease;
}
.icon-btn:hover { color: var(--brand-1); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0); }
.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--brand-grad);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: 13px;
    border: 2px solid var(--surface);
    box-shadow: var(--shadow-sm);
}

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.card--glass {
    background: var(--surface-glass);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.card--brand {
    background: var(--brand-grad);
    color: var(--text-on-grad);
    border: none;
    box-shadow: var(--shadow-brand);
}
.card--brand .muted { color: rgba(255,255,255,.85); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.card-title { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--text-muted); }
.kbd { font-family: var(--font-mono); font-size: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    min-height: 44px;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn--primary {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn--ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn--soft {
    background: var(--brand-grad-soft);
    color: var(--brand-1);
    border-color: rgba(255,45,135,.18);
}
.btn--danger {
    background: rgba(239,68,68,.1);
    color: var(--danger);
    border-color: rgba(239,68,68,.25);
}
.btn--block { width: 100%; }
.btn--lg { padding: 16px 22px; font-size: 15px; min-height: 52px; }
.btn--sm { padding: 8px 12px; font-size: 12.5px; min-height: 36px; }
.btn[disabled], .btn.is-loading {
    opacity: .65;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Form ---------- */
.field {
    display: block;
    margin-bottom: 14px;
}
.field-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 0 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.input-wrap:focus-within {
    border-color: var(--brand-1);
    box-shadow: 0 0 0 4px rgba(255,45,135,.12);
}
.input-wrap i { color: var(--text-muted); margin-right: 10px; flex-shrink: 0; }
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
    flex: 1; min-width: 0;
    background: transparent;
    border: 0;
    color: var(--text);
    font: inherit;
    padding: 13px 0;
    outline: none;
}
.input-wrap textarea { resize: vertical; min-height: 84px; padding: 13px 0; }
.input-wrap .toggle-eye {
    background: none; border: 0; color: var(--text-muted);
    cursor: pointer; padding: 6px; margin-left: 6px;
}
input, select, textarea { font-family: inherit; }

.checkbox {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; user-select: none;
    color: var(--text-2); font-size: 14px;
}
.checkbox input { accent-color: var(--brand-1); width: 18px; height: 18px; }

/* ---------- Alerts / Flash ---------- */
.alert {
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border);
    font-size: 14px;
}
.alert i { font-size: 16px; margin-top: 2px; }
.alert--success { background: rgba(16,185,129,.10); color: #047857; border-color: rgba(16,185,129,.22); }
.alert--error   { background: rgba(239,68,68,.10);  color: #B91C1C; border-color: rgba(239,68,68,.22); }
.alert--info    { background: rgba(59,130,246,.10); color: #1D4ED8; border-color: rgba(59,130,246,.22); }
[data-theme="dark"] .alert--success { color: #6EE7B7; }
[data-theme="dark"] .alert--error   { color: #FCA5A5; }
[data-theme="dark"] .alert--info    { color: #93C5FD; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
}
.badge--success { background: rgba(16,185,129,.12); color: #047857; border-color: rgba(16,185,129,.25); }
.badge--warn    { background: rgba(245,158,11,.12); color: #B45309; border-color: rgba(245,158,11,.25); }
.badge--danger  { background: rgba(239,68,68,.12);  color: #B91C1C; border-color: rgba(239,68,68,.25); }
.badge--brand   { background: var(--brand-grad-soft); color: var(--brand-1); border-color: rgba(255,45,135,.22); }
[data-theme="dark"] .badge--success { color: #6EE7B7; }
[data-theme="dark"] .badge--warn    { color: #FCD34D; }
[data-theme="dark"] .badge--danger  { color: #FCA5A5; }

/* ---------- Stats grid ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-icon {
    width: 38px; height: 38px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--brand-grad-soft);
    color: var(--brand-1);
    margin-bottom: 8px;
    font-size: 16px;
}
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
    position: fixed;
    z-index: 30;
    left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100% - 28px);
    max-width: 460px;
    background: var(--surface-glass);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid var(--border-strong);
    border-radius: 28px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-around;
    box-shadow: var(--shadow-lg);
}
.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    color: var(--text-muted);
    font-size: 11px; font-weight: 600;
    border-radius: 18px;
    transition: color .15s ease, background .15s ease;
    text-decoration: none;
}
.bottom-nav a i { font-size: 18px; }
.bottom-nav a.is-active {
    color: var(--brand-1);
    background: var(--brand-grad-soft);
}

/* ---------- Top tabs (admin nav) ---------- */
.tabs {
    display: flex;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 6px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    flex: 0 0 auto;
    padding: 8px 16px;
    color: var(--text-2);
    font-weight: 600;
    border-radius: var(--radius-pill);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.tabs a.is-active {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.tabs a:hover:not(.is-active) { background: var(--surface-2); }

/* ---------- Table ---------- */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.data th, table.data td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.data th {
    background: var(--surface-2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    font-weight: 700;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--surface-2); }

/* ---------- Modal ---------- */
.modal {
    position: fixed; inset: 0;
    z-index: 50;
    background: rgba(15,16,32,.55);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.is-open { display: flex; }
.modal-card {
    width: 100%; max-width: 480px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 22px;
    max-height: 90vh;
    overflow: auto;
}

/* ---------- Clock display (employee dashboard) ---------- */
.clock-time {
    font-size: 76px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.clock-time small {
    font-size: 24px;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 4px;
}
.clock-date {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

/* ---------- Big action button (clock in/out) ---------- */
.cta-wrap {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 22px auto;
    display: grid;
    place-items: center;
}

.cta-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--brand-grad);
    color: #fff;
    display: grid;
    place-items: center;
    margin: 18px auto;
    box-shadow: var(--shadow-brand), inset 0 -8px 24px rgba(0,0,0,.18);
    border: 0;
    cursor: pointer;
    transition: transform .15s ease;
    font-family: inherit;
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.cta-wrap .cta-circle {
    margin: 0;
    z-index: 3;
    animation: cta-breath 2.8s ease-in-out infinite;
}
.cta-wrap .cta-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(from 0deg,
        transparent 0deg,
        rgba(255,255,255,0.30) 60deg,
        rgba(255,255,255,0.05) 120deg,
        transparent 180deg);
    animation: cta-sweep 4.5s linear infinite;
    pointer-events: none;
    z-index: 1;
}
.cta-wrap .cta-circle > * { position: relative; z-index: 2; }
.cta-circle:hover { transform: scale(1.02); }
.cta-circle:active { transform: scale(.98); }
.cta-circle:disabled {
    background: linear-gradient(135deg, #B0B3C7, #8B90A8);
    box-shadow: none;
    cursor: not-allowed;
    animation: none !important;
}
.cta-circle:disabled::before { animation: none !important; opacity: 0; }
.cta-circle .cta-icon { font-size: 44px; margin-bottom: 8px; }
.cta-circle .cta-label { font-size: 22px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.cta-circle .cta-sub { font-size: 12px; opacity: .9; margin-top: 4px; }

/* Pulse rings — emit dari pusat tombol */
.cta-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px solid rgba(255, 45, 135, 0.55);
    animation: cta-ripple 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    pointer-events: none;
    z-index: 1;
}
.cta-ring:nth-of-type(2) { animation-delay: 0.8s; }
.cta-ring:nth-of-type(3) { animation-delay: 1.6s; }

/* Orbit dot — titik kecil yang berputar mengelilingi tombol */
.cta-orbit {
    position: absolute;
    width: 244px;
    height: 244px;
    pointer-events: none;
    z-index: 2;
    animation: cta-spin 3.2s linear infinite;
}
.cta-orbit::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 12px 3px rgba(255, 45, 135, 0.9),
        0 0 28px 6px rgba(255, 138, 76, 0.5);
}

/* Variant SELESAI (hijau, animasi lebih lembut, tanpa rings) */
.cta-wrap--done .cta-circle {
    background: linear-gradient(135deg, #10B981, #059669);
    cursor: default;
    animation-name: cta-breath-done;
}

@keyframes cta-ripple {
    0%   { transform: scale(0.82); opacity: 1;   border-width: 3px; }
    60%  {                          opacity: .35; border-width: 1.5px; }
    100% { transform: scale(1.55); opacity: 0;   border-width: 1px; }
}
@keyframes cta-breath {
    0%, 100% {
        box-shadow:
            0 14px 40px rgba(255,45,135,.35),
            inset 0 -8px 24px rgba(0,0,0,.18);
    }
    50% {
        box-shadow:
            0 24px 70px rgba(255,45,135,.60),
            0 0 0 8px rgba(255,45,135,.10),
            inset 0 -8px 24px rgba(0,0,0,.18);
    }
}
@keyframes cta-breath-done {
    0%, 100% {
        box-shadow:
            0 14px 40px rgba(16,185,129,.35),
            inset 0 -8px 24px rgba(0,0,0,.18);
    }
    50% {
        box-shadow:
            0 20px 56px rgba(16,185,129,.50),
            0 0 0 6px rgba(16,185,129,.10),
            inset 0 -8px 24px rgba(0,0,0,.18);
    }
}
@keyframes cta-sweep { to { transform: rotate(360deg); } }
@keyframes cta-spin  { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .cta-ring, .cta-orbit,
    .cta-wrap .cta-circle,
    .cta-wrap .cta-circle::before {
        animation: none !important;
    }
    .cta-orbit { display: none; }
}

/* ---------- Login hero ---------- */
.login-hero {
    padding: 28px 4px 20px;
    text-align: left;
}
.login-hero .pre {
    color: var(--brand-1);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.login-hero h1 {
    margin: 6px 0 8px;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -.02em;
    font-weight: 800;
}
.login-hero h1 .accent {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-hero p {
    color: var(--text-2);
    margin: 0;
    max-width: 32ch;
}

/* ---------- Map ---------- */
#map { width: 100%; height: 380px; border-radius: var(--radius); overflow: hidden; }
.leaflet-container { font: inherit; }

/* ---------- Misc ---------- */
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 0; min-width: 0; }
.spacer { height: 16px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.no-print { }
@media print {
    body::before, body::after, .no-print { display: none !important; }
    body { background: #fff; color: #000; }
    .card, .table-wrap { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- Rekap Gaji — card layout ---------- */
.rekap-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 720px) {
    .rekap-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
    .rekap-cards { grid-template-columns: repeat(3, 1fr); }
}

.rekap-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .15s ease, box-shadow .2s ease;
}
.rekap-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.rekap-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.rekap-card-id {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.rekap-card-id strong {
    display: block;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rekap-avatar {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--brand-grad);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.rekap-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 10px 6px;
}
.rekap-stat { text-align: center; }
.rekap-stat-num {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    letter-spacing: -.02em;
}
.rekap-stat-lbl {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
}

.rekap-money {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rekap-money-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-2);
}
.rekap-money-row strong { color: var(--text); font-weight: 600; }

.rekap-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding: 10px 14px;
    background: var(--brand-grad-soft);
    border-radius: 12px;
    border: 1px solid rgba(255,45,135,.18);
}
.rekap-total-row span {
    color: var(--text-2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}
.rekap-total-row strong {
    color: var(--brand-1);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
}

/* Summary brand card */
.rekap-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.rekap-summary .muted { color: rgba(255,255,255,.85) !important; }

/* ---------- PWA toast & install pill ---------- */
.pwa-toast {
    position: fixed;
    z-index: 60;
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom));
    transform: translate(-50%, 16px);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    padding: 10px 14px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}
.pwa-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.pwa-install-pill {
    position: fixed;
    z-index: 35;
    right: 16px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    background: var(--brand-grad);
    color: #fff;
    border: 0;
    border-radius: var(--radius-pill);
    padding: 10px 16px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    animation: pulse 2.4s ease-in-out infinite;
}
.pwa-install-pill:hover { transform: translateY(-2px); }
.pwa-install-pill[hidden] { display: none !important; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 14px 40px rgba(255,45,135,.35); }
    50%      { box-shadow: 0 18px 60px rgba(255,45,135,.55); }
}

/* PWA standalone: tweak ekstra (safe-area sudah ditangani di body) */
@media (display-mode: standalone) {
    /* Notch & home indicator sudah dihandle via env(safe-area-inset-*) di body */
}

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
    .clock-time { font-size: 64px; }
    .clock-time small { font-size: 20px; }
    .login-hero h1 { font-size: 28px; }
    .stat-value { font-size: 22px; }
    .topbar { padding-bottom: 16px; }
}
