/* SoliDefi Travel - MyExpense Tracker CSS Design System */

:root {
    --primary-color: hsl(210, 100%, 50%);
    --primary-light: hsl(210, 100%, 75%);
    --secondary-color: hsl(190, 80%, 45%);
    --bg-dark: hsl(220, 20%, 5%);
    --bg-light: hsl(220, 20%, 12%);
    --bg-card: hsla(220, 20%, 10%, 0.7);
    --text-main: hsl(0, 0%, 95%);
    --text-muted: hsl(0, 0%, 70%);
    --glass-bg: hsla(220, 20%, 8%, 0.6);
    --glass-border: hsla(0, 0%, 100%, 0.08);
    --card-shadow: 0 8px 32px 0 hsla(0, 0%, 0%, 0.45);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.3s ease;
    
    /* Category Colors */
    --cat-lodging: #0077ff;
    --cat-transport: #00e5ff;
    --cat-food: #a855f7;
    --cat-shopping: #f59e0b;
    --cat-sightseeing: #ec4899;
    --cat-others: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* Glassmorphism Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
}

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: var(--card-shadow);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.logo span {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

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

/* Landing View Container */
.landing-container {
    min-height: 100vh;
    padding: 120px 5% 60px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(0, 119, 255, 0.15), transparent 45%),
                radial-gradient(circle at bottom left, rgba(0, 229, 255, 0.1), transparent 40%);
}

.hero-info {
    text-align: center;
    max-width: 800px;
    margin-bottom: 50px;
}

.hero-info h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.15;
}

.hero-info h1 span {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-info p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* File Upload & Store Grid Layout */
.landing-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    max-width: 1100px;
    width: 100%;
    align-items: stretch;
}

/* Download Section Card */
.download-card {
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
}

.download-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.download-card h2 span {
    color: var(--secondary-color);
}

.download-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.step-list {
    list-style: none;
    margin-bottom: 35px;
}

.step-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.step-list li i {
    color: var(--primary-color);
    margin-top: 5px;
}

.store-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.store-btn {
    flex: 1;
    min-width: 150px;
    background: hsla(220, 20%, 6%, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 18px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
}

.store-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    background: hsla(220, 20%, 14%, 0.8);
}

.store-btn i {
    font-size: 1.6rem;
}

.store-btn-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.store-btn-text strong {
    font-size: 0.95rem;
}

/* File Upload Card */
.upload-card {
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--card-shadow);
}

.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 45px 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 119, 255, 0.03);
    box-shadow: 0 0 15px rgba(0, 119, 255, 0.1);
}

.dropzone-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition-fast);
}

.dropzone:hover .dropzone-icon {
    transform: translateY(-5px);
    color: var(--secondary-color);
}

.dropzone h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.dropzone p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 16px rgba(0, 119, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 119, 255, 0.35);
}

.btn-secondary {
    background: hsla(220, 20%, 8%, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: hsla(220, 20%, 15%, 0.8);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    margin: 25px 0;
    font-size: 0.9rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.divider:not(:empty)::before {
    margin-right: .75em;
}

.divider:not(:empty)::after {
    margin-left: .75em;
}

/* --- DASHBOARD VIEW CONTAINER --- */
.dashboard-container {
    padding: 120px 5% 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.header-title h1 {
    font-size: 2.2rem;
    margin-bottom: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box {
    position: relative;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: white;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 119, 255, 0.1);
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.2);
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    background: rgba(0, 119, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card:nth-child(2) .stat-icon {
    color: var(--secondary-color);
    background: rgba(0, 229, 255, 0.1);
}

.stat-card:nth-child(3) .stat-icon {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.stat-card:nth-child(4) .stat-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Country Tabs Navigation */
.tabs-container {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.country-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 1px;
}

.country-tab {
    background: none;
    border: none;
    outline: none;
    color: var(--text-muted);
    padding: 12px 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.country-tab:hover {
    color: var(--text-main);
}

.country-tab.active {
    color: var(--primary-color);
}

.country-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px 5px 0 0;
}

/* Country specific context widget */
.country-widget {
    background: rgba(0, 229, 255, 0.03);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 16px;
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.country-widget-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.country-widget-info h4 {
    font-size: 1.2rem;
}

.country-widget-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
}

.country-widget-details {
    display: flex;
    gap: 30px;
}

.country-widget-details p {
    font-size: 0.9rem;
}

/* Visuals Layout: Charts & Map Grid */
.visuals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .visuals-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.chart-card h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.chart-container-donut {
    position: relative;
    height: 250px;
    width: 100%;
}

.chart-container-line {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-card-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .chart-card-row {
        grid-template-columns: 1fr;
    }
}

/* Map Card */
.map-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    height: 100%;
}

.map-card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-left: 3px solid var(--secondary-color);
    padding-left: 10px;
}

#travel-map {
    height: 350px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
}

/* Leaflet Popups Dark theme styling override */
.leaflet-popup-content-wrapper {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
    border-radius: 12px !important;
}
.leaflet-popup-tip {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Transactions Table Card */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-card-header h3 {
    font-size: 1.2rem;
    border-left: 3px solid #a855f7;
    padding-left: 10px;
}

.table-card-header span {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

th {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

/* Category badging in table */
.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.cat-lodging { background: rgba(0, 119, 255, 0.15); color: var(--cat-lodging); border: 1px solid rgba(0, 119, 255, 0.2); }
.cat-transport { background: rgba(0, 229, 255, 0.15); color: var(--cat-transport); border: 1px solid rgba(0, 229, 255, 0.2); }
.cat-food { background: rgba(168, 85, 247, 0.15); color: var(--cat-food); border: 1px solid rgba(168, 85, 247, 0.2); }
.cat-shopping { background: rgba(245, 158, 11, 0.15); color: var(--cat-shopping); border: 1px solid rgba(245, 158, 11, 0.2); }
.cat-sightseeing { background: rgba(236, 72, 153, 0.15); color: var(--cat-sightseeing); border: 1px solid rgba(236, 72, 153, 0.2); }
.cat-others { background: rgba(100, 116, 139, 0.15); color: var(--cat-others); border: 1px solid rgba(100, 116, 139, 0.2); }

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive grid changes */
@media (max-width: 768px) {
    .landing-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-info h1 {
        font-size: 2.5rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        max-width: 100%;
        width: 100%;
    }
}

/* Footer Content styling */
footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
    padding: 30px 5%;
    background-color: hsla(220, 20%, 3%, 0.8);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 15px;
}

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

.social-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

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

/* ── Tab buttons (new .tab-btn replaces .country-tab) ─────────────────────── */
.tab-btn {
    background: none;
    border: none;
    outline: none;
    color: var(--text-muted);
    padding: 12px 22px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
}
.tab-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.03); }
.tab-btn.active {
    color: var(--primary-color);
    background: rgba(59,130,246,0.06);
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px 5px 0 0;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 8px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.badge-green  { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.badge-amber  { background: rgba(245,158,11,0.15);  color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.badge-blue   { background: rgba(59,130,246,0.15);  color: #3b82f6; border: 1px solid rgba(59,130,246,0.3); }

/* ── Category inline badge ────────────────────────────────────────────────── */
.cat-badge {
    display: inline-block;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    white-space: nowrap;
}

/* ── Country tag ──────────────────────────────────────────────────────────── */
.country-tag {
    display: inline-block;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.25);
    color: #3b82f6;
    white-space: nowrap;
}

/* ── Outlier row ──────────────────────────────────────────────────────────── */
.outlier-row td {
    background: rgba(245,158,11,0.04);
}
.outlier-row:hover td {
    background: rgba(245,158,11,0.08) !important;
}
:root { --danger-color: #ef4444; }

/* ── Filter row ───────────────────────────────────────────────────────────── */
.filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.filter-select {
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-main);
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}
.filter-select:focus, .filter-select:hover {
    border-color: var(--primary-color);
}

/* ── Upload progress ──────────────────────────────────────────────────────── */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 12px;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.spinner {
    width: 20px; height: 20px;
    border: 3px solid rgba(59,130,246,0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Wide chart card (full width) ────────────────────────────────────────── */
.chart-card.wide {
    margin-bottom: 30px;
}
.chart-card-header-row {
    margin-bottom: 8px;
}
.chart-card-header-row h3 {
    margin-bottom: 4px;
}
.chart-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ── Chart heights ────────────────────────────────────────────────────────── */
.chart-container-bar     { position: relative; height: 280px; width: 100%; }
.chart-container-bar-lg  { position: relative; height: 340px; width: 100%; }
.chart-container-radar   { position: relative; height: 300px; width: 100%; }
.chart-container-donut   { position: relative; height: 260px; width: 100%; }
.chart-container-line    { position: relative; height: 280px; width: 100%; }

/* ── Two-col grid ─────────────────────────────────────────────────────────── */
.visuals-grid.two-col {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
    .visuals-grid.two-col { grid-template-columns: 1fr; }
}

/* ── Map (now inside chart-card.wide) ─────────────────────────────────────── */
#travel-map {
    height: 380px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    z-index: 10;
}

/* ── Stat card accent variant ─────────────────────────────────────────────── */
.stat-card.accent {
    border-color: rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.06);
}

/* ── Leaflet popup ────────────────────────────────────────────────────────── */
.leaflet-popup-content-wrapper {
    background: #0d1424 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
    border-radius: 14px !important;
    color: #e2e8f0 !important;
}
.leaflet-popup-tip { background: #0d1424 !important; }

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dashboard-actions { flex-direction: column; align-items: flex-start; width: 100%; }
    .filter-row { width: 100%; }
    .filter-select { flex: 1; }
}

/* ── File Management & Alerts Styles ──────────────────────────────────────── */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition-fast);
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.25);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-info i {
    color: var(--primary-light);
    font-size: 1.1rem;
}

.btn-delete-file {
    background: none;
    border: none;
    outline: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.btn-delete-file:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.trip-edit-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.trip-name-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-main);
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-fast);
}

.trip-name-input:focus {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
}

.btn-save-trip-name {
    background: hsla(220, 20%, 8%, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-save-trip-name:hover {
    border-color: var(--primary-color);
    background: hsla(220, 20%, 15%, 0.8);
    color: white;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.06);
    border-left: 3px solid #ef4444;
    border-radius: 0 8px 8px 0;
    font-size: 0.88rem;
    color: #fca5a5;
}

.alert-item i {
    margin-top: 3px;
    font-size: 0.9rem;
}

/* Sidebar Grid Layout */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-grid-layout {
        grid-template-columns: 1fr;
    }
}

.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 30px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    border-left: 3px solid var(--primary-color);
    padding-left: 8px;
    font-weight: 700;
}

.country-tabs-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-item-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-country-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.sidebar-country-header:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.05);
}

.sidebar-country-header.active {
    background: linear-gradient(90deg, rgba(0, 119, 255, 0.15), rgba(0, 229, 255, 0.08));
    border-color: rgba(0, 119, 255, 0.3);
    color: var(--primary-light);
}

.sidebar-trip-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 18px;
    margin-top: 4px;
    border-left: 1px dashed rgba(255, 255, 255, 0.12);
}

.sidebar-trip-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.sidebar-trip-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-trip-item.active {
    color: var(--secondary-color);
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.15);
    font-weight: 600;
}

/* Horizontal Trip Tabs Container */
#trip-tabs-container {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 10px 16px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}


