/* ============================================================
   CarZoon Auth & Profile Styles  — Redesigned UI
   Login · Signup · Forgot Password · OTP
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* ── Page wrapper ── */
.czauth-wrap {
    max-width: 560px;
    margin: 40px auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─────────────────────────────────────────────────────────
   TAB SWITCHER  — new pill-style two-button row
───────────────────────────────────────────────────────── */
.czauth-tabs {
    display: flex;
    position: relative;
    background: transparent;
    border-radius: 14px;
    padding: 0;
    margin-bottom: 24px;
    gap: 0;
    border: 2px solid #062b5f;
    overflow: hidden;
}
.czauth-tab {
    flex: 1;
    padding: 13px 10px;
    background: #fff;
    border: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
    color: #062b5f !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    position: relative;
    z-index: 2;
    font-family: inherit;
    letter-spacing: 0.2px;
}
.czauth-tab:first-child {
    border-right: 1px solid #062b5f;
}
.czauth-tab.is-active {
    background: #062b5f !important;
    color: #fff !important;
}
/* Hide the old sliding indicator — no longer used */
.czauth-tab-indicator {
    display: none !important;
}

/* ─────────────────────────────────────────────────────────
   FLASH MESSAGE
───────────────────────────────────────────────────────── */
.czauth-flash {
    padding: 13px 16px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.czauth-flash.is-success {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    color: #166534 !important;
}
.czauth-flash.is-error {
    background: #fff1f2;
    border: 1.5px solid #fecdd3;
    color: #9f1239 !important;
}

/* ─────────────────────────────────────────────────────────
   PANELS  (login / signup / forgot / otp)
───────────────────────────────────────────────────────── */
.czauth-panel {
    display: none;
}
.czauth-panel.is-active {
    display: block;
}
.czauth-panel-inner {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 36px 32px;
    box-shadow: 0 4px 40px rgba(6, 43, 95, 0.10);
    border: 1px solid #e8edf8;
}

/* Panel header */
.czauth-panel-header {
    text-align: center;
    margin-bottom: 28px;
}
/* Hide the old car logo icon */
.czauth-logo-icon {
    display: none !important;
}
.czauth-title {
    font-size: 26px;
    font-weight: 900;
    color: #062b5f !important;
    margin: 0 0 8px;
    line-height: 1.2;
}
.czauth-subtitle {
    font-size: 14px;
    color: #66748d !important;
    margin: 0;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   ROLE SELECTOR  — new tab-style (matches screenshots)
───────────────────────────────────────────────────────── */
.czauth-role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 4px;
    border: 2px solid #062b5f;
    border-radius: 12px;
    overflow: hidden;
}
.czauth-role-card {
    cursor: pointer;
    position: relative;
}
.czauth-role-radio { position: absolute !important; opacity: 0; pointer-events: none; }
.czauth-role-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 13px 10px 12px;
    background: #fff;
    text-align: center;
    transition: background 0.18s;
    border: none;
}
/* Divider between the two role cards */
.czauth-role-card:first-child .czauth-role-inner {
    border-right: 1px solid #062b5f;
}
.czauth-role-radio:checked + .czauth-role-inner {
    background: #062b5f;
}
.czauth-role-radio:checked + .czauth-role-inner .czauth-role-name,
.czauth-role-radio:checked + .czauth-role-inner .czauth-role-desc {
    color: #fff !important;
}
/* Hide emoji icons inside role cards — not in design */
.czauth-role-icon { display: none; }
.czauth-role-name  {
    font-size: 14px;
    font-weight: 700;
    color: #062b5f !important;
    line-height: 1.2;
}
.czauth-role-desc  {
    font-size: 12px;
    color: #66748d !important;
    line-height: 1.3;
}

/* ─────────────────────────────────────────────────────────
   FORM ELEMENTS
───────────────────────────────────────────────────────── */
.czauth-form { display: flex; flex-direction: column; gap: 0; }

.czauth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}
.czauth-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #062b5f !important;
    letter-spacing: 0.2px;
}
.czauth-req { color: #e53e3e !important; }

.czauth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.czauth-input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    pointer-events: none;
    line-height: 1;
    color: #aab4c4;
}
.czauth-input-wrap .czauth-input { padding-left: 42px; }

.czauth-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #cfd6df !important;
    border-radius: 4px;
    font-size: 14px;
    color: #0f172a !important;
    background: #fff !important;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.czauth-input:focus {
    border-color: #062b5f !important;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(6, 43, 95, 0.08);
}
.czauth-input::placeholder { color: #aab4c4 !important; }
.czauth-input-disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}
.czauth-hint {
    font-size: 11.5px;
    color: #94a3b8 !important;
    margin-top: 3px;
}

.czauth-pwd-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #66748d !important;
    padding: 4px;
}

/* Full-width stacked fields — no 2-col grid for name/password */
.czauth-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* Remember-me / terms row */
.czauth-row-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.czauth-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151 !important;
    cursor: pointer;
}
.czauth-check {
    width: 16px; height: 16px;
        margin-top: 5px !important;
    accent-color: #062b5f;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
}
.czauth-terms-check {
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.czauth-link-sm {
    font-size: 13px;
    color: #173FC2;
    text-decoration: none;
    font-weight: 600;
}
button.czauth-link-sm {
  color: #fff !important;
}
.czauth-link-sm:hover { text-decoration: underline; }

/* Field error text */
.czauth-field-error {
    font-size: 12px;
    color: #e53e3e !important;
    font-weight: 500;
    display: none;
    margin-top: 2px;
}
.czauth-field-error.is-visible { display: block; }

/* ─────────────────────────────────────────────────────────
   PASSWORD STRENGTH
───────────────────────────────────────────────────────── */
.czauth-strength-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 14px;
}
.czauth-strength-bar {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.czauth-strength-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.3s, background 0.3s;
    width: 0%;
}
.czauth-strength-label {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 52px;
    text-align: right;
}

/* ─────────────────────────────────────────────────────────
   BUTTON
───────────────────────────────────────────────────────── */
.czauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s, transform 0.12s;
    letter-spacing: 0.3px;
    margin-top: 4px;
}
.czauth-btn:active { transform: scale(0.98); }
.czauth-btn-primary {
    background: #01792F;
    color: #fff;
    box-shadow: none;
}
.czauth-btn-primary:hover { background: #059447; }
.czauth-btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* Forgot password — style as a secondary text link, not a full button */
.czauth-forgot-link {
    background: transparent !important;
    color: #173FC2 !important;
    font-weight: 600;
    font-size: 13px;
    margin-top: 8px;
    padding: 6px;
    text-decoration: underline;
    letter-spacing: 0;
}
.czauth-forgot-link:hover { background: transparent !important; opacity: 0.75; }

/* ─────────────────────────────────────────────────────────
   SWITCH TEXT  ("Already have an account?")
───────────────────────────────────────────────────────── */
.czauth-switch-text {
    text-align: center;
    font-size: 13.5px;
    color: #66748d !important;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid #e8edf8;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.czauth-switch-link {
    background: none;
    border: none;
    color: #173FC2 !important;
    font-weight: 700;
    cursor: pointer;
    box-shadow: unset;
    font-size: 13.5px;
    font-family: inherit;
    padding: 0;
    text-decoration: none;
}
.czauth-switch-link:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────
   PROFILE PAGE  (unchanged styles kept intact)
───────────────────────────────────────────────────────── */
.czpro-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header card */
.czpro-header-card {
    background: #062b5f;
    border-radius: 20px;
    padding: 30px 32px;
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    color: #fff;
    position: relative;
}
.czpro-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #2f68ff;
    color: #fff !important;
    font-size: 26px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid rgba(255,255,255,0.2);
}
.czpro-header-info { flex: 1; min-width: 180px; }
.czpro-display-name {
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 6px;
    color: #fff !important;
    line-height: 1.2;
}
.czpro-role-badge {
    display: inline-block;
    background: rgba(47,104,255,0.25);
    border: 1px solid rgba(47,104,255,0.5);
    color: #93c5fd !important;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 99px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.czpro-email, .czpro-phone {
    font-size: 13px;
    color: rgba(255,255,255,0.7) !important;
    margin-top: 3px;
}
.czpro-logout-btn {
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    color: #fff !important;
    border-radius: 11px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s;
    flex-shrink: 0;
}
.czpro-logout-btn:hover { background: rgba(255,255,255,0.22); }

/* Stats row */
.czpro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.czpro-stat {
    background: #fff;
    border: 1.5px solid #e8edf8;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
}
.czpro-stat-num {
    font-size: 32px;
    font-weight: 900;
    color: #0f172a !important;
    line-height: 1;
    margin-bottom: 6px;
}
.czpro-stat-green { color: #059669 !important; }
.czpro-stat-amber { color: #d97706 !important; }
.czpro-stat-label { font-size: 13px; color: #66748d !important; font-weight: 600; }

/* 2-col grid */
.czpro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.czpro-card {
    background: #fff;
    border: 1.5px solid #e8edf8;
    border-radius: 20px;
    padding: 26px 28px;
}
.czpro-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid #f1f5f9;
}
.czpro-form .czauth-btn { margin-top: 8px; }
.czpro-flash { margin-bottom: 16px; }

/* Quick actions */
.czpro-actions { display: flex; flex-direction: column; gap: 10px; }
.czpro-action-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid #e8edf8;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.czpro-action-link:hover {
    border-color: #062b5f !important;
    box-shadow: 0 4px 16px rgba(6, 43, 95, 0.08);
}
.czpro-action-icon { font-size: 24px; flex-shrink: 0; }
.czpro-action-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.czpro-action-text strong { font-size: 14px; font-weight: 700; color: #0f172a !important; }
.czpro-action-text small  { font-size: 12px; color: #66748d !important; }
.czpro-action-arrow { font-size: 20px; color: #94a3b8 !important; font-weight: 700; }

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .czauth-panel-inner { padding: 14px 12px 19px; }
    .czauth-grid-2      { grid-template-columns: 1fr; }
    .czauth-role-selector { grid-template-columns: 1fr 1fr; }
    .czpro-grid         { grid-template-columns: 1fr; }
    .czpro-stats        { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .czpro-header-card  { padding: 22px 20px; }
}
@media (max-width: 400px) {
    .czauth-role-selector { grid-template-columns: 1fr 1fr; }
    .czpro-stats          { grid-template-columns: 1fr; }
    .czauth-role-desc {font-size: 11px;}
    .czauth-role-name {font-size: 12px; }
}

/* ─────────────────────────────────────────────────────────
   STEP 4 AUTH MODE TABS (Sign In / Create Account)
───────────────────────────────────────────────────────── */
.cz-auth-mode-tabs {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.cz-auth-mode-tab {
    flex: 1;
    padding: 12px 16px;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: background 0.2s, color 0.2s;
}
.cz-auth-mode-tab:first-child {
    border-right: 1px solid #e2e8f0;
}
.cz-auth-mode-tab--active {
    background: #1a56db;
    color: #fff;
}
.cz-auth-mode-tab:hover:not(.cz-auth-mode-tab--active) {
    background: #e8f0fe;
    color: #1a56db;
}
