:root {
    --ink: #0e2b29;
    --teal-deep: #123832;
    --teal: #1f6f64;
    --teal-bright: #2f9c88;
    --gold: #c9a227;
    --gold-soft: #e4c25e;
    --cream: #f6f3ea;
    --ash: #8fa19e;
    --danger: #c1543c;
}
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--cream);
    position: relative;
}

/* Foto asli sebagai background penuh halaman */
.bg-photo {
    position: fixed;
    inset: 0;
    background-image: url("../images/login-bg.jpg");
    background-size: cover;
    background-position: center;
    z-index: -2;
}
.bg-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            ellipse at 20% -10%,
            rgba(47, 156, 136, 0.3),
            transparent 55%
        ),
        linear-gradient(
            165deg,
            rgba(10, 25, 23, 0.88) 0%,
            rgba(10, 33, 31, 0.78) 55%,
            rgba(8, 20, 19, 0.92) 100%
        );
    z-index: -1;
}

.stage {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
@media (max-width: 860px) {
    .stage {
        grid-template-columns: 1fr;
    }
}

/* --- Panel kiri: identitas & menara, kaca tipis di atas foto --- */
.brand-panel {
    position: relative;
    padding: 56px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(
        200deg,
        rgba(31, 111, 100, 0.38),
        rgba(10, 33, 31, 0.62)
    );
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden;
}

.eyebrow {
    font-size: 12.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-soft);
    font-weight: 600;
}
.brand-title {
    font-family: "Fraunces", serif;
    font-size: 34px;
    line-height: 1.15;
    margin: 14px 0 6px;
    font-weight: 600;
}
.brand-sub {
    color: rgba(246, 243, 234, 0.78);
    font-size: 14.5px;
    line-height: 1.6;
    max-width: 34ch;
}

.minaret {
    position: relative;
    align-self: center;
    width: 150px;
    opacity: 0.92;
    margin: 24px 0;
}
.minaret svg {
    width: 100%;
    height: auto;
    display: block;
}

.contact-block {
    font-size: 12.5px;
    color: rgba(246, 243, 234, 0.65);
    line-height: 1.7;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 16px;
}
.contact-block b {
    color: var(--gold-soft);
    font-weight: 600;
}

/* --- Panel kanan: form, kartu krem semi-transparan --- */
.form-panel {
    background: rgba(246, 243, 234, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--ink);
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
}
.form-heading {
    font-family: "Fraunces", serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px;
}
.form-caption {
    font-size: 13.5px;
    color: #5c6e6b;
    margin-bottom: 26px;
}

.role-toggle {
    display: flex;
    background: #eae5d5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 26px;
}
.role-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #6c7a77;
    border-radius: 9px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}
.role-toggle button.active {
    background: var(--ink);
    color: var(--cream);
    box-shadow: 0 6px 16px -6px rgba(14, 43, 41, 0.5);
}

.field {
    margin-bottom: 16px;
}
.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #42524f;
    margin-bottom: 6px;
}
.field input,
.field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #dad3be;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus {
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 3px rgba(47, 156, 136, 0.18);
}
.field.hidden {
    display: none;
}

.error-text {
    color: var(--danger);
    font-size: 12.5px;
    margin-top: 5px;
}

.row-between {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 20px;
}
.row-between a {
    font-size: 12.5px;
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
}
.row-between a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--teal-bright), var(--teal));
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 24px -10px rgba(31, 111, 100, 0.55);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}
.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -10px rgba(31, 111, 100, 0.65);
}
.btn-submit:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.divider-text {
    text-align: center;
    font-size: 12px;
    color: #9aa6a3;
    margin: 22px 0 16px;
}

.btn-secondary {
    display: block;
    text-align: center;
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: 1.5px solid #d9ce9a;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
}
.btn-secondary:hover {
    background: #efe9d6;
}

@media (prefers-reduced-motion: reduce) {
    .btn-submit {
        transition: none;
    }
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 44px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    padding: 4px;
}

.toggle-password:hover {
    color: #374151;
}

/* Sembunyikan ikon reveal-password bawaan Edge/IE,
   supaya cuma ikon mata custom kita yang tampil */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Jaga-jaga untuk browser Chromium yang render tombol serupa.
   PENTING: jangan pakai display:none / pointer-events:none di sini,
   karena di WebKit (Safari/iOS) itu bisa membuat SELURUH input
   password jadi tidak bisa diklik/diketik. Cukup visibility:hidden. */
input[type="password"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
}
