:root {
    --bg: #f7f4ee;
    --panel: #ffffff;
    --panel-soft: #fcfaf7;
    --line: #e9e2d8;
    --line-soft: #efe7dc;
    --text: #1f2a37;
    --muted: #6b7280;
    --brand: #916a44;
    --brand-deep: #38322d;
    --brand-soft: #f6ede3;
    --brand-soft-2: #fbf6f0;
    --shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.05);
    --white: #ffffff;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #faf8f4 0%, #f4efe8 100%);
    color: var(--text);
}

a {
    text-decoration: none;
}

button,
input,
textarea {
    font-family: inherit;
}

/* Auth Layout */
.auth-page,
.otp-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.auth-shell {
    width: min(1140px, 100%);
    background: var(--white);
    border: 1px solid #f0e8de;
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.auth-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    min-height: 680px;
}

.auth-side {
    background: var(--panel-soft);
    border-right: 1px solid var(--line);
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.auth-brand-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--brand);
    box-shadow: var(--shadow-soft);
}

.auth-brand-copy h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
}

.auth-brand-copy p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.auth-side-card {
    margin-top: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px 20px;
}

.auth-side-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.auth-side-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

.auth-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-points li {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.6;
}

.auth-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    margin-top: 8px;
    flex-shrink: 0;
}

.auth-side-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.auth-main {
    padding: 38px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    background: var(--brand-soft);
    color: var(--brand-deep);
    border: 1px solid #ead9c8;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
}

.auth-switch {
    font-size: 14px;
    color: var(--muted);
}

.auth-switch a,
.auth-link {
    color: var(--brand-deep);
    font-weight: 600;
}

.auth-heading h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
}

.auth-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 620px;
}

.auth-forms {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    align-items: start;
}

.auth-mini-panel,
.auth-form-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
}

.auth-mini-panel h4,
.auth-form-panel h4 {
    margin: 0 0 8px;
    font-size: 20px;
}

.auth-mini-panel p,
.auth-form-panel p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.auth-mini-note,
.auth-footnote {
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-input-group {
    margin-bottom: 14px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.auth-input {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus-within,
.otp-field input:focus {
    border-color: #c9a685;
    box-shadow: 0 0 0 3px rgba(145, 106, 68, 0.08);
}

.auth-input svg {
    width: 18px;
    height: 18px;
    stroke: var(--brand);
    flex-shrink: 0;
}

.auth-input input,
.auth-input textarea {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
}

.auth-password-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    padding: 0;
}

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 4px 0 18px;
    flex-wrap: wrap;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.auth-btn,
.otp-btn {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 14px;
    background: var(--brand);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.auth-btn:hover,
.otp-btn:hover {
    background: var(--brand-deep);
}

.auth-btn:disabled,
.otp-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-social-btn {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--white);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

.is-invalid {
    border-color: var(--danger) !important;
}

.text-danger.validation-error {
    font-size: 13px;
    color: var(--danger);
}

/* OTP Page */
.otp-page {
    background: linear-gradient(180deg, #faf8f4 0%, #f4efe8 100%);
}

.otp-card {
    width: 100%;
    max-width: 520px;
    background: var(--white);
    border: 1px solid var(--line-soft);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
}

.otp-badge {
    width: 78px;
    height: 78px;
    margin: -70px auto 18px;
    border-radius: 22px;
    background: var(--brand-deep);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: var(--shadow-soft);
}

.otp-card h1 {
    margin: 0 0 8px;
    font-size: 36px;
    color: var(--text);
}

.otp-card>p {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.7;
}

.otp-field {
    text-align: left;
    margin-bottom: 16px;
}

.otp-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.otp-field input {
    width: 100%;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    background: var(--white);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.otp-field input[readonly] {
    background: #f8f6f2;
    color: var(--muted);
}

.otp-meta {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

.otp-meta p {
    margin: 0;
}

.otp-meta a {
    color: var(--brand);
    font-weight: 700;
}

.otp-back {
    margin-top: 18px;
}

.otp-back a {
    color: var(--brand-deep);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1080px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-side {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .auth-forms {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .auth-page,
    .otp-page {
        padding: 20px 12px;
    }

    .auth-main,
    .auth-side,
    .otp-card {
        padding: 24px 18px;
    }

    .auth-heading h2 {
        font-size: 28px;
    }

    .otp-card h1 {
        font-size: 30px;
    }

    .auth-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .otp-badge {
        width: 64px;
        height: 64px;
        margin-top: -56px;
        border-radius: 18px;
        font-size: 13px;
    }
}
