/* ============================================================
   login.css — Bandar Sri Laksamana
   Layout  : Split dua kolom (Hero kiri | Form kanan)
   Palette : SELARAS layout.css — Blue Deep #0A2540, Blue Mid #0D4F8C,
             Blue Bright #1A7FD4, Blue Light #4AAEF6, Blue Pale #E8F4FD
   Type    : DM Serif Display (judul) + DM Sans (UI, sama dengan layout)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@300;400;500;600&display=swap");

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── TOKENS — identik dengan layout.css ────────────────────── */
:root {
    --blue-deep:   #0a2540;
    --blue-mid:    #0d4f8c;
    --blue-bright: #1a7fd4;
    --blue-light:  #4aaef6;
    --blue-pale:   #e8f4fd;
    --blue-ultra:  #f0f6ff;
    --text-muted:  #7a9ab8;
    --text-faint:  #a0bcd8;
    --border:      #ddeaf8;
    --bg:          #f0f6ff;
    --surface:     #ffffff;
    --danger:      #c0392b;
    --danger-bg:   #fdecea;
    --success:     #0e7a55;
    --success-bg:  #e3f6ed;
    --radius:      12px;
    --radius-sm:   8px;
}

html, body {
    height: 100%;
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--blue-deep);
    overflow: hidden;
}

/* ─── SPLIT LAYOUT ───────────────────────────────────────────── */
.login-root {
    display: grid;
    grid-template-columns: 1fr 460px;
    height: 100vh;
    overflow: hidden;
}

/* ═══════════════════════════════════════════
   PANEL KIRI — HERO
═══════════════════════════════════════════ */
.panel-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hero-slides {
    position: absolute;
    inset: 0;
}
.hero-slides img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 55%;
    filter: brightness(0.42) saturate(1.05);
    transition: opacity 0.6s ease;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    /* Gradien biru selaras dengan sidebar layout */
    background: linear-gradient(
        175deg,
        rgba(10, 37, 64, 0.6) 0%,
        rgba(13, 79, 140, 0.4) 50%,
        rgba(10, 37, 64, 0.85) 100%
    );
}

/* Konten hero — 3 zona: atas (logo), tengah (brand), bawah (stats) */
.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem 2.25rem;
}

/* ── Logo bar atas ── */
.hero-top { display: flex; align-items: center; }
.logo-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.16);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}
.logo-img {
    height: 38px;
    width: auto;
    max-width: 68px;
    object-fit: contain;
}
.logo-divider {
    width: 1px; height: 26px;
    background: rgba(255,255,255,0.25);
}

/* ── Brand tengah ── */
.hero-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 0;
}
.anchor-wrap { margin-bottom: 0.9rem; }
.anchor-emoji {
    font-size: 1.6rem;
    display: block;
    line-height: 1;
    filter: drop-shadow(0 2px 10px rgba(74,174,246,.5));
}
.brand-title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 400;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-shadow: 0 3px 20px rgba(0,0,0,.5);
    margin-bottom: 0.85rem;
}
.brand-sub {
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.7;
    max-width: 300px;
}

/* ── Stat bar bawah ── */
.hero-stats {
    display: flex;
    align-items: center;
    width: fit-content;
    padding: 0.65rem 1rem;
    background: rgba(10, 37, 64, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
}
.hstat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.67rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.03em;
    padding: 0 0.85rem;
}
.hstat:first-child { padding-left: 0; }
.hstat:last-child  { padding-right: 0; }
/* Ikon biru terang — konsisten dengan blue-light */
.hstat svg { color: var(--blue-light); flex-shrink: 0; }
.hstat-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.15); }

/* Slide dots */
.slide-dots {
    position: absolute;
    bottom: 1.25rem; right: 1.25rem;
    z-index: 10;
    display: flex;
    gap: 0.35rem;
}
.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.25s;
}
.dot.active {
    background: var(--blue-light);
    width: 16px;
    border-radius: 99px;
}

/* ═══════════════════════════════════════════
   PANEL KANAN — FORM
═══════════════════════════════════════════ */
.panel-form {
    background: var(--bg);           /* #f0f6ff — sama dengan body layout */
    display: flex;
    flex-direction: column;
    padding: 2.25rem 2.5rem 1.5rem;
    overflow-y: auto;
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(10,37,64,.12);
}

/* Header */
.form-header { margin-bottom: 1.5rem; }
.form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-bright);
    margin-bottom: 0.55rem;
}
.eyebrow-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--blue-bright);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.65); }
}
.form-title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 400;
    color: var(--blue-deep);
    line-height: 1.15;
    margin-bottom: 0.35rem;
}
.form-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Alerts */
.alert {
    display: flex; align-items: flex-start; gap: 0.55rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
    line-height: 1.4;
}
.alert svg { flex-shrink: 0; margin-top: 0.05rem; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #a8dfc5; }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #f0b8b3; }

/* Form fields */
.login-form { display: flex; flex-direction: column; }
.field-group { margin-bottom: 1.1rem; }

.field-label {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--blue-deep);
    opacity: 0.75;
    margin-bottom: 0.4rem;
}
.field-label svg { color: var(--blue-bright); opacity: 1; }

.field-wrap { position: relative; }

.field-input {
    width: 100%;
    padding: 0.72rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: "DM Sans", sans-serif;
    font-size: 0.875rem;
    color: var(--blue-deep);
    background: var(--surface);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.field-input::placeholder { color: var(--text-faint); }
.field-input:focus {
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(26,127,212,.12);
}
.field-input.is-invalid {
    border-color: var(--danger);
    background: var(--danger-bg);
}
.field-error { display: block; font-size: 0.72rem; color: var(--danger); margin-top: 0.3rem; }

/* Toggle password */
.toggle-pw {
    position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 0.2rem;
    display: flex; align-items: center;
    transition: color .15s;
}
.toggle-pw:hover { color: var(--blue-bright); }
#password { padding-right: 2.8rem; }

/* Jarak sebelum tombol submit */
.login-form { margin-bottom: 0; }
.field-group:last-of-type { margin-bottom: 1.4rem; }

/* Submit button — sama dengan sidebar gradient */
.btn-submit {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--blue-mid) 0%, var(--blue-bright) 100%);
    color: #fff;
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em;
    border: none; border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(13,79,140,.3);
    transition: opacity .18s, transform .14s, box-shadow .18s;
    position: relative; overflow: hidden;
}
.btn-submit::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
    transform: translateX(-100%);
    transition: transform .5s ease;
}
.btn-submit:hover::before { transform: translateX(100%); }
.btn-submit:hover { opacity: 0.92; box-shadow: 0 6px 24px rgba(13,79,140,.38); }
.btn-submit:active { transform: scale(0.985); }

/* Divider */
.form-divider {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 1.35rem 0 1rem;
}
.form-divider span:not(.divider-label) { flex: 1; height: 1px; background: var(--border); }
.divider-label {
    font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--text-faint); white-space: nowrap;
}

/* ─── INFO TILES — biru muda, konsisten dengan blue-pale ─────── */
.info-tiles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.info-tile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.9rem;
    /* Background biru pucat — sama dengan topbar-date di layout */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--blue-bright);
    transition: border-left-color .15s, background .15s, transform .12s;
}
.info-tile:hover {
    background: var(--blue-pale);
    border-left-color: var(--blue-mid);
    transform: translateX(2px);
}

/* Ikon kotak — biru pale dengan ikon biru terang */
.tile-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--blue-pale);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--blue-bright);
}
.info-tile:hover .tile-icon {
    background: rgba(26,127,212,0.12);
    border-color: rgba(26,127,212,0.25);
}

.info-tile > div:not(.tile-icon) {
    display: flex; flex-direction: column; gap: 0.06rem;
}
.tile-title {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--blue-deep);
}
.tile-sub {
    font-size: 0.67rem;
    color: var(--text-muted);
}

/* Footer */
.form-footer {
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.67rem;
    color: var(--text-faint);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 960px) {
    .login-root { grid-template-columns: 1fr; height: auto; overflow-y: auto; }
    html, body   { overflow: auto; }
    .panel-hero  { height: 42vh; min-height: 240px; }
    .hero-stats  { display: none; }
    .hero-brand  { justify-content: flex-end; padding-bottom: 1.5rem; }
    .brand-title { font-size: 1.75rem; }
    .panel-form  {
        box-shadow: none; border-left: none;
        border-top: 3px solid var(--blue-bright);
        padding: 2rem 1.75rem 1.5rem;
    }
}
@media (max-width: 480px) {
    .panel-form  { padding: 1.5rem 1.25rem; }
    .form-title  { font-size: 1.5rem; }
    .logo-row    { gap: 0.65rem; padding: 0.4rem 0.75rem; }
    .logo-img    { height: 32px; }
}

/* ─── Remember Me checkbox ───────────────────────────────────── */
.field-remember {
    display: flex;
    align-items: center;
    margin: -0.3rem 0 1.1rem;
}
.remember-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.remember-check input[type="checkbox"] {
    /* sembunyikan checkbox asli, ganti dengan .remember-box custom */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.remember-box {
    position: relative;
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.remember-box::after {
    content: "";
    position: absolute;
    left: 5px; top: 1.5px;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity .12s;
}
.remember-check input[type="checkbox"]:checked + .remember-box {
    background: linear-gradient(135deg, var(--blue-mid) 0%, var(--blue-bright) 100%);
    border-color: var(--blue-bright);
}
.remember-check input[type="checkbox"]:checked + .remember-box::after {
    opacity: 1;
}
.remember-check input[type="checkbox"]:focus-visible + .remember-box {
    box-shadow: 0 0 0 3px rgba(26,127,212,.18);
}
.remember-check:hover .remember-box {
    border-color: var(--blue-light);
}