/**
 * HUMANITARIAN PLATFORM - MODERN TAILWIND-INSPIRED CSS
 * Mobile-first responsive design with red color scheme
 */

/* ========================================
   CSS RESET & BASE STYLES
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ======================================== */

:root {
    /* Red Color Palette */
    --primary-50: #fef2f2;
    --primary-100: #fee2e2;
    --primary-200: #fecaca;
    --primary-300: #fca5a5;
    --primary-400: #f87171;
    --primary-500: #ef4444;
    --primary-600: #dc2626;
    --primary-700: #b91c1c;
    --primary-800: #991b1b;
    --primary-900: #7f1d1d;
    
    /* Gray Scale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition: all 0.15s ease-in-out;
    --transition-fast: all 0.1s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --gray-50: #111827;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
    
    color: #f9fafb;
    background-color: #111827;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--gray-100);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-4);
    color: var(--gray-700);
}

[data-theme="dark"] p {
    color: var(--gray-300);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ========================================
   LAYOUT UTILITIES
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Gap Utilities */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background-color: var(--gray-900);
    border-bottom-color: var(--gray-700);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-600);
    text-decoration: none;
}

.logo:hover {
    color: var(--primary-700);
    text-decoration: none;
}

.logo img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
}

.nav-menu {
    display: none;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-menu.show {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid var(--gray-200);
    flex-direction: column;
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .nav-menu.show {
    background-color: var(--gray-900);
    border-top-color: var(--gray-700);
}

.nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
}

[data-theme="dark"] .nav-link {
    color: var(--gray-300);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-600);
    background-color: var(--primary-50);
    text-decoration: none;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    background-color: var(--primary-900);
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

[data-theme="dark"] .mobile-menu-toggle {
    color: var(--gray-300);
}

.mobile-menu-toggle:hover {
    background-color: var(--gray-100);
    color: var(--primary-600);
}

[data-theme="dark"] .mobile-menu-toggle:hover {
    background-color: var(--gray-800);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

[data-theme="dark"] .user-button {
    color: var(--gray-300);
}

.user-button:hover {
    background-color: var(--gray-100);
    color: var(--primary-600);
}

[data-theme="dark"] .user-button:hover {
    background-color: var(--gray-800);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: var(--space-2);
    display: none;
    z-index: 50;
}

[data-theme="dark"] .user-dropdown {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

[data-theme="dark"] .user-dropdown a {
    color: var(--gray-300);
}

.user-dropdown a:hover {
    background-color: var(--gray-100);
    color: var(--primary-600);
    text-decoration: none;
}

[data-theme="dark"] .user-dropdown a:hover {
    background-color: var(--gray-700);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

[data-theme="dark"] .theme-toggle {
    color: var(--gray-300);
}

.theme-toggle:hover {
    background-color: var(--gray-100);
    color: var(--primary-600);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: var(--gray-800);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.language-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: none;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 0.875rem;
}

[data-theme="dark"] .language-button {
    border-color: var(--gray-600);
    color: var(--gray-300);
}

.language-button:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    padding: var(--space-2);
    display: none;
    z-index: 50;
}

[data-theme="dark"] .language-dropdown {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

[data-theme="dark"] .language-option {
    color: var(--gray-300);
}

.language-option:hover {
    background-color: var(--gray-100);
    color: var(--primary-600);
    text-decoration: none;
}

[data-theme="dark"] .language-option:hover {
    background-color: var(--gray-700);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
}

.btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
}

.btn-xl {
    padding: var(--space-4) var(--space-8);
    font-size: 1.125rem;
}

/* Primary Button */
.btn-primary {
    background-color: var(--primary-600);
    color: #ffffff;
    border-color: var(--primary-600);
}

.btn-primary:hover {
    background-color: var(--primary-700);
    border-color: var(--primary-700);
    color: #ffffff;
    text-decoration: none;
}

.btn-primary:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-900);
    border-color: var(--gray-300);
}

[data-theme="dark"] .btn-secondary {
    background-color: var(--gray-800);
    color: var(--gray-100);
    border-color: var(--gray-600);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
    border-color: var(--gray-400);
    color: var(--gray-900);
    text-decoration: none;
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--gray-700);
    border-color: var(--gray-500);
    color: var(--gray-100);
}

/* Outline Button */
.btn-outline {
    background-color: transparent;
    color: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-outline:hover {
    background-color: var(--primary-600);
    color: #ffffff;
    text-decoration: none;
}

/* Ghost Button */
.btn-ghost {
    background-color: transparent;
    color: var(--gray-700);
    border-color: transparent;
}

[data-theme="dark"] .btn-ghost {
    color: var(--gray-300);
}

.btn-ghost:hover {
    background-color: var(--gray-100);
    color: var(--primary-600);
    text-decoration: none;
}

[data-theme="dark"] .btn-ghost:hover {
    background-color: var(--gray-800);
}

/* Success Button */
.btn-success {
    background-color: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
    text-decoration: none;
}

/* Warning Button */
.btn-warning {
    background-color: var(--warning);
    color: #ffffff;
    border-color: var(--warning);
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    color: #ffffff;
    text-decoration: none;
}

/* Danger Button */
.btn-danger {
    background-color: var(--error);
    color: #ffffff;
    border-color: var(--error);
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    text-decoration: none;
}

/* Icon Button */
.btn-icon {
    padding: var(--space-2);
    width: 40px;
    height: 40px;
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

[data-theme="dark"] .form-label {
    color: var(--gray-300);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    line-height: 1.25;
    color: var(--gray-900);
    background-color: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select {
    color: var(--gray-100);
    background-color: var(--gray-800);
    border-color: var(--gray-600);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus,
[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 3px var(--primary-900);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--gray-400);
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: var(--error);
}

.form-input.error:focus,
.form-textarea.error:focus,
.form-select.error:focus {
    box-shadow: 0 0 0 3px #fecaca;
}

[data-theme="dark"] .form-input.error:focus,
[data-theme="dark"] .form-textarea.error:focus,
[data-theme="dark"] .form-select.error:focus {
    box-shadow: 0 0 0 3px #7f1d1d;
}

.field-error {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: var(--space-1);
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: var(--space-1);
}

[data-theme="dark"] .form-help {
    color: var(--gray-400);
}

/* Checkbox and Radio */
.form-checkbox,
.form-radio {
    width: 1rem;
    height: 1rem;
    color: var(--primary-600);
    background-color: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
}

[data-theme="dark"] .form-checkbox,
[data-theme="dark"] .form-radio {
    background-color: var(--gray-800);
    border-color: var(--gray-600);
}

.form-checkbox:checked,
.form-radio:checked {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}

.form-radio {
    border-radius: var(--radius-full);
}

/* File Input */
.form-file {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.form-file input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.form-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background-color: var(--gray-50);
    color: var(--gray-600);
    transition: var(--transition);
    cursor: pointer;
}

[data-theme="dark"] .form-file-label {
    border-color: var(--gray-600);
    background-color: var(--gray-800);
    color: var(--gray-400);
}

.form-file:hover .form-file-label {
    border-color: var(--primary-500);
    background-color: var(--primary-50);
    color: var(--primary-600);
}

[data-theme="dark"] .form-file:hover .form-file-label {
    background-color: var(--primary-900);
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background-color: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

[data-theme="dark"] .card {
    background-color: var(--gray-800);
    border-color: var(--gray-700);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .card-header {
    border-bottom-color: var(--gray-700);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

[data-theme="dark"] .card-footer {
    border-top-color: var(--gray-700);
    background-color: var(--gray-900);
}

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */

.alert {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

[data-theme="dark"] .alert-success {
    background-color: #14532d;
    border-color: #166534;
    color: #bbf7d0;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

[data-theme="dark"] .alert-error {
    background-color: #7f1d1d;
    border-color: #991b1b;
    color: #fecaca;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fed7aa;
    color: #92400e;
}

[data-theme="dark"] .alert-warning {
    background-color: #78350f;
    border-color: #92400e;
    color: #fed7aa;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

[data-theme="dark"] .alert-info {
    background-color: #1e3a8a;
    border-color: #1e40af;
    color: #bfdbfe;
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 1000;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.flash-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.flash-warning {
    background-color: #fffbeb;
    border: 1px solid #fed7aa;
    color: #92400e;
}

.flash-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: var(--space-1);
    margin-left: auto;
    border-radius: var(--radius);
    transition: var(--transition);
}

.flash-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* ========================================
   MODALS
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

[data-theme="dark"] .modal-content {
    background-color: var(--gray-800);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--gray-700);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

[data-theme="dark"] .modal-title {
    color: var(--gray-100);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-600);
    background-color: var(--gray-100);
}

[data-theme="dark"] .modal-close:hover {
    color: var(--gray-300);
    background-color: var(--gray-700);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--gray-700);
}

/* ========================================
   TABS
   ======================================== */

.tabs {
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: var(--space-6);
}

[data-theme="dark"] .tabs {
    border-bottom-color: var(--gray-700);
}

.tab-list {
    display: flex;
    gap: var(--space-1);
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab {
    padding: var(--space-3) var(--space-4);
    color: var(--gray-600);
    cursor: pointer;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: var(--transition);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

[data-theme="dark"] .tab {
    color: var(--gray-400);
}

.tab:hover {
    color: var(--primary-600);
    background-color: var(--primary-50);
    text-decoration: none;
}

[data-theme="dark"] .tab:hover {
    background-color: var(--primary-900);
}

.tab.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
    background-color: var(--primary-50);
}

[data-theme="dark"] .tab.active {
    background-color: var(--primary-900);
}

.tab-content {
    display: none;
}

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

/* ========================================
   ACCORDIONS
   ======================================== */

.accordion {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

[data-theme="dark"] .accordion {
    border-color: var(--gray-700);
}

.accordion-item {
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .accordion-item {
    border-bottom-color: var(--gray-700);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: var(--space-4);
    background-color: var(--gray-50);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

[data-theme="dark"] .accordion-header {
    background-color: var(--gray-800);
}

.accordion-header:hover {
    background-color: var(--gray-100);
}

[data-theme="dark"] .accordion-header:hover {
    background-color: var(--gray-700);
}

.accordion-title {
    font-weight: 500;
    color: var(--gray-900);
    margin: 0;
}

[data-theme="dark"] .accordion-title {
    color: var(--gray-100);
}

.accordion-icon {
    color: var(--gray-500);
    transition: var(--transition);
}

.accordion-content {
    padding: 0 var(--space-4);
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.accordion-content.active {
    padding: var(--space-4);
    max-height: 1000px;
}

/* ========================================
   CAROUSELS
   ======================================== */

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.carousel-container {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: var(--space-4);
}

.carousel-next {
    right: var(--space-4);
}

.carousel-indicators {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background-color: #ffffff;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: var(--space-8) 0;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--gray-300);
}

[data-theme="dark"] .pagination a {
    color: var(--gray-300);
    border-color: var(--gray-600);
}

.pagination a:hover {
    background-color: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-600);
    text-decoration: none;
}

[data-theme="dark"] .pagination a:hover {
    background-color: var(--primary-900);
}

.pagination a.active {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
    color: #ffffff;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: var(--primary-100);
    color: var(--primary-800);
}

[data-theme="dark"] .badge-primary {
    background-color: var(--primary-900);
    color: var(--primary-200);
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

[data-theme="dark"] .badge-success {
    background-color: #14532d;
    color: #bbf7d0;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

[data-theme="dark"] .badge-warning {
    background-color: #78350f;
    color: #fed7aa;
}

.badge-error {
    background-color: #fecaca;
    color: #991b1b;
}

[data-theme="dark"] .badge-error {
    background-color: #7f1d1d;
    color: #fecaca;
}

.badge-gray {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

[data-theme="dark"] .badge-gray {
    background-color: var(--gray-800);
    color: var(--gray-200);
}

/* ========================================
   PROGRESS BARS
   ======================================== */

.progress {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

[data-theme="dark"] .progress {
    background-color: var(--gray-700);
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-600);
    border-radius: var(--radius-full);
    transition: width 0.3s ease-in-out;
}

.progress-bar-success {
    background-color: var(--success);
}

.progress-bar-warning {
    background-color: var(--warning);
}

.progress-bar-error {
    background-color: var(--error);
}

/* ========================================
   TOOLTIPS
   ======================================== */

.tooltip {
    position: absolute;
    z-index: 1000;
    padding: var(--space-2) var(--space-3);
    background-color: var(--gray-900);
    color: #ffffff;
        font-size: 0.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-4px);
    transition: var(--transition);
    pointer-events: none;
}

.tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--gray-900);
}

/* ========================================
   BACK TO TOP
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    background-color: var(--primary-600);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 100;
}

.back-to-top:hover {
    background-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.back-to-top:active {
    transform: translateY(0);
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

[data-theme="dark"] .loading::after {
    background-color: rgba(0, 0, 0, 0.8);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-full);
    border-top-color: var(--primary-600);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Text */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-thin { font-weight: 100; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* Colors */
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-info { color: var(--info); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }
.text-gray-900 { color: var(--gray-900); }

/* Background */
.bg-primary { background-color: var(--primary-600); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-error { background-color: var(--error); }
.bg-info { background-color: var(--info); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-gray-200 { background-color: var(--gray-200); }

/* Border */
.border { border: 1px solid var(--gray-300); }
.border-t { border-top: 1px solid var(--gray-300); }
.border-b { border-bottom: 1px solid var(--gray-300); }
.border-l { border-left: 1px solid var(--gray-300); }
.border-r { border-right: 1px solid var(--gray-300); }

.border-primary { border-color: var(--primary-600); }
.border-success { border-color: var(--success); }
.border-warning { border-color: var(--warning); }
.border-error { border-color: var(--error); }

/* Rounded */
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.h-auto { height: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-index */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Select */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* ========================================
   RESPONSIVE UTILITIES - ENHANCED
   ======================================== */

/* Mobile First Approach with Enhanced Breakpoints */
@media (min-width: 480px) {
    .xs\:block { display: block; }
    .xs\:hidden { display: none; }
    .xs\:flex { display: flex; }
    .xs\:grid { display: grid; }
    .xs\:text-sm { font-size: 0.875rem; }
    .xs\:text-base { font-size: 1rem; }
    .xs\:p-3 { padding: var(--space-3); }
    .xs\:p-4 { padding: var(--space-4); }
    .xs\:m-3 { margin: var(--space-3); }
    .xs\:m-4 { margin: var(--space-4); }
}

@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:hidden { display: none; }
    .sm\:flex { display: flex; }
    .sm\:grid { display: grid; }
    .sm\:inline-flex { display: inline-flex; }
    .sm\:inline-block { display: inline-block; }
    
    .sm\:text-xs { font-size: 0.75rem; }
    .sm\:text-sm { font-size: 0.875rem; }
    .sm\:text-base { font-size: 1rem; }
    .sm\:text-lg { font-size: 1.125rem; }
    .sm\:text-xl { font-size: 1.25rem; }
    .sm\:text-2xl { font-size: 1.5rem; }
    
    .sm\:p-2 { padding: var(--space-2); }
    .sm\:p-3 { padding: var(--space-3); }
    .sm\:p-4 { padding: var(--space-4); }
    .sm\:p-6 { padding: var(--space-6); }
    .sm\:p-8 { padding: var(--space-8); }
    
    .sm\:px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
    .sm\:px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
    .sm\:px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
    .sm\:py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
    .sm\:py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
    .sm\:py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
    
    .sm\:m-2 { margin: var(--space-2); }
    .sm\:m-3 { margin: var(--space-3); }
    .sm\:m-4 { margin: var(--space-4); }
    .sm\:m-6 { margin: var(--space-6); }
    .sm\:m-8 { margin: var(--space-8); }
    
    .sm\:mt-2 { margin-top: var(--space-2); }
    .sm\:mt-3 { margin-top: var(--space-3); }
    .sm\:mt-4 { margin-top: var(--space-4); }
    .sm\:mb-2 { margin-bottom: var(--space-2); }
    .sm\:mb-3 { margin-bottom: var(--space-3); }
    .sm\:mb-4 { margin-bottom: var(--space-4); }
    
    .sm\:gap-2 { gap: var(--space-2); }
    .sm\:gap-3 { gap: var(--space-3); }
    .sm\:gap-4 { gap: var(--space-4); }
    .sm\:gap-6 { gap: var(--space-6); }
    
    .sm\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    
    .sm\:flex-row { flex-direction: row; }
    .sm\:flex-col { flex-direction: column; }
    .sm\:items-center { align-items: center; }
    .sm\:justify-center { justify-content: center; }
    .sm\:justify-between { justify-content: space-between; }
    
    .sm\:text-left { text-align: left; }
    .sm\:text-center { text-align: center; }
    .sm\:text-right { text-align: right; }
    
    .sm\:w-auto { width: auto; }
    .sm\:w-full { width: 100%; }
    .sm\:h-auto { height: auto; }
    .sm\:h-full { height: 100%; }
}

@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:grid { display: grid; }
    .md\:inline-flex { display: inline-flex; }
    .md\:inline-block { display: inline-block; }
    
    .md\:text-sm { font-size: 0.875rem; }
    .md\:text-base { font-size: 1rem; }
    .md\:text-lg { font-size: 1.125rem; }
    .md\:text-xl { font-size: 1.25rem; }
    .md\:text-2xl { font-size: 1.5rem; }
    .md\:text-3xl { font-size: 1.875rem; }
    .md\:text-4xl { font-size: 2.25rem; }
    
    .md\:p-4 { padding: var(--space-4); }
    .md\:p-6 { padding: var(--space-6); }
    .md\:p-8 { padding: var(--space-8); }
    .md\:p-12 { padding: var(--space-12); }
    .md\:p-16 { padding: var(--space-16); }
    
    .md\:px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
    .md\:px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
    .md\:px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
    .md\:px-12 { padding-left: var(--space-12); padding-right: var(--space-12); }
    .md\:py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
    .md\:py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
    .md\:py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
    .md\:py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
    
    .md\:m-4 { margin: var(--space-4); }
    .md\:m-6 { margin: var(--space-6); }
    .md\:m-8 { margin: var(--space-8); }
    .md\:m-12 { margin: var(--space-12); }
    .md\:m-16 { margin: var(--space-16); }
    
    .md\:mt-4 { margin-top: var(--space-4); }
    .md\:mt-6 { margin-top: var(--space-6); }
    .md\:mt-8 { margin-top: var(--space-8); }
    .md\:mb-4 { margin-bottom: var(--space-4); }
    .md\:mb-6 { margin-bottom: var(--space-6); }
    .md\:mb-8 { margin-bottom: var(--space-8); }
    
    .md\:gap-4 { gap: var(--space-4); }
    .md\:gap-6 { gap: var(--space-6); }
    .md\:gap-8 { gap: var(--space-8); }
    
    .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    
    .md\:flex-row { flex-direction: row; }
    .md\:flex-col { flex-direction: column; }
    .md\:items-start { align-items: flex-start; }
    .md\:items-center { align-items: center; }
    .md\:items-end { align-items: flex-end; }
    .md\:justify-start { justify-content: flex-start; }
    .md\:justify-center { justify-content: center; }
    .md\:justify-between { justify-content: space-between; }
    .md\:justify-end { justify-content: flex-end; }
    
    .md\:text-left { text-align: left; }
    .md\:text-center { text-align: center; }
    .md\:text-right { text-align: right; }
    
    .md\:w-1\/2 { width: 50%; }
    .md\:w-1\/3 { width: 33.333333%; }
    .md\:w-2\/3 { width: 66.666667%; }
    .md\:w-1\/4 { width: 25%; }
    .md\:w-3\/4 { width: 75%; }
    .md\:w-auto { width: auto; }
    .md\:w-full { width: 100%; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
    .lg\:flex { display: flex; }
    .lg\:grid { display: grid; }
    .lg\:inline-flex { display: inline-flex; }
    .lg\:inline-block { display: inline-block; }
    
    .lg\:text-base { font-size: 1rem; }
    .lg\:text-lg { font-size: 1.125rem; }
    .lg\:text-xl { font-size: 1.25rem; }
    .lg\:text-2xl { font-size: 1.5rem; }
    .lg\:text-3xl { font-size: 1.875rem; }
    .lg\:text-4xl { font-size: 2.25rem; }
    .lg\:text-5xl { font-size: 3rem; }
    .lg\:text-6xl { font-size: 3.75rem; }
    
    .lg\:p-6 { padding: var(--space-6); }
    .lg\:p-8 { padding: var(--space-8); }
    .lg\:p-12 { padding: var(--space-12); }
    .lg\:p-16 { padding: var(--space-16); }
    .lg\:p-20 { padding: var(--space-20); }
    .lg\:p-24 { padding: var(--space-24); }
    
    .lg\:px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
    .lg\:px-12 { padding-left: var(--space-12); padding-right: var(--space-12); }
    .lg\:px-16 { padding-left: var(--space-16); padding-right: var(--space-16); }
    .lg\:px-20 { padding-left: var(--space-20); padding-right: var(--space-20); }
    .lg\:py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
    .lg\:py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
    .lg\:py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
    .lg\:py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
    
    .lg\:m-6 { margin: var(--space-6); }
    .lg\:m-8 { margin: var(--space-8); }
    .lg\:m-12 { margin: var(--space-12); }
    .lg\:m-16 { margin: var(--space-16); }
    .lg\:m-20 { margin: var(--space-20); }
    .lg\:m-24 { margin: var(--space-24); }
    
    .lg\:mt-8 { margin-top: var(--space-8); }
    .lg\:mt-12 { margin-top: var(--space-12); }
    .lg\:mt-16 { margin-top: var(--space-16); }
    .lg\:mb-8 { margin-bottom: var(--space-8); }
    .lg\:mb-12 { margin-bottom: var(--space-12); }
    .lg\:mb-16 { margin-bottom: var(--space-16); }
    
    .lg\:gap-6 { gap: var(--space-6); }
    .lg\:gap-8 { gap: var(--space-8); }
    .lg\:gap-12 { gap: var(--space-12); }
    
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    
    .lg\:flex-row { flex-direction: row; }
    .lg\:flex-col { flex-direction: column; }
    .lg\:items-start { align-items: flex-start; }
    .lg\:items-center { align-items: center; }
    .lg\:items-end { align-items: flex-end; }
    .lg\:justify-start { justify-content: flex-start; }
    .lg\:justify-center { justify-content: center; }
    .lg\:justify-between { justify-content: space-between; }
    .lg\:justify-end { justify-content: flex-end; }
    
    .lg\:text-left { text-align: left; }
    .lg\:text-center { text-align: center; }
    .lg\:text-right { text-align: right; }
    
    .lg\:w-1\/2 { width: 50%; }
    .lg\:w-1\/3 { width: 33.333333%; }
    .lg\:w-2\/3 { width: 66.666667%; }
    .lg\:w-1\/4 { width: 25%; }
    .lg\:w-3\/4 { width: 75%; }
    .lg\:w-auto { width: auto; }
    .lg\:w-full { width: 100%; }
}

@media (min-width: 1280px) {
    .xl\:block { display: block; }
    .xl\:hidden { display: none; }
    .xl\:flex { display: flex; }
    .xl\:grid { display: grid; }
    .xl\:inline-flex { display: inline-flex; }
    .xl\:inline-block { display: inline-block; }
    
    .xl\:text-lg { font-size: 1.125rem; }
    .xl\:text-xl { font-size: 1.25rem; }
    .xl\:text-2xl { font-size: 1.5rem; }
    .xl\:text-3xl { font-size: 1.875rem; }
    .xl\:text-4xl { font-size: 2.25rem; }
    .xl\:text-5xl { font-size: 3rem; }
    .xl\:text-6xl { font-size: 3.75rem; }
    .xl\:text-7xl { font-size: 4.5rem; }
    .xl\:text-8xl { font-size: 6rem; }
    
    .xl\:p-8 { padding: var(--space-8); }
    .xl\:p-12 { padding: var(--space-12); }
    .xl\:p-16 { padding: var(--space-16); }
    .xl\:p-20 { padding: var(--space-20); }
    .xl\:p-24 { padding: var(--space-24); }
    .xl\:p-32 { padding: 8rem; }
    
    .xl\:px-12 { padding-left: var(--space-12); padding-right: var(--space-12); }
    .xl\:px-16 { padding-left: var(--space-16); padding-right: var(--space-16); }
    .xl\:px-20 { padding-left: var(--space-20); padding-right: var(--space-20); }
    .xl\:px-24 { padding-left: var(--space-24); padding-right: var(--space-24); }
    .xl\:py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
    .xl\:py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
    .xl\:py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
    .xl\:py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }
    
    .xl\:m-8 { margin: var(--space-8); }
    .xl\:m-12 { margin: var(--space-12); }
    .xl\:m-16 { margin: var(--space-16); }
    .xl\:m-20 { margin: var(--space-20); }
    .xl\:m-24 { margin: var(--space-24); }
    .xl\:m-32 { margin: 8rem; }
    
    .xl\:mt-12 { margin-top: var(--space-12); }
    .xl\:mt-16 { margin-top: var(--space-16); }
    .xl\:mt-20 { margin-top: var(--space-20); }
    .xl\:mb-12 { margin-bottom: var(--space-12); }
    .xl\:mb-16 { margin-bottom: var(--space-16); }
    .xl\:mb-20 { margin-bottom: var(--space-20); }
    
    .xl\:gap-8 { gap: var(--space-8); }
    .xl\:gap-12 { gap: var(--space-12); }
    .xl\:gap-16 { gap: var(--space-16); }
    
    .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .xl\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    
    .xl\:flex-row { flex-direction: row; }
    .xl\:flex-col { flex-direction: column; }
    .xl\:items-start { align-items: flex-start; }
    .xl\:items-center { align-items: center; }
    .xl\:items-end { align-items: flex-end; }
    .xl\:justify-start { justify-content: flex-start; }
    .xl\:justify-center { justify-content: center; }
    .xl\:justify-between { justify-content: space-between; }
    .xl\:justify-end { justify-content: flex-end; }
    
    .xl\:text-left { text-align: left; }
    .xl\:text-center { text-align: center; }
    .xl\:text-right { text-align: right; }
    
    .xl\:w-1\/2 { width: 50%; }
    .xl\:w-1\/3 { width: 33.333333%; }
    .xl\:w-2\/3 { width: 66.666667%; }
    .xl\:w-1\/4 { width: 25%; }
    .xl\:w-3\/4 { width: 75%; }
    .xl\:w-auto { width: auto; }
    .xl\:w-full { width: 100%; }
}

@media (min-width: 1536px) {
    .xxl\:block { display: block; }
    .xxl\:hidden { display: none; }
    .xxl\:flex { display: flex; }
    .xxl\:grid { display: grid; }
    
    .xxl\:text-2xl { font-size: 1.5rem; }
    .xxl\:text-3xl { font-size: 1.875rem; }
    .xxl\:text-4xl { font-size: 2.25rem; }
    .xxl\:text-5xl { font-size: 3rem; }
    .xxl\:text-6xl { font-size: 3.75rem; }
    .xxl\:text-7xl { font-size: 4.5rem; }
    .xxl\:text-8xl { font-size: 6rem; }
    .xxl\:text-9xl { font-size: 8rem; }
    
    .xxl\:p-12 { padding: var(--space-12); }
    .xxl\:p-16 { padding: var(--space-16); }
    .xxl\:p-20 { padding: var(--space-20); }
    .xxl\:p-24 { padding: var(--space-24); }
    .xxl\:p-32 { padding: 8rem; }
    .xxl\:p-40 { padding: 10rem; }
    
    .xxl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xxl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .xxl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .xxl\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .xxl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .xxl\:grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
    .xxl\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

/* ========================================
   MODERN RESPONSIVE COMPONENTS
   ======================================== */

/* Enhanced Container System */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

@media (min-width: 640px) {
    .container { max-width: 640px; }
}

@media (min-width: 768px) {
    .container { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

@media (min-width: 1536px) {
    .container { max-width: 1536px; }
}

/* Modern Card System */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    background: var(--card-header-bg);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--border-color);
    background: var(--card-footer-bg);
}

/* Modern Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-xl);
}

/* Button Variants */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    border-color: var(--secondary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-color);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    background: var(--success-hover);
    border-color: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Modern Form System */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--text-color);
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: var(--danger-color);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
}

.form-help {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
}

/* Modern Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--hover-bg);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--primary-bg);
}

/* Modern Grid System */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Modern Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none { flex: none; }

/* Modern Spacing System */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }
.gap-16 { gap: var(--space-16); }

/* Modern Typography */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

.font-thin { font-weight: 100; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }

/* Modern Color System */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--text-muted); }
.text-white { color: white; }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-info { background-color: var(--info-color); }
.bg-white { background-color: white; }
.bg-transparent { background-color: transparent; }

/* Modern Border System */
.border { border-width: 1px; border-style: solid; border-color: var(--border-color); }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }
.border-8 { border-width: 8px; }

.border-primary { border-color: var(--primary-color); }
.border-secondary { border-color: var(--secondary-color); }
.border-success { border-color: var(--success-color); }
.border-warning { border-color: var(--warning-color); }
.border-danger { border-color: var(--danger-color); }
.border-info { border-color: var(--info-color); }

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-md); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: 9999px; }

/* Modern Shadow System */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Modern Animation System */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation Delays */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }

/* Modern Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.not-sr-only {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Modern Responsive Images */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.img-contain {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

/* Modern Aspect Ratios */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-3-2 {
    aspect-ratio: 3 / 2;
}

/* Modern Overflow Utilities */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }
.overflow-visible { overflow: visible; }

.overflow-x-hidden { overflow-x: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-x-scroll { overflow-x: scroll; }

.overflow-y-hidden { overflow-y: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-y-scroll { overflow-y: scroll; }

/* Modern Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.static { position: static; }

/* Modern Z-Index Utilities */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Modern Width & Height Utilities */
.w-auto { width: auto; }
.w-full { width: 100%; }
.w-screen { width: 100vw; }
.w-min { width: min-content; }
.w-max { width: max-content; }
.w-fit { width: fit-content; }

.h-auto { height: auto; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-min { height: min-content; }
.h-max { height: max-content; }
.h-fit { height: fit-content; }

/* Modern Min/Max Width & Height */
.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.min-w-min { min-width: min-content; }
.min-w-max { min-width: max-content; }
.min-w-fit { min-width: fit-content; }

.max-w-0 { max-width: 0; }
.max-w-full { max-width: 100%; }
.max-w-min { max-width: min-content; }
.max-w-max { max-width: max-content; }
.max-w-fit { max-width: fit-content; }

.min-h-0 { min-height: 0; }
.min-h-full { min-height: 100%; }
.min-h-screen { min-height: 100vh; }
.min-h-min { min-height: min-content; }
.min-h-max { min-height: max-content; }
.min-h-fit { min-height: fit-content; }

.max-h-full { max-height: 100%; }
.max-h-screen { max-height: 100vh; }
.max-h-min { max-height: min-content; }
.max-h-max { max-height: max-content; }
.max-h-fit { max-height: fit-content; }

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .footer,
    .back-to-top,
    .modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-600);
    color: #ffffff;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius);
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-600: #000000;
        --gray-300: #000000;
        --gray-700: #000000;
    }
    
    [data-theme="dark"] {
        --primary-600: #ffffff;
        --gray-300: #ffffff;
        --gray-700: #ffffff;
    }
}