/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink: #0f172a;
    --ink-2: #1f2a44;
    --brand: #f8b732;
    --brand-dark: #d99612;
    --slate: #475569;
    --muted: #94a3b8;
    --bg: #f8fafc;
    --card: #ffffff;
    --success: #16a34a;
    --warning: #f97316;
    --info: #2563eb;
    --shadow-soft: 0 25px 60px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

/* Navigation Bar */
.navbar {
    background: #1a1a2e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    z-index: 1000;
    width: 100%;
}

main,
.dashboard {
    scroll-margin-top: 120px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    color: var(--brand);
    margin-bottom: 12px;
}

.section-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    margin-bottom: 12px;
}

.nav-container {
    margin: 0 auto;
    padding: 10px 20px 10px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo - Left Side */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-img {
    height: 100px;
    width: 150px;
    max-width: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.logo a:hover .logo-img {
    transform: scale(1.1);
    filter: drop-shadow(2px 2px 8px rgba(255, 215, 0, 0.5));
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;

    /* ⭐ ADDED → Ensures menu stays right */
    margin-left: auto;
}

.nav-item {
    position: relative;
}

/* Dropdown Menu for Home1 */
.home-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a2e;
    list-style: none;
    padding: 10px 0;
    margin: 5px 0 0 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    z-index: 1001;
}

.home-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-link:hover {
    background: transparent;
    color: #ffd700;
    padding-left: 25px;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 20px;
    display: block;
    border-radius: 25px;
    background: transparent;
}

.nav-link:hover {
    background: transparent;
    color: #ffd700;
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .nav-container {
        height: auto;
        padding: 10px 20px;
    }

    .hamburger {
        display: flex;
    }

    .logo-img {
        height: 70px;
        width: 70px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: #1a1a2e;
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-link {
        width: 100%;
        padding: 15px 20px;
        margin: 5px 20px;
        border-radius: 10px;
    }

    .nav-link:hover {
        background: transparent;
        color: #ffd700;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        background: transparent;
    }

    .home-dropdown:hover .dropdown-menu {
        transform: none;
    }

    .dropdown-link {
        padding: 10px 40px;
        font-size: 14px;
    }
}
/*dashboard*/
.dashboard {
    background: var(--bg);
    padding: 140px min(8vw, 120px) 80px;
}

/* Tabs */
.dashboard-tabs {
    display: inline-flex;
    gap: 12px;
    background: #fff;
    padding: 8px;
    border-radius: 999px;
    margin: 0 auto 40px;
    box-shadow: var(--shadow-soft);
}

.dashboard-tab {
    border: none;
    background: transparent;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-tab.active {
    background: #0f172a;
    color: #fff;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Cards */
.chart-card {
    background: #fff;
    border-radius: 32px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

/* Labels */
.range-pill,
.badge {
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.range-pill {
    background: rgba(15, 23, 42, 0.08);
    color: var(--ink);
}

.badge.neutral {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

/* Legend */
.chart-legend {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--slate);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.legend-dot.primary {
    background: #2563eb;
}

.legend-dot.secondary {
    background: #a5b4fc;
}

#volumeChart {
    width: 100%;
    height: auto;
}

/* Lane List */
.lane-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lane-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.lane-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lane-route {
    font-weight: 600;
    color: var(--ink);
}

.lane-mode {
    font-size: 0.85rem;
    color: var(--slate);
}

.lane-metrics {
    text-align: right;
}

.lane-loads {
    font-weight: 600;
    color: var(--ink);
}

.lane-trend {
    font-size: 0.85rem;
    color: #22c55e;
}

.lane-trend.negative {
    color: #ef4444;
}

.lane-footnote {
    font-size: 0.85rem;
    color: var(--slate);
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-card {
    background: #fff;
    padding: 24px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-card .label {
    font-size: 0.85rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.summary-card strong {
    font-size: 2rem;
    color: var(--ink);
}

.summary-card small {
    color: var(--muted);
}

/* Insights */
.insights-grid {
    margin: 40px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.insight-card {
    padding: 28px;
    border-radius: 28px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-card h3 {
    font-size: 1.3rem;
}

.badge {
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
}

.badge.success {
    background: rgba(22, 163, 74, 0.15);
    color: var(--success);
}

.badge.warning {
    background: rgba(249, 115, 22, 0.18);
    color: var(--warning);
}

.badge.neutral {
    background: rgba(148, 163, 184, 0.25);
    color: var(--ink-2);
}

/* Reports layout */
.reports-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    gap: 28px;
}

.report-card {
    background: #fff;
    border-radius: 32px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
}

.report-card.compact {
    padding: 28px;
}

.btn-small {
    padding: 10px 18px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 999px;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
    transition: border 0.2s ease;
}

.btn-small:hover {
    border-color: var(--ink);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
}

.report-table th,
.report-table td {
    text-align: left;
    padding: 14px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.95rem;
}

.report-table th {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.trend {
    font-weight: 600;
}

.trend.up {
    color: var(--success);
}

.trend.down {
    color: #dc2626;
}

.trend.flat {
    color: var(--slate);
}

.ops-feed {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 22px;
}

.ops-feed li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.ops-feed li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ops-feed strong {
    display: block;
    margin-bottom: 4px;
}

.tag {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.tag.success {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
}

.tag.info {
    background: rgba(37, 99, 235, 0.12);
    color: var(--info);
}

.tag.warning {
    background: rgba(249, 115, 22, 0.15);
    color: var(--warning);
}
/* Mobile Responsive Fix */
@media (max-width: 1024px) {
    .dashboard {
        padding: 120px 24px 60px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .reports-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Reduce top padding for phone */
    .dashboard {
        padding-top: 70px;
    }

    /* Tabs full width */
    .dashboard-tabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 10px;
        border-radius: 20px;
    }

    .dashboard-tab {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Stack grid vertically */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-card {
        padding: 20px;
        border-radius: 20px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Lanes */
    .lane-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px;
    }

    .lane-metrics {
        text-align: left;
    }

    /* Summary cards spacing */
    .summary-card strong {
        font-size: 1.6rem;
    }

    .reports-layout {
        gap: 20px;
    }
}
