/* XzsnyC — design tokens & komponen dasar.
 * Gaya: bersih, modern, profesional (kartu putih, border tipis, bayangan lembut, aksen biru). */
:root {
    color-scheme: light;

    /* warna */
    --ink: #0F172A;
    --ink-2: #1E293B;
    --paper: #F6F8FC;
    --surface: #FFFFFF;
    --soft: #EEF2F8;
    --line: #E2E8F0;
    --line-strong: #CBD5E1;
    --muted: #64748B;
    --muted-2: #475569;
    --blue: #245BFF;
    --blue-deep: #1744D8;
    --blue-soft: #E8EEFF;
    --electric: #245BFF;
    --err: #B42318;
    --ok: #087443;
    --warning: #A95C00;

    /* bentuk */
    --r: 12px;
    --r-sm: 8px;
    --border: 1px solid var(--line);

    /* bayangan */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-md: 0 8px 20px -6px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
    --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, .22), 0 4px 12px rgba(15, 23, 42, .08);
    --sh-1: var(--shadow-sm);
    --sh-2: var(--shadow-md);
    --ring: 0 0 0 3px rgba(36, 91, 255, .2);

    /* gerak */
    --ease: cubic-bezier(.2, .7, .2, 1);
    --t: 180ms;

    /* alias lama */
    --white: var(--surface);
    --grid: var(--line);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 450;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    background: var(--paper);
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.hidden {
    display: none !important;
}

.mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

::selection {
    background: var(--blue);
    color: #fff;
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- identitas ---------- */
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    background: transparent;
    color: var(--blue);
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -.07em;
    box-shadow: none;
}

/* Shared wordmark used in every page header. */
.brand-inline {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-width: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.065em;
    white-space: nowrap;
    text-decoration: none;
}

.brand-initial {
    color: var(--blue) !important;
}

.brand-inline .brand-initial {
    margin-right: .01em;
}

.notfound .notfound-brand {
    margin-bottom: 2px;
    font-size: 25px;
}

@media (max-width: 390px) {
    .top .brand-inline {
        font-size: 15px;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-2);
}

/* ---------- tombol ---------- */
.btn,
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    font: 650 14px/1.15 'Inter', sans-serif;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
    transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}

.btn:active,
.btn-login:active {
    transform: translateY(1px);
}

.btn[disabled],
.btn-login[disabled] {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary,
.btn-login,
.btn:not(.ghost):not(.btn-secondary):not(.btn-ghost) {
    background: var(--blue);
    color: #fff;
}

.btn-primary:hover,
.btn-login:hover,
.btn:not(.ghost):not(.btn-secondary):not(.btn-ghost):not([disabled]):hover {
    background: var(--blue-deep);
    box-shadow: 0 8px 18px -8px rgba(36, 91, 255, .7);
}

.btn-secondary,
.btn.ghost,
.btn-ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover,
.btn.ghost:hover,
.btn-ghost:hover {
    background: var(--soft);
    box-shadow: var(--shadow-sm);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.icon-btn:hover {
    background: var(--blue-soft);
    border-color: var(--blue);
}

.icon-btn:active {
    transform: translateY(1px);
}

/* ---------- kartu ---------- */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}

.card:focus-within {
    border-color: var(--blue);
}

@media (hover: hover) {
    .card:not(.auth-card):hover {
        box-shadow: var(--shadow-md);
    }
}

.muted {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

/* ---------- form ---------- */
label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 650;
    color: var(--ink);
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    font: 500 14px 'Inter', sans-serif;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    outline: none;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}

textarea {
    min-height: 96px;
    padding: 12px 13px;
    line-height: 1.55;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #94A3B8;
    opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #94A3B8;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: var(--ring);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--err);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
}

button:disabled {
    filter: saturate(.6);
}

/* ---------- state umum ---------- */
.shimmer,
.clay-shimmer {
    background: linear-gradient(90deg, #E8EDF5 25%, #F8FAFD 50%, #E8EDF5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.3s linear infinite;
    border-radius: var(--r-sm);
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

.toast,
.notice {
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-md);
}

.center-screen {
    display: grid;
    place-items: center;
    padding: 24px;
}

.notfound {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
    max-width: 420px;
    background: var(--surface);
    padding: 34px 30px;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.notfound h1 {
    font-size: 28px;
    letter-spacing: -.03em;
    font-weight: 800;
}

.notfound .brand-mark {
    width: 48px;
    height: 48px;
    font-size: 24px;
}

.notfound .btn {
    margin-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
