/* ============================================
   SHARED.CSS — Common styles across all pages
   AutoHub Connect
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --navy: #1a2a44;
    --orange: #e05a2b;
    --steel: #8a9bb5;
    --light: #f4f6f9;
    --white: #ffffff;
    --dark: #0d1a2e;
    --green: #1a7a3c;
    --red: #c0392b;
    --border: #e0e6ef;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--light);
    color: var(--navy);
    overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--white);
    border-bottom: 1px solid #e8ecf2;
    box-shadow: 0 2px 20px rgba(26,42,68,0.06);
    padding: 14px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-brand img { height: 40px; width: auto; }

.brand-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 1px;
    color: var(--navy);
    line-height: 1;
}

.brand-text span { color: var(--orange); }

.nav-link {
    color: var(--steel) !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active-page { color: var(--navy) !important; font-weight: 700; }

.btn-login {
    background: none;
    border: 1.5px solid #cdd5e0;
    padding: 8px 22px;
    border-radius: 25px;
    color: var(--navy);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-login:hover { border-color: var(--navy); }

.btn-signup {
    background: var(--orange);
    color: #fff !important;
    border: none;
    padding: 8px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-signup:hover { background: #c94e22; color: white !important; transform: translateY(-1px); }

/* ===== SECTION SHARED ===== */
.section-label {
    display: inline-block;
    background: rgba(224,90,43,0.1);
    color: var(--orange);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--navy);
    letter-spacing: 1px;
    line-height: 1.1;
    margin-bottom: 12px;
}

.section-sub {
    color: var(--steel);
    font-size: 1rem;
    line-height: 1.6;
}

.section-title-white { color: var(--white); }

/* ===== PAGE HERO ===== */
.page-hero {
    background: var(--dark);
    padding: 70px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(224,90,43,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(224,90,43,0.15);
    border: 1px solid rgba(224,90,43,0.4);
    color: #f07a55;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.page-hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--white);
    line-height: 1.0;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.page-hero-title span { color: var(--orange); }

.page-hero-sub {
    font-size: 1rem;
    color: var(--steel);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-brand-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: white;
    letter-spacing: 1px;
}

footer p { color: #4a5e78; font-size: 0.82rem; margin: 0; }

/* ===== AUTH MODAL ===== */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.modal-title-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--navy);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modal-subtitle { color: var(--steel); font-size: 0.9rem; }

.modal-role-card {
    background: var(--light);
    border: 2px solid #e5eaf0;
    border-radius: 18px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    height: 100%;
}

.modal-role-card:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(224,90,43,0.12);
}

.modal-role-card .m-icon { font-size: 2.4rem; margin-bottom: 10px; display: block; }
.modal-role-card h5 { color: var(--navy); font-weight: 700; margin-bottom: 6px; font-size: 0.92rem; }
.modal-role-card p { font-size: 0.78rem; color: var(--steel); margin: 0; }

.auth-step { display: none; }
.auth-step.active { display: block; animation: fadeInUp 0.25s ease; }

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

.form-label { font-weight: 600; color: var(--navy); font-size: 0.88rem; }

.form-control {
    border-radius: 12px;
    border: 1.5px solid var(--border);
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.form-control:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(224,90,43,0.1);
}

.btn-auth-submit {
    background: var(--orange);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
}

.btn-auth-submit:hover { background: #c94e22; color: white; transform: translateY(-1px); }
.btn-auth-submit:disabled { background: #ccc; cursor: not-allowed; transform: none; }

.auth-switch { text-align: center; font-size: 0.85rem; color: var(--steel); margin-top: 16px; }
.auth-switch a { color: var(--orange); text-decoration: none; font-weight: 600; }

.btn-back {
    background: none; border: none; color: var(--steel);
    font-size: 0.85rem; cursor: pointer; padding: 0;
    display: flex; align-items: center; gap: 5px; margin-bottom: 16px;
    font-family: 'DM Sans', sans-serif;
    transition: color 0.2s;
}
.btn-back:hover { color: var(--navy); }

.role-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(224,90,43,0.1); color: var(--orange);
    padding: 4px 12px; border-radius: 20px; font-size: 0.78rem;
    font-weight: 600; margin-bottom: 16px;
}

.btn-outline-navy {
    background: none;
    border: 1.5px solid var(--navy);
    padding: 12px 32px;
    border-radius: 28px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    transition: all 0.2s;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

.btn-outline-navy:hover { background: var(--navy); color: white; }

.btn-cta-orange {
    background: var(--orange);
    color: white;
    border: none;
    padding: 13px 32px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
}

.btn-cta-orange:hover { background: #c94e22; color: white; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(224,90,43,0.3); }

/* ===== PASSWORD STRENGTH ===== */
.password-wrap { position: relative; }

.pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--steel);
    font-size: 0.9rem;
    padding: 0;
    transition: color 0.2s;
    z-index: 5;
}
.pw-toggle:hover { color: var(--navy); }

.password-strength-wrap { margin-top: 8px; }

.strength-bar {
    height: 4px;
    border-radius: 4px;
    background: #e0e6ef;
    margin-bottom: 6px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.strength-label.weak { color: var(--red); }
.strength-label.fair { color: #f0a500; }
.strength-label.good { color: #3a7bd5; }
.strength-label.strong { color: var(--green); }

.pw-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-top: 6px;
}

.pw-req {
    font-size: 0.74rem;
    color: var(--steel);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.pw-req .req-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e0e6ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.pw-req.met { color: var(--green); }
.pw-req.met .req-icon { background: var(--green); color: white; }

/* ===== LOGIN ATTEMPTS / LOCK ===== */
.login-attempts-warn {
    background: rgba(224,90,43,0.1);
    border: 1px solid rgba(224,90,43,0.3);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: #b34a1a;
    margin-bottom: 12px;
    display: none;
}

.login-attempts-warn.show { display: block; }

.account-locked-msg {
    background: rgba(192,57,43,0.08);
    border: 1px solid rgba(192,57,43,0.25);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--red);
    text-align: center;
    margin-bottom: 12px;
    display: none;
}

.account-locked-msg.show { display: block; }
.account-locked-msg strong { display: block; font-size: 1rem; margin-bottom: 4px; }

.lock-timer {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--red);
    letter-spacing: 2px;
    margin-top: 4px;
}

/* ===== OTP INPUT ===== */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.otp-box {
    width: 50px;
    height: 56px;
    border: 2px solid var(--border);
    border-radius: 14px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    font-family: 'Bebas Neue', sans-serif;
    transition: all 0.2s;
    outline: none;
    background: var(--light);
    caret-color: var(--orange);
}

.otp-box:focus {
    border-color: var(--orange);
    background: white;
    box-shadow: 0 0 0 3px rgba(224,90,43,0.12);
}

.otp-box.filled {
    border-color: var(--orange);
    background: rgba(224,90,43,0.06);
}

/* ===== RESEND TIMER ===== */
.resend-wrap {
    text-align: center;
    font-size: 0.85rem;
    color: var(--steel);
    margin-top: 14px;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--orange);
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    padding: 0;
    transition: color 0.2s;
}

.resend-btn:disabled { color: var(--steel); cursor: not-allowed; }
.resend-btn:not(:disabled):hover { color: #c94e22; }

.resend-timer { font-weight: 700; color: var(--orange); }

/* ===== AUTH STANDALONE PAGES ===== */
.auth-page-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, #1a2a44 60%, #0d1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    position: relative;
    overflow: hidden;
}

.auth-page-bg::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(224,90,43,0.15) 0%, transparent 65%);
    pointer-events: none;
}

.auth-page-bg::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(26,42,68,0.5) 0%, transparent 65%);
    pointer-events: none;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
}

.auth-card-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    justify-content: center;
    text-decoration: none;
}

.auth-card-logo img { height: 34px; }

.auth-card-logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--navy);
}
.auth-card-logo-text span { color: var(--orange); }

.auth-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(224,90,43,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 18px;
}

.auth-card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.9rem;
    color: var(--navy);
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-align: center;
}

.auth-card-sub {
    color: var(--steel);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

.auth-card-sub .email-highlight {
    color: var(--navy);
    font-weight: 700;
}

.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--steel);
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 20px;
    transition: color 0.2s;
    font-weight: 500;
}
.auth-back-link:hover { color: var(--navy); }

/* ===== TOAST ===== */
.toast-notif {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--navy);
    color: white;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast-notif.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--navy);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background .15s;
    flex-shrink: 0;
    line-height: 1;
}
.hamburger-btn:hover { background: var(--light); }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 26, 46, 0.55);
    z-index: 998;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-hero { padding: 50px 0 40px; }
    .auth-card { padding: 28px 20px; }
    .otp-box { width: 42px; height: 48px; font-size: 1.2rem; }
    .pw-requirements { grid-template-columns: 1fr; }
    .hamburger-btn { display: flex; align-items: center; justify-content: center; }
    /* Sidebar slides in when .sidebar-open is toggled */
    .dash-sidebar.sidebar-open {
        transform: translateX(0) !important;
        z-index: 999;
        box-shadow: 4px 0 24px rgba(13, 26, 46, 0.18);
    }
}

@media (max-width: 480px) {
    .auth-card { padding: 22px 14px; border-radius: 14px; }
    .otp-box { width: 36px; height: 44px; font-size: 1.1rem; }
    .page-hero { padding: 36px 0 28px; }
}

@media (max-width: 375px) {
    .auth-card { padding: 18px 12px; }
    .otp-box { width: 32px; height: 40px; font-size: 1rem; gap: 6px; }
}
