/* =========================================================
   HAYAT — AUTH.CSS
   Split-panel auth layout (login, register)
   ========================================================= */

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

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

/* ── Left blue panel ────────────────────────────────────── */
.auth-panel {
    background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 60%, #2a4a9a 100%);
    padding: 40px 48px;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    overflow: hidden;
}
.auth-panel::before {
    content: ''; position: absolute; bottom: -80px; right: -80px;
    width: 300px; height: 300px; border-radius: 50%;
    background: rgba(255,138,0,.08);
}
.auth-panel::after {
    content: ''; position: absolute; top: -60px; left: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,.04);
}
.auth-panel-logo {
    display: flex; align-items: center; gap: 10px;
    position: relative; z-index: 1;
}
.auth-panel-logo span {
    font-family: var(--font-head); font-weight: 800; font-size: 1.4rem;
    color: #fff; letter-spacing: .06em;
}
.auth-panel-content {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    position: relative; z-index: 1;
}
.auth-panel-content h2 {
    font-family: var(--font-head); font-size: 2.2rem; font-weight: 800;
    color: #fff; line-height: 1.15; margin-bottom: 16px;
}
.auth-panel-content h2 em { font-style: normal; color: var(--orange); }
.auth-panel-content p {
    color: rgba(255,255,255,.65); font-size: .9rem; line-height: 1.75;
    margin-bottom: 32px;
}
.auth-panel-perks { display: flex; flex-direction: column; gap: 12px; }
.auth-perk {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,.85); font-size: .88rem;
    font-family: var(--font-head); font-weight: 500;
}
.auth-perk .icon { color: var(--orange); width: 17px; height: 17px; flex-shrink: 0; }
.auth-panel-footer {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; gap: 0;
}

/* ── Right form panel ───────────────────────────────────── */
.auth-form-panel {
    display: flex; align-items: flex-start; justify-content: center;
    padding: 48px 24px;
    overflow-y: auto;
}
.auth-form-wrap { width: 100%; max-width: 520px; }

.auth-mobile-logo {
    display: none; justify-content: center; margin-bottom: 32px;
}
.auth-mobile-logo a { display: flex; align-items: center; gap: 10px; }
.auth-mobile-logo span {
    font-family: var(--font-head); font-weight: 800; font-size: 1.3rem;
    color: var(--blue-dark);
}

/* ── Auth card ──────────────────────────────────────────── */
.auth-card {
    background: #fff; border-radius: var(--radius-lg);
    border: 2px solid var(--border); padding: 40px;
    box-shadow: var(--shadow);
}
.auth-card-title {
    font-family: var(--font-head); font-size: 1.5rem; font-weight: 800;
    color: var(--blue-dark); margin-bottom: 6px;
}
.auth-card-sub {
    font-size: .88rem; color: var(--text-muted); margin-bottom: 28px;
}
.auth-card-sub a { color: var(--orange); font-weight: 600; }

/* ── Input with icon ────────────────────────────────────── */
.input-wrap { position: relative; }
.input-wrap .input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); width: 17px; height: 17px; pointer-events: none;
}
.input-wrap .form-control { padding-left: 42px; }
.input-wrap .input-toggle {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); cursor: pointer; background: none; border: none;
    padding: 0; display: flex; align-items: center;
}
.input-wrap .input-toggle:hover { color: var(--blue); }

/* ── Divider ────────────────────────────────────────────── */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-muted); font-size: .8rem; margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Role selector (register) ───────────────────────────── */
.role-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px;
}
.role-tab {
    border: 2px solid var(--border); border-radius: var(--radius);
    padding: 12px 14px; cursor: pointer; text-align: center;
    transition: all var(--transition); background: #fff;
}
.role-tab input { display: none; }
.role-tab:has(input:checked),
.role-tab.selected {
    border-color: var(--orange); background: var(--orange-light);
}
.role-tab-icon { font-size: 1.3rem; margin-bottom: 4px; }
.role-tab span  { font-family: var(--font-head); font-size: .8rem; font-weight: 600; color: var(--blue-dark); display: block; }
.role-tab small { font-size: .72rem; color: var(--text-muted); }

/* ── Form grid ──────────────────────────────────────────── */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Submit button ──────────────────────────────────────── */
.auth-submit {
    width: 100%; justify-content: center; margin-top: 8px;
    font-size: 1rem; padding: 14px;
}

/* ── Footer link ────────────────────────────────────────── */
.auth-footer-link {
    text-align: center; margin-top: 20px;
    font-size: .85rem; color: var(--text-muted);
}
.auth-footer-link a { color: var(--orange); font-weight: 600; }

/* ── Password strength ──────────────────────────────────── */
.pwd-strength { margin-top: 6px; }
.pwd-strength-bar {
    height: 4px; border-radius: 2px; background: var(--border);
    margin-bottom: 4px; overflow: hidden;
}
.pwd-strength-fill {
    height: 100%; border-radius: 2px;
    background: var(--border); width: 0;
    transition: width .3s, background .3s;
}
.pwd-strength-label { font-size: .75rem; color: var(--text-muted); }

/* ── Step indicator (multi-step register) ───────────────── */
.auth-steps {
    display: flex; align-items: center; gap: 0; margin-bottom: 28px;
}
.auth-step {
    display: flex; align-items: center; gap: 8px; flex: 1;
}
.auth-step-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid var(--border); background: #fff;
    font-family: var(--font-head); font-size: .78rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; color: var(--text-muted);
    transition: all var(--transition);
}
.auth-step.active   .auth-step-num { border-color: var(--blue); background: var(--blue); color: #fff; }
.auth-step.done     .auth-step-num { border-color: #2a9d5c; background: #2a9d5c; color: #fff; }
.auth-step-label    { font-family: var(--font-head); font-size: .72rem; font-weight: 600; color: var(--text-muted); }
.auth-step.active   .auth-step-label { color: var(--blue-dark); }
.auth-step-line     { flex: 1; height: 2px; background: var(--border); }
.auth-step.done ~ .auth-step-line { background: #2a9d5c; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
    .auth-wrap    { grid-template-columns: 1fr; }
    .auth-panel   { display: none; }
    .auth-mobile-logo { display: flex; }
    .auth-form-panel { padding: 32px 16px; align-items: flex-start; }
}
@media (max-width: 540px) {
    .auth-card    { padding: 28px 20px; }
    .form-grid-2  { grid-template-columns: 1fr; }
}
