/* Light Theme (Default) - Global Variables */
:root {
    /* Sidebar */
    --sidebar-bg: #ffffff;
    --sidebar-border: #f0f0f0;
    --sidebar-shadow: 0 0 30px rgba(0, 0, 0, 0.04);
    --sidebar-brand-border: #f5f5f5;
    --sidebar-section-title: #a1a1aa;
    --sidebar-link-color: #52525b;
    --sidebar-link-hover-bg: #f4faf7;
    --sidebar-link-hover-color: #18181b;
    --sidebar-link-active-bg: #ecfdf5;
    --sidebar-link-active-color: #059669;
    --sidebar-accent: #10b981;
    --sidebar-footer-border: #f5f5f5;
    --sidebar-footer-bg: #fafafa;
    --sidebar-user-color: #3f3f46;

    /* Brand */
    --brand-name-color: #18181b;
    --brand-tagline-color: #a1a1aa;

    /* General */
    --color-primary: #10b981;
    --color-primary-dark: #059669;
    --color-primary-light: #d1fae5;
    --color-surface-light: #fafafa;
    --color-surface-card: #ffffff;
    --color-text-primary: #18181b;
    --color-text-secondary: #71717a;
    --color-text-light: #a1a1aa;
    --color-border: #e4e4e7;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Sidebar sizing */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
}

/* Dark Theme */
[data-theme="dark"] {
    --sidebar-bg: #18181b;
    --sidebar-border: #27272a;
    --sidebar-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    --sidebar-brand-border: #27272a;
    --sidebar-section-title: #71717a;
    --sidebar-link-color: #d4d4d8;
    --sidebar-link-hover-bg: #27272a;
    --sidebar-link-hover-color: #ffffff;
    --sidebar-link-active-bg: rgba(16, 185, 129, 0.12);
    --sidebar-link-active-color: #34d399;
    --sidebar-accent: #34d399;
    --sidebar-footer-border: #27272a;
    --sidebar-footer-bg: #0f0f11;
    --sidebar-user-color: #e4e4e7;

    --brand-name-color: #fafafa;
    --brand-tagline-color: #71717a;

    --color-primary: #34d399;
    --color-primary-dark: #10b981;
    --color-primary-light: #064e3b;
    --color-surface-light: #09090b;
    --color-surface-card: #18181b;
    --color-text-primary: #fafafa;
    --color-text-secondary: #a1a1aa;
    --color-text-light: #71717a;
    --color-border: #3f3f46;
}

/* ============================================
   RESET — GF-58
   ============================================
   Bootstrap Reboot used to live in bootstrap-compat.css (GF-16). That file is gone;
   this is the same element-level reset, kept on base.leaf pages so headings, lists,
   and form controls do not fall back to raw browser defaults. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

h1 { font-size: calc(1.375rem + 1.5vw); }
h2 { font-size: calc(1.325rem + 0.9vw); }
h3 { font-size: calc(1.3rem + 0.6vw); }
h4 { font-size: calc(1.275rem + 0.3vw); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (min-width: 1200px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

ol, ul {
    padding-left: 2rem;
}

ol, ul, dl {
    margin-top: 0;
    margin-bottom: 1rem;
}

hr {
    margin: 1rem 0;
    color: inherit;
    border: 0;
    border-top: 1px solid;
    opacity: 0.25;
}

b, strong { font-weight: bolder; }
small { font-size: 0.875em; }

img, svg { vertical-align: middle; }

table {
    caption-side: bottom;
    border-collapse: collapse;
}

th {
    text-align: inherit;
    text-align: -webkit-match-parent;
}

label { display: inline-block; }

input, button, select, optgroup, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button, select { text-transform: none; }
button { border-radius: 0; }
button:focus:not(:focus-visible) { outline: 0; }

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled),
[role="button"] {
    cursor: pointer;
}

textarea { resize: vertical; }

::-moz-focus-inner {
    padding: 0;
    border-style: none;
}

/* trips/detail.leaf toggles bid-detail panels with the `hidden` attribute while
   `.bid-details` sets a display; without !important the attribute would lose. */
[hidden] { display: none !important; }

/* Body Layout with Sidebar */
body {
    background: var(--color-surface-light) !important;
    color: var(--color-text-primary);
    margin: 0;
    padding: 0;
}

body.has-sidebar {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ============================================
   SIDEBAR - MOBILE FIRST DESIGN
   ============================================ */

/* Sidebar Styles - Mobile First (Hidden by default) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(85%, 320px);
    height: 100vh;
    height: 100dvh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 4px 0 20px var(--sidebar-shadow);
    z-index: 1062;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(-100%);
}

/* Show sidebar when active on mobile */
.sidebar.show {
    transform: translateX(0);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* Sidebar Header/Brand */
.sidebar-brand {
    padding: 1.5rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--sidebar-brand-border);
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    background: var(--sidebar-link-hover-bg);
}

/* Enhanced Brand Icon with Gradient Background and Shimmer */
.sidebar-brand-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sidebar-link-hover-bg);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulse animation on hover */
.sidebar-brand:hover .sidebar-brand-icon {
    transform: scale(1.05);
    background: var(--sidebar-link-active-bg);
}

.sidebar-brand-text {
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
}

.sidebar-brand-name {
    font-size: 1.25rem;
    font-weight: 900;
    margin: 0;
    color: var(--brand-name-color);
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
}

.sidebar-brand-tagline {
    font-size: 0.55rem;
    margin: 0.25rem 0 0 0;
    color: var(--brand-tagline-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 1.5rem;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    transition: all 0.3s ease;
    z-index: 1051;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.sidebar-toggle:hover {
    background: var(--color-primary-dark);
    transform: scale(1.1);
}

/* Services Section in Sidebar */
.sidebar-section {
    padding: 1.5rem 0;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--sidebar-section-title);
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

.sidebar-collapsed .sidebar-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

/* Service Tabs */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin: 0.25rem 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: var(--sidebar-link-color);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--sidebar-accent);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: var(--sidebar-link-hover-bg);
    color: var(--sidebar-link-hover-color);
}

.sidebar-nav-link.active {
    background: var(--sidebar-link-active-bg);
    color: var(--sidebar-link-active-color);
}

.sidebar-nav-link:hover::before,
.sidebar-nav-link.active::before {
    transform: scaleY(1);
}

.sidebar-nav-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-nav-link:hover .sidebar-nav-icon {
    transform: scale(1.1) rotate(5deg);
}

.sidebar-nav-content {
    flex: 1;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-collapsed .sidebar-nav-content {
    opacity: 0;
    width: 0;
}

.sidebar-nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.sidebar-nav-description {
    font-size: 0.75rem;
    margin: 0.25rem 0 0 0;
    opacity: 0.7;
    white-space: nowrap;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid var(--sidebar-footer-border);
    background: var(--sidebar-footer-bg);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: transparent;
    border-radius: var(--border-radius-md);
    color: var(--sidebar-user-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-user:hover {
    background: var(--sidebar-link-hover-bg);
    color: var(--sidebar-link-hover-color);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 0.75rem;
    margin: 0;
    opacity: 0.7;
    white-space: nowrap;
}

/* Main Content Wrapper - Mobile First */
.main-wrapper {
    flex: 1;
    margin-left: 0; /* No margin on mobile */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Navigation (simplified) */
.top-nav {
    background: var(--color-surface-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.top-nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

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

/* Main Container */
main.main-content {
    flex: 1;
    padding: 2rem;
    background: var(--color-surface-light);
}

/* Announcement Banner */
.announcement-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    color: white;
}

.banner-icon {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.banner-content p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.banner-content .highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
}

.banner-link {
    background: white;
    color: var(--color-primary-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* Values Section */
.values-section {
    background: var(--color-surface-card);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-xl) 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.values-section h2 {
    text-align: center;
    color: var(--color-text-primary);
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xl);
    letter-spacing: -0.02em;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.value-card {
    background: var(--color-surface-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.value-card h3 {
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.value-card p {
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--color-surface-card);
    border-top: 1px solid var(--color-border);
    padding: 2rem;
    /* Clear the iOS home indicator. The footer is the last element in the base.leaf shell, so
       without this its content — and any action button above it — sits under the home bar. */
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    margin-top: auto;
}

/* The footer used to be built from Bootstrap's grid — `container` / `row` / `col-12` / `text-center` /
   `mb-3` / `mx-2` / `text-decoration-none` — for what is a centred column with two links in it. GF-16. */
.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

/* 44px tap targets, which the `mx-2` version did not have. */
.footer__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.5rem;
}

.footer__copy {
    display: block;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.footer a {
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
    font-weight: 500;
    text-decoration: none;
}

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

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Tooltips for Collapsed Sidebar */
.sidebar-collapsed .sidebar-nav-link {
    position: relative;
}

.sidebar-collapsed .sidebar-nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-text-primary);
    color: var(--color-surface-card);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    font-size: 0.875rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1052;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-collapsed .sidebar-nav-link:hover::after {
    opacity: 1;
}

/* ============================================
   MOBILE OVERLAY - MOBILE FIRST (FIXED FOR ALL VIEWS)
   ============================================ */

/* Mobile Sidebar Overlay - Proper z-index and visibility */
.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1060; /* Higher than navbar to work everywhere */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Don't block clicks when hidden */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

.mobile-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Allow clicks when visible */
}

/* Mobile Menu Toggle Button - Always visible on mobile */
.mobile-menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1063;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Ensure toggle button is visible on mobile for ALL views */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

/* Smaller brand icon on mobile */
.sidebar-brand-icon {
    width: 48px;
    height: 48px;
    font-size: 1.75rem;
}

/* ============================================
   TABLET RESPONSIVENESS (min-width: 768px)
   ============================================ */
@media (min-width: 768px) {
    .sidebar {
        width: min(75%, 280px);
    }

    .mobile-menu-toggle {
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }

    .sidebar-brand-icon {
        width: 52px;
        height: 52px;
        font-size: 2rem;
    }
}

/* ============================================
   DESKTOP RESPONSIVENESS (min-width: 992px)
   ============================================ */
@media (min-width: 992px) {
    /* Desktop sidebar - always visible */
    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(0);
    }

    /* Collapsed sidebar state */
    .sidebar-collapsed .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar-collapsed .sidebar-brand {
        padding: 1.25rem 0.5rem;
        justify-content: center;
    }

    .sidebar-collapsed .sidebar-brand-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .sidebar-collapsed .sidebar-nav-link {
        padding: 0.75rem;
        justify-content: center;
    }

    .sidebar-collapsed .sidebar-nav-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .sidebar-collapsed .sidebar-footer {
        padding: 0.75rem 0.5rem;
    }

    .sidebar-collapsed .theme-toggle {
        justify-content: center;
        padding: 0.5rem;
    }

    .sidebar-collapsed .theme-toggle-label {
        display: none;
    }

    .sidebar-collapsed .sidebar-user {
        justify-content: center;
        padding: 0.5rem;
    }

    .sidebar-collapsed .sidebar-toggle {
        right: 50%;
        transform: translateX(50%);
    }

    /* Desktop main wrapper with sidebar margin */
    .main-wrapper {
        margin-left: var(--sidebar-width);
    }

    .sidebar-collapsed .main-wrapper {
        margin-left: var(--sidebar-collapsed-width);
    }

    /* Hide mobile controls on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }

    .mobile-sidebar-overlay {
        display: none !important;
        pointer-events: none !important;
    }

    /* Show sidebar toggle button on desktop */
    .sidebar-toggle {
        display: flex !important;
    }

    /* Full-size brand icon on desktop */
    .sidebar-brand-icon {
        width: 52px;
        height: 52px;
        font-size: 2rem;
    }
}

/* ============================================
   SMALL MOBILE ADJUSTMENTS (max-width: 576px)
   ============================================ */
@media (max-width: 576px) {
    .top-nav {
        padding: 0.75rem 1rem;
    }

    .top-nav-menu {
        gap: 0.75rem;
        font-size: 0.875rem;
    }

    main.main-content {
        padding: 1rem;
    }

    .values-section {
        padding: var(--spacing-md);
    }

    .values-section h2 {
        font-size: 1.75rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .banner-content {
        text-align: center;
        font-size: 0.9rem;
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .banner-icon {
        font-size: 1.5rem;
    }

    .sidebar {
        width: 90%;
    }

    .mobile-menu-toggle {
        top: 0.75rem;
        left: 0.75rem;
        width: 40px;
        height: 40px;
    }
}

/* Theme transition for dark mode toggle */
.sidebar,
.sidebar-brand,
.sidebar-nav-link,
.sidebar-footer,
.top-nav,
.footer {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--sidebar-link-hover-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--sidebar-link-color);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.theme-toggle:hover {
    background: var(--sidebar-link-active-bg);
    color: var(--sidebar-link-active-color);
}

.theme-toggle .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-light {
    display: inline;
}

.theme-toggle-label {
    flex: 1;
    text-align: left;
}

[data-theme="dark"] .theme-toggle-label::after {
    content: ' ✓';
    color: var(--color-primary);
}

/* ──────────────────────────────────────────────────────────────────────────────
   Reduced motion
   ──────────────────────────────────────────────────────────────────────────────
   Honour the OS-level "reduce motion" setting. For some people motion is not a
   preference but a vestibular trigger, so this is a correctness requirement.

   Transforms and opacity still settle to their final values — only the animating
   is removed. `!important` is used deliberately: this has to beat the inline
   styles and utility classes scattered through the templates.

   The transport stylesheets (design-system, gf-components, ui-enhancements,
   gf-live-ride) already carry their own guard; this covers the base shell, which
   is what the marketing, auth and client pages render against.
   ────────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==============================================================================
   GLOBAL TOAST NOTIFICATIONS (NEW BIDS, DRIVER ARRIVAL, TRIPS)
   ============================================================================== */

.gf-global-toast-container {
    position: fixed;
    top: max(1.25rem, env(safe-area-inset-top, 20px));
    right: 1.25rem;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 2rem));
    width: 100%;
}

.gf-toast {
    pointer-events: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 1.25rem;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    padding: 1.125rem;
    margin-bottom: 0.75rem;
    transform: translateY(-20px) scale(0.96);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    position: relative;
    font-family: inherit;
    color: #0f172a;
}

.gf-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.gf-toast--arrival::before {
    background: linear-gradient(90deg, #f59e0b 0%, #ea580c 100%);
}

.gf-toast--assigned::before {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.gf-toast--visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.gf-toast--leaving {
    transform: translateY(-16px) scale(0.94);
    opacity: 0;
    transition: transform 0.24s ease-in, opacity 0.24s ease-in;
}

.gf-toast__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.gf-toast__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #059669;
    background: #ecfdf5;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    border: 1px solid #a7f3d0;
}

.gf-toast__badge--arrival {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.gf-toast__badge--assigned {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.gf-toast__amount {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-left: auto;
    padding-right: 0.5rem;
}

.gf-toast__close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
    border-radius: 0.4rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.gf-toast__close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.gf-toast__body {
    margin-bottom: 0.875rem;
}

.gf-toast__driver-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.gf-toast__avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.gf-toast__driver-info {
    flex: 1;
    min-width: 0;
}

.gf-toast__driver-name-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.gf-toast__driver-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gf-toast__rating {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
}

.gf-toast__rating--new {
    color: #047857;
    background: #d1fae5;
}

.gf-toast__vehicle {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gf-toast__vehicle i {
    color: #94a3b8;
    margin-right: 0.25rem;
}

.gf-toast__meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
}

.gf-toast__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
}

.gf-toast__pill--cash {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.gf-toast__pill--card {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.gf-toast__dest-label {
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.gf-toast__arrival-copy,
.gf-toast__assigned-copy {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.45;
}

.gf-toast__arrival-copy strong,
.gf-toast__assigned-copy strong {
    color: #0f172a;
    font-weight: 700;
}

.gf-toast__pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: gf-toast-pulse 1.5s infinite ease-in-out;
}

@keyframes gf-toast-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.4; }
}

.gf-toast__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gf-toast-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.875rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1.2;
    text-align: center;
}

.gf-toast-btn--accept {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
}

.gf-toast-btn--accept:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.38);
    transform: translateY(-1px);
}

.gf-toast-btn--accept.is-loading {
    opacity: 0.75;
    cursor: wait;
}

.gf-toast-btn--accept.is-success {
    background: #10b981;
}

.gf-toast-btn--view {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.gf-toast-btn--view:hover {
    background: #e2e8f0;
    color: #0f172a;
    text-decoration: none;
}

.gf-toast-btn--primary {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.gf-toast-btn--primary:hover {
    background: #1e293b;
    color: #ffffff;
    text-decoration: none;
}

.gf-toast-btn--secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    flex: 0 0 auto;
    padding: 0.6rem 0.75rem;
}

.gf-toast-btn--secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
    text-decoration: none;
}

@media (max-width: 640px) {
    .gf-global-toast-container {
        top: max(0.75rem, env(safe-area-inset-top, 12px));
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
        width: auto;
    }
}

/* Dark mode toast overrides */
[data-theme="dark"] .gf-toast {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(71, 85, 105, 0.8);
    color: #f8fafc;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

[data-theme="dark"] .gf-toast__amount {
    color: #f8fafc;
}

[data-theme="dark"] .gf-toast__driver-name {
    color: #f8fafc;
}

[data-theme="dark"] .gf-toast__vehicle {
    color: #94a3b8;
}

[data-theme="dark"] .gf-toast__dest-label {
    color: #94a3b8;
}

[data-theme="dark"] .gf-toast__arrival-copy,
[data-theme="dark"] .gf-toast__assigned-copy {
    color: #cbd5e1;
}

[data-theme="dark"] .gf-toast__arrival-copy strong,
[data-theme="dark"] .gf-toast__assigned-copy strong {
    color: #f8fafc;
}

[data-theme="dark"] .gf-toast__close {
    color: #64748b;
}

[data-theme="dark"] .gf-toast__close:hover {
    color: #f8fafc;
    background: #334155;
}

[data-theme="dark"] .gf-toast-btn--view {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

[data-theme="dark"] .gf-toast-btn--view:hover {
    background: #475569;
}

[data-theme="dark"] .gf-toast-btn--secondary {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

[data-theme="dark"] .gf-toast-btn--secondary:hover {
    background: #475569;
}

/* ==============================================================================
   NAVIGATION NOTIFICATION BADGES
   ============================================================================== */

.gf-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
    transition: transform 0.2s ease, opacity 0.2s ease;
    animation: gf-badge-pulse 2.2s infinite ease-in-out;
}

.gf-bottom-nav-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 9999px;
    background: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    border: 1.5px solid #ffffff;
    animation: gf-badge-pulse 2.2s infinite ease-in-out;
}

.gf-nav-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #ffffff;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
    animation: gf-badge-pulse 2s infinite ease-in-out;
}

.gf-sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: gf-badge-pulse 2.2s infinite ease-in-out;
}

.gf-sidebar-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #ffffff;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
    animation: gf-badge-pulse 2s infinite ease-in-out;
}

@keyframes gf-badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}


