:root {
    --brand: #023755;
    --brand-light: #0A5A87;
    --brand-dark: #01263B;
    --ink: #1C1B18;
    --mute: #6B6559;
    --line: #9AA5AE;
    --bg: #E9EDF1;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: 'IBM Plex Sans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* ---------- Kartu + bayangan ---------- */

.auth-stage {
    position: relative;
    width: 100%;
    max-width: 880px;
    padding-bottom: 60px;
}

.auth-stage::before,
.auth-stage::after {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: 60px;
    width: 50%;
    height: 40px;
    background: transparent;
    box-shadow: 0 24px 24px -8px rgba(0, 0, 0, .4);
}
.auth-stage::before {
    left: 3%;
    transform: rotate(-1.8deg);
    transform-origin: 0 100%;
}
.auth-stage::after {
    right: 3%;
    transform: rotate(1.8deg);
    transform-origin: 100% 100%;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: none;
}

/* ---------- Panel kiri ---------- */

.auth-brand {
    position: relative;
    background: var(--brand);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 28px;
    min-height: 420px;
    overflow: hidden;
}
.auth-brand .waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.auth-brand .brand-content { position: relative; z-index: 1; }
.brand-logo {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}
.brand-logo img { width: 70%; height: auto; }
.brand-name {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .12em;
    margin: 0 0 6px;
}
.brand-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    opacity: .75;
    margin: 0;
}

/* ---------- Panel kanan ---------- */

.auth-panel { padding: 48px 44px; }
.auth-panel h1 {
    font-size: 28px;
    font-weight: 400;
    text-align: center;
    margin: 0 0 6px;
}
.auth-sub {
    text-align: center;
    font-size: 12px;
    color: var(--mute);
    margin: 0 0 26px;
    line-height: 1.5;
}
.auth-panel p { font-size: 14px; line-height: 1.55; }

.field {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    margin: 20px 0;
    color: var(--brand);
    transition: border-color .15s;
}
.field:focus-within { border-color: var(--brand); }
.field svg { width: 20px; height: 20px; flex-shrink: 0; }
.field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 0;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
}
.field input::placeholder { color: #8A929A; }

.btn-primary {
    display: block;
    margin: 28px auto 0;
    min-width: 160px;
    padding: 12px 36px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.btn-primary:hover { background: var(--brand-light); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: wait; }

.btn-outline {
    display: block;
    margin: 18px auto 0;
    padding: 10px 28px;
    border: 1px solid var(--brand);
    border-radius: 999px;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.btn-outline:hover { background: var(--brand); color: #fff; }

.auth-links {
    text-align: center;
    font-size: 13px;
    color: var(--mute);
    margin: 18px 0 0;
}
.auth-links a, .auth-panel a { color: var(--brand); font-weight: 500; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    font-size: 12px;
    color: var(--mute);
}
.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #D5DADF;
}

.auth-oauth-buttons { display: flex; gap: 10px; }
.btn-oauth {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #D5DADF;
    border-radius: 999px;
    color: var(--ink) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.btn-oauth:hover { border-color: var(--brand); background: #F4F8FB; }
.btn-oauth svg { width: 18px; height: 18px; }

.auth-errors, .auth-error, .auth-success, .auth-info {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    list-style: none;
}
.auth-errors, .auth-error { background: #FDECEC; color: #9B1C1C; }
.auth-success { background: #E8F5EE; color: #17633B; }
.auth-info { background: #E7F1F8; color: var(--brand); }

.account-row { font-size: 14px; margin: 10px 0; }
.account-row strong { color: var(--mute); font-weight: 500; margin-right: 6px; }

.auth-footer {
    margin-top: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--mute);
    text-align: center;
}

/* ---------- Layar kecil ---------- */

@media (max-width: 720px) {
    .auth-stage { padding-bottom: 44px; }
    .auth-stage::before,
    .auth-stage::after { bottom: 44px; height: 28px; box-shadow: 0 16px 18px -6px rgba(0, 0, 0, .4); }

    .auth-card { grid-template-columns: 1fr; border-radius: 22px; }
    .auth-brand { min-height: 0; padding: 28px 20px; }
    .brand-logo { width: 72px; height: 72px; margin-bottom: 10px; }
    .brand-name { font-size: 18px; }
    .auth-panel { padding: 32px 24px; }
    .auth-oauth-buttons { flex-direction: column; }
}