/* ═══════════════════════════════════════════════════════════════
   auth.css — Rentora Auth Pages  (v2 — split layout)
   Scope: auth.html, forgot_password.html, password_reset_*.html
   Depends on: base.css (design tokens)
   ═══════════════════════════════════════════════════════════════ */

/* ── Page layout: stretch to fill viewport below header ─────── */
.auth-page .site-main {
    padding: 0;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: stretch;
}

/* ── Split wrapper ──────────────────────────────────────────── */
.auth-split {
    display: flex;
    width: 100%;
    min-height: 100%;
}

/* ══════════════════════════════════════════════════════════════
   LEFT — Brand Panel
   ══════════════════════════════════════════════════════════════ */
.auth-brand {
    flex: 0 0 44%;
    background: linear-gradient(145deg, #060d1a 0%, #0a1628 45%, #0f2a4a 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 64px 56px;
}

.auth-brand__inner {
    position: relative;
    z-index: 2;
}

.auth-brand__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: rgba(13, 148, 136, 0.18);
    border: 1px solid rgba(13, 148, 136, 0.32);
    border-radius: 999px;
    color: #5eead4;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 32px;
}

.auth-brand__headline {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    letter-spacing: -1.4px;
    margin-bottom: 20px;
}

.auth-brand__sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    max-width: 310px;
    margin-bottom: 40px;
}

.auth-brand__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-brand__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 500;
}

.auth-brand__features li i {
    color: #34d399;
    font-size: 16px;
    flex-shrink: 0;
}

/* Decorative blobs */
.auth-brand__deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand__deco--1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.16) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
}

.auth-brand__deco--2 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.13) 0%, transparent 70%);
    top: 30px;
    right: 10px;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT — Form Side
   ══════════════════════════════════════════════════════════════ */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
    background: #f1f5f9;
}

/* ── Auth Card ─────────────────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* ── Flash Messages ────────────────────────────────────────── */
.auth-flashes {
    padding: 20px 28px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
}

.auth-flash i { flex-shrink: 0; margin-top: 1px; }

.auth-flash--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-flash--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* ── Form Panel ────────────────────────────────────────────── */
.auth-panel {
    display: none;
    padding: 36px 32px 40px;
}

.auth-panel--active {
    display: block;
    animation: panel-enter 0.28s var(--ease) both;
}

@keyframes panel-enter {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel Header ──────────────────────────────────────────── */
.auth-panel__title {
    font-size: 23px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    text-align: center;
}

.auth-panel__subtitle {
    font-size: 13.5px;
    color: #64748b;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

.auth-panel__subtitle--brand { color: var(--clr-brand); }

/* ── Form ──────────────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Field ─────────────────────────────────────────────────── */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field__label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.field__label sup {
    color: #ef4444;
    font-size: 11px;
}

.field__link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--clr-brand);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

.field__link:hover { color: var(--clr-brand-dark); }

.field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.field__icon {
    position: absolute;
    left: 13px;
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
    transition: color var(--duration) var(--ease);
    z-index: 1;
}

.field__input {
    width: 100%;
    padding: 11px 40px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: border-color var(--duration) var(--ease),
                box-shadow   var(--duration) var(--ease),
                background   var(--duration) var(--ease);
}

.field__input::placeholder { color: #9ca3af; font-size: 13.5px; }

.field__input:focus {
    border-color: var(--clr-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.field__control:has(.field__input:focus) .field__icon {
    color: var(--clr-brand);
}

.field__eye {
    position: absolute;
    right: 11px;
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 5px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: color var(--duration) var(--ease);
}

.field__eye:hover { color: #374151; }

/* ── Submit Button ─────────────────────────────────────────── */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    margin-top: 6px;
    background: linear-gradient(135deg, #0f766e 0%, #0e7490 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: var(--font);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.1px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(15, 118, 110, 0.35);
    transition: opacity .2s var(--ease),
                transform .2s var(--ease),
                box-shadow .2s var(--ease);
}

.btn-submit:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(15, 118, 110, 0.45);
    color: #fff;
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}

/* ── Switch Link ───────────────────────────────────────────── */
.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 13.5px;
    color: #64748b;
}

.auth-switch__link {
    font-weight: 600;
    color: var(--clr-brand);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    transition: color var(--duration) var(--ease);
}

.auth-switch__link:hover { color: var(--clr-brand-dark); }

/* ── Success State (forgot password / reset done) ───────────── */
.auth-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #065f46;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.20);
}

.auth-success-state .auth-panel__subtitle {
    max-width: 340px;
    margin: 0 auto 26px;
}

/* ── Password reset form pages (confirm / complete) ─────────── */
.auth-panel--success,
.auth-panel--center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

.email-success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #065f46;
    margin: 20px auto 20px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.20);
}

.auth-panel__title-success {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    text-align: center;
}

.auth-panel__description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 320px;
    text-align: center;
}

.auth-panel__retry-link {
    color: var(--clr-brand);
    text-decoration: none;
    font-weight: 600;
}

.auth-panel__retry-link:hover { color: var(--clr-brand-dark); }

.auth-error-container {
    width: 100%;
    margin-bottom: 16px;
}

.auth-error-msg {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 6px;
    border-left: 3px solid #dc2626;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-brand { display: none; }
    .auth-form-side { background: #f1f5f9; }
}

@media (max-width: 540px) {
    .auth-page .site-main { min-height: calc(100vh - 56px); }
    .auth-form-side { padding: 24px 12px; align-items: flex-start; padding-top: 32px; }
    .auth-panel { padding: 28px 20px 32px; }
    .auth-flashes { padding: 16px 20px 0; }
    .auth-form--two-col { grid-template-columns: 1fr; }
    .auth-card { border-radius: 16px; }
}
