/* ================================================================
   AM-AUTH.CSS — Auto Mundial Ford Design System (Auth Pages)
   ================================================================ */

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

:root {
    --am-navy: #102b4e;
    --am-navy-light: #1a3a5c;
    --am-ford-blue: #003478;
    --am-accent: #2096cd;
    --am-success: #10b981;
    --am-warning: #f59e0b;
    --am-danger: #ef4444;
    --am-surface: #f0f2f5;
    --am-card: #ffffff;
    --am-text: #1e293b;
    --am-text-muted: #64748b;
    --am-border: #e2e8f0;
    --am-radius: 1rem;
    --am-radius-sm: 0.75rem;
    --am-shadow: 0 4px 24px rgba(16, 43, 78, 0.10);
    --am-shadow-hover: 0 12px 40px rgba(16, 43, 78, 0.18);
    --am-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --am-transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
}

/* ================================================================
   BASE OVERRIDES
   ================================================================ */

body.am-auth-body {
    font-family: var(--am-font) !important;
    background: var(--am-surface) !important;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.am-auth-body * {
    font-family: var(--am-font) !important;
}

/* ================================================================
   LOGIN — SPLIT SCREEN LAYOUT
   ================================================================ */

.am-login-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--am-surface);
}

/* ---- Hero Panel (Left) ---- */
.am-login-hero {
    flex: 0 0 45%;
    max-width: 45%;
    background: linear-gradient(160deg, #0a1f3b 0%, var(--am-navy) 30%, var(--am-ford-blue) 70%, #1a5a8a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
}

.am-login-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(32, 150, 205, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.am-login-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.am-hero-logo {
    width: 280px;
    max-width: 80%;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.am-hero-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.am-hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    max-width: 320px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.am-hero-divider {
    width: 60px;
    height: 3px;
    background: var(--am-accent);
    border-radius: 2px;
    margin: 1.5rem 0;
    position: relative;
    z-index: 1;
}

.am-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.am-hero-badge i {
    color: var(--am-accent);
}

/* ---- Form Panel (Right) ---- */
.am-login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    overflow-y: auto;
}

.am-login-form-container {
    width: 100%;
    max-width: 440px;
}

.am-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.am-form-header-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.am-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--am-text);
    margin-bottom: 0.4rem;
}

.am-form-subtitle {
    font-size: 0.9rem;
    color: var(--am-text-muted);
    font-weight: 400;
}

/* ---- Form Card ---- */
.am-form-card {
    background: var(--am-card);
    border-radius: var(--am-radius);
    box-shadow: var(--am-shadow);
    border: 1px solid var(--am-border);
    padding: 2rem;
}

/* ---- Form Inputs ---- */
.am-input-group {
    margin-bottom: 1.25rem;
}

.am-input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--am-text);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.am-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--am-surface);
    border: 2px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    overflow: hidden;
    transition: var(--am-transition);
}

.am-input-wrapper:focus-within {
    border-color: var(--am-ford-blue);
    box-shadow: 0 0 0 3px rgba(0, 52, 120, 0.08);
    background: #fff;
}

.am-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    color: var(--am-text-muted);
    font-size: 0.95rem;
}

.am-input-wrapper:focus-within .am-input-icon {
    color: var(--am-ford-blue);
}

.am-input-wrapper input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 0.65rem 0.75rem 0.65rem 0;
    font-size: 0.9rem;
    color: var(--am-text);
    outline: none !important;
    box-shadow: none !important;
    height: auto;
}

.am-input-wrapper input::placeholder {
    color: var(--am-text-muted);
    font-weight: 400;
}

.am-toggle-pass {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--am-text-muted);
    cursor: pointer;
    transition: var(--am-transition);
    border-radius: 0.5rem;
    margin-right: 2px;
}

.am-toggle-pass:hover {
    color: var(--am-ford-blue);
    background: rgba(0, 52, 120, 0.06);
}

/* ---- Captcha ---- */
.am-captcha-wrapper {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

/* ---- Submit Button ---- */
.am-btn-primary {
    display: block;
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--am-ford-blue) 0%, var(--am-navy) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--am-radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--am-transition);
    box-shadow: 0 4px 14px rgba(0, 52, 120, 0.3);
    text-transform: none;
}

.am-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 52, 120, 0.4);
    background: linear-gradient(135deg, #003d8f 0%, #153d6b 100%);
    color: #ffffff;
}

.am-btn-primary:active {
    transform: translateY(0);
}

/* ---- Alert Messages ---- */
.am-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--am-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.am-alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.am-alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}

.am-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ---- Form Footer Links ---- */
.am-form-links {
    text-align: center;
    margin-top: 1.5rem;
}

.am-form-links a {
    color: var(--am-ford-blue);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--am-transition);
}

.am-form-links a:hover {
    color: var(--am-accent);
    text-decoration: underline;
}

.am-form-divider {
    color: var(--am-text-muted);
    margin: 0 0.75rem;
    font-size: 0.8rem;
}

/* ---- Login Footer ---- */
.am-login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--am-border);
}

.am-login-footer p {
    font-size: 0.8rem;
    color: var(--am-text-muted);
    font-weight: 700;
    margin: 0;
}

.am-login-footer a {
    color: var(--am-ford-blue);
    text-decoration: none;
    font-weight: 500;
}

.am-login-footer a:hover {
    text-decoration: underline;
}

/* ================================================================
   WELCOME PAGE
   ================================================================ */

.am-welcome-wrapper {
    min-height: 100vh;
    background: var(--am-surface);
}

/* ---- Nav Override ---- */
.am-welcome-wrapper .am-welcome-nav {
    background: var(--am-navy) !important;
    box-shadow: 0 2px 20px rgba(16, 43, 78, 0.15);
    padding: 0.75rem 0;
}

.am-welcome-nav .nav-link,
.am-welcome-nav .navbar-brand {
    color: #fff !important;
}

.am-welcome-nav .nav-link:hover {
    color: var(--am-accent) !important;
}

/* ---- Hero Section ---- */
.am-welcome-hero {
    background: linear-gradient(160deg, #0a1f3b 0%, var(--am-navy) 35%, var(--am-ford-blue) 70%, #1a5a8a 100%);
    padding: 5rem 1rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.am-welcome-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(32, 150, 205, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.am-welcome-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.am-welcome-hero-logo {
    width: 200px;
    max-width: 60%;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.am-welcome-hero h1 {
    color: #fff;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.am-welcome-hero p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.15rem;
    font-weight: 400;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.am-welcome-hero .am-hero-divider {
    margin: 1.25rem auto;
}

/* ---- Store Badges ---- */
.am-store-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.am-store-badge {
    display: block;
    width: 160px;
    transition: var(--am-transition);
    opacity: 0.9;
}

.am-store-badge:hover {
    transform: translateY(-3px) scale(1.03);
    opacity: 1;
}

.am-store-badge img {
    width: 100%;
    border-radius: 8px;
}

/* ---- Feature Cards Section ---- */
.am-welcome-features {
    padding: 3.5rem 1rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.am-welcome-section-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--am-text);
    margin-bottom: 0.5rem;
}

.am-welcome-section-subtitle {
    text-align: center;
    color: var(--am-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.am-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.am-feature-card {
    background: var(--am-card);
    border-radius: var(--am-radius);
    border: 1px solid var(--am-border);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--am-transition);
    text-decoration: none;
    display: block;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.am-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--am-ford-blue), var(--am-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.am-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--am-shadow-hover);
    text-decoration: none;
    border-color: transparent;
}

.am-feature-card:hover::before {
    transform: scaleX(1);
}

.am-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 52, 120, 0.08), rgba(32, 150, 205, 0.08));
    color: var(--am-ford-blue);
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    transition: var(--am-transition);
}

.am-feature-card:hover .am-feature-icon {
    background: linear-gradient(135deg, var(--am-ford-blue), var(--am-accent));
    color: #fff;
    transform: scale(1.1);
}

.am-feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--am-text);
    margin-bottom: 0.5rem;
}

.am-feature-card p {
    font-size: 0.85rem;
    color: var(--am-text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.am-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--am-ford-blue);
    text-decoration: none;
    transition: var(--am-transition);
}

.am-feature-card:hover .am-feature-link {
    color: var(--am-accent);
    gap: 0.6rem;
}

/* ---- Info Cards ---- */
.am-welcome-info {
    padding: 0 1rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.am-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.am-info-card {
    background: var(--am-card);
    border-radius: var(--am-radius);
    border: 1px solid var(--am-border);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--am-transition);
    text-decoration: none;
}

.am-info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--am-shadow);
    text-decoration: none;
}

.am-info-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 52, 120, 0.08), rgba(32, 150, 205, 0.08));
    color: var(--am-ford-blue);
    font-size: 1rem;
}

.am-info-card:hover .am-info-card-icon {
    background: linear-gradient(135deg, var(--am-ford-blue), var(--am-accent));
    color: #fff;
}

.am-info-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--am-text);
    margin-bottom: 0.25rem;
}

.am-info-card p {
    font-size: 0.8rem;
    color: var(--am-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ================================================================
   APP DOWNLOAD MODAL — Styled
   ================================================================ */

.am-modal .modal-content {
    border-radius: var(--am-radius);
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(16, 43, 78, 0.25);
}

.am-modal .modal-header {
    background: linear-gradient(135deg, var(--am-navy), var(--am-ford-blue));
    border: none;
    padding: 1.25rem 1.5rem;
}

.am-modal .modal-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.am-modal .modal-header .close {
    color: rgba(255, 255, 255, 0.7);
    text-shadow: none;
    opacity: 1;
}

.am-modal .modal-header .close:hover {
    color: #fff;
}

.am-modal .modal-body {
    padding: 2rem 1.5rem;
}

.am-modal .modal-body p {
    font-size: 0.9rem;
    color: var(--am-text);
    line-height: 1.6;
    font-weight: 700;
}

.am-modal .modal-body .am-modal-version {
    font-size: 0.8rem;
    color: var(--am-text-muted);
    margin-top: 1rem;
    text-align: center;
    font-weight: 700;
}

.am-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--am-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--am-transition);
    margin-bottom: 0.75rem;
    border: none;
}

.am-modal-btn-android {
    background: linear-gradient(135deg, #34a853, #0f9d58);
    color: #fff !important;
}

.am-modal-btn-android:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 168, 83, 0.3);
    color: #fff;
    text-decoration: none;
}

.am-modal-btn-ios {
    background: linear-gradient(135deg, var(--am-text), #374151);
    color: #fff !important;
}

.am-modal-btn-ios:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.3);
    color: #fff;
    text-decoration: none;
}

.am-modal .modal-footer {
    border-top: 1px solid var(--am-border);
    padding: 1rem 1.5rem;
    justify-content: center;
}

.am-modal-close-btn {
    background: var(--am-surface);
    color: var(--am-text-muted);
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    padding: 0.5rem 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--am-transition);
}

.am-modal-close-btn:hover {
    background: var(--am-border);
    color: var(--am-text);
}

/* ================================================================
   WELCOME FOOTER
   ================================================================ */

.am-welcome-footer {
    background: transparent;
    padding: 2rem 1rem;
    text-align: center;
}

.am-welcome-footer .am-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.am-welcome-footer .am-footer-copy {
    font-size: 0.9rem;
    color: var(--am-ford-blue);
    font-weight: 700;
    margin: 0;
}

.am-welcome-footer .am-footer-copy a {
    color: var(--am-ford-blue);
    text-decoration: none;
    font-weight: 700;
}

.am-welcome-footer .am-footer-copy a:hover {
    color: var(--am-accent);
}

.am-welcome-footer .am-footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.am-welcome-footer .am-footer-links a {
    font-size: 0.9rem;
    color: var(--am-ford-blue);
    font-weight: 700;
    text-decoration: none;
    transition: var(--am-transition);
}

.am-welcome-footer .am-footer-links a:hover {
    color: var(--am-accent);
}

/* ================================================================
   DESKTOP-ONLY GATE
   On mobile/tablet, hide the auth content and show an app redirect
   ================================================================ */

/* Desktop: hide the mobile notice, show the content */
.am-mobile-notice {
    display: none;
}

/* Mobile/Tablet: show the notice, hide the content */
@media (max-width: 991px) {
    .am-desktop-only-content {
        display: none !important;
    }

    .am-mobile-notice {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: linear-gradient(160deg, #0a1f3b 0%, var(--am-navy) 35%, var(--am-ford-blue) 70%, #1a5a8a 100%);
        padding: 2.5rem 1.5rem;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    .am-mobile-notice::before {
        content: '';
        position: absolute;
        top: -30%;
        right: -20%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(32, 150, 205, 0.1) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

    .am-mobile-notice-logo {
        width: 200px;
        max-width: 70%;
        margin-bottom: 2rem;
        position: relative;
        z-index: 1;
    }

    .am-mobile-notice-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.15);
        color: var(--am-accent);
        font-size: 2rem;
        margin-bottom: 1.5rem;
        position: relative;
        z-index: 1;
    }

    .am-mobile-notice h2 {
        color: #ffffff;
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
        position: relative;
        z-index: 1;
    }

    .am-mobile-notice p {
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.95rem;
        font-weight: 400;
        max-width: 380px;
        line-height: 1.6;
        margin-bottom: 2rem;
        position: relative;
        z-index: 1;
    }

    .am-mobile-notice .am-store-badges {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: wrap;
        margin-bottom: 2rem;
        position: relative;
        z-index: 1;
    }

    .am-mobile-notice .am-store-badge {
        width: 150px;
    }

    .am-mobile-notice .am-store-badge img {
        width: 100%;
        border-radius: 8px;
    }

    .am-mobile-notice-footer {
        position: relative;
        z-index: 1;
        margin-top: 1rem;
    }

    .am-mobile-notice-footer a {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.8rem;
        text-decoration: none;
        font-weight: 500;
        transition: var(--am-transition);
    }

    .am-mobile-notice-footer a:hover {
        color: var(--am-accent);
    }
}

/* ================================================================
   SOCIALS IN HERO
   ================================================================ */

.am-hero-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.am-hero-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: var(--am-transition);
    text-decoration: none;
}

.am-hero-social-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}