/* =================================================================
   SwissBiohacker - Main Stylesheet
   Version: 2.0 - Design System Refresh
   ================================================================= */

/* =================================================================
   1. CSS VARIABLES & THEME
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Core Colors */
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-input: #151515;
    
    /* Accent Colors */
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-light: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.3);
    
    /* Secondary Accent - Green for success/health */
    --green: #06d6a0;
    --green-hover: #05b88a;
    --green-light: rgba(6, 214, 160, 0.15);
    
    /* Semantic Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Text Colors */
    --text: #f5f5f5;
    --text-secondary: #d4d4d4;
    --text-muted: #a3a3a3;
    --text-dim: #737373;
    
    /* Borders */
    --border: #2a2a2a;
    --border-light: #3a3a3a;
    --border-focus: var(--accent);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 8px 30px var(--accent-glow);
    
    /* 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;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 500;
    --z-toast: 600;
    --z-tooltip: 700;
}

/* =================================================================
   2. RESET & BASE STYLES
   ================================================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* =================================================================
   3. TYPOGRAPHY
   ================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 {
    font-size: clamp(2.5rem, 5vw, var(--font-size-6xl));
    font-weight: 900;
}

h2 {
    font-size: clamp(1.75rem, 4vw, var(--font-size-3xl));
    font-weight: 800;
}

h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

p {
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

strong, b {
    font-weight: 600;
    color: var(--text);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =================================================================
   4. LAYOUT
   ================================================================= */

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

.container-narrow {
    max-width: 800px;
}

.container-wide {
    max-width: 1400px;
}

/* Section spacing */
section {
    padding: var(--space-16) 0;
}

/* =================================================================
   5. HEADER & NAVIGATION
   ================================================================= */

.header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    padding: var(--space-4) 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-base);
}

.header.scrolled {
    padding: var(--space-3) 0;
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-8);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-emoji {
    font-size: 1.4em;
}

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

.nav-link {
    position: relative;
    padding: var(--space-2) var(--space-4);
    color: var(--text-muted);
    font-weight: 500;
    font-size: var(--font-size-sm);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent);
}

.nav-link-highlight {
    background: var(--accent) !important;
    color: white !important;
    font-weight: 600;
}

.nav-link-highlight:hover {
    background: var(--accent-hover) !important;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: var(--space-2);
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

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

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

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

/* Mobile Navigation */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-2);
        padding: 80px var(--space-6) var(--space-6);
        background: var(--bg-elevated);
        border-left: 1px solid var(--border);
        transition: right var(--transition-slow);
        overflow-y: auto;
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .nav-link {
        padding: var(--space-4);
        font-size: var(--font-size-base);
    }
    
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: calc(var(--z-sticky) - 1);
    }
    
    .nav-overlay.active {
        display: block;
    }
}

/* =================================================================
   6. BUTTONS
   ================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px; /* Touch-friendly */
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* Secondary/Outline Button */
.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--accent);
    color: white;
}

/* Ghost Button */
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-light);
}

/* Success Button */
.btn-success {
    background: var(--green);
    color: var(--bg);
}

.btn-success:hover:not(:disabled) {
    background: var(--green-hover);
}

/* Large Button */
.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
    border-radius: var(--radius-xl);
}

/* Small Button */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
    min-height: 36px;
}

/* Icon Button */
.btn-icon {
    width: 44px;
    padding: 0;
}

/* =================================================================
   7. CARDS
   ================================================================= */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

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

.card-interactive:hover {
    border-color: var(--accent);
}

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

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

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

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Featured Card */
.card-featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.05) 100%);
}

/* =================================================================
   8. FORMS
   ================================================================= */

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

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

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--text);
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    min-height: 44px;
}

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

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

.form-input::placeholder {
    color: var(--text-dim);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-icon-wrapper .form-input {
    padding-left: calc(var(--space-4) * 2 + 1em);
}

/* Form validation states */
.form-input.is-valid {
    border-color: var(--success);
}

.form-input.is-invalid {
    border-color: var(--error);
}

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

/* =================================================================
   9. BADGES & TAGS
   ================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-light);
}

.badge-success {
    background: var(--green-light);
    color: var(--green);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* Tag style (less prominent) */
.tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* =================================================================
   10. HERO SECTION
   ================================================================= */

.hero {
    padding: var(--space-20) 0 var(--space-16);
    text-align: center;
}

.hero-title {
    margin-bottom: var(--space-4);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto var(--space-8);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
}

/* Stats Banner */
.stats-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-10);
    padding: var(--space-8) 0;
    margin-top: var(--space-12);
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* =================================================================
   11. FEATURE CARDS GRID
   ================================================================= */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    padding: var(--space-8);
    text-align: center;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    font-size: 2.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    border-radius: var(--radius-xl);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.feature-title {
    margin-bottom: var(--space-3);
}

.feature-description {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* =================================================================
   12. BLOG POST CARDS
   ================================================================= */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-6);
}

.post-card {
    display: flex;
    flex-direction: column;
}

.post-card-image {
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.post-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--text-dim);
}

.post-title {
    margin-bottom: var(--space-3);
    font-size: var(--font-size-xl);
}

.post-excerpt {
    flex: 1;
    margin-bottom: var(--space-4);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.post-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--accent);
}

.post-link:hover {
    gap: var(--space-3);
}

/* =================================================================
   13. FAQ / ACCORDION
   ================================================================= */

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: var(--space-4);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5);
    font-family: var(--font-sans);
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: left;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    border-color: var(--accent);
}

.faq-question[aria-expanded="true"] {
    border-color: var(--accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.faq-icon {
    font-size: var(--font-size-xl);
    color: var(--accent);
    transition: transform var(--transition-fast);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-top: none;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    color: var(--text-muted);
    line-height: 1.8;
}

.faq-answer[hidden] {
    display: none;
}

/* =================================================================
   14. NEWSLETTER SECTION
   ================================================================= */

.newsletter-section {
    padding: var(--space-12);
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    text-align: center;
}

.newsletter-title {
    margin-bottom: var(--space-3);
}

.newsletter-subtitle {
    margin-bottom: var(--space-6);
    color: var(--text-muted);
}

.newsletter-form {
    display: flex;
    gap: var(--space-3);
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form .form-input {
    flex: 1;
}

.newsletter-message {
    margin-top: var(--space-4);
    font-size: var(--font-size-sm);
}

.newsletter-message.success {
    color: var(--success);
}

.newsletter-message.error {
    color: var(--error);
}

@media (max-width: 640px) {
    .newsletter-form {
        flex-direction: column;
    }
}

/* =================================================================
   15. FOOTER
   ================================================================= */

.footer {
    padding: var(--space-16) 0 var(--space-8);
    border-top: 1px solid var(--border);
    margin-top: var(--space-16);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: var(--space-4);
}

.footer-brand p {
    font-size: var(--font-size-sm);
}

.footer-column h4 {
    margin-bottom: var(--space-4);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

/* =================================================================
   16. BREADCRUMBS
   ================================================================= */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    font-size: var(--font-size-sm);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--accent);
}

.breadcrumb-item.active {
    color: var(--text);
}

.breadcrumb-separator {
    color: var(--text-dim);
}

/* =================================================================
   17. BACK TO TOP BUTTON
   ================================================================= */

.back-to-top {
    position: fixed;
    right: var(--space-6);
    bottom: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-accent);
    z-index: var(--z-dropdown);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* =================================================================
   18. LOADING STATES
   ================================================================= */

/* Skeleton Screen */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 25%,
        var(--bg-elevated) 50%,
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-2);
}

.skeleton-heading {
    height: 2em;
    width: 60%;
    margin-bottom: var(--space-4);
}

.skeleton-image {
    aspect-ratio: 16/9;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

/* =================================================================
   19. TOAST NOTIFICATIONS
   ================================================================= */

.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: var(--z-toast);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s ease;
}

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

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-icon {
    font-size: var(--font-size-xl);
}

.toast-message {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--text);
}

.toast-close {
    padding: var(--space-1);
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
}

/* =================================================================
   20. TABLES (Responsive)
   ================================================================= */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--space-6) 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--accent);
    background: var(--bg-elevated);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* =================================================================
   21. UTILITY CLASSES
   ================================================================= */

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

/* Flexbox */
.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-end { justify-content: flex-end; }
.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); }

/* Text */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

/* Spacing */
.m-0 { margin: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.my-8 { margin-top: var(--space-8); margin-bottom: var(--space-8); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* Width */
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }

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

/* Visibility */
.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;
}

/* =================================================================
   22. RESPONSIVE UTILITIES
   ================================================================= */

@media (max-width: 640px) {
    .sm\:hidden { display: none !important; }
    .sm\:block { display: block !important; }
    .sm\:flex { display: flex !important; }
    .sm\:flex-col { flex-direction: column !important; }
    .sm\:text-center { text-align: center !important; }
}

@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:block { display: block !important; }
    .md\:flex { display: flex !important; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (min-width: 1024px) {
    .lg\:hidden { display: none !important; }
    .lg\:block { display: block !important; }
    .lg\:flex { display: flex !important; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
}

/* =================================================================
   23. PRINT STYLES
   ================================================================= */

@media print {
    .header,
    .footer,
    .back-to-top,
    .toast-container,
    .nav-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}
