:root {
    --bg: #f3f5f7;
    --surface: #ffffff;
    --ink: #0f1b2d;
    --muted: #56647a;
    --line: #e6eaf0;
    /* Tema logo perusahaan: biru dongker + oranye (uji coba di halaman Masuk) */
    --accent: #17458c;        /* biru logo */
    --accent-ink: #123a75;
    --accent-deep: #0b2350;   /* biru dongker */
    --accent-soft: #e8eef8;
    --accent-ring: rgba(23, 69, 140, .16);
    --orange: #e57a1c;        /* oranye logo */
    --orange-terang: #f39a45; /* oranye di atas latar gelap */
    --danger: #c4323a;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* ---------- Panel kiri ---------- */
.auth-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(110% 90% at 100% 0%, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 55%),
        radial-gradient(80% 60% at 0% 100%, rgba(229, 122, 28, .22) 0%, rgba(229, 122, 28, 0) 60%),
        linear-gradient(150deg, var(--accent-deep) 0%, var(--accent) 100%);
}

.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 48px solid rgba(255, 255, 255, .06);
    pointer-events: none;
}

.auth-hero::before { width: 420px; height: 420px; right: -140px; bottom: -160px; }
.auth-hero::after { width: 220px; height: 220px; left: -90px; top: 38%; border-width: 30px; border-color: rgba(229, 122, 28, .28); }
/* Garis oranye tipis di tepi atas panel */
.auth-hero { border-top: 4px solid var(--orange); }

.brand { display: flex; align-items: center; gap: .75rem; position: relative; z-index: 1; }
.brand img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #fff; }
.brand strong { display: block; font-size: 1.1rem; line-height: 1.1; }
.brand small { opacity: .8; font-size: .78rem; }

.hero-body { margin: auto 0; position: relative; z-index: 1; max-width: 460px; }
.hero-clock { font-size: 4.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-clock small { font-size: 1.6rem; color: var(--orange-terang); margin-left: 2px; }
.hero-date { font-weight: 600; opacity: .9; margin-top: .4rem; }
.hero-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 2.2rem 0 1.2rem; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.features li { display: flex; gap: .8rem; align-items: flex-start; }
.features i {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(229, 122, 28, .16);
    border: 1px solid rgba(243, 154, 69, .35);
    color: #f7a65a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}
.features strong { display: block; font-size: .92rem; }
.features span { font-size: .8rem; opacity: .8; }

.hero-foot { position: relative; z-index: 1; font-size: .75rem; opacity: .7; }

/* ---------- Form ---------- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .35rem; color: var(--accent-deep); }
.auth-card h1::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 4px; background: var(--orange); margin-bottom: .75rem; }
.auth-card .lead { color: var(--muted); font-size: .92rem; margin: 0 0 1.75rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .4rem; color: #3b4a5f; }
.input {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 .9rem;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input:focus-within > i { color: var(--accent); }
.input > i { color: var(--muted); font-size: 1.05rem; }
.input input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    padding: .85rem 0;
}
.input button {
    border: 0;
    background: transparent;
    color: var(--muted);
    min-width: 44px;
    min-height: 44px;
    margin-right: -.6rem;
    cursor: pointer;
    font-size: 1.05rem;
    border-radius: 8px;
}
.input button:hover { color: var(--ink); }

.btn-login {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: .98rem;
    padding: .9rem 1rem;
    margin-top: .5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 14px 28px -16px rgba(11, 35, 80, .85);
    transition: background .15s, transform .15s;
}
.btn-login:hover { background: var(--accent-ink); }
.btn-login:active { transform: translateY(1px); }
.btn-login[disabled] { opacity: .75; cursor: progress; }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.help { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 1.1rem; }

/* ---------- HP ---------- */
@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; }
    .auth-hero { padding: 1.4rem 1.25rem 4.5rem; border-radius: 0 0 28px 28px; }
    .auth-hero::after { display: none; }
    .hero-body { margin: 1.6rem 0 0; }
    .hero-clock { font-size: 2.8rem; }
    .hero-clock small { font-size: 1.1rem; }
    .hero-title, .features, .hero-foot { display: none; }
    .auth-main { padding: 0 1rem 2rem; margin-top: -3rem; align-items: flex-start; position: relative; z-index: 2; }
    .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.5rem 1.25rem; box-shadow: 0 24px 48px -32px rgba(15, 27, 45, .45); }
    .auth-card h1 { font-size: 1.4rem; }
    .auth-card .lead { margin-bottom: 1.25rem; }
}

.swal2-popup { border-radius: 22px !important; font-family: inherit !important; }
.swal2-styled.swal2-confirm { background: var(--accent) !important; border-radius: 12px !important; }
/* Bilah PWA: pasang aplikasi */
.pm-pwa-bilah { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 1050; width: min(520px, calc(100% - 24px)); display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid #e6eaf0; border-radius: 16px; padding: .7rem .8rem; box-shadow: 0 10px 30px rgba(15, 27, 45, .14); font-family: inherit; }
.pm-pwa-bilah > i { font-size: 1.4rem; color: var(--orange); }
.pm-pwa-bilah div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pm-pwa-bilah strong { font-size: .88rem; color: #0f1b2d; }
.pm-pwa-bilah small { font-size: .75rem; color: #56647a; }
.pm-pwa-bilah button { border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; border-radius: 10px; padding: .45rem .8rem; white-space: nowrap; cursor: pointer; }
.pm-pwa-bilah button.tutup { background: transparent; color: #56647a; font-size: 1.3rem; padding: 0 .3rem; line-height: 1; }
