/* ==========================================================================
   Hydro Internal — Konfirmasi Kehadiran
   Design System v2 · Mobile-first · WCAG AA · Light + Dark
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
    /* Brand (mint/hijau) */
    --brand-50:  #EAF6EF;
    --brand-100: #D3EDDD;
    --brand-200: #A7DBC0;
    --brand-300: #6FC79B;
    --brand-400: #3FAE78;
    --brand-500: #1E8E5A;
    --brand-600: #17724A;
    --brand-700: #12573A;
    --brand-800: #0D3F2A;

    /* Sky (secondary) */
    --sky-50:  #E9F6FE;
    --sky-100: #CFEBFB;
    --sky-500: #0B7FC4;
    --sky-600: #086699;

    /* Coral (accent) */
    --coral-50:  #FFF3EA;
    --coral-500: #D9701A;
    --coral-600: #B85A0F;

    /* Status — kontras teks >= 4.5:1 */
    --st-hadir-fg: #12603C;  --st-hadir-bg: #E3F5EB;  --st-hadir-bd: #2E8B5C;
    --st-tidak-fg: #A32020;  --st-tidak-bg: #FDEAEA;  --st-tidak-bd: #CC3B3B;
    --st-resch-fg: #8A4A08;  --st-resch-bg: #FDF0DE;  --st-resch-bd: #D9701A;

    /* Netral */
    --n-0:   #FFFFFF;
    --n-25:  #FBFCFB;
    --n-50:  #F5F8F6;
    --n-100: #EDF2EF;
    --n-200: #DFE7E3;
    --n-300: #C6D2CC;
    --n-400: #93A39B;
    --n-500: #6B7A73;
    --n-600: #4E5B55;
    --n-700: #37423D;
    --n-800: #232C28;

    /* Semantic */
    --c-text:      var(--n-800);
    --c-text-2:    var(--n-600);
    --c-text-3:    var(--n-500);
    --c-bg:        var(--n-50);
    --c-surface:   var(--n-0);
    --c-border:    var(--n-200);
    --c-primary:   var(--brand-500);
    --c-primary-d: var(--brand-600);

    /* Type scale (fluid) */
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fs-2xs: 11px;
    --fs-xs:  12.5px;
    --fs-sm:  14px;
    --fs-md:  16px;
    --fs-lg:  clamp(17px, 4.6vw, 19px);
    --fs-xl:  clamp(21px, 5.6vw, 25px);
    --fs-2xl: clamp(30px, 9vw, 40px);
    --fs-3xl: clamp(42px, 14vw, 56px);

    /* Space (8pt grid) */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;

    /* Radius */
    --r-xs: 6px; --r-sm: 9px; --r-md: 13px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;

    /* Shadow multi-layer */
    --sh-1: 0 1px 2px rgba(13,63,42,.06), 0 1px 3px rgba(13,63,42,.05);
    --sh-2: 0 1px 2px rgba(13,63,42,.05), 0 4px 12px rgba(13,63,42,.07);
    --sh-3: 0 2px 4px rgba(13,63,42,.06), 0 12px 28px rgba(13,63,42,.11);

    /* Layout */
    --tap:   48px;
    --nav-h: 62px;
    --maxw:  620px;
    --ease:  cubic-bezier(.32,.72,0,1);
    --dur:   .24s;
}

/* Dark theme — diaktifkan via data-theme (tombol) atau preferensi sistem */
:root[data-theme="dark"] {
        --c-text:    #E8EFEB;
        --c-text-2:  #A9B8B1;
        --c-text-3:  #8B9A93;
        --c-bg:      #0F1613;
        --c-surface: #17211D;
        --c-border:  #2A3733;
        --c-primary: #4CB583;
        --c-primary-d: #6FC79B;
        --n-25: #131C18; --n-50: #0F1613; --n-100: #1B2622; --n-200: #2A3733; --n-300: #3A4A44; --n-400: #6B7A73;
        --st-hadir-bg: #12301F; --st-hadir-fg: #7AD3A5; --st-hadir-bd: #3FAE78;
        --st-tidak-bg: #341A1A; --st-tidak-fg: #F09A9A; --st-tidak-bd: #D95757;
        --st-resch-bg: #33240F; --st-resch-fg: #EBB271; --st-resch-bd: #D9701A;
        --sky-50: #0C2635; --sky-600: #6BC2EE;
        --sh-1: 0 1px 3px rgba(0,0,0,.35);
        --sh-2: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.4);
        --sh-3: 0 2px 4px rgba(0,0,0,.3), 0 12px 28px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --c-text:    #E8EFEB;
        --c-text-2:  #A9B8B1;
        --c-text-3:  #8B9A93;
        --c-bg:      #0F1613;
        --c-surface: #17211D;
        --c-border:  #2A3733;
        --c-primary: #4CB583;
        --c-primary-d: #6FC79B;
        --n-25: #131C18; --n-50: #0F1613; --n-100: #1B2622; --n-200: #2A3733; --n-300: #3A4A44; --n-400: #6B7A73;
        --st-hadir-bg: #12301F; --st-hadir-fg: #7AD3A5; --st-hadir-bd: #3FAE78;
        --st-tidak-bg: #341A1A; --st-tidak-fg: #F09A9A; --st-tidak-bd: #D95757;
        --st-resch-bg: #33240F; --st-resch-fg: #EBB271; --st-resch-bd: #D9701A;
        --sky-50: #0C2635; --sky-600: #6BC2EE;
        --sh-1: 0 1px 3px rgba(0,0,0,.35);
        --sh-2: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.4);
        --sh-3: 0 2px 4px rgba(0,0,0,.3), 0 12px 28px rgba(0,0,0,.5);
    }
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-md);
    line-height: 1.55;
    color: var(--c-text);
    background: var(--c-bg);
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-h) + var(--s-6) + env(safe-area-inset-bottom, 0px));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,h2,h3,h4 { margin: 0 0 var(--s-2); line-height: 1.2; font-weight: 800; letter-spacing: -.015em; }
p { margin: 0 0 var(--s-3); }
a { color: var(--c-primary); text-decoration: none; }
img, svg { max-width: 100%; display: block; }

:focus-visible {
    outline: 3px solid var(--sky-500);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

/* ---------- 3. LAYOUT ---------- */
.containerx {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: var(--s-4);
}

.page-head { margin-bottom: var(--s-4); }
.page-head h1 { font-size: var(--fs-xl); margin: 0 0 2px; }
.page-head .sub { font-size: var(--fs-sm); color: var(--c-text-3); margin: 0; }

/* Topbar (desktop) */
.topbar {
    display: none;
    position: sticky; top: 0; z-index: 60;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}
.topbar-inner {
    max-width: 1000px; margin: 0 auto;
    padding: 0 var(--s-5); height: 62px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand {
    font-weight: 800; font-size: var(--fs-lg); letter-spacing: -.02em;
    color: var(--c-primary-d);
    display: flex; align-items: center; gap: var(--s-2);
}
.topnav { display: flex; gap: var(--s-1); }
.topnav a {
    display: flex; align-items: center; gap: var(--s-2);
    padding: var(--s-2) var(--s-4); border-radius: var(--r-pill);
    color: var(--c-text-2); font-weight: 700; font-size: var(--fs-sm);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.topnav a:hover { background: var(--n-100); color: var(--c-text); }
.topnav a.active { background: var(--brand-50); color: var(--brand-700); }

/* Bottom nav (mobile) */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    display: flex;
}
.bottomnav a {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    font-size: var(--fs-2xs); font-weight: 700;
    color: var(--c-text-3);
    transition: color var(--dur) var(--ease);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.bottomnav a i { font-size: 19px; transition: transform var(--dur) var(--ease); }
.bottomnav a.active { color: var(--c-primary); }
.bottomnav a.active i { transform: translateY(-2px) scale(1.06); }
.bottomnav a.active::after {
    content: ''; position: absolute; top: 0; left: 50%;
    transform: translateX(-50%);
    width: 26px; height: 3px; border-radius: 0 0 4px 4px;
    background: var(--c-primary);
}

/* ---------- 4. CARD ---------- */
.cardx {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    padding: var(--s-5);
    margin-bottom: var(--s-4);
}
.cardx__title {
    font-size: var(--fs-md); font-weight: 800;
    margin-bottom: var(--s-4);
    display: flex; align-items: center; gap: var(--s-2);
}

/* ---------- 5. FORM ---------- */
.field { margin-bottom: var(--s-5); }
.field:last-child { margin-bottom: 0; }

.label {
    display: block; font-size: var(--fs-sm); font-weight: 700;
    margin-bottom: var(--s-2); color: var(--c-text);
}
.label .req { color: var(--st-tidak-bd); margin-left: 3px; font-weight: 800; }
.hint { font-size: var(--fs-xs); color: var(--c-text-3); margin-top: var(--s-2); }

.input, .select, .textarea {
    width: 100%; min-height: var(--tap);
    padding: var(--s-3) var(--s-4);
    font-family: inherit; font-size: var(--fs-md); font-weight: 500;
    color: var(--c-text); background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--c-text-3); font-weight: 400; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-300); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 4px var(--brand-50);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7A73' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L2 5h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--s-4) center;
    padding-right: var(--s-7);
    cursor: pointer;
}

/* Validasi inline */
.field--error .input, .field--error .select { border-color: var(--st-tidak-bd); background: var(--st-tidak-bg); }
.field-error {
    display: none; align-items: center; gap: 6px;
    color: var(--st-tidak-fg); font-size: var(--fs-sm); font-weight: 700; margin-top: var(--s-2);
}
.field--error .field-error { display: flex; }

/* ---------- 6. STATUS SELECTOR ---------- */
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }

.status-opt {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; min-height: 84px; padding: var(--s-3) var(--s-1);
    font-family: inherit; font-size: var(--fs-xs); font-weight: 800;
    text-align: center; color: var(--c-text-2);
    background: var(--c-surface);
    border: 2px solid var(--c-border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.status-opt i { font-size: 23px; transition: transform var(--dur) var(--ease); }
.status-opt span { line-height: 1.15; }
.status-opt:hover { border-color: var(--n-300); background: var(--n-25); }
.status-opt:active { transform: scale(.97); }

.status-opt[data-status="Hadir"].is-active {
    background: var(--st-hadir-bg); border-color: var(--st-hadir-bd); color: var(--st-hadir-fg);
}
.status-opt[data-status="Tidak Hadir"].is-active {
    background: var(--st-tidak-bg); border-color: var(--st-tidak-bd); color: var(--st-tidak-fg);
}
.status-opt[data-status="Reschedule"].is-active {
    background: var(--st-resch-bg); border-color: var(--st-resch-bd); color: var(--st-resch-fg);
}
.status-opt.is-active i { transform: scale(1.08); }

/* Indikator centang saat aktif */
.status-opt .tick {
    position: absolute; top: 7px; right: 7px;
    width: 19px; height: 19px; border-radius: 50%;
    background: currentColor; color: var(--c-surface);
    display: grid; place-items: center; font-size: 10px;
    opacity: 0; transform: scale(.4);
    transition: all var(--dur) var(--ease);
}
.status-opt.is-active .tick { opacity: 1; transform: scale(1); }

/* ---------- 7. BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    min-height: var(--tap); padding: var(--s-3) var(--s-5);
    font-family: inherit; font-size: var(--fs-md); font-weight: 800;
    letter-spacing: -.01em;
    border: none; border-radius: var(--r-md);
    cursor: pointer; white-space: nowrap;
    transition: transform .16s var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }

.btn--primary { background: var(--c-primary); color: #fff; box-shadow: var(--sh-2); }
.btn--primary:hover { background: var(--c-primary-d); box-shadow: var(--sh-3); }

.btn--ghost { background: var(--c-surface); color: var(--c-text); border: 1.5px solid var(--c-border); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-d); }

.btn--danger { background: var(--st-tidak-bg); color: var(--st-tidak-fg); }
.btn--danger:hover { background: var(--st-tidak-bd); color: #fff; }

.btn--secondary { background: var(--sky-50); color: var(--sky-600); }
.btn--secondary:hover { background: var(--sky-500); color: #fff; }

.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: var(--s-2) var(--s-3); font-size: var(--fs-sm); gap: 6px; }
.btn[disabled], .btn.is-loading { opacity: .72; pointer-events: none; }

.spinner {
    width: 17px; height: 17px; flex: 0 0 auto;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 8. SUBMIT BAR ---------- */
.submit-bar { margin-top: var(--s-4); }

/* ---------- 9. BADGE ---------- */
.badgex {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px var(--s-3);
    font-size: var(--fs-xs); font-weight: 800;
    border-radius: var(--r-pill); white-space: nowrap;
    border: 1px solid transparent;
}
.badgex--hadir   { background: var(--st-hadir-bg); color: var(--st-hadir-fg); border-color: var(--st-hadir-bd); }
.badgex--tidak   { background: var(--st-tidak-bg); color: var(--st-tidak-fg); border-color: var(--st-tidak-bd); }
.badgex--resched { background: var(--st-resch-bg); color: var(--st-resch-fg); border-color: var(--st-resch-bd); }
.badgex--neutral { background: var(--n-100); color: var(--c-text-2); border-color: var(--c-border); }

/* ---------- 10. TOAST ---------- */
.toast-wrap {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--nav-h) + var(--s-4) + env(safe-area-inset-bottom, 0px));
    width: min(93vw, 440px);
    display: flex; flex-direction: column; gap: var(--s-2);
    z-index: 400; pointer-events: none;
}
.toastx {
    display: flex; align-items: flex-start; gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--r-md);
    box-shadow: var(--sh-3);
    font-size: var(--fs-sm); font-weight: 600;
    animation: toastIn .3s var(--ease);
    pointer-events: auto;
}
.toastx__icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.toastx__body { flex: 1; min-width: 0; }
.toastx__msg { color: var(--c-text); }
.toastx--success { border-left-color: var(--st-hadir-bd); }
.toastx--success .toastx__icon { color: var(--st-hadir-bd); }
.toastx--error { border-left-color: var(--st-tidak-bd); }
.toastx--error .toastx__icon { color: var(--st-tidak-bd); }
.toastx--warning { border-left-color: var(--st-resch-bd); }
.toastx--warning .toastx__icon { color: var(--st-resch-bd); }
.toastx.is-hiding { animation: toastOut .22s var(--ease) forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------- 11. TRANSISI HALAMAN ---------- */
.containerx { animation: fadeUp .3s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 12. SKELETON ---------- */
.skel {
    background: linear-gradient(90deg, var(--n-100) 25%, var(--n-200) 37%, var(--n-100) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 13. EMPTY STATE ---------- */
.emptyx { text-align: center; padding: var(--s-8) var(--s-4); color: var(--c-text-3); }
.emptyx__ico {
    width: 72px; height: 72px; margin: 0 auto var(--s-4);
    border-radius: 50%; display: grid; place-items: center;
    background: var(--n-100); color: var(--n-400); font-size: 28px;
}
.emptyx h3 { font-size: var(--fs-md); color: var(--c-text); margin-bottom: var(--s-1); }
.emptyx p { font-size: var(--fs-sm); margin: 0 auto; max-width: 320px; }

/* ---------- 14. DASHBOARD ---------- */
.stat-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
    color: #fff; border-radius: var(--r-xl);
    padding: var(--s-6) var(--s-5);
    text-align: center; box-shadow: var(--sh-3);
    margin-bottom: var(--s-4);
}
.stat-hero::after {
    content: ''; position: absolute; top: -60%; right: -20%;
    width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255,255,255,.09);
}
.stat-hero__lbl {
    font-size: var(--fs-xs); font-weight: 800;
    text-transform: uppercase; letter-spacing: .09em;
    opacity: .9; position: relative; z-index: 1;
}
.stat-hero__num {
    font-size: var(--fs-3xl); font-weight: 800; line-height: 1;
    margin: var(--s-2) 0; position: relative; z-index: 1;
    letter-spacing: -.03em;
}
.stat-hero__date { font-size: var(--fs-xs); opacity: .9; position: relative; z-index: 1; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-bottom: var(--s-4); }
.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--s-4) var(--s-2);
    text-align: center; box-shadow: var(--sh-1);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.stat-card__ico { font-size: 22px; margin-bottom: 5px; }
.stat-card__num { font-size: var(--fs-xl); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.stat-card__lbl { font-size: var(--fs-2xs); font-weight: 800; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .04em; }
.stat-card--hadir   { border-top: 3px solid var(--st-hadir-bd); }
.stat-card--tidak   { border-top: 3px solid var(--st-tidak-bd); }
.stat-card--resched { border-top: 3px solid var(--st-resch-bd); }
.stat-card--hadir .stat-card__ico, .stat-card--hadir .stat-card__num { color: var(--st-hadir-fg); }
.stat-card--tidak .stat-card__ico, .stat-card--tidak .stat-card__num { color: var(--st-tidak-fg); }
.stat-card--resched .stat-card__ico, .stat-card--resched .stat-card__num { color: var(--st-resch-fg); }

/* Progress proporsi status */
.progress {
    display: flex; height: 10px; border-radius: var(--r-pill);
    overflow: hidden; background: var(--n-100); margin: var(--s-3) 0 var(--s-2);
}
.progress span { display: block; transition: width .5s var(--ease); }
.progress .p-hadir   { background: var(--st-hadir-bd); }
.progress .p-tidak   { background: var(--st-tidak-bd); }
.progress .p-resched { background: var(--st-resch-bd); }

.chip-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: var(--s-2) var(--s-3);
    background: var(--n-50);
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    font-size: var(--fs-sm); font-weight: 700;
}

/* ---------- 15. RIWAYAT ---------- */
.rec-list { display: flex; flex-direction: column; gap: var(--s-3); }

.rec {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-left: 4px solid var(--n-300);
    border-radius: var(--r-md);
    box-shadow: var(--sh-1);
    padding: var(--s-4);
    transition: box-shadow var(--dur) var(--ease);
}
.rec--hadir   { border-left-color: var(--st-hadir-bd); }
.rec--tidak   { border-left-color: var(--st-tidak-bd); }
.rec--resched { border-left-color: var(--st-resch-bd); }

.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.theme-btn {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px; color: var(--c-text-2);
    background: transparent; border: 1px solid var(--c-border); border-radius: var(--r-md);
    cursor: pointer; transition: all var(--dur) var(--ease);
}
.theme-btn:hover { color: var(--c-primary); border-color: var(--c-primary); background: var(--n-50); }
.theme-btn:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.rec__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.rec__name { font-size: var(--fs-md); font-weight: 800; letter-spacing: -.01em; }
.rec__meta {
    display: flex; flex-wrap: wrap; gap: 3px var(--s-4);
    font-size: var(--fs-sm); color: var(--c-text-2); margin-bottom: var(--s-2);
}
.rec__meta span { display: inline-flex; align-items: center; gap: 5px; }
.rec__meta i { color: var(--c-text-3); font-size: 12.5px; }
.rec__note {
    font-size: var(--fs-sm); padding: var(--s-2) var(--s-3);
    background: var(--n-50); border: 1px solid var(--c-border);
    border-radius: var(--r-sm); margin-bottom: var(--s-3);
    color: var(--c-text-2);
}
.rec__note b { color: var(--c-text); }
.rec__sync { font-size: var(--fs-xs); font-weight: 700; margin-bottom: var(--s-3); display: flex; align-items: center; gap: 5px; }
.rec__sync--ok   { color: var(--st-hadir-fg); }
.rec__sync--err  { color: var(--st-tidak-fg); }
.rec__sync--wait { color: var(--c-text-3); }
.rec__actions { display: flex; gap: var(--s-2); }
.rec__actions .btn { flex: 1; min-height: 42px; font-size: var(--fs-sm); }
.rec__actions form { flex: 1; display: flex; }
.rec__actions form .btn { width: 100%; }

/* Tabel desktop */
.table-desktop { display: none; }

/* ---------- 16. FILTER SEGMENTED ---------- */
.seg {
    display: flex; gap: 3px; padding: 3px;
    background: var(--n-100); border-radius: var(--r-md);
    overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
    flex: 1; min-width: max-content; min-height: 44px;
    padding: var(--s-2) var(--s-4);
    font-family: inherit; font-size: var(--fs-sm); font-weight: 800;
    color: var(--c-text-2); background: transparent;
    border: none; border-radius: var(--r-sm);
    cursor: pointer; white-space: nowrap;
    transition: all var(--dur) var(--ease);
}
.seg button.is-active { background: var(--c-surface); color: var(--c-text); box-shadow: var(--sh-1); }

/* ---------- 17. UTIL ---------- */
.mb-0 { margin-bottom: 0; }
.d-none { display: none !important; }
.mt-3 { margin-top: var(--s-4); }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- 18. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ---------- 19. MOBILE ---------- */
@media (max-width: 767px) {
    .submit-bar {
        position: fixed; left: 0; right: 0; z-index: 90;
        bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
        padding: var(--s-3) var(--s-4);
        background: var(--c-surface);
        border-top: 1px solid var(--c-border);
    }
    body { padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom, 0px)); }
    .cardx { padding: var(--s-4); border-radius: var(--r-md); }
}

/* ---------- 20. DESKTOP ---------- */
@media (min-width: 768px) {
    body { padding-bottom: var(--s-7); }
    .topbar { display: block; }
    .bottomnav { display: none; }
    .toast-wrap { bottom: var(--s-6); }
    .containerx { padding: var(--s-6); }
    .submit-bar { position: static; background: none; border: none; padding: 0; }
    .rec-list { display: none; }
    .table-desktop { display: block; }

    .table-desktop table {
        width: 100%; border-collapse: separate; border-spacing: 0;
        background: var(--c-surface);
        border: 1px solid var(--c-border);
        border-radius: var(--r-lg); overflow: hidden;
        box-shadow: var(--sh-1);
    }
    .table-desktop th {
        text-align: left; font-size: var(--fs-2xs); font-weight: 800;
        text-transform: uppercase; letter-spacing: .06em;
        color: var(--c-text-3); padding: var(--s-3) var(--s-4);
        background: var(--n-50); border-bottom: 1px solid var(--c-border);
        white-space: nowrap;
    }
    .table-desktop td {
        padding: var(--s-3) var(--s-4);
        border-bottom: 1px solid var(--c-border);
        font-size: var(--fs-sm); vertical-align: middle;
    }
    .table-desktop tbody tr:last-child td { border-bottom: none; }
    .table-desktop tbody tr:hover td { background: var(--n-25); }

    .stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
}

/* ---------- 21. PRINT ---------- */
@media print {
    .topbar, .bottomnav, .submit-bar, .toast-wrap, .rec__actions, .seg { display: none !important; }
    body { background: #fff; padding: 0; }
    .cardx, .table-desktop table { box-shadow: none; border: 1px solid #ddd; }
    .rec-list { display: none; }
    .table-desktop { display: block !important; }
}
