/* Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #15151f;
    --bg-hover: #1f1f2e;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    
    --border-color: #2a2a3a;
    --border-hover: #3a3a4a;
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app {
    min-height: 100vh;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    color: var(--accent-blue);
    font-size: 1.25rem;
}

.logo-text {
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent-blue);
    font-weight: 600;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Data Range Banner */
.data-range-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.range-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent-blue);
}

.range-icon svg {
    width: 24px;
    height: 24px;
}

.range-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.range-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.range-value {
    font-size: 1.1rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.range-value strong {
    color: var(--accent-blue);
}

.range-total {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: -1px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Quick Search */
.quick-search {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 3rem;
}

.quick-search h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.search-suggestions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-suggestions span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.suggestion {
    padding: 0.4rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

/* Ticket Finder */
.ticket-finder {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 3rem;
}

.ticket-finder h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.finder-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.finder-box {
    margin-bottom: 1.5rem;
}

.finder-input-group {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 500px;
}

.finder-prefix {
    padding: 1rem 0.75rem 1rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
}

.finder-input-group input {
    flex: 1;
    padding: 1rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-mono);
    min-width: 150px;
}

.finder-input-group input:focus {
    outline: none;
    background: var(--bg-tertiary);
}

.finder-input-group input::placeholder {
    color: var(--text-muted);
}

/* Remove number input spinners */
.finder-input-group input[type="number"]::-webkit-outer-spin-button,
.finder-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.finder-input-group input[type="number"] {
    -moz-appearance: textfield;
}

.finder-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--accent-purple);
    color: white;
    border: 1px solid var(--accent-purple);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.finder-btn:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

.finder-btn svg {
    width: 20px;
    height: 20px;
}

.ticket-detail-result {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ticket-detail-result.active {
    min-height: 200px;
    max-height: 600px;
    padding: 1.5rem;
    overflow-y: auto;
}

.ticket-detail-card {
    animation: fadeIn 0.3s ease;
}

.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.ticket-detail-id {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-purple);
}

.ticket-detail-status {
    padding: 0.35rem 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.ticket-detail-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
}

.ticket-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ticket-detail-meta-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-detail-meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.ticket-detail-section {
    margin-bottom: 1.5rem;
}

.ticket-detail-section h4 {
    font-size: 0.9rem;
    color: var(--accent-blue);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.ticket-detail-section p,
.ticket-detail-section pre {
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.ticket-not-found {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.ticket-not-found svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 3rem;
}

.quick-actions h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.action-card:hover .action-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.action-icon svg {
    width: 24px;
    height: 24px;
}

/* Top Section */
.top-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.top-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.top-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-blue);
}

.top-name {
    font-weight: 500;
}

.top-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.top-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: var(--width);
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Search Panel */
.search-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.search-type-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.type-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.type-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.type-btn svg {
    width: 18px;
    height: 18px;
}

.search-input-area {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
}

.input-wrapper input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-main);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
    padding: 1rem 1.5rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    background: #2563eb;
}

.primary-btn.loading .btn-text {
    display: none;
}

.primary-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    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); }
}

.input-hint {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.results-area {
    min-height: 300px;
}

.results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
}

.results-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border-radius: var(--radius-sm);
}

.result-icon svg {
    width: 20px;
    height: 20px;
}

.result-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.result-content {
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}

.result-sources {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.result-sources-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.source-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Stats Dashboard */
.stats-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.summary-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.chart-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bar-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar {
    height: 24px;
    width: var(--width);
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    border-radius: var(--radius-sm);
    min-width: 4px;
}

.bar.agent {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
}

.bar-value {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.tags-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.tags-section h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    transition: all 0.2s ease;
}

.tag:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.tag-xl { font-size: 1rem; }
.tag-lg { font-size: 0.9rem; }
.tag-md { font-size: 0.85rem; }
.tag-sm { font-size: 0.8rem; }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-body input {
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

.modal-body input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .main {
        padding: 1rem;
    }
    
    .section-header h1 {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .summary-row,
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .search-type-selector {
        justify-content: center;
    }
    
    .type-btn span {
        display: none;
    }
}

