/* =================================================================
   1. THEME DEFINITIONS - Completely Different Color Scheme
   ================================================================= */
:root {
    /* Light Theme - Subtle Brown/Warm Scheme */
    --color-primary: #a67c52; /* Muted Brown */
    --color-primary-dark: #8b6f47; /* Darker Muted Brown */
    --color-primary-light: #b8946f; /* Light Muted Brown */
    --color-secondary: #c4a484; /* Light Tan */
    --color-accent: #d4af8c; /* Light Beige */
    --color-background: #fefefe; /* Almost White */
    --color-surface: #ffffff;
    --color-surface-secondary: #fafafa; /* Very Light Gray */
    --color-text: #3a3a3a; /* Dark Gray */
    --color-text-secondary: #6b6b6b; /* Medium Gray */
    --color-text-muted: #9a9a9a; /* Light Gray */
    --color-border: #e0e0e0; /* Light Gray */
    --color-border-light: #f0f0f0; /* Very Light Gray */
    --color-error: #d32f2f; /* Red */
    --color-error-bg: #ffebee; /* Light Red */
    --color-warning: #f57c00; /* Orange */
    --color-success: #388e3c; /* Green */
    --color-info: #1976d2; /* Blue */
    --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;
}

[data-theme="dark"] {
    /* Dark Theme - Subtle Dark */
    --color-primary: #b8946f; /* Light Muted Brown */
    --color-primary-dark: #a67c52; /* Muted Brown */
    --color-primary-light: #c4a484; /* Light Tan */
    --color-secondary: #d4af8c; /* Light Beige */
    --color-accent: #e0c4a0; /* Very Light Beige */
    --color-background: #1a1a1a; /* Dark Gray */
    --color-surface: #2a2a2a; /* Darker Gray */
    --color-surface-secondary: #3a3a3a; /* Medium Dark Gray */
    --color-text: #e0e0e0; /* Light Gray */
    --color-text-secondary: #b0b0b0; /* Medium Light Gray */
    --color-text-muted: #808080; /* Medium Gray */
    --color-border: #404040; /* Dark Gray */
    --color-border-light: #505050; /* Lighter Dark Gray */
    --color-error: #f44336; /* Light Red */
    --color-error-bg: #2a1a1a; /* Dark Red */
    --color-warning: #ff9800; /* Light Orange */
    --color-success: #4caf50; /* Light Green */
    --color-info: #2196f3; /* Light Blue */
    --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: 'Space Grotesk', -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-to-content {
    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-to-content:focus {
    top: 6px;
}

/* =================================================================
   3. MOBILE HEADER
   ================================================================= */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    z-index: 101;
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--color-surface-secondary);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-logo .logo-icon {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    background: var(--color-primary);
    border-radius: var(--radius-md);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-logo h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.mobile-overlay.active {
    display: block;
}

/* =================================================================
   4. SIDEBAR LAYOUT - Completely Different Structure
   ================================================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    background: var(--color-primary);
    border-radius: var(--radius-md);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background: var(--color-surface-secondary);
}

.sidebar-toggle span {
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
}

.nav-link:hover {
    background: var(--color-surface-secondary);
    color: var(--color-text);
}

.nav-link.active {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-text {
    white-space: nowrap;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--color-surface-secondary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--color-border);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* =================================================================
   4. MAIN CONTENT AREA
   ================================================================= */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: var(--color-background);
    transition: margin-left 0.3s ease;
}

.view-content {
    padding: 2rem;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border-light);
}

.page-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* =================================================================
   5. DASHBOARD LAYOUT - Completely Different Grid System
   ================================================================= */
.dashboard-grid {
    display: grid;
    gap: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    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: var(--color-primary);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    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-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Budget Section */
.budget-section {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.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: var(--color-primary);
    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: 0.75rem;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
}

.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-xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.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: var(--color-primary);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-bar:hover {
    background: var(--color-primary)(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. RECORDS VIEW - Different Table Design
   ================================================================= */
.records-container {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.records-table-wrapper {
    overflow-x: auto;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.records-table th {
    background: var(--color-surface-secondary);
    padding: 1rem 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;
}

.records-table th:hover {
    background: var(--color-border-light);
}

.records-table th::after {
    content: '↕';
    position: absolute;
    right: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.records-table th[data-sort-key] {
    cursor: pointer;
}

.records-table th[data-sort-key]:hover::after {
    color: var(--color-primary);
}

.records-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.record-row {
    transition: all 0.2s ease;
}

.record-row:hover {
    background: var(--color-surface-secondary);
}

.record-row.new-record {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.no-records {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-secondary);
}

.no-records-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--color-text-muted);
}

.no-records h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.no-records p {
    margin: 0 0 1.5rem 0;
    color: var(--color-text-muted);
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    z-index: 1;
}

.search-box input {
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.875rem;
    width: 300px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

/* =================================================================
   7. FORM DESIGN - Completely Different Layout
   ================================================================= */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.transaction-form {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    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: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

.form-group input.invalid-input,
.form-group select.invalid-input {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.error-message {
    color: var(--color-error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* =================================================================
   8. BUTTONS - Different Style
   ================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    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: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-surface-secondary);
    color: var(--color-text);
    border: 1px 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: #8b0000;
    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-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.settings-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.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 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
        justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    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-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.modal-content p {
    margin: 0 0 1.5rem 0;
    color: var(--color-text-secondary);
}

.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-lg);
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    margin-bottom: 1rem;
}

.user-feedback.error {
    background: var(--color-error);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   12. RESPONSIVE DESIGN
   ================================================================= */
@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 100;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
    
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .view-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .budget-details {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .data-actions {
        flex-direction: column;
    }
    
    .chart-bars {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .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: var(--color-primary)(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;
}