:root {
    --auth-brown: #3d2314;
    --auth-brown-dark: #2a1810;
    --auth-green: #2d6a4f;
    --auth-cream: #faf7f2;
    --auth-muted: #8a8178;
    --auth-border: #e8e2d8;
}

* { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    font-family: "DM Sans", system-ui, sans-serif;
    color: #2b2b2b;
    background: var(--auth-cream);
    min-height: 100vh;
}

.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Left panel — clean photo bg, no baked-in mockup text */
.auth-hero {
    position: relative;
    background: url('../images/login-bg.jpg') center/cover no-repeat;
    color: #fff;
    display: flex;
    align-items: stretch;
}
.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30,18,12,0.45) 0%, rgba(30,18,12,0.72) 100%);
}
.auth-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 2.5rem 2rem;
    min-height: 100vh;
}

.auth-brand-center {
    text-align: center;
    margin-bottom: 1.25rem;
}
.auth-logo-img {
    display: block;
    width: min(190px, 100%);
    height: auto;
    margin: 0 auto;
}
.auth-logo-on-dark {
    width: min(220px, 90%);
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.25));
}
.auth-logo-card {
    width: min(160px, 75%);
    margin-bottom: 0.25rem;
}
.auth-tagline-logo {
    width: 32px;
    height: auto;
    opacity: 0.7;
}

.auth-panel-label {
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.9;
    margin: 0.5rem 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.85);
}
.auth-panel-label::before, .auth-panel-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.4);
}

.auth-hero-headline {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.12;
    margin: 0 0 0.75rem;
    text-align: center;
    color: #fff;
}
.auth-hero-sub {
    font-size: 0.86rem;
    opacity: 0.92;
    text-align: center;
    max-width: 34ch;
    margin: 0 auto 1.5rem;
    line-height: 1.55;
}

.auth-features {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1rem 0;
}
.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.auth-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.45);
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
}
.auth-feature strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.12rem;
    font-weight: 600;
}
.auth-feature span { font-size: 0.74rem; opacity: 0.88; line-height: 1.4; }

.auth-script {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    opacity: 0.92;
    margin-top: 0.5rem;
    align-self: flex-start;
}

/* Right panel */
.auth-form-side {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--auth-cream);
    position: relative;
}

.auth-back {
    align-self: flex-end;
    margin: 1.25rem 1.5rem 0;
    font-size: 0.82rem;
    color: var(--auth-muted);
}
.auth-back:hover { color: var(--auth-brown); }

.auth-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem 2rem;
}

.auth-card {
    width: min(400px, 100%);
    background: #fff;
    border-radius: 14px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 4px 32px rgba(61,35,20,0.07);
    border: 1px solid var(--auth-border);
}

.auth-card-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-card-brand .auth-logo-img { margin: 0 auto 0.55rem; }
.auth-card-brand h2 {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--auth-brown);
}
.auth-card-brand p {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: var(--auth-muted);
    line-height: 1.45;
}

.auth-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    background: var(--auth-cream);
    border-radius: 999px;
    padding: 0.25rem;
}
.auth-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--auth-muted);
}
.auth-tabs button.active {
    background: #fff;
    color: var(--auth-brown);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.auth-error {
    background: #fdecec;
    color: #b00020;
    border: 1px solid #f5c2c2;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.84rem;
    margin-bottom: 1rem;
}

.input-icon-wrap {
    position: relative;
    margin-bottom: 1rem;
}
.input-icon-wrap .field-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 0.88rem;
    pointer-events: none;
    line-height: 1;
}
.input-icon-wrap input {
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    padding: 0.78rem 2.5rem 0.78rem 2.4rem;
    font: inherit;
    font-size: 0.88rem;
    outline: none;
    background: #fff;
    transition: border-color 0.2s;
}
.input-icon-wrap input::placeholder { color: #aaa; }
.input-icon-wrap input:focus { border-color: var(--auth-brown); }
.input-icon-wrap .toggle-pw {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--auth-muted);
    font-size: 0.88rem;
    padding: 0;
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
}
.auth-options label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--auth-muted);
    cursor: pointer;
}
.auth-options a { color: #c06030; font-weight: 500; text-decoration: none; }

.btn-auth {
    width: 100%;
    border: 0;
    background: var(--auth-brown);
    color: #fff;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}
.btn-auth:hover { background: var(--auth-brown-dark); }

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-otp-note {
    font-size: 0.78rem;
    color: var(--auth-muted);
    margin-top: 0.75rem;
    text-align: center;
}
.auth-otp-note strong { color: var(--auth-green); }

.auth-footer {
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--auth-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--auth-muted);
    background: #fff;
}
.auth-footer a { color: var(--auth-muted); text-decoration: none; }

.auth-tagline {
    position: absolute;
    bottom: 4.5rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.55;
}
.auth-tagline img { width: 20px; height: 20px; }
.auth-tagline span {
    writing-mode: vertical-rl;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: var(--auth-green);
    font-weight: 600;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero-inner { min-height: auto; padding: 2rem 1.5rem; }
    .auth-features { display: none; }
    .auth-script { display: none; }
    .auth-tagline { display: none; }
}
