/* =====================================================================
   TRATOK CORPORATES — Auth pages (Login, Register, Verify, Reset)
   ===================================================================== */

.auth-body {
    background: var(--bg-body);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* ─── Brand panel (left) ─────────────────────────────────────────── */
.auth-brand-panel {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: 56px;
    background:
        linear-gradient(160deg, #0f0f14 0%, #1a1520 50%, #131a28 100%);
    overflow: hidden;
}
.auth-brand-panel::before {
    content: ''; position: absolute;
    top: -40%; right: -30%; width: 80%; height: 80%;
    background: radial-gradient(circle, rgba(212,168,67,0.07) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.auth-brand-panel::after {
    content: ''; position: absolute;
    bottom: -20%; left: -20%; width: 60%; height: 60%;
    background: radial-gradient(circle, rgba(232,99,74,0.04) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.auth-brand-decoration {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='none' stroke='rgba(212,168,67,0.04)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 60px 60px; opacity: 0.6; pointer-events: none;
}
.auth-brand-content {
    position: relative; z-index: 2; max-width: 460px;
}
.auth-brand-logo img {
    height: 44px; margin-bottom: 44px; opacity: 0.92;
}
.auth-brand-title {
    font-family: var(--font-display);
    font-size: 2.6rem; font-weight: 600;
    color: var(--text-primary); line-height: 1.15; margin-bottom: 18px;
}
.auth-brand-subtitle {
    font-size: 1.02rem; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 44px;
}
.auth-brand-features {
    display: flex; flex-direction: column; gap: 18px;
}
.auth-brand-feature {
    display: flex; align-items: center; gap: 14px;
    font-size: 0.92rem; color: var(--text-secondary);
}
.auth-brand-feature i {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(212,168,67,0.08);
    border: 1px solid rgba(212,168,67,0.14);
    border-radius: var(--radius-md);
    color: var(--gold-400); font-size: 0.86rem;
    flex-shrink: 0;
}

/* ─── Form panel (right) ─────────────────────────────────────────── */
.auth-form-panel {
    display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
    background: var(--bg-surface);
    overflow-y: auto;
}
.auth-form-panel-top { align-items: flex-start; padding-top: 64px; }

.auth-form-container {
    width: 100%; max-width: 500px;
}
.auth-form-header { margin-bottom: 28px; }
.auth-form-header h2 {
    font-family: var(--font-display);
    font-size: 1.9rem; font-weight: 600;
    color: var(--text-primary); margin-bottom: 6px;
}
.auth-form-header p {
    font-size: 0.9rem; color: var(--text-muted);
}
.auth-form-header a {
    color: var(--gold-400); font-weight: 600;
}
.auth-form-header a:hover { color: var(--gold-300); }

/* ─── Lang switcher inside auth pages ────────────────────────────── */
.auth-lang-corner {
    position: absolute; top: 22px; right: 28px; z-index: 5;
}

/* ─── Multi-step progress bar ────────────────────────────────────── */
.signup-progress { margin-bottom: 32px; }
.progress-track {
    height: 3px; background: var(--border-muted);
    border-radius: 3px; margin-bottom: 14px; overflow: hidden;
}
.progress-fill {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}
.progress-steps { display: flex; justify-content: space-between; }
.progress-step {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px; flex: 1;
}
.progress-step-circle {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-input);
    border: 2px solid var(--border-muted);
    transition: all 0.3s ease;
}
.progress-step-circle span {
    font-size: 0.74rem; font-weight: 700;
    color: var(--text-muted); transition: color 0.3s ease;
}
.progress-step.active .progress-step-circle {
    border-color: var(--gold-400);
    background: rgba(212,168,67,0.1);
}
.progress-step.active .progress-step-circle span { color: var(--gold-400); }
.progress-step.completed .progress-step-circle {
    border-color: var(--gold-500);
    background: var(--gold-500);
}
.progress-step.completed .progress-step-circle span { color: #0c1018; }
.progress-step-label {
    font-size: 0.66rem; font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
    transition: color 0.3s ease;
}
.progress-step.active .progress-step-label { color: var(--gold-400); }
.progress-step.completed .progress-step-label { color: var(--text-secondary); }

/* ─── Form steps ─────────────────────────────────────────────────── */
.form-step { display: none; animation: stepFadeIn 0.35s ease-out; }
.form-step.active { display: block; }
@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-title {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 22px; padding-bottom: 18px;
    border-bottom: 1px solid var(--border-muted);
}
.step-title > i {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(212,168,67,0.08);
    border: 1px solid rgba(212,168,67,0.12);
    border-radius: var(--radius-md);
    color: var(--gold-400); font-size: 1rem; flex-shrink: 0;
}
.step-title h3 {
    font-family: var(--font-display);
    font-size: 1.1rem; font-weight: 600;
    color: var(--text-primary); margin-bottom: 2px;
}
.step-title p { font-size: 0.8rem; color: var(--text-muted); }

.form-actions-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 28px; padding-top: 20px;
    border-top: 1px solid var(--border-muted);
}

/* ─── Password helpers ───────────────────────────────────────────── */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 44px; }
.password-toggle {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 0.85rem; padding: 4px;
}
.password-toggle:hover { color: var(--text-primary); }

.password-strength {
    display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.strength-bar {
    flex: 1; height: 4px; background: var(--border-muted);
    border-radius: 3px; overflow: hidden;
}
.strength-fill {
    height: 100%; width: 0; border-radius: 3px;
    transition: all 0.3s ease;
}
.strength-text {
    font-size: 0.72rem; font-weight: 600; min-width: 48px;
}

/* ─── Review step ────────────────────────────────────────────────── */
.review-card {
    background: var(--bg-input);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-lg);
    padding: 4px 0; margin-bottom: 22px;
}
.review-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 18px;
}
.review-row:last-child { border-bottom: none; }
.review-label {
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
    flex-shrink: 0;
}
.review-value {
    font-size: 0.9rem; color: var(--text-primary);
    font-weight: 500; text-align: right; word-break: break-word;
}

/* ─── Terms checkbox ─────────────────────────────────────────────── */
.terms-check { margin-bottom: 12px; }
.checkbox-label {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; font-size: 0.84rem;
    color: var(--text-secondary); line-height: 1.5;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-custom {
    width: 18px; height: 18px;
    border: 2px solid var(--border-default);
    border-radius: 4px; flex-shrink: 0; margin-top: 2px;
    transition: all 0.2s ease; position: relative;
}
.checkbox-label input:checked + .checkbox-custom {
    background: var(--gold-500); border-color: var(--gold-500);
}
.checkbox-label input:checked + .checkbox-custom::after {
    content: ''; position: absolute;
    top: 2px; left: 5px; width: 5px; height: 9px;
    border: solid #0c1018; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ─── Login extras ───────────────────────────────────────────────── */
.auth-divider {
    display: flex; align-items: center; gap: 16px;
    margin: 24px 0; color: var(--text-muted);
    font-size: 0.74rem; text-transform: uppercase;
    letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-muted);
}
.forgot-link {
    display: block; text-align: right;
    font-size: 0.8rem; color: var(--gold-400);
    margin-top: -8px; margin-bottom: 22px;
}
.forgot-link:hover { color: var(--gold-300); }

/* ─── Status pages (verify, success, error) ──────────────────────── */
.status-icon-wrap {
    width: 78px; height: 78px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px;
}
.status-icon-wrap i { font-size: 1.7rem; }
.status-icon-success { background: var(--success-bg); }
.status-icon-success i { color: var(--success); }
.status-icon-info { background: var(--info-bg); }
.status-icon-info i { color: var(--info); }
.status-icon-error { background: var(--danger-bg); }
.status-icon-error i { color: var(--danger); }
.status-page-title {
    font-family: var(--font-display);
    font-size: 1.6rem; font-weight: 600;
    margin-bottom: 12px; color: var(--text-primary);
}
.status-page-text {
    color: var(--text-secondary); margin-bottom: 28px;
    font-size: 0.94rem; line-height: 1.65;
}

/* ─── Mobile-only top bar (logo + hamburger) ─────────────────────── */
.auth-mobile-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky; top: 0;
    z-index: 50;
}
.auth-mobile-head .auth-mobile-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}
.auth-mobile-head .auth-mobile-logo img { height: 28px; }
.auth-mobile-head .auth-mobile-logo span {
    font-family: var(--font-display);
    font-size: 0.94rem; font-weight: 500;
    color: var(--gold-400);
    letter-spacing: 0.02em;
}
.auth-mobile-head .auth-mobile-toggle {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}
.auth-mobile-head .auth-mobile-toggle:hover {
    border-color: var(--border-default);
    color: var(--gold-400);
}
.auth-mobile-head .auth-mobile-toggle .bars {
    width: 18px; height: 14px; position: relative; display: block;
}
.auth-mobile-head .auth-mobile-toggle .bars::before,
.auth-mobile-head .auth-mobile-toggle .bars::after,
.auth-mobile-head .auth-mobile-toggle .bars span {
    content: ''; position: absolute; left: 0; right: 0;
    height: 2px; border-radius: 1px;
    background: currentColor;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease;
}
.auth-mobile-head .auth-mobile-toggle .bars::before { top: 0; }
.auth-mobile-head .auth-mobile-toggle .bars span    { top: 6px; display: block; }
.auth-mobile-head .auth-mobile-toggle .bars::after  { bottom: 0; }
.auth-mobile-head .auth-mobile-toggle.open .bars::before { transform: translateY(6px) rotate(45deg); }
.auth-mobile-head .auth-mobile-toggle.open .bars::after  { transform: translateY(-6px) rotate(-45deg); }
.auth-mobile-head .auth-mobile-toggle.open .bars span    { opacity: 0; transform: scaleX(0); }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 950px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { padding: 0 0 40px; }
    .auth-form-panel .auth-form-container {
        max-width: 100%;
        padding: 20px 22px 40px;
    }
    .auth-form-panel-top { padding-top: 0; }
    .progress-step-label { font-size: 0.6rem; }
    .auth-mobile-head { display: flex; }
    /* On mobile, hide the corner lang switcher — it lives in the drawer */
    .auth-lang-corner { display: none; }
}
@media (max-width: 520px) {
    .form-row { grid-template-columns: 1fr; }
    .auth-form-header h2 { font-size: 1.6rem; }
}
