/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.1);
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

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

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-panel {
    display: none;
}

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

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.625rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--accent);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    padding: 0.625rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9375rem;
    cursor: pointer;
    outline: none;
    min-width: 150px;
}

.filter-select:focus {
    border-color: var(--accent);
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

thead {
    background: rgba(59, 130, 246, 0.05);
}

th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

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

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-airline { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-hotel { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.badge-car_rental { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-credit_card { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-retail { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-dining { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.badge-fuel { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.badge-entertainment { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.badge-other { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.badge-region {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: capitalize;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Table Footer */
.table-footer {
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer a {
    color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.375rem;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .stat {
        flex-direction: row;
        justify-content: space-between;
    }

    .controls {
        flex-direction: column;
    }

    .search-input, .filter-select {
        width: 100%;
    }

    footer .container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}
