/* ==========================================================================
   1. BRAND TOKENS & RESET
   ========================================================================== */
:root {
    --primary-orange: #F5821F;
    --primary-hover: #E04800;
    --dark-navy: #242E3D;
    --dark-card: #0A192F;
    --charcoal: #003366;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;
    --gray-border: #E2E8F0;
    --text-muted: #64748B;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;

    /* Typography Tokens */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-sm: clamp(0.75rem, 1vw, 0.85rem);
    --font-size-base: clamp(0.875rem, 1.2vw, 1rem);
    --font-size-lg: clamp(1.25rem, 2vw, 1.5rem);
    --font-size-xl: clamp(1.75rem, 3vw, 2.25rem);
    --font-size-hero: clamp(2.25rem, 5vw, 3rem);
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
}

/* --- FLEXBOX STICKY FOOTER LAYOUT --- */
body {
    background-color: var(--light-bg);
    color: var(--dark-navy);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

#access-section,
#register,
#login {
    scroll-margin-top: 90px;
}

/* ==========================================================================
   2. TOP NAVIGATION BAR (STICKY TOP)
   ========================================================================== */
.header {
    background-color: var(--dark-navy);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1002;
}

.brand-logo .logo-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-logo .logo-subtitle {
    font-size: 0.7rem;
    color: #94A3B8;
    display: block;
    margin-top: 2px;
}

.brand-divider {
    width: 1px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}


.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #CBD5E1;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--white);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    min-height: 44px;
    white-space: nowrap;
}

.btn-orange {
    background-color: var(--primary-orange);
    color: var(--white);
}

.btn-orange:hover {
    background-color: var(--primary-hover);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
    background: transparent;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-outline-dark {
    border-color: var(--gray-border);
    color: var(--dark-navy);
    background: var(--white);
}

.btn-outline-dark:hover {
    background-color: #F1F5F9;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    z-index: 1002;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, #F8FAFC 0%, #EDF2F7 100%);
    padding: 4rem 0;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 1rem;
}

.hero-content h1 span {
    color: var(--primary-orange);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-img-card {
    width: 100%;
    max-width: 500px;
    height: 320px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(#E2E8F0 1px, transparent 1px);
    background-size: 16px 16px;
}

.magnifier-illustration {
    width: 140px;
    height: 140px;
    border: 10px solid var(--dark-navy);
    border-radius: 50%;
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.magnifier-illustration::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 80px;
    background: var(--dark-navy);
    bottom: -60px;
    right: -30px;
    transform: rotate(-45deg);
    border-radius: 8px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 50px;
}

.bar {
    width: 12px;
    background-color: var(--primary-orange);
    border-radius: 2px;
}

/* ==========================================================================
   4. SERVICES SNAPSHOT (SLIDER)
   ========================================================================== */
.services-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

.section-title h2 span {
    text-decoration: underline;
    text-decoration-color: var(--primary-orange);
    text-underline-offset: 6px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.slider-container {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0.25rem 1.5rem 0.25rem;
    scrollbar-width: none;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.service-card {
    flex: 0 0 220px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--dark-navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-navy);
    height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gray-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    transition: var(--transition);
}

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

.slider-btn.prev {
    left: -20px;
}

.slider-btn.next {
    right: -20px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray-border);
}

.dot.active {
    background-color: var(--primary-orange);
    width: 16px;
    border-radius: 4px;
}

/* ==========================================================================
   5. ACCOUNT ACCESS PANEL (SPLIT)
   ========================================================================== */
.access-section {
    padding: 3rem 0;
}

.access-panel {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.access-left {
    background-color: var(--dark-navy);
    color: var(--white);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.access-left .icon-box {
    width: 64px;
    height: 64px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.access-left h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.access-left p {
    color: #94A3B8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 260px;
}

.access-right {
    padding: 3rem 2.5rem;
    background: #FAFAFA;
    position: relative;
}

.access-right h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.access-right p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    background: var(--white);
}

.form-control:focus {
    border-color: var(--primary-orange);
}

.form-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.forgot-link:hover {
    color: var(--dark-navy);
}

.or-divider {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 5;
}

/* ==========================================================================
   6. DASHBOARD SNAPSHOT (4 TABS)
   ========================================================================== */
.dashboard-section {
    padding: 3rem 0;
}

.tabs-header {
    display: flex;
    background: #E2E8F0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--dark-navy);
    color: var(--white);
}

.tab-content {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 2.5rem 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-orange);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-info h4 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-navy);
    line-height: 1.2;
}

.stat-info p {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-navy);
}

.stat-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

/* ==========================================================================
   7. ABOUT INNOVISION (EXTERNAL LINK BANNER)
   ========================================================================== */
.external-banner {
    margin: 1.5rem 0 3rem 0;
    background: var(--dark-navy);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.banner-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-text h4 {
    font-size: 1rem;
    font-weight: 700;
}

.banner-text p {
    font-size: 0.85rem;
    color: #94A3B8;
}

/* ==========================================================================
   8. FOOTER (ALWAYS AT BOTTOM)
   ========================================================================== */
.footer {
    background-color: var(--dark-navy);
    color: #94A3B8;
    padding: 1.5rem 0;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a:hover {
    color: var(--white);
}

/* ==========================================================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background-color: var(--dark-navy);
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.3);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem 1.5rem;
        gap: 2rem;
        z-index: 1001;
        transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }

    .nav-wrapper.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        width: 100%;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        margin-top: auto;
    }

    .nav-actions .btn {
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .access-panel {
        grid-template-columns: 1fr;
    }

    .or-divider {
        display: none;
    }

    .tab-pane.active {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .brand-divider,
    .brand-logo .logo-subtitle {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 1.5rem !important;
    }

    .section-title h2 {
        font-size: 1.35rem !important;
    }

    .access-left h3,
    .access-right h3 {
        font-size: 0.9rem !important;
    }

    .stat-info h4 {
        font-size: 1.25rem !important;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-content p {
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-visual {
        display: none;
    }

    .tabs-header {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 50%;
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .external-banner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .banner-info {
        flex-direction: column;
    }

    .tab-pane.active {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    h1, .h1 {
        font-size: 1.35rem !important;
        margin-bottom: 0.5rem !important;
    }

    h2, .h2 {
        font-size: 1.2rem !important;
    }

    h3, .h3 {
        font-size: 1.05rem !important;
    }

    h4, .h4 {
        font-size: 0.95rem !important;
    }

    /* Prevent aggressive word splitting across standard elements */
    p, span:not(.orders-table *), div:not(.orders-table *) {
        overflow-wrap: break-word;
        word-break: normal;
    }

    .container, .container-fluid {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .card, .tracker-card, .guide-step-card {
        padding: 0.85rem !important;
    }

    /* Table Fixes: Ensure text stays horizontal and scrolls smoothly */
    .orders-table-wrapper {
        overflow-x: auto;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .orders-table th,
    .orders-table td {
        white-space: nowrap !important;
        word-break: normal !important;
        padding: 0.75rem 0.5rem !important;
    }
}