/* =================================================================
   1. THEME DEFINITIONS - Modern Purple/Blue Scheme
   ================================================================= */
:root {
    /* Light Theme - Modern Purple/Blue */
    --color-primary: #6366f1; /* Indigo 500 */
    --color-primary-dark: #4f46e5; /* Indigo 600 */
    --color-primary-light: #818cf8; /* Indigo 400 */
    --color-secondary: #8b5cf6; /* Violet 500 */
    --color-accent: #06b6d4; /* Cyan 500 */
    --color-background: #fafafa; /* Gray 50 */
    --color-surface: #ffffff;
    --color-surface-secondary: #f8fafc; /* Slate 50 */
    --color-text: #1e293b; /* Slate 800 */
    --color-text-secondary: #64748b; /* Slate 500 */
    --color-text-muted: #94a3b8; /* Slate 400 */
    --color-border: #e2e8f0; /* Slate 200 */
    --color-border-light: #f1f5f9; /* Slate 100 */
    --color-error: #ef4444; /* Red 500 */
    --color-error-bg: #fef2f2; /* Red 50 */
    --color-warning: #f59e0b; /* Amber 500 */
    --color-success: #10b981; /* Emerald 500 */
    --color-info: #3b82f6; /* Blue 500 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

[data-theme="dark"] {
    /* Dark Theme - Dark Purple/Blue */
    --color-primary: #8b5cf6; /* Violet 500 */
    --color-primary-dark: #7c3aed; /* Violet 600 */
    --color-primary-light: #a78bfa; /* Violet 400 */
    --color-secondary: #06b6d4; /* Cyan 500 */
    --color-accent: #f59e0b; /* Amber 500 */
    --color-background: #0f172a; /* Slate 900 */
    --color-surface: #1e293b; /* Slate 800 */
    --color-surface-secondary: #334155; /* Slate 700 */
    --color-text: #f1f5f9; /* Slate 100 */
    --color-text-secondary: #94a3b8; /* Slate 400 */
    --color-text-muted: #64748b; /* Slate 500 */
    --color-border: #334155; /* Slate 700 */
    --color-border-light: #475569; /* Slate 600 */
    --color-error: #f87171; /* Red 400 */
    --color-error-bg: #450a0a; /* Red 950 */
    --color-warning: #fbbf24; /* Amber 400 */
    --color-success: #34d399; /* Emerald 400 */
    --color-info: #60a5fa; /* Blue 400 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

/* =================================================================
   2. BASE STYLES & RESETS
   ================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 1000;
    transition: top 0.3s;
    font-weight: 500;
}

.skip-link:focus {
    top: 6px;
}

/* Visually hidden content */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =================================================================
   3. TOP NAVIGATION BAR
   ================================================================= */
.top-navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background: var(--color-surface-secondary);
    color: var(--color-text);
}

.nav-link.active {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--color-surface-secondary);
    border: none;
    border-radius: var(--radius-lg);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--color-border);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* =================================================================
   4. MAIN CONTENT AREA
   ================================================================= */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 70px);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.section-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* =================================================================
   5. DASHBOARD LAYOUT
   ================================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

/* Budget Overview */
.budget-overview {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.budget-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.budget-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.budget-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--color-border-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 6px;
    transition: width 0.3s ease;
}

.budget-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-lg);
}

.budget-label {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.budget-value {
    font-weight: 700;
    font-size: 1.125rem;
}

.budget-value.spent {
    color: var(--color-primary);
}

.budget-value.remaining {
    color: var(--color-success);
}

.budget-value.over-budget {
    color: var(--color-error);
}

/* Chart Section */
.chart-section {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 1.5rem 0;
}

.chart-container {
    margin-top: 1.5rem;
}

.chart-bars {
    display: flex;
    align-items: end;
    justify-content: space-between;
    height: 200px;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-bar:hover {
    background: linear-gradient(180deg, var(--color-primary-dark), var(--color-primary));
    transform: scaleY(1.05);
}

.chart-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.chart-dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* =================================================================
   6. TRANSACTIONS LAYOUT
   ================================================================= */
.transactions-container {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.transactions-table-wrapper {
    overflow-x: auto;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.transactions-table th {
    background: var(--color-surface-secondary);
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
    cursor: pointer;
    user-select: none;
    position: relative;
    white-space: nowrap;
}

.transactions-table th:hover {
    background: var(--color-border-light);
}

.transactions-table th::after {
    content: '↕';
    position: absolute;
    right: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.transactions-table th[data-sort-key] {
    cursor: pointer;
}

.transactions-table th[data-sort-key]:hover::after {
    color: var(--color-primary);
}

.transactions-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.transaction-row {
    transition: all 0.2s ease;
}

.transaction-row:hover {
    background: var(--color-surface-secondary);
}

.transaction-row.new-transaction {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-secondary);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--color-text-muted);
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0 0 2rem 0;
    color: var(--color-text-muted);
}

/* Search Container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    z-index: 1;
}

.search-input {
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 1rem;
    width: 400px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =================================================================
   7. FORM DESIGN
   ================================================================= */
.form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.transaction-form {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.875rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.invalid-input,
.form-select.invalid-input {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: var(--color-error);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* =================================================================
   8. BUTTONS
   ================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    min-height: 44px;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-surface-secondary);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    min-height: 36px;
}

/* =================================================================
   9. SETTINGS LAYOUT
   ================================================================= */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-card {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border-light);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.data-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.import-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* =================================================================
   10. MODAL DESIGN
   ================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 1rem 0;
}

.modal-message {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0 0 1.5rem 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* =================================================================
   11. STATUS MESSAGES
   ================================================================= */
.user-feedback {
    background: var(--color-success);
    color: white;
    border-radius: var(--radius-xl);
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    margin-bottom: 1rem;
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.user-feedback.error {
    background: var(--color-error);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* =================================================================
   12. RESPONSIVE DESIGN
   ================================================================= */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .nav-link span {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .budget-details {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        gap: 0.125rem;
    }
    
    .nav-link {
        padding: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input {
        width: 100%;
    }
    
    .data-actions {
        flex-direction: column;
    }
    
    .chart-bars {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* =================================================================
   13. ACCESSIBILITY & FOCUS STATES
   ================================================================= */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:focus,
input:focus,
select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =================================================================
   14. UTILITY CLASSES
   ================================================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden { display: none; }
.visible { display: block; }

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mark highlighting for search results */
mark {
    background: linear-gradient(120deg, var(--color-warning) 0%, var(--color-accent) 100%);
    color: var(--color-text);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

