/* ============================================
   GESTION AUTO - STYLE COMPLET
   Polices: Manrope + Cairo
   Design professionnel - STONE THEME
   ============================================ */

/* ===== Import Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

/* ===== Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #0f172a;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Manrope', 'Cairo', ui-sans-serif, system-ui, sans-serif;
    background: var(--stone-100);
    color: var(--stone-900);
    line-height: 1.6;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHIE - APPLIQUÉE PARTOUT
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', 'Cairo', ui-sans-serif, system-ui, sans-serif;
    font-weight: 800;
    color: var(--stone-900);
}

p, span, div, a, li, td, th, label, input, select, textarea, button {
    font-family: 'Cairo', 'Manrope', ui-sans-serif, system-ui, sans-serif;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: white;
    padding: 12px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--stone-200);
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--stone-600);
    display: none;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: 'Manrope', 'Cairo', sans-serif;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.header-brand .logo {
    font-size: 28px;
}

.header-brand span:last-child {
    font-weight: 900;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.language-selector {
    display: flex;
    gap: 4px;
    background: var(--stone-100);
    border-radius: var(--radius-full);
    padding: 4px;
}

.lang-btn {
    padding: 4px 12px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    color: var(--stone-600);
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.lang-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 800;
}

.lang-btn:hover:not(.active) {
    color: var(--primary);
}

.header-notifications {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--stone-600);
    transition: var(--transition);
    padding: 4px;
}

.header-notifications:hover {
    color: var(--primary);
}

.header-notifications .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--stone-200);
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--stone-700);
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.logout-btn {
    color: var(--stone-400);
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.logout-btn:hover {
    color: var(--danger);
    background: #fee2e2;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: 260px;
    background: white;
    height: calc(100vh - 64px);
    position: fixed;
    right: 0;
    top: 64px;
    overflow-y: auto;
    border-left: 1px solid var(--stone-200);
    padding: 16px 0 20px;
    transition: var(--transition);
    z-index: 90;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--stone-300);
    border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--stone-400);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px 12px;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    border-bottom: 1px solid var(--stone-200);
    margin-bottom: 4px;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.sidebar-brand .logo {
    font-size: 28px;
}

.sidebar-brand span:last-child {
    font-weight: 900;
    letter-spacing: -0.5px;
}

.sidebar-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--stone-400);
    padding: 0 24px 16px;
    border-bottom: 1px solid var(--stone-200);
    margin-bottom: 8px;
    font-family: 'Cairo', 'Manrope', sans-serif;
}

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

.sidebar-menu li {
    margin: 1px 10px;
}

.sidebar-menu .menu-divider {
    padding: 16px 24px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--stone-400);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: default;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.sidebar-menu .menu-divider:first-of-type {
    padding-top: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    color: var(--stone-700);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 700;
    font-size: 14px;
    position: relative;
    font-family: 'Cairo', 'Manrope', sans-serif;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--stone-400);
    transition: var(--transition);
}

.sidebar-menu a span:not(.badge) {
    flex: 1;
}

.sidebar-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-menu a:hover i {
    color: var(--primary);
}

.sidebar-menu a.active {
    background: var(--primary);
    color: white;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.sidebar-menu a.active i {
    color: white;
}

.sidebar-menu a .badge {
    margin-right: auto;
    background: var(--stone-200);
    padding: 1px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: var(--stone-600);
    transition: var(--transition);
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.sidebar-menu a:hover .badge {
    background: var(--primary);
    color: white;
}

.sidebar-menu a.active .badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-right: 260px;
    padding: 24px 32px;
    min-height: calc(100vh - 64px);
    background: var(--stone-100);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 800;
    font-family: 'Manrope', 'Cairo', sans-serif;
    color: var(--stone-900);
}

.dashboard-header h2 i {
    color: var(--primary);
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   STATS GRID
   ============================================ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--stone-200);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

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

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
}

.stat-card .stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-card .stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-card .stat-icon.yellow { background: #fef3c7; color: #d97706; }
.stat-card .stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-card .stat-icon.red { background: #fee2e2; color: #dc2626; }
.stat-card .stat-icon.orange { background: #ffedd5; color: #ea580c; }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--stone-900);
    direction: ltr;
    unicode-bidi: embed;
    text-align: center;
    width: 100%;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--stone-500);
    font-weight: 600;
    margin-top: 4px;
    text-align: center;
    width: 100%;
    font-family: 'Cairo', 'Manrope', sans-serif;
}

.stat-card .stat-change {
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 12px;
    border-radius: var(--radius-full);
    justify-content: center;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.stat-change.up {
    background: #dcfce7;
    color: #16a34a;
}

.stat-change.down {
    background: #fee2e2;
    color: #dc2626;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--stone-200);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--stone-200);
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Manrope', 'Cairo', sans-serif;
    color: var(--stone-900);
}

.card-header h3 i {
    color: var(--primary);
}

.card-body {
    padding: 20px 24px;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: var(--stone-100);
    padding: 12px 16px;
    text-align: right;
    font-weight: 700;
    color: var(--stone-600);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--stone-200);
    font-family: 'Manrope', 'Cairo', sans-serif;
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--stone-100);
    vertical-align: middle;
    font-size: 14px;
    font-family: 'Cairo', 'Manrope', sans-serif;
    color: var(--stone-800);
}

table tr:hover td {
    background: var(--stone-50);
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    margin-left: 8px;
    vertical-align: middle;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    align-items: center;
    gap: 4px;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #dbeafe; color: #2563eb; }
.badge-secondary { background: var(--stone-200); color: var(--stone-600); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 12px;
}

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

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

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

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--stone-300);
    color: var(--stone-700);
    font-weight: 700;
}

.btn-outline-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-white {
    background: white;
    color: var(--primary);
    font-weight: 700;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 700;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* ============================================
   FORMS
   ============================================ */
.form-container {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--stone-200);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--stone-700);
    font-size: 13px;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.form-group label .required {
    color: var(--danger);
}

.form-group label .optional {
    color: var(--stone-400);
    font-weight: 400;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--stone-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    background: white;
    font-family: 'Cairo', 'Manrope', sans-serif;
    font-weight: 400;
    color: var(--stone-800);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--stone-200);
    flex-wrap: wrap;
}

/* ============================================
   UPLOAD AREA
   ============================================ */
.upload-area {
    border: 2px dashed var(--stone-300);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--stone-50);
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area .upload-icon {
    font-size: 40px;
    color: var(--stone-400);
}

.upload-area .upload-text {
    color: var(--stone-500);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Cairo', 'Manrope', sans-serif;
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-preview {
    max-width: 150px;
    max-height: 120px;
    margin: 10px auto;
    border-radius: var(--radius-sm);
    display: none;
}

.upload-preview.show {
    display: block;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.notifications-bar {
    background: #fef3c7;
    border-right: 4px solid #f59e0b;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notifications-bar i {
    color: #d97706;
    font-size: 20px;
}

.notifications-bar div {
    flex: 1;
    font-size: 14px;
    color: #78350f;
    font-weight: 600;
    font-family: 'Cairo', 'Manrope', sans-serif;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-family: 'Cairo', 'Manrope', sans-serif;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border-right: 4px solid #16a34a;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border-right: 4px solid #dc2626;
}

.alert-info {
    background: #dbeafe;
    color: #2563eb;
    border-right: 4px solid #2563eb;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
    color: var(--stone-300);
}

.empty-state h3 {
    color: var(--stone-600);
    font-size: 20px;
    font-weight: 700;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.empty-state p {
    color: var(--stone-400);
    margin-bottom: 16px;
    font-family: 'Cairo', 'Manrope', sans-serif;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--stone-200);
}

.pagination-wrapper .info {
    color: var(--stone-500);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Manrope', 'Cairo', sans-serif;
}

.pagination-wrapper .buttons {
    display: flex;
    gap: 6px;
}

/* ============================================
   WELCOME SECTION
   ============================================ */
.welcome-section {
    background: var(--primary-gradient);
    border-radius: var(--radius);
    padding: 30px 40px;
    color: white;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-section h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    font-family: 'Manrope', 'Cairo', sans-serif;
    color: white;
}

.welcome-section p {
    opacity: 0.9;
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Cairo', 'Manrope', sans-serif;
    color: rgba(255,255,255,0.9);
}

.welcome-section .date {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Cairo', 'Manrope', sans-serif;
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .main-content {
        padding: 20px;
    }

    .row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        right: -280px;
        width: 280px;
        top: 0;
        height: 100vh;
        z-index: 200;
        box-shadow: var(--shadow-xl);
        padding-top: 16px;
        border-left: none;
    }

    .sidebar.open {
        right: 0;
    }

    .sidebar-brand {
        display: flex;
    }

    .main-content {
        margin-right: 0;
        padding: 16px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions {
        justify-content: center;
    }

    .header {
        padding: 8px 12px;
    }

    .header-brand span:last-child {
        display: none;
    }

    .user-name {
        display: none;
    }

    .language-selector {
        display: none;
    }

    .form-container {
        padding: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-card {
        min-height: 130px;
    }

    .welcome-section {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    .stat-card {
        min-height: 110px;
        padding: 16px;
    }

    .pagination-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--stone-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-warning { color: var(--warning); }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.p-8 { padding: 8px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-full { border-radius: var(--radius-full); }

.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); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.4s ease;
}

.slide-down {
    animation: slideDown 0.3s ease;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header,
    .sidebar,
    .dashboard-actions,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    body {
        background: white !important;
    }
}