/**
 * CafeBot Dashboard — Main Stylesheet
 * ===================================
 * 
 * Структура:
 * 1. CSS Variables (цветовая схема)
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout Components
 * 5. Navigation
 * 6. Cards & Containers
 * 7. Forms & Inputs
 * 8. Buttons
 * 9. Tables
 * 10. Modals
 * 11. Alerts & Notifications
 * 12. Status Badges
 * 13. Empty States
 * 14. Loading States
 * 15. Utilities
 * 16. Animations
 * 17. Responsive
 */

/* ========================================
   1. CSS VARIABLES
   ======================================== */

:root {
    /* Primary Colors */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #a3bffa;
    --primary-bg: rgba(102, 126, 234, 0.1);
    
    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    /* Neutral Colors */
    --white: #ffffff;
    --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;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Order Status Colors */
    --status-new: #3b82f6;
    --status-new-bg: #dbeafe;
    --status-cooking: #f59e0b;
    --status-cooking-bg: #fef3c7;
    --status-ready: #8b5cf6;
    --status-ready-bg: #ede9fe;
    --status-issued: #10b981;
    --status-issued-bg: #d1fae5;
    --status-cancelled: #ef4444;
    --status-cancelled-bg: #fee2e2;
    
    /* Staff Role Colors */
    --role-kitchen: #f59e0b;
    --role-kitchen-bg: #fef3c7;
    --role-reception: #3b82f6;
    --role-reception-bg: #dbeafe;
    --role-manager: #8b5cf6;
    --role-manager-bg: #ede9fe;
    
    /* Text Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    /* Background */
    --bg-body: #f5f7fa;
    --bg-card: #ffffff;
    --bg-input: #f9fafb;
    
    /* Borders */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    
    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Font Sizes */
    --text-xs: 12px;
    --text-sm: 13px;
    --text-base: 14px;
    --text-md: 15px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 20px;
    --text-3xl: 24px;
    --text-4xl: 30px;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Z-Index */
    --z-dropdown: 100;
    --z-modal-backdrop: 200;
    --z-modal: 300;
    --z-toast: 400;
}


/* ========================================
   2. RESET & BASE
   ======================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background: var(--bg-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}


/* ========================================
   3. TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-4);
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }


/* ========================================
   4. LAYOUT COMPONENTS
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-sm { max-width: 640px; }
.container-md { max-width: 768px; }
.container-lg { max-width: 1024px; }
.container-xl { max-width: 1280px; }

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: var(--space-6);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Flex */
.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-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); }


/* ========================================
   5. NAVIGATION
   ======================================== */

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4) var(--space-6);
    position: sticky;
    top: 0;
    z-index: var(--z-dropdown);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-brand:hover {
    color: var(--text-primary);
}

.navbar-brand-icon {
    font-size: 24px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs-separator {
    color: var(--gray-400);
}


/* ========================================
   6. CARDS & CONTAINERS
   ======================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-light);
    background: var(--gray-50);
}

/* Card hover effect */
.card-hover {
    transition: all var(--transition);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Stat Card */
.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-bg); }
.stat-icon.success { background: var(--success-light); }
.stat-icon.warning { background: var(--warning-light); }
.stat-icon.danger { background: var(--danger-light); }
.stat-icon.info { background: var(--info-light); }

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}


/* ========================================
   7. FORMS & INPUTS
   ======================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--gray-300);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input.error {
    border-color: var(--danger);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-hint {
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.form-error {
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--danger);
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-check-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-input {
    padding-left: 44px;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--gray-400);
    pointer-events: none;
}


/* ========================================
   8. BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 500;
    text-align: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
    color: var(--white);
    background: var(--gradient-primary);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    color: var(--text-secondary);
    background: var(--gray-100);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
    color: var(--text-primary);
}

/* Outline Button */
.btn-outline {
    color: var(--primary);
    background: transparent;
    border: 2px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
    color: var(--white);
    background: var(--primary);
}

/* Ghost Button */
.btn-ghost {
    color: var(--text-secondary);
    background: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* Success Button */
.btn-success {
    color: var(--white);
    background: var(--gradient-success);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Danger Button */
.btn-danger {
    color: var(--white);
    background: var(--gradient-danger);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* Warning Button */
.btn-warning {
    color: var(--white);
    background: var(--gradient-warning);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-md);
}

/* Full Width Button */
.btn-block {
    width: 100%;
}

/* Icon Button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}


/* ========================================
   9. TABLES
   ======================================== */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--gray-50);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--gray-50);
}

.table-actions {
    display: flex;
    gap: var(--space-2);
}


/* ========================================
   10. MODALS
   ======================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    z-index: var(--z-modal);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: scale(0.97);
    transition: transform var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--gray-100);
}

.modal-body {
    padding: var(--space-6);
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-light);
    background: var(--gray-50);
}


/* ========================================
   11. ALERTS & NOTIFICATIONS
   ======================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.alert-message {
    font-size: var(--text-sm);
    margin: 0;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
}

.toast-close {
    padding: var(--space-1);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--gray-100);
}


/* ========================================
   12. STATUS BADGES
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

/* Order Status Badges */
.badge-new {
    background: var(--status-new-bg);
    color: var(--status-new);
}

.badge-cooking {
    background: var(--status-cooking-bg);
    color: var(--status-cooking);
}

.badge-ready {
    background: var(--status-ready-bg);
    color: var(--status-ready);
}

.badge-issued {
    background: var(--status-issued-bg);
    color: var(--status-issued);
}

.badge-cancelled {
    background: var(--status-cancelled-bg);
    color: var(--status-cancelled);
}

/* Staff Role Badges */
.badge-kitchen {
    background: var(--role-kitchen-bg);
    color: var(--role-kitchen);
}

.badge-reception {
    background: var(--role-reception-bg);
    color: var(--role-reception);
}

.badge-manager {
    background: var(--role-manager-bg);
    color: var(--role-manager);
}

/* Generic Badges */
.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}


/* ========================================
   13. EMPTY STATES
   ======================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: var(--space-4);
    opacity: 0.8;
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state-message {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
    max-width: 400px;
}


/* ========================================
   14. LOADING STATES
   ======================================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-10);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-text {
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-2);
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--space-3);
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}


/* ========================================
   15. UTILITIES
   ======================================== */

/* Spacing */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Border */
.border { border: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }

/* Rounded */
.rounded { border-radius: var(--radius); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow */
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-none { box-shadow: none; }


/* ========================================
   16. ANIMATIONS
   ======================================== */

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-slideUp { animation: slideInUp 0.3s ease; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce { animation: bounce 1s infinite; }


/* ========================================
   17. RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 24px;
        --text-3xl: 20px;
    }
    
    .main-content {
        padding: var(--space-4);
    }
    
    .navbar-content {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .navbar-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 { 
        grid-template-columns: 1fr; 
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .modal {
        width: 95%;
    }
    
    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .table th,
    .table td {
        padding: var(--space-3);
        font-size: var(--text-xs);
    }
    
    /* Hide on mobile */
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: var(--space-3) var(--space-4);
    }
    
    .card-body {
        padding: var(--space-4);
    }
    
    .modal-body {
        padding: var(--space-4);
    }
    
    .empty-state {
        padding: var(--space-8);
    }
    
    .empty-state-icon {
        font-size: 48px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
