/* Gaya halaman autentikasi Palang Pintu Tata letak dua panel untuk identitas layanan dan formulir. */

/* Reset & Variables */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy:        #0f2540;
    --navy-mid:    #1a3a5c;
    --navy-light:  #1e4976;
    --red:         #c0392b;
    --red-dark:    #922b21;
    --gold:        #b8860b;
    --gold-light:  #d4a017;
    --white:       #ffffff;
    --off-white:   #f4f6f9;
    --border:      #d0d7e2;
    --text:        #1c2833;
    --muted:       #5d6d7e;
    --shadow-lg:   0 20px 60px rgba(15,37,64,0.18), 0 4px 16px rgba(15,37,64,0.10);
    --transition:  0.28s cubic-bezier(0.4,0,0.2,1);
    --font-family-base: "Segoe UI", Tahoma, Arial, sans-serif;
    --font-family-heading: "Segoe UI", Tahoma, Arial, sans-serif;
}

html, body {
    height: 100%;
    font-family: var(--font-family-base);
    background: var(--off-white);
    color: var(--text);
    overflow-x: hidden;
}

/* Layout: Split Panel */
.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* PANEL KIRI; Branding */
.login-brand {
    flex: 0 0 45%;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

/* Aksen garis merah-putih di atas */
.login-brand::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--red) 50%, var(--white) 50%);
}

/* Ornamen lingkaran dekoratif */
.login-brand::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 40px solid rgba(255,255,255,0.04);
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 36px solid rgba(255,255,255,0.04);
    pointer-events: none;
}

.deco-circle.c1 {
    width: 320px;
    height: 320px;
    bottom: -110px;
    right: -110px;
}

.deco-circle.c2 {
    width: 220px;
    height: 220px;
    top: -70px;
    left: -70px;
}

.brand-circle {
    position: absolute;
    top: -80px;
    left: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 30px solid rgba(255,255,255,0.04);
    pointer-events: none;
}

/* Area logo */
.brand-logo-wrap {
    position: relative;
    z-index: 1;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.30);
    animation: logoFloat 3s ease-in-out infinite;
    overflow: hidden;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

.brand-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.30));
}

/* Fallback jika gambar tidak ada */
.brand-logo-wrap .logo-fallback {
    font-family: var(--font-family-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -2px;
    line-height: 1;
    display: none;
}

/* Teks identitas layanan */
.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-title {
    font-family: var(--font-family-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 14px;
    animation: fadeUp 0.7s ease both;
}

.brand-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--gold-light));
    border-radius: 2px;
    margin: 0 auto 18px;
    animation: fadeUp 0.8s ease both;
}

.brand-desc {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    max-width: 300px;
    animation: fadeUp 0.9s ease both;
}

.brand-badge {
    margin-top: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 30px;
    color: rgba(255,255,255,0.70);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: fadeUp 1s ease both;
}

.brand-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--gold-light);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.4); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* PANEL KANAN; Form Login */
.login-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    background: var(--white);
    position: relative;
    animation: slideIn 0.5s ease both;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Aksen garis emas vertikal pemisah panel */
.login-box::before {
    content: '';
    position: absolute;
    left: 0; top: 10%; bottom: 10%;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--gold-light), transparent);
    border-radius: 2px;
}

.form-wrap {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 36px;
}

.form-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
}

.form-header h2 {
    font-family: var(--font-family-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
}

/* Pesan pemberitahuan */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid;
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.alert-error   { background: #fdf0ef; color: var(--red-dark); border-color: var(--red); }
.alert-success { background: #edf7f0; color: #1a6b3c; border-color: #27ae60; }
.alert-error ul { padding-left: 1.2em; margin: 0; }

/* Kolom formulir */
.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}

.field-group label .req {
    color: var(--red);
    margin-left: 2px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-size: 14px;
    font-family: var(--font-family-base);
    color: var(--text);
    background: var(--off-white);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    outline: none;
    -webkit-appearance: none;
}

.input-wrap input:focus {
    border-color: var(--navy-mid);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.10);
}

.input-wrap input:invalid:not(:placeholder-shown) {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
}

.input-wrap input::placeholder { color: #a0aab4; }

/* Tombol tampilkan atau sembunyikan password */
.input-wrap .pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 15px;
    padding: 2px;
    line-height: 1;
    transition: color var(--transition);
    user-select: none;
}
.input-wrap .pw-toggle:hover { color: var(--navy); }
.input-wrap input[type="password"],
.input-wrap input[name="password"] { padding-right: 44px; }

/* Kotak captcha */
.captcha-box { margin-bottom: 20px; }
.captcha-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}

.captcha-box .input-wrap input {
    text-align: center;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.captcha-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: 9px;
    margin-bottom: 10px;
    letter-spacing: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    user-select: none;
    border: 1.5px solid rgba(26,58,92,0.15);
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

/* Tekstur pengganggu pada gambar captcha */
.captcha-display::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Tombol kirim formulir */
.btn-submit {
    width: 100%;
    min-height: 48px;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-family-base);
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(26,58,92,0.25);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-submit:hover::after  { opacity: 1; }
.btn-submit:active { transform: scale(0.98); }
.btn-submit span  {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}
.btn-submit:disabled {
    opacity: 0.82;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 3px 10px rgba(26,58,92,0.18);
}

/* Link kembali */
.auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    text-align: center;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(26,58,92,0.18);
    border-radius: 9px;
    color: var(--navy);
    background: var(--white);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.auth-link:hover {
    border-color: var(--navy-mid);
    background: #f7f9fc;
    color: var(--navy-mid);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 0;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition);
}
.back-link:hover { color: var(--navy); }
.back-link::before { content: '← '; }

/* Footer kecil */
.form-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

/* RESPONSIVE; Mobile */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        min-height: 100vh;
    }

    .login-brand {
        flex: 0 0 auto;
        padding: 40px 24px 36px;
    }

    .brand-logo-wrap {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    .brand-logo-wrap img { width: 100%; height: 100%; }
    .brand-title  { font-size: 20px; }
    .brand-desc   { font-size: 13px; max-width: 280px; }
    .brand-badge  { margin-top: 20px; }

    .login-box {
        flex: 1;
        padding: 36px 24px 40px;
    }
    .login-box::before { display: none; }

    .form-wrap { max-width: 100%; }
    .form-header h2 { font-size: 22px; }

    .input-wrap input {
        font-size: 16px;
        min-height: 46px;
    }

    .btn-submit {
        min-height: 52px;
        border-radius: 12px;
        font-size: 15.5px;
        margin-top: 10px;
        box-shadow: 0 8px 20px rgba(15,37,64,0.24);
        touch-action: manipulation;
    }

    .btn-submit:hover::after { opacity: 0; }

    .btn-submit:active {
        transform: translateY(1px) scale(0.995);
        box-shadow: 0 5px 14px rgba(15,37,64,0.22);
    }

    .btn-submit:disabled { transform: none; }
}

@media (max-width: 400px) {
    .login-box { padding: 28px 16px 32px; }
    .brand-title { font-size: 18px; }
    .btn-submit {
        min-height: 50px;
        font-size: 15px;
        border-radius: 11px;
    }
}

/* Palang Pintu 2026; tampilan mengikuti identitas layanan terbaru. */
:root{--navy:#074b3d;--navy-mid:#0b6650;--navy-light:#178061;--gold:#b9891d;--gold-light:#e2bc53;--off-white:#fffdf7;--border:#d8d9cf;--text:#123e35;--muted:#65706a}
.login-container{background:#fffdf7}.login-brand{flex:0 0 58%;min-height:100vh;padding:32px 55px 54px;justify-content:center;background:radial-gradient(circle at 50% 28%,#1a766480,transparent 38%),linear-gradient(145deg,#075044,#063b33 75%);overflow:hidden}.login-brand:after{opacity:.18;background-image:linear-gradient(120deg,transparent 45%,#f0d171 46% 47%,transparent 48%),radial-gradient(circle at 15% 8%,#fff 0 1px,transparent 2px)}.login-brand:before{height:18px;top:auto;bottom:0;border-top:4px solid #d4a72f}.brand-kicker{position:absolute;top:32px;left:55px;right:55px;display:flex;justify-content:space-between;text-align:left;color:#fff;font-size:11px;line-height:1.55;font-weight:700;letter-spacing:3px}.brand-kicker span:last-child{padding-bottom:12px;border-bottom:3px solid var(--gold-light)}.brand-logo-wrap{width:min(430px,55vh)!important;height:min(430px,55vh)!important;margin:30px auto 2px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}.brand-logo-wrap img{object-fit:contain!important;filter:drop-shadow(0 18px 28px #001f1a66)}.brand-content{max-width:650px}.brand-title{text-transform:uppercase;font-size:46px!important;letter-spacing:4px!important;margin-top:-16px}.brand-divider{width:80px!important;height:3px!important}.brand-desc{font-family:Georgia,serif;font-size:22px!important;line-height:1.45!important}.brand-collaboration{font-size:12px;max-width:570px;margin-top:14px}.login-box{padding:34px 50px;background:radial-gradient(circle at 100% 18%,#dfe8dc 0 10%,transparent 28%),#fffdf7}.login-box:before{display:none}.form-wrap{max-width:470px}.login-identity{display:flex;align-items:center;gap:14px;margin-bottom:28px;text-decoration:none;color:var(--navy)}.login-identity img{width:64px;height:64px;object-fit:contain}.login-identity b{display:block;font-size:22px;letter-spacing:.5px}.login-identity small{display:block;font-size:7px;line-height:1.55;font-weight:700;letter-spacing:.6px}.form-header{margin-bottom:25px}.form-header h2{font:600 38px/1.2 Georgia,serif!important;color:#073e35}.form-header h2:after{content:"◆";display:block;margin:11px auto 0;color:#bc8a1d;font-size:15px;letter-spacing:16px}.form-header p{font-size:13px!important;line-height:1.55!important}.field-group{margin-bottom:15px}.field-group label,.captcha-box label{color:#173f36;font-weight:700}.input-wrap input{min-height:52px;padding:13px 17px;background:#fffefa;border-color:#c9b8ad}.input-wrap input:focus{border-color:#a7746f;box-shadow:0 0 0 3px #a7746f13}.captcha-box{margin-bottom:14px}.captcha-display{min-height:55px;background:linear-gradient(115deg,#075143,#15805f);font-family:Georgia,serif;font-size:24px;border-radius:8px}.btn-submit{min-height:54px;background:linear-gradient(115deg,#075143,#15805f);border-radius:8px}.btn-submit span:after{content:" →";margin-left:18px}.auth-actions{margin-top:16px}.auth-link{background:#fffdf7;border-color:#d7d4c7}.auth-link:before{content:"♟";font-size:22px;margin-right:12px}.back-link{padding-top:6px;color:#075143}.form-footer{margin-top:14px;padding-top:16px}.deco-circle{display:none}
@media(max-width:900px){.login-brand{flex-basis:50%;padding:32px 25px}.brand-kicker{left:25px;right:25px}.brand-title{font-size:34px!important}.brand-desc{font-size:17px!important}.login-box{padding:30px}.login-identity b{font-size:18px}}
@media(max-width:768px){.login-brand{min-height:auto;padding:70px 24px 38px}.brand-kicker{top:18px;font-size:8px;letter-spacing:1.5px}.brand-logo-wrap{width:190px!important;height:190px!important}.brand-title{font-size:28px!important}.brand-desc{font-size:15px!important}.login-box{padding:30px 20px}.login-identity{justify-content:center}.form-header h2{font-size:32px!important}}
