/* =============================================================================
   Award Flight Search - Modern Dashboard Styles
   ============================================================================= */

/* -----------------------------------------------------------------------------
   CSS Variables & Theme
   ----------------------------------------------------------------------------- */

:root {
    /* Primary Colors */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Accent Colors */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;

    /* Surfaces */
    --surface-primary: #ffffff;
    --surface-secondary: #f9fafb;
    --surface-elevated: #ffffff;

    /* Background */
    --bg-gradient-start: #f0f4ff;
    --bg-gradient-end: #e8f0fe;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 40px -10px rgb(99 102 241 / 0.3);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* -----------------------------------------------------------------------------
   Reset & Base
   ----------------------------------------------------------------------------- */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.5;
}

/* -----------------------------------------------------------------------------
   App Container
   ----------------------------------------------------------------------------- */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -----------------------------------------------------------------------------
   Navigation
   ----------------------------------------------------------------------------- */

.navbar {
    background: var(--surface-primary);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border-radius: var(--radius-lg);
    color: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.navbar-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--gray-600);
}

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

.status-dot.online {
    background: var(--success-500);
    box-shadow: 0 0 0 3px var(--success-50);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.status-text {
    font-weight: 500;
}

/* -----------------------------------------------------------------------------
   Main Content
   ----------------------------------------------------------------------------- */

.main-content {
    flex: 1;
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* -----------------------------------------------------------------------------
   Hero Section
   ----------------------------------------------------------------------------- */

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-content {
    margin-bottom: 32px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.035em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    font-weight: 400;
}

/* -----------------------------------------------------------------------------
   Search Card
   ----------------------------------------------------------------------------- */

.search-card {
    background: var(--surface-primary);
    border-radius: var(--radius-2xl);
    padding: 24px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    max-width: 900px;
    margin: 0 auto;
}

.search-form {
    width: 100%;
}

.search-inputs {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-900);
    background: var(--surface-secondary);
    transition: all var(--transition-fast);
}

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

.input-wrapper input:hover {
    border-color: var(--gray-300);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--surface-primary);
    box-shadow: 0 0 0 4px var(--primary-50);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-500);
}

/* Airport inputs - uppercase */
#origin, #destination {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Select wrapper */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: 14px 40px 14px 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-900);
    background: var(--surface-secondary);
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.select-wrapper select:hover {
    border-color: var(--gray-300);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--surface-primary);
    box-shadow: 0 0 0 4px var(--primary-50);
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.select-wrapper:focus-within .select-arrow {
    color: var(--primary-500);
}

.range-group {
    min-width: 160px;
}

/* Swap Button */
.swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-bottom: 4px;
}

.swap-button:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    transform: rotate(180deg);
}

/* Search Button */
.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
    min-width: 140px;
    height: 52px;
}

.search-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.5);
}

.search-button:active:not(:disabled) {
    transform: translateY(0);
}

.search-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-content, .btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loader {
    display: none;
}

.search-button.loading .btn-content {
    display: none;
}

.search-button.loading .btn-loader {
    display: flex;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------------------------
   Results Section
   ----------------------------------------------------------------------------- */

.results-section {
    margin-top: 32px;
}

/* Search Status Bar */
.search-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface-primary);
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.status-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.route-display {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.route-display svg {
    color: var(--primary-500);
}

.route-origin, .route-destination {
    letter-spacing: 0.05em;
}

.route-date {
    font-size: 0.9375rem;
    color: var(--gray-500);
    font-weight: 500;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-50);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-700);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-500);
    animation: pulse-primary 1.5s infinite;
}

@keyframes pulse-primary {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-badge.success {
    background: var(--success-50);
    color: var(--success-600);
}

.status-badge.success .badge-dot {
    background: var(--success-500);
    animation: none;
}

.status-badge.error {
    background: var(--error-50);
    color: var(--error-600);
}

.status-badge.error .badge-dot {
    background: var(--error-500);
    animation: none;
}

/* -----------------------------------------------------------------------------
   Stats Row
   ----------------------------------------------------------------------------- */

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
}

.stat-card.highlight .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    flex-shrink: 0;
}

.stat-card.highlight .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* -----------------------------------------------------------------------------
   Results Card
   ----------------------------------------------------------------------------- */

.results-card {
    background: var(--surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.results-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.results-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* Table Wrapper */
.table-wrapper {
    padding: 0 24px 24px;
    overflow-x: auto;
}

/* -----------------------------------------------------------------------------
   DataTables Customization
   ----------------------------------------------------------------------------- */

.dataTables_wrapper {
    font-size: 0.9375rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 16px 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 8px;
    min-width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.dataTables_wrapper .dataTables_info {
    padding: 16px 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding: 16px 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px !important;
    margin: 0 2px !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-md) !important;
    background: var(--surface-primary) !important;
    color: var(--gray-700) !important;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-300) !important;
    color: var(--gray-900) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-500) !important;
    border-color: var(--primary-500) !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Flights Table */
.flights-table {
    width: 100%;
    border-collapse: collapse;
}

.flights-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.flights-table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    font-weight: 500;
}

.flights-table tbody tr {
    transition: background-color var(--transition-fast);
}

.flights-table tbody tr:hover {
    background-color: var(--gray-50);
}

.flights-table tbody tr.has-connections {
    cursor: pointer;
}

.flights-table tbody tr.has-connections:hover {
    background-color: var(--primary-50);
}

/* Miles Badge */
.miles-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.miles-economy {
    background: var(--primary-50);
    color: var(--primary-700);
}

.miles-business {
    background: var(--warning-50);
    color: var(--warning-600);
}

.miles-best {
    background: var(--success-50);
    color: var(--success-600);
}

/* Cabin Badge */
.cabin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
}

.cabin-economy {
    background: var(--gray-100);
    color: var(--gray-700);
}

.cabin-premium {
    background: var(--success-50);
    color: var(--success-600);
}

.cabin-business {
    background: var(--warning-50);
    color: var(--warning-600);
}

/* Stops */
.stops-clickable {
    color: var(--primary-600);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.stops-clickable:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Empty State
   ----------------------------------------------------------------------------- */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.empty-illustration {
    color: var(--gray-300);
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 1rem;
    color: var(--gray-500);
    max-width: 360px;
}

/* Hide empty state when table has data */
.dataTables_wrapper ~ .empty-state,
.flights-table:not(:empty) ~ .empty-state {
    display: none;
}

/* -----------------------------------------------------------------------------
   Modal
   ----------------------------------------------------------------------------- */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface-primary);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modal-in 0.2s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

/* Connection Details */
.connection-summary {
    background: var(--gray-50);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.connection-summary strong {
    color: var(--gray-900);
}

.connection-legs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leg-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: var(--surface-primary);
}

.leg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.leg-number {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-600);
    background: var(--primary-50);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.leg-flight {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
}

.leg-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.leg-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.leg-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.leg-airport {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-600);
    letter-spacing: 0.05em;
}

.leg-date {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.leg-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    color: var(--gray-400);
}

.leg-duration {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

.arrow-line {
    font-size: 1.25rem;
}

.layover-info {
    background: var(--warning-50);
    color: var(--warning-600);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

/* -----------------------------------------------------------------------------
   Toast Notifications
   ----------------------------------------------------------------------------- */

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: var(--surface-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--gray-300);
    animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.toast-success {
    border-left-color: var(--success-500);
}

.toast-success .toast-icon {
    background: var(--success-50);
    color: var(--success-600);
}

.toast-error {
    border-left-color: var(--error-500);
}

.toast-error .toast-icon {
    background: var(--error-50);
    color: var(--error-600);
}

.toast-warning {
    border-left-color: var(--warning-500);
}

.toast-warning .toast-icon {
    background: var(--warning-50);
    color: var(--warning-600);
}

.toast-info {
    border-left-color: var(--primary-500);
}

.toast-info .toast-icon {
    background: var(--primary-50);
    color: var(--primary-600);
}

/* -----------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------------- */

.footer {
    text-align: center;
    padding: 24px;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer .separator {
    margin: 0 8px;
    color: var(--gray-300);
}

.footer a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

/* -----------------------------------------------------------------------------
   Responsive Design
   ----------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 24px 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .search-card {
        padding: 20px;
    }

    .search-inputs {
        flex-direction: column;
        gap: 16px;
    }

    .input-group {
        width: 100%;
        min-width: auto;
    }

    .swap-button {
        align-self: center;
        transform: rotate(90deg);
        margin: -8px 0;
    }

    .swap-button:hover {
        transform: rotate(270deg);
    }

    .search-button {
        width: 100%;
    }

    .search-status-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .table-wrapper {
        padding: 0 16px 16px;
    }

    .toast-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }

    .leg-route {
        flex-direction: column;
        gap: 12px;
    }

    .leg-arrow {
        flex-direction: row;
        gap: 8px;
    }

    .arrow-line {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 1.125rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .empty-state {
        padding: 60px 16px;
    }

    .empty-illustration svg {
        width: 80px;
        height: 80px;
    }
}

/* -----------------------------------------------------------------------------
   Utilities
   ----------------------------------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
