/* ==========================================================================
   Autentikasi & halaman error
   ========================================================================== */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 44px 52px;
    background: var(--navy-900);
    color: #e9eff9;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
    pointer-events: none;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -160px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 0 0 60px rgba(255, 255, 255, 0.022),
        0 0 0 130px rgba(255, 255, 255, 0.014);
    pointer-events: none;
}

.auth-brand-panel .brand {
    position: relative;
    z-index: 1;
}

.auth-hero {
    position: relative;
    z-index: 1;
    max-width: 470px;
}

.auth-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #b9c8de;
}

.auth-hero h1 {
    font-size: 33px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.03em;
    color: #fff;
}

.auth-hero h1 span {
    color: #8fa9ff;
}

.auth-hero p {
    margin-top: 14px;
    font-size: 13.5px;
    line-height: 1.65;
    color: #a6b6cd;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #c7d3e4;
}

.auth-feature-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: #9fb4ff;
}

.auth-feature-icon .icon {
    width: 14px;
    height: 14px;
}

.auth-feature strong {
    display: block;
    color: #eef3fb;
    font-weight: 600;
}

.auth-feature span {
    display: block;
    margin-top: 1px;
    font-size: 11.5px;
    color: #90a2bd;
}

.auth-brand-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 10.5px;
    color: #8093b0;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 392px;
    animation: page-enter 380ms var(--ease) both;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.auth-mobile-brand .brand-mark {
    background: var(--brand);
}

.auth-mobile-brand strong {
    font-size: 16px;
    color: var(--text);
}

.auth-title {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
}

.auth-subtitle {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 24px;
}

.password-field .input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-xs);
    color: var(--text-faint);
}

.password-toggle:hover {
    background: var(--surface-3);
    color: var(--text);
}

.password-toggle .icon {
    width: 16px;
    height: 16px;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -2px;
}

.auth-row a {
    font-size: 11.5px;
    font-weight: 600;
}

.auth-note {
    font-size: 11.5px;
    color: var(--text-muted);
}

.password-toggle .icon-hide[hidden] {
    display: none;
}

.auth-submit {
    margin-top: 2px;
}

.demo-box {
    margin-top: 22px;
    padding: 13px 14px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.demo-box-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.demo-box-head .icon {
    width: 13px;
    height: 13px;
}

.demo-box dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 9px 0 0;
    font-size: 11.5px;
}

.demo-box dt {
    color: var(--text-faint);
}

.demo-box dd {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    word-break: break-all;
}

.auth-foot {
    margin-top: 24px;
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--text-faint);
    text-align: center;
}

/* Halaman error */
.error-body {
    background: var(--bg);
}

.error-page {
    min-height: 100vh;
    max-width: 520px;
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 32px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.error-brand span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.error-code {
    font-size: 78px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--brand);
    opacity: 0.22;
}

.error-page h1 {
    margin-top: 8px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.error-page p {
    margin-top: 8px;
    max-width: 420px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
}

.error-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.error-foot {
    margin-top: 44px;
    font-size: 10.5px;
    color: var(--text-faint);
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 32px 20px;
    }

    .auth-mobile-brand {
        display: flex;
    }
}

/* Installer hosting */
.auth-card--wide {
    max-width: 480px;
}

.install-checks {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
}

.install-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #c7d3e4;
}

.install-check-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

.install-check-label .icon {
    width: 14px;
    height: 14px;
    color: #9fb4ff;
    flex: 0 0 14px;
}

.install-check-label code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #dbe4f3;
    word-break: break-all;
}

.install-code {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: #0f2038;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.75;
    color: #c7d3e4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}
