/* Halaman login admin OpenSID (desain baru: panel hero + kartu login) */

body.login {
    font-family: 'Plus Jakarta Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #334155;
    line-height: 1.6;
    text-align: left;
    background-color: #dbeafe;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    margin: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body.login a,
body.login a:hover,
body.login a:focus {
    text-decoration: none;
    -o-transition: all .3s;
    -moz-transition: all .3s;
    -webkit-transition: all .3s;
    -ms-transition: all .3s;
    transition: all .3s;
}

body.login img {
    max-width: 100%;
}

body.login ::-moz-selection {
    background: #1d6ce3;
    color: #fff;
    text-shadow: none;
}

body.login ::selection {
    background: #1d6ce3;
    color: #fff;
    text-shadow: none;
}

/* ---------- Dekorasi sudut ---------- */

.login-blob-bottom {
    position: fixed;
    right: -190px;
    bottom: -190px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b82f6 0%, #1d6ce3 55%, #1558c0 100%);
    z-index: 1;
    pointer-events: none;
}

/* ---------- Layout utama ---------- */

.login-page {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    height: 100%;
    min-height: 0;
}

/* ---------- Panel kiri (hero) ---------- */

.login-hero {
    position: relative;
    flex: 1 1 56%;
    max-width: 56%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
}

.login-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        102deg,
        rgba(8, 38, 80, 0.88) 0%,
        rgba(10, 45, 95, 0.66) 42%,
        rgba(10, 45, 95, 0.28) 72%,
        rgba(10, 45, 95, 0) 100%
    );
    z-index: 1;
}

.login-hero-blob {
    position: absolute;
    top: -180px;
    left: -180px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4d93f7 0%, #1d6ce3 60%, #1558c0 100%);
    z-index: 2;
    pointer-events: none;
}

.login-hero-inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-height: 0;
    padding: 40px 56px 40px 64px;
    gap: 28px;
}

/* Brand desa */

.hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    margin-bottom: 40px;
}

.hero-brand:hover,
.hero-brand:focus {
    color: #fff;
    opacity: .9;
}

.hero-brand-logo {
    width: 62px;
    height: 62px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25));
}

.hero-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.hero-brand-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2px;
    opacity: .95;
}

.hero-brand-name {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: #fff;
}

.hero-brand-meta {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    opacity: .85;
    margin-top: 2px;
}

.hero-brand-sep {
    margin: 0 4px;
}

/* Intro */

.hero-eyebrow {
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #fff;
    opacity: .9;
}

.hero-title {
    margin: 0 0 14px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.5px;
    color: #fff;
}

.hero-desc {
    margin: 0 0 28px;
    max-width: 470px;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.75;
    color: #fff;
    opacity: .92;
}

/* Fitur layanan */

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 22px 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-features li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 92px;
}

.hero-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2f7ef0, #1d6ce3);
    color: #fff;
    font-size: 17px;
    box-shadow: 0 8px 18px rgba(29, 108, 227, .35);
}

.hero-feature-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
}

/* Tagline */

.hero-tagline-script {
    margin: 0;
    font-family: 'Great Vibes', 'Brush Script MT', cursive;
    font-size: 27px;
    font-weight: 400;
    line-height: 1.3;
    color: #fff;
}

.hero-tagline-bar {
    display: block;
    width: 54px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1d6ce3 0%, #7db3f7 100%);
}

/* ---------- Panel kanan (kartu login) ---------- */

.login-panel {
    flex: 1 1 44%;
    max-width: 44%;
    min-height: 0;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 32px 40px;
    position: relative;
    z-index: 2;
}

.login-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
    background: #fff;
    border-radius: 24px;
    padding: 32px 34px 24px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(15, 40, 85, .22);
    flex-shrink: 0;
}

.login-card-logo {
    display: inline-block;
    margin-bottom: 14px;
}

.login-card-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.login-card-bsre {
    display: block;
    width: 150px;
    margin: 10px auto 0;
}

.login-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: #12294d;
}

.login-subtitle {
    margin: 0 0 22px;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.7;
    color: #64748b;
}

/* Peringatan / error */

.login-alert {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    text-align: left;
}

.login-alert p {
    margin: 0;
    line-height: 1.6;
}

.login-alert p + p {
    margin-top: 6px;
}

/* Form */

.login-form {
    margin: 0;
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-input {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 15px;
    top: 24px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
}

.login-card .login-input input.form-control {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 44px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 48px;
    text-align: left;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all .25s ease;
}

.login-input input.form-control:focus {
    outline: 0;
    background: #fff;
    border-color: #1d6ce3;
    box-shadow: 0 0 0 3px rgba(29, 108, 227, .14);
}

.login-input input.form-control:-webkit-autofill,
.login-input input.form-control:-webkit-autofill:hover,
.login-input input.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #1e293b;
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset;
    transition: background-color 5000s ease-in-out 0s;
}

.login-input input.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
    opacity: 1;
}

.login-input-toggle {
    position: absolute;
    right: 8px;
    top: 24px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 15px;
    cursor: pointer;
    transition: all .25s ease;
}

.login-input-toggle:hover,
.login-input-toggle:focus {
    outline: 0;
    color: #1d6ce3;
    background: rgba(29, 108, 227, .08);
}

/* Ingat saya + lupa password */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 20px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1d6ce3;
    cursor: pointer;
}

.login-forgot {
    font-size: 13.5px;
    font-weight: 600;
    color: #1d6ce3;
}

.login-forgot:hover,
.login-forgot:focus {
    color: #1558c0;
    text-decoration: underline;
}

/* Tombol */

button.login-btn,
.login-card form button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(145deg, #2f7ef0 0%, #1d6ce3 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 48px;
    text-shadow: none;
    box-shadow: 0 10px 22px rgba(29, 108, 227, .32);
    -o-transition: all .25s ease;
    -moz-transition: all .25s ease;
    -webkit-transition: all .25s ease;
    -ms-transition: all .25s ease;
    transition: all .25s ease;
    cursor: pointer;
}

button.login-btn:hover,
button.login-btn:focus,
button.login-btn:active,
.login-card form button.btn:hover,
.login-card form button.btn:focus,
.login-card form button.btn:active {
    outline: 0;
    color: #fff;
    background: linear-gradient(145deg, #1d6ce3 0%, #1558c0 100%);
    box-shadow: 0 12px 26px rgba(21, 88, 192, .4);
    transform: translateY(-1px);
}

button.login-btn:disabled,
.login-card form button.btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-btn-otp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 20px;
    border: 1.5px solid #cfe0f8;
    border-radius: 12px;
    background: #f5f9ff;
    color: #1d6ce3;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 42px;
    transition: all .25s ease;
}

.login-btn-otp:hover,
.login-btn-otp:focus {
    outline: 0;
    background: #e8f1fe;
    border-color: #1d6ce3;
    color: #1558c0;
    text-decoration: none;
}

/* Pembatas "atau" */

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 500;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Kotak informasi akses */

.login-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #eef4fb;
    text-align: left;
}

.login-notice-icon {
    margin-top: 2px;
    color: #1d6ce3;
    font-size: 18px;
    flex-shrink: 0;
}

.login-notice-body {
    flex: 1;
}

.login-notice-title {
    margin: 0 0 3px;
    font-size: 13.5px;
    font-weight: 700;
    color: #12294d;
}

.login-notice-text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #64748b;
}

/* Hak cipta */

.login-copyright {
    margin: 18px 0 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: #94a3b8;
}

.login-copyright a {
    color: #64748b;
    font-weight: 600;
}

.login-copyright a:hover,
.login-copyright a:focus {
    color: #1d6ce3;
}

/* ---------- Element lain di dalam kartu ---------- */

.login-card .form-group.has-error .login-input input.form-control,
.login-card .form-control.input-error {
    border-color: #f87171;
    background: #fff;
}

.login-card label.error {
    display: block;
    margin-top: 5px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    position: static !important;
}

.login-card .alert {
    border-radius: 12px;
    font-size: 13px;
    text-align: left;
}

.login-card .callout {
    padding: 12px 16px;
    border-radius: 12px;
    background: #eef4fb;
    border: 1px solid #d5e5f9;
    text-align: left;
    margin-bottom: 16px;
}

.login-card .callout p {
    margin: 0;
    color: #334155;
}

.login-card a.btn {
    display: inline-block;
    height: 44px;
    padding: 11px 20px;
    border-radius: 12px;
    border: 1.5px solid #cfe0f8;
    background: #f5f9ff;
    color: #1d6ce3;
    font-size: 13.5px;
    font-weight: 700;
    transition: all .25s ease;
}

.login-card a.btn:hover,
.login-card a.btn:focus {
    background: #e8f1fe;
    border-color: #1d6ce3;
    color: #1558c0;
    text-decoration: none;
}

.login-card img#captcha {
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.login-card .captcha input.form-control,
.login-card form .form-control {
    width: 100%;
    height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    font-family: inherit;
    font-size: 14px;
    padding: 0 16px;
    box-shadow: none;
}

.login-card form .form-control:focus {
    outline: 0;
    background: #fff;
    border-color: #1d6ce3;
    box-shadow: 0 0 0 3px rgba(29, 108, 227, .14);
}

.login-card .otp-container {
    justify-content: center;
}

.login-card hr {
    border-top: 1px solid #e2e8f0;
    margin: 14px 0;
}

/* ---------- Responsif ---------- */

/* Desktop: rapatkan isi agar muat satu layar tanpa scroll */
@media (min-width: 992px) and (max-height: 860px) {
    .login-hero-inner {
        padding: 28px 44px 28px 52px;
        gap: 18px;
    }

    .hero-brand {
        margin-bottom: 18px;
    }

    .hero-brand-logo {
        width: 52px;
        height: 52px;
    }

    .hero-brand-name {
        font-size: 22px;
    }

    .hero-eyebrow {
        font-size: 11.5px;
        margin-bottom: 6px;
    }

    .hero-title {
        font-size: 27px;
        margin-bottom: 10px;
    }

    .hero-desc {
        margin-bottom: 16px;
        font-size: 13.5px;
        line-height: 1.65;
    }

    .hero-features {
        gap: 14px 20px;
    }

    .hero-features li {
        gap: 8px;
    }

    .hero-feature-icon {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .hero-tagline-script {
        font-size: 23px;
    }

    .login-panel {
        padding: 20px 32px;
    }

    .login-card {
        padding: 24px 28px 18px;
        border-radius: 20px;
    }

    .login-card-logo {
        margin-bottom: 10px;
    }

    .login-card-logo img {
        width: 56px;
        height: 56px;
    }

    .login-title {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .login-subtitle {
        margin-bottom: 16px;
        font-size: 13px;
    }

    .login-form .form-group {
        margin-bottom: 12px;
    }

    .login-options {
        margin-bottom: 14px;
    }

    .login-divider {
        margin: 14px 0;
    }

    .login-notice {
        padding: 11px 14px;
    }

    .login-copyright {
        margin-top: 12px;
    }

    .login-alert {
        margin-bottom: 12px;
        padding: 10px 14px;
    }
}

/* ---------- Tablet & Android (potret): hero ringkas + kartu langsung terlihat ---------- */

@media (max-width: 991px) {
    body.login {
        background-attachment: scroll;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: visible;
        -webkit-tap-highlight-color: transparent;
    }

    .login-page {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .login-hero {
        flex: none;
        max-width: none;
    }

    .login-hero::before {
        background: linear-gradient(160deg, rgba(8, 38, 80, 0.88) 0%, rgba(10, 45, 95, 0.6) 100%);
    }

    .login-hero-inner {
        padding: 28px 28px 58px;
        gap: 0;
    }

    .hero-brand {
        margin-bottom: 18px;
    }

    .hero-eyebrow {
        font-size: 11.5px;
        margin-bottom: 6px;
    }

    .hero-title {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .hero-desc {
        margin-bottom: 0;
        max-width: 560px;
    }

    /* Sembunyikan deret fitur & tagline agar kartu login langsung terlihat */
    .hero-features,
    .hero-tagline {
        display: none;
    }

    .login-panel {
        flex: none;
        max-width: none;
        padding: 0 20px 48px;
        margin-top: -36px;
        overflow: visible;
    }

    .login-card {
        max-width: 460px;
        margin: 0 auto;
        position: relative;
        z-index: 3;
    }

    /* Cegah zoom otomatis iOS saat fokus ke input */
    .login-card .login-input input.form-control,
    .login-card form .form-control {
        font-size: 16px;
    }

    .login-blob-bottom {
        right: -140px;
        bottom: -140px;
        width: 320px;
        height: 320px;
        opacity: .85;
    }
}

/* ---------- Ponsel ---------- */

@media (max-width: 767px) {
    .login-hero-inner {
        padding: 22px 18px 52px;
    }

    .hero-brand {
        margin-bottom: 12px;
        gap: 12px;
    }

    .hero-brand-logo {
        width: 48px;
        height: 48px;
    }

    .hero-brand-label {
        font-size: 12px;
    }

    .hero-brand-name {
        font-size: 20px;
    }

    .hero-brand-meta {
        font-size: 9.5px;
        letter-spacing: .8px;
    }

    .hero-eyebrow,
    .hero-desc {
        display: none;
    }

    .hero-title {
        font-size: 21px;
        margin-bottom: 0;
    }

    .login-panel {
        padding: 0 14px 40px;
        margin-top: -32px;
    }

    .login-card {
        border-radius: 18px;
        padding: 24px 18px 18px;
    }

    .login-card-logo {
        margin-bottom: 10px;
    }

    .login-card-logo img {
        width: 58px;
        height: 58px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-subtitle {
        margin-bottom: 16px;
        font-size: 12.5px;
    }

    .login-options {
        margin-bottom: 16px;
    }
}

/* ---------- Area sentuh (perangkat touch) ---------- */

@media (pointer: coarse) {
    .login-input-toggle {
        width: 44px;
        height: 44px;
    }

    .login-remember {
        padding: 8px 0;
    }

    .login-remember input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .login-forgot {
        padding: 8px 0;
    }
}

/* ---------- Ponsel/tablet lanskap pendek: kembali dua kolom ---------- */

@media (max-width: 991px) and (orientation: landscape) and (max-height: 480px) {
    body.login {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .login-page {
        flex-direction: row;
        height: 100%;
        min-height: 0;
    }

    .login-hero {
        flex: 1 1 40%;
        max-width: 40%;
    }

    .login-hero-inner {
        padding: 18px 22px;
        justify-content: center;
        gap: 0;
    }

    .hero-brand {
        margin-bottom: 0;
    }

    .hero-eyebrow,
    .hero-title,
    .hero-desc {
        display: none;
    }

    .login-panel {
        flex: 1 1 60%;
        max-width: 60%;
        padding: 14px 18px;
        margin-top: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .login-card {
        max-width: 420px;
        margin: auto;
        padding: 18px 20px 14px;
        border-radius: 16px;
    }

    .login-card-logo {
        margin-bottom: 8px;
    }

    .login-card-logo img {
        width: 44px;
        height: 44px;
    }

    .login-title {
        font-size: 19px;
        margin-bottom: 4px;
    }

    .login-subtitle {
        margin-bottom: 12px;
        font-size: 12px;
    }

    .login-form .form-group {
        margin-bottom: 10px;
    }

    .login-options {
        margin-bottom: 12px;
    }

    .login-divider {
        margin: 10px 0;
    }
}
