:root {
    color-scheme: light;
    --bg: #eef3f6;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #d9e2ec;
    --brand: #0f766e;
    --brand-dark: #0b5f59;
    --accent: #0ea5e9;
    --danger: #b91c1c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top left, #f9fbfc 0%, var(--bg) 45%, #e8eef3 100%);
    color: var(--text);
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.auth-shell {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    border: 1px solid #e2e8f0;
}

.auth-hero {
    background: linear-gradient(145deg, #0f766e, #0b5f59 55%, #115e8a 100%);
    color: #ffffff;
    padding: 20px 18px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    margin-bottom: 14px;
}

/*
 * logban.png includes light “Sinapi Aba” text — invisible on pale grey.
 * Same treatment as backoffice: dark green panel (#02693a) behind the banner.
 */
.sorm-logo-panel {
    background: #02693a;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    line-height: 0;
    align-self: start;
    max-width: 100%;
}
.sorm-logo-panel a {
    display: block;
}
.sorm-logo-panel img {
    display: block;
    width: 100%;
    max-width: 160px;
    height: auto;
}

/* Login/OTP hero: panel stands out on teal gradient */
.auth-hero .sorm-logo-panel {
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-hero h1 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.2;
}

.auth-hero p {
    margin: 0;
    color: #e6f8f7;
    line-height: 1.45;
    font-size: 0.95rem;
}

.feature-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: #ecfeff;
    line-height: 1.35;
    font-size: 0.88rem;
}

.feature-list li + li {
    margin-top: 5px;
}

.card {
    background: var(--surface);
    padding: 18px 16px;
}

.card-head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.card-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.muted {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.95rem;
}

form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.status-message {
    min-height: 20px;
    font-size: 0.86rem;
    color: var(--muted);
}

.status-message.pending {
    color: #0f766e;
}

.status-message.error {
    color: var(--danger);
}

.status-message.success {
    color: #0f766e;
}

.field-group {
    display: grid;
    gap: 7px;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.muted-link {
    font-size: 0.84rem;
    color: #0369a1;
    text-decoration: none;
}

.muted-link:hover {
    text-decoration: underline;
}

input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1rem;
    color: var(--text);
    background: var(--surface-alt);
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
    background: #fff;
}

.input-with-action {
    position: relative;
}

.inline-action {
    position: absolute;
    right: 6px;
    top: 6px;
    min-height: 32px;
    min-width: 54px;
    border: 0;
    border-radius: 6px;
    padding: 0 10px;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
}

.inline-action:hover {
    background: #cfd8e3;
}

.caps-warning {
    min-height: 18px;
    margin-top: -3px;
    font-size: 0.82rem;
    color: var(--danger);
}

.primary-btn {
    margin-top: 2px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.primary-btn:hover {
    background: var(--brand-dark);
}

.secondary-btn {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
}

.secondary-btn:hover {
    background: #f8fafc;
}

.secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.primary-btn:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.3);
    outline-offset: 2px;
}

.card-foot {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.dot-sep {
    color: #94a3b8;
}

@media (min-width: 768px) {
    .page {
        padding: 18px;
    }

    .auth-shell {
        grid-template-columns: 0.9fr 1.1fr;
    }

    .auth-hero {
        padding: 24px 22px;
    }

    .auth-hero h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 24px 22px;
    }
}

@media (max-width: 420px) {
    .card-foot .dot-sep {
        display: none;
    }

    .card-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}
