/* ==========================================================================
   Login Administrator — Modern Premium Admin Authentication (Mobile First)
   Palette: navy blue, royal blue, cyan, white, emerald accent
   ========================================================================== */

:root {
    --navy-900: #0a1a3c;
    --navy-800: #0e2350;
    --royal-600: #1d4ed8;
    --royal-500: #2563eb;
    --cyan-500: #06b6d4;
    --cyan-300: #67e8f9;
    --emerald-500: #10b981;
    --ink: #0f1f3d;
    --muted: #5b6b8c;
    --line: #e3eaf5;
    --grad-brand: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #06b6d4 100%);
    --grad-navy: linear-gradient(150deg, #0a1a3c 0%, #0e2350 55%, #14306b 100%);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--grad-navy);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

/* Dekorasi background */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-decor span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.bg-decor .b1 { width: 380px; height: 380px; top: -140px; right: -100px;
    background: radial-gradient(circle, rgba(6,182,212,0.55), transparent 70%);
    animation: driftA 16s ease-in-out infinite alternate; }
.bg-decor .b2 { width: 340px; height: 340px; bottom: -140px; left: -90px;
    background: radial-gradient(circle, rgba(59,130,246,0.5), transparent 70%);
    animation: driftB 20s ease-in-out infinite alternate; }
.bg-decor .b3 { width: 220px; height: 220px; top: 55%; left: 55%;
    background: radial-gradient(circle, rgba(16,185,129,0.35), transparent 70%);
    animation: driftA 13s ease-in-out infinite alternate-reverse; }
@keyframes driftA { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px,50px) scale(1.15); } }
@keyframes driftB { from { transform: translate(0,0) scale(1.1); } to { transform: translate(70px,-45px) scale(0.95); } }

/* ---------- Shell ---------- */
.auth-shell {
    width: 100%;
    max-width: 1020px;
    margin: auto;
    animation: shellIn 0.6s cubic-bezier(0.22, 0.8, 0.32, 1) both;
}
@keyframes shellIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr;
    background: #fff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(2, 8, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
@media (min-width: 992px) {
    .auth-grid { grid-template-columns: 1.05fr 1fr; }
}

/* ---------- Panel brand (desktop) ---------- */
.brand-panel {
    display: none;
    position: relative;
    overflow: hidden;
    background: var(--grad-navy);
    color: #fff;
    padding: clamp(2rem, 4vw, 3rem);
    isolation: isolate;
}
@media (min-width: 992px) {
    .brand-panel { display: flex; flex-direction: column; justify-content: center; }
}
.brand-panel::before,
.brand-panel::after {
    content: ''; position: absolute; border-radius: 50%; z-index: 0; pointer-events: none;
}
.brand-panel::before { width: 300px; height: 300px; top: -110px; right: -90px;
    background: radial-gradient(circle, rgba(6,182,212,0.35), transparent 70%); }
.brand-panel::after { width: 260px; height: 260px; bottom: -100px; left: -70px;
    background: radial-gradient(circle, rgba(37,99,235,0.4), transparent 70%); }
.brand-inner { position: relative; z-index: 1; }
.brand-logo {
    width: 64px; height: 64px; object-fit: contain;
    background: #fff; border-radius: 1.1rem; padding: 8px;
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.4);
}
.brand-title {
    font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
    font-size: clamp(1.6rem, 2.5vw, 2.1rem); margin: 0;
}
.brand-title .accent {
    background: linear-gradient(90deg, #67e8f9, #93c5fd, #6ee7b7, #67e8f9);
    background-size: 220% auto;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: gradientShift 6s linear infinite;
}
@keyframes gradientShift { to { background-position: 220% center; } }
.brand-sub { font-weight: 700; color: rgba(255,255,255,0.92); font-size: 1.02rem; }
.brand-tag { color: rgba(219,231,248,0.72); font-size: 0.9rem; }
.brand-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-direction: column; gap: 0.9rem; }
.brand-points li { display: flex; align-items: center; gap: 0.8rem; font-size: 0.9rem; font-weight: 600; color: rgba(219,231,248,0.88); }
.brand-points .pi {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 0.85rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
}
.brand-points li:nth-child(1) .pi { color: var(--cyan-300); }
.brand-points li:nth-child(2) .pi { color: #93c5fd; }
.brand-points li:nth-child(3) .pi { color: #6ee7b7; }

/* ---------- Area form ---------- */
.form-side {
    padding: clamp(1.5rem, 5vw, 2.75rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Brand ringkas mobile */
.mobile-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.4rem; }
@media (min-width: 992px) { .mobile-brand { display: none; } }
.mobile-brand img {
    width: 44px; height: 44px; object-fit: contain; flex-shrink: 0;
    background: #f1f5fb; border: 1px solid var(--line); border-radius: 0.8rem; padding: 5px;
}
.mobile-brand strong { display: block; font-size: 0.98rem; font-weight: 800; color: var(--navy-900); line-height: 1.25; }
.mobile-brand small { display: block; font-size: 0.74rem; font-weight: 600; color: var(--muted); }

.shield-badge {
    width: 60px; height: 60px; border-radius: 1.1rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.7rem; color: #fff;
    background: var(--grad-brand);
    box-shadow: 0 12px 26px -8px rgba(29, 78, 216, 0.55);
    animation: shieldFloat 4.5s ease-in-out infinite;
}
@keyframes shieldFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.form-title {
    font-weight: 800; letter-spacing: -0.01em; color: var(--navy-900);
    font-size: clamp(1.3rem, 4.5vw, 1.65rem); margin: 0;
}
.form-desc { color: var(--muted); font-size: clamp(0.85rem, 2.6vw, 0.95rem); }

/* Error */
.alert-login {
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.86rem; font-weight: 600;
    border-radius: 0.9rem;
    animation: shakeIn 0.4s ease;
}
@keyframes shakeIn {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Input modern */
.field-label { font-size: 0.82rem; font-weight: 700; color: var(--navy-900); margin-bottom: 0.4rem; display: block; }
.input-modern .input-group-text {
    background: #f1f5fb; border: 1px solid var(--line); border-right: 0;
    color: var(--royal-600); border-radius: 0.9rem 0 0 0.9rem;
    font-size: 1.05rem; padding-left: 0.95rem; padding-right: 0.7rem;
}
.input-modern .form-control {
    min-height: 52px;
    border: 1px solid var(--line); border-left: 0;
    border-radius: 0 0.9rem 0.9rem 0;
    font-size: 0.95rem; font-weight: 600; color: var(--ink);
    background: #f8fafd;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input-modern .form-control::placeholder { color: #93a3bd; font-weight: 500; }
.input-modern .form-control:focus {
    background: #fff; border-color: var(--royal-500);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
    outline: 0;
}
.input-modern:focus-within .input-group-text { border-color: var(--royal-500); background: rgba(37,99,235,0.07); }
.toggle-pass {
    border: 1px solid var(--line); border-left: 0;
    background: #f8fafd; color: var(--muted);
    border-radius: 0 0.9rem 0.9rem 0;
    min-width: 52px; min-height: 52px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: color 0.2s ease, background 0.2s ease;
}
.toggle-pass:hover { color: var(--royal-600); background: rgba(37,99,235,0.07); }
.input-modern.has-toggle .form-control { border-radius: 0; }

/* Tombol submit */
.btn-login {
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    width: 100%; min-height: 52px;
    font-weight: 800; font-size: 1rem; color: #fff;
    background: var(--grad-brand); border: none; border-radius: 0.9rem;
    padding: 0.85rem 1.5rem;
    box-shadow: 0 14px 28px -10px rgba(29, 78, 216, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-login:hover:not(:disabled), .btn-login:focus-visible:not(:disabled) {
    color: #fff; transform: translateY(-2px); filter: brightness(1.06);
    box-shadow: 0 18px 34px -10px rgba(29, 78, 216, 0.6);
}
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { cursor: wait; filter: saturate(0.85); opacity: 0.92; }
.btn-login .shine {
    position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg); animation: shineSweep 3.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes shineSweep { 0%,55% { left: -80%; } 100% { left: 140%; } }

.back-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--muted); font-size: 0.86rem; font-weight: 600; text-decoration: none;
    padding: 0.6rem 0.4rem; min-height: 44px;
    transition: color 0.2s ease, gap 0.2s ease;
}
.back-link:hover { color: var(--royal-600); gap: 0.65rem; }
.secure-note {
    display: flex; align-items: center; justify-content: center; gap: 0.45rem;
    color: #9aabc4; font-size: 0.74rem; font-weight: 600;
}
.secure-note .bi { color: var(--emerald-500); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .auth-shell { animation: none; }
    .bg-decor span, .brand-title .accent, .shield-badge,
    .btn-login .shine, .alert-login { animation: none; }
    .btn-login, .back-link, .toggle-pass, .input-modern .form-control { transition: none; }
    .btn-login:hover:not(:disabled) { transform: none; }
}
