/* DESIGN SYSTEM & CUSTOM VARIABLE TOKENS */
:root {
    --bg-app: #08080f;
    --bg-card: rgba(18, 18, 30, 0.65);
    --bg-card-hover: rgba(26, 26, 42, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(123, 97, 255, 0.5);
    
    /* Typography Font Sizes & Families */
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;
    
    /* Elegant Dynamic Color Palette */
    --primary: hsl(252, 100%, 69%);      /* Neon Purple-Blue */
    --primary-glow: hsla(252, 100%, 69%, 0.35);
    --secondary: hsl(190, 100%, 50%);    /* Neon Cyan */
    --accent: hsl(340, 95%, 60%);       /* Neon Pink-Red */
    --success: hsl(145, 80%, 45%);      /* Vibrant Green */
    --warning: hsl(42, 100%, 55%);      /* Warm Yellow */
    --danger: hsl(352, 90%, 60%);       /* Ruby Red */
    
    /* Categorized Expense Colors */
    --cat-transport: hsl(205, 90%, 55%);
    --cat-lodging: hsl(265, 85%, 60%);
    --cat-food: hsl(14, 90%, 55%);
    --cat-activities: hsl(150, 75%, 45%);
    --cat-shopping: hsl(330, 85%, 55%);
    --cat-misc: hsl(0, 0%, 60%);
    
    /* Text Color Spectrum */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --header-height: 80px;
    --border-radius: 16px;
    --glass-blur: blur(16px);
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* GENERAL STYLE & RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* LAYOUT CONTAINER */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(88, 48, 255, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(0, 229, 255, 0.06) 0%, transparent 40%);
}

/* SIDEBAR STYLES */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(12, 12, 22, 0.85);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    height: 100%;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.brand-logo i {
    font-size: 20px;
    color: white;
}

.brand h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand h1 span {
    color: var(--secondary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), rgba(123, 97, 255, 0.4));
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.25);
}

.nav-btn i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* SIDEBAR FOOTER & BUDGET WIDGET */
.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.budget-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.widget-header button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.widget-header button:hover {
    color: var(--secondary);
}

.widget-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    margin: 6px 0;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    width: 0%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, var(--warning), var(--accent));
}

.progress-bar-fill.danger {
    background: linear-gradient(90deg, var(--danger), #ff4d4d);
}

.widget-sub {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

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

.action-btn-sm {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.action-btn-sm:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

/* MAIN CONTENT AREA */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    overflow: hidden;
}

/* HEADER BANNER */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.header-info h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-info .subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.header-info .subtitle i {
    color: var(--secondary);
    margin-right: 6px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-secondary-sm {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary-sm:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.12);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.15);
}

/* DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    flex-grow: 1;
    overflow: hidden;
    height: calc(100vh - var(--header-height) - 48px);
}

/* GLASS CARD STYLES */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* CONTENT PANEL TAB PANELS */
.content-panel {
    height: 100%;
}

.tab-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    overflow-y: auto;
}

.tab-panel.active {
    display: flex;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h3 i {
    color: var(--primary);
}

.panel-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    margin-top: -12px;
}

/* SELECT AND INPUT GENERAL STYLES */
.custom-select, input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.custom-select:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* FORM LAYOUTS */
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.input-with-symbol input {
    padding-right: 36px;
}

.input-with-symbol span {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
}

/* TIMELINE PANEL */
.timeline-filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-filters label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-filters .custom-select {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    padding-left: 8px;
}

.timeline-day-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-day-header {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-day-header span.date {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
}

.day-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 12px;
    border-left: 2px dashed rgba(255, 255, 255, 0.06);
    margin-left: 8px;
}

.no-events-placeholder {
    padding: 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
}

/* EVENT CARD STYLES */
.event-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    position: relative;
    transition: var(--transition-smooth);
}

.event-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.event-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* Specific Event Type Styles */
.event-card.activity .event-icon-wrapper {
    background: rgba(123, 97, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(123, 97, 255, 0.3);
}

.event-card.food .event-icon-wrapper {
    background: rgba(255, 107, 0, 0.15);
    color: var(--cat-food);
    border: 1px solid rgba(255, 107, 0, 0.3);
}

.event-card.transport .event-icon-wrapper {
    background: rgba(0, 229, 255, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(0, 229, 255, 0.3);
}

.event-card.lodging .event-icon-wrapper {
    background: rgba(200, 80, 255, 0.15);
    color: var(--cat-lodging);
    border: 1px solid rgba(200, 80, 255, 0.3);
}

.event-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.event-time {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.event-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.event-location {
    font-size: 12px;
    color: var(--text-muted);
}

.event-location i {
    margin-right: 4px;
    color: var(--accent);
}

.event-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 8px;
}

.event-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.event-price {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--success);
    background: rgba(46, 204, 113, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.event-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition-smooth);
}

.event-card:hover .event-actions {
    opacity: 1;
}

.btn-card-action {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    transition: var(--transition-smooth);
}

.btn-card-action:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-card-action.edit:hover {
    color: var(--secondary);
}

.btn-card-action.delete:hover {
    color: var(--danger);
}

/* MAP PANEL STYLES */
.map-panel {
    height: 100%;
}

#map-container {
    flex-grow: 1;
    position: relative;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

#map {
    width: 100%;
    height: 100%;
    background: #111;
}

/* Custom dark styling for Leaflet controls */
.leaflet-bar {
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-premium) !important;
}

.leaflet-bar a {
    background-color: #1a1a2e !important;
    color: white !important;
    border-bottom: 1px solid var(--border-color) !important;
    transition: var(--transition-smooth);
}

.leaflet-bar a:hover {
    background-color: #2e2e4f !important;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: rgba(18, 18, 30, 0.95) !important;
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    border-radius: 8px;
}

.leaflet-popup-content h4 {
    font-family: var(--font-heading);
    margin-bottom: 4px;
    color: var(--secondary);
}

.map-legend {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item .line {
    width: 24px;
    height: 3px;
    display: inline-block;
    border-radius: 2px;
}

.legend-item .line.flight {
    border-top: 2.5px dashed var(--secondary);
}

.legend-item .line.land {
    background-color: var(--accent);
}

.legend-item .dot.pin {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

/* SUGGESTIONS / EXPLORE PANEL */
.destinations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.destination-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.destination-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.dest-header-bar {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dest-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.dest-name span {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 6px;
}

.btn-show-dest {
    background: rgba(123, 97, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(123, 97, 255, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-show-dest:hover {
    background: var(--primary);
    color: white;
}

.dest-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dest-section h5 {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.sugg-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sugg-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
}

.sugg-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

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

.sugg-title {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.sugg-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-add-sugg {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.btn-add-sugg:hover {
    background: var(--success);
    color: white;
}

/* FINANCIALS PANEL */
.expense-dashboard {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    margin-bottom: 30px;
    align-items: start;
}

.chart-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.svg-chart-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.chart-inner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.chart-inner-text .pct {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.chart-inner-text .lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.chart-legend {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

.legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
}

.legend-key {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.legend-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-color-dot.transport { background-color: var(--cat-transport); }
.legend-color-dot.lodging { background-color: var(--cat-lodging); }
.legend-color-dot.food { background-color: var(--cat-food); }
.legend-color-dot.activities { background-color: var(--cat-activities); }
.legend-color-dot.shopping { background-color: var(--cat-shopping); }
.legend-color-dot.misc { background-color: var(--cat-misc); }

.legend-row .val {
    font-weight: 600;
    color: white;
}

.budget-manager-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.budget-manager-card h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 16px;
}

.budget-editor {
    margin-bottom: 20px;
}

.finance-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-card .m-label {
    font-size: 11px;
    color: var(--text-muted);
}

.metric-card .m-value {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.metric-card .m-value.text-success {
    color: var(--success);
}

.metric-card .m-value.sub-text {
    font-size: 14px;
    color: var(--secondary);
}

.currency-converter-box {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.currency-converter-box h5 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.converter-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.converter-inputs input.small-input {
    width: 80px;
    padding: 6px 10px;
    font-size: 13px;
}

.converter-inputs select.small-select {
    width: 120px;
    padding: 6px 10px;
    font-size: 13px;
}

.expense-list-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title-bar h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.15);
}

.expense-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.expense-table th {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.expense-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.expense-table tbody tr:last-child td {
    border-bottom: none;
}

.expense-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge-category {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-category.transport { background: rgba(0, 229, 255, 0.15); color: var(--secondary); border: 1px solid rgba(0, 229, 255, 0.3); }
.badge-category.lodging { background: rgba(200, 80, 255, 0.15); color: var(--cat-lodging); border: 1px solid rgba(200, 80, 255, 0.3); }
.badge-category.food { background: rgba(255, 107, 0, 0.15); color: var(--cat-food); border: 1px solid rgba(255, 107, 0, 0.3); }
.badge-category.activities { background: rgba(46, 204, 113, 0.15); color: var(--success); border: 1px solid rgba(46, 204, 113, 0.3); }
.badge-category.shopping { background: rgba(255, 80, 150, 0.15); color: var(--cat-shopping); border: 1px solid rgba(255, 80, 150, 0.3); }
.badge-category.misc { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.15); }

/* CALCULATOR PANEL STYLES */
.calculator-box {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.calculator-form {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.transport-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

.transport-radio {
    cursor: pointer;
}

.transport-radio input {
    display: none;
}

.transport-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    transition: var(--transition-smooth);
}

.transport-card i {
    font-size: 20px;
    color: var(--text-muted);
}

.transport-card span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

.transport-radio input:checked + .transport-card {
    background: rgba(123, 97, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.transport-radio input:checked + .transport-card i,
.transport-radio input:checked + .transport-card span {
    color: var(--secondary);
}

.calculator-results {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(123, 97, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.4s ease-out;
}

.calculator-results h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--secondary);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.result-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-tile .lbl {
    font-size: 11px;
    color: var(--text-muted);
}

.result-tile .val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.result-tile .val.highlighted {
    color: var(--warning);
    font-size: 24px;
}

.results-notes {
    font-size: 12px;
    color: var(--text-muted);
    border-left: 2px solid var(--secondary);
    padding-left: 10px;
    background: rgba(255, 255, 255, 0.01);
    padding: 8px 10px;
    border-radius: 0 6px 6px 0;
}

/* MODAL STYLES */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    background: rgba(20, 20, 35, 0.95);
    border-radius: var(--border-radius);
    padding: 28px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    color: var(--danger);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.modal-content h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    margin-bottom: 14px;
    color: var(--secondary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.hidden {
    display: none !important;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE LAYOUTS (TABLETS / MOBILE) */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    
    .app-container {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
    }
    
    .brand {
        margin-bottom: 16px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 16px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 16px;
        height: auto;
        overflow: visible;
    }
    
    .map-panel {
        height: 400px;
        order: -1; /* Make map appear at the top on smaller screens */
    }
    
    .content-panel {
        height: auto;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .dest-body {
        grid-template-columns: 1fr;
    }
    
    .expense-dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .backup-actions {
        flex-direction: column;
    }
}

/* GALLERY, PHOTOS AND COMMENTS STYLING */
.event-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.event-photo-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.event-photo-thumb:hover {
    transform: scale(1.08);
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.4);
}

.event-comment-box {
    font-size: 12.5px;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.5;
}

/* Lightbox zoom in animation */
.lightbox-content {
    animation: lightboxZoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxZoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal-btn#btn-close-lightbox:hover {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary);
}

/* INLINE DAY ACTIVITY ADD BUTTON */
.btn-add-activity-inline {
    background: rgba(0, 229, 255, 0.1);
    border: 1px dashed var(--secondary);
    color: var(--secondary);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.btn-add-activity-inline:hover {
    background: var(--secondary);
    color: var(--bg-app);
    border-style: solid;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

/* COUNTRY FILTER LAYOUTS */
.country-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.country-itinerary-section, .country-guides-section {
    animation: fadeIn 0.4s ease-out;
}
