/*!
 * OpenSID Lamongan Digital — Layanan Mandiri warga v0.1 (Fase 5)
 * Lapisan di atas tampilan Layanan Mandiri OpenSID (Bootstrap 3 + AdminLTE 2).
 * Hanya aktif bila <html> memiliki kelas "lds-mandiri" (resources/views/lamongan/mandiri_head).
 * Prinsip: mobile-first, target sentuh >= 48px, teks input 16px (iOS tidak memperbesar).
 * Berlisensi GPL v3, mengikuti OpenSID.
 */
html.lds-mandiri {
    --m-navy: #0B2545;
    --m-navy-2: #13315C;
    --m-blue: #1769E0;
    --m-blue-600: #0F57C2;
    --m-blue-50: #E8F0FD;
    --m-emerald: #10B981;
    --m-bg: #F5F7FB;
    --m-surface: #FFFFFF;
    --m-border: #E3E8F0;
    --m-text: #0F1B2D;
    --m-text-2: #4A5A72;
    --m-text-3: #7A889E;
    --m-radius: 12px;
    --m-radius-lg: 20px;
    --m-shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px rgba(15, 27, 45, .08);
    --m-font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html.lds-mandiri body { font-family: var(--m-font); color: var(--m-text); -webkit-font-smoothing: antialiased; }

/* ==========================================================================
   1. HALAMAN MASUK (auth/index.blade.php)
   ========================================================================== */
html.lds-mandiri body.login {
    background: linear-gradient(180deg, var(--m-navy) 0, var(--m-navy) 260px, var(--m-bg) 260px) !important;
    min-height: 100vh;
}
html.lds-mandiri body.login .top-content,
html.lds-mandiri body.login .inner-bg { padding: 0 !important; background: none !important; }
html.lds-mandiri body.login .container { width: auto; max-width: 460px; padding: 24px 16px 32px; }
html.lds-mandiri body.login .row { margin: 0; }
html.lds-mandiri body.login .form-box {
    float: none; width: 100%; margin: 0 auto; padding: 0;
    background: var(--m-surface); border-radius: var(--m-radius-lg); box-shadow: var(--m-shadow); overflow: hidden;
}
html.lds-mandiri body.login .form-top {
    background: var(--m-surface) !important; color: var(--m-text) !important;
    padding: 24px 22px 8px !important; text-align: center; border: 0; border-radius: 0; height: auto;
}
html.lds-mandiri body.login .form-top img { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 12px; }
html.lds-mandiri body.login .form-top h1 {
    font-family: var(--m-font); font-size: 19px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em;
    color: var(--m-text) !important; margin: 0 0 8px; text-transform: none;
}
html.lds-mandiri body.login .form-top h3 {
    font-family: var(--m-font); font-size: 13px; line-height: 1.55; font-weight: 500;
    color: var(--m-text-2) !important; margin: 0; text-transform: none;
}
html.lds-mandiri body.login .form-bottom { background: var(--m-surface) !important; padding: 16px 22px 22px !important; border-radius: 0; }
html.lds-mandiri body.login .form-bottom .form-group { margin-bottom: 12px; }
html.lds-mandiri body.login .form-bottom input.form-control {
    height: 52px; font-size: 16px; font-family: var(--m-font); font-weight: 600; letter-spacing: .06em;
    text-align: left; color: var(--m-text);
    background: var(--m-bg) !important; border: 1px solid var(--m-border) !important; border-radius: var(--m-radius) !important;
    padding: 0 16px; box-shadow: none;
}
html.lds-mandiri body.login .form-bottom input.form-control::placeholder { letter-spacing: 0; font-weight: 500; color: var(--m-text-3); }
html.lds-mandiri body.login .form-bottom input.form-control:focus {
    background: #fff !important; border-color: var(--m-blue) !important; box-shadow: 0 0 0 3px rgba(23, 105, 224, .18) !important; outline: 0;
}
html.lds-mandiri body.login .form-bottom label[for="checkbox"] { font-weight: 500; color: var(--m-text-2); font-size: 14px; }
html.lds-mandiri body.login .form-bottom center { text-align: left; display: flex; align-items: center; gap: 8px; }
html.lds-mandiri body.login .form-bottom input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--m-blue); }
html.lds-mandiri body.login .form-bottom .btn {
    height: 50px; border-radius: var(--m-radius) !important; font-family: var(--m-font); font-size: 15px;
    text-transform: none; letter-spacing: 0; box-shadow: none; transition: background .15s, border-color .15s;
}
html.lds-mandiri body.login .form-bottom .btn b { font-weight: 700; }
/* Tombol utama MASUK */
html.lds-mandiri body.login .form-bottom button[type="submit"] {
    background: var(--m-blue) !important; border: 0 !important; color: #fff !important;
}
html.lds-mandiri body.login .form-bottom button[type="submit"]:hover { background: var(--m-blue-600) !important; }
/* Tombol sekunder (e-KTP, Lupa PIN, Daftar) */
html.lds-mandiri body.login .form-bottom a > .btn,
html.lds-mandiri body.login .form-bottom button[type="button"] {
    background: var(--m-surface) !important; border: 1px solid var(--m-border) !important; color: var(--m-text) !important;
}
html.lds-mandiri body.login .form-bottom a > .btn:hover { border-color: var(--m-blue) !important; color: var(--m-blue) !important; }
html.lds-mandiri body.login .login-footer-bottom { margin-top: 14px; text-align: center; font-size: 12px; }
html.lds-mandiri body.login .login-footer-bottom a { color: var(--m-text-3) !important; }

/* Tombol "Pasang aplikasi" (lamongan-mandiri.js, muncul bila peramban mendukung) */
html.lds-mandiri .lds-pasang {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    min-height: 50px; margin: 4px 0 12px; border-radius: var(--m-radius);
    background: var(--m-blue-50); color: var(--m-blue-600); border: 1px dashed var(--m-blue);
    font: 700 15px/1.2 var(--m-font); cursor: pointer;
}
html.lds-mandiri .lds-pasang[hidden] { display: none; }

/* ==========================================================================
   2. HALAMAN SETELAH MASUK (layouts/index.blade.php)
   ========================================================================== */
html.lds-mandiri body.layout-top-nav { background: var(--m-bg); }
html.lds-mandiri .main-header .navbar { background: var(--m-navy) !important; border: 0; }
html.lds-mandiri .content-wrapper { background: var(--m-bg) !important; }
html.lds-mandiri .box {
    border: 1px solid var(--m-border); border-top: 1px solid var(--m-border) !important;
    border-radius: 16px; box-shadow: var(--m-shadow);
}
html.lds-mandiri .box-header { border-radius: 16px 16px 0 0; }
html.lds-mandiri .btn { border-radius: 10px; }
html.lds-mandiri .form-control { border-radius: 10px; min-height: 42px; font-size: 15px; }

/* Bilah navigasi bawah (ponsel): disisipkan lamongan-mandiri.js setelah warga masuk */
html.lds-mandiri .lds-navbawah { display: none; }
@media (max-width: 767px) {
    html.lds-mandiri .lds-navbawah {
        display: grid; grid-template-columns: repeat(4, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
        background: var(--m-surface); border-top: 1px solid var(--m-border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 16px rgba(15, 27, 45, .06);
    }
    html.lds-mandiri .lds-navbawah a {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        min-height: 50px; border-radius: 12px; color: var(--m-text-3); font: 600 11.5px/1.2 var(--m-font); text-decoration: none;
    }
    html.lds-mandiri .lds-navbawah a i { font-size: 19px; }
    html.lds-mandiri .lds-navbawah a[aria-current="page"] { color: var(--m-blue); background: var(--m-blue-50); }
    html.lds-mandiri.lds-ada-navbawah .content-wrapper,
    html.lds-mandiri.lds-ada-navbawah .main-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    html.lds-mandiri *, html.lds-mandiri *::before, html.lds-mandiri *::after { transition: none !important; animation: none !important; }
}
