/**
 * CoreSpaceX School Management Software
 * Complete Stylesheet - Light Theme (Education-Friendly)
 * 
 * @package     CoreSpaceX
 * @version     2.0.0
 * @author      CoreSpaceX Design Team
 * 
 * Table of Contents:
 * 1. CSS Variables & Custom Properties
 * 2. Reset & Base Styles
 * 3. Typography
 * 4. Layout System
 * 5. Sidebar Navigation
 * 6. Header / Top Bar
 * 7. Main Content Area
 * 8. Cards & Panels
 * 9. Statistics Cards
 * 10. Data Tables
 * 11. Forms & Inputs
 * 12. Buttons
 * 13. Badges & Tags
 * 14. Alerts & Notifications
 * 15. Modals & Dialogs
 * 16. Pagination
 * 17. Progress Bars
 * 18. Avatars
 * 19. Dropdowns & Menus
 * 20. Tabs
 * 21. Accordion
 * 22. Tooltips
 * 23. Breadcrumbs
 * 24. Empty States
 * 25. Loading States
 * 26. Utilities
 * 27. Animations
 * 28. Responsive Breakpoints
 */

/* ============================================================================
   1. CSS VARIABLES & CUSTOM PROPERTIES
   ============================================================================ */

:root {
    /* Primary Colors */
    --color-primary: #3b82f6;
    --color-primary-light: #60a5fa;
    --color-primary-dark: #2563eb;
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    
    /* Secondary Colors */
    --color-secondary: #64748b;
    --color-secondary-light: #94a3b8;
    --color-secondary-dark: #475569;
    
    /* Success Colors */
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-success-dark: #059669;
    --color-success-50: #ecfdf5;
    --color-success-100: #d1fae5;
    --color-success-600: #059669;
    
    /* Warning Colors */
    --color-warning: #f59e0b;
    --color-warning-light: #fbbf24;
    --color-warning-dark: #d97706;
    --color-warning-50: #fffbeb;
    --color-warning-100: #fef3c7;
    --color-warning-600: #d97706;
    
    /* Danger/Error Colors */
    --color-danger: #ef4444;
    --color-danger-light: #f87171;
    --color-danger-dark: #dc2626;
    --color-danger-50: #fef2f2;
    --color-danger-100: #fee2e2;
    --color-danger-600: #dc2626;
    
    /* Info Colors */
    --color-info: #06b6d4;
    --color-info-light: #22d3ee;
    --color-info-dark: #0891b2;
    --color-info-50: #ecfeff;
    --color-info-100: #cffafe;
    
    /* Neutral Colors */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;
    
    /* Background Colors */
    --bg-body: #f8fafc;
    --bg-sidebar: #1e293b;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-active: #e2e8f0;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --text-link: #3b82f6;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #3b82f6;
    
    /* Shadow Sizes */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    
    /* Sidebar Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 64px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --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-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;
}

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

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

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Remove default list styles */
ul,
ol {
    list-style: none;
}

/* Links */
a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

/* Buttons reset */
button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
}

/* Input reset */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

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

/* Selection */
::selection {
    background-color: var(--color-primary-100);
    color: var(--color-primary-700);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray-300) var(--color-gray-100);
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

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

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

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

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-slow);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar-collapsed .app-main {
    margin-left: var(--sidebar-collapsed-width);
}

.content-wrapper {
    flex: 1;
    padding: 24px;
    margin-top: var(--header-height);
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.container-fluid {
    width: 100%;
    padding: 0 16px;
}

/* 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-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Grid System */
.grid {
    display: grid;
    gap: 24px;
}

.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); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Spacing */
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

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

/* ============================================================================
   5. SIDEBAR NAVIGATION
   ============================================================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: var(--text-inverse);
    z-index: var(--z-fixed);
    transition: width var(--transition-slow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

/* Sidebar Header / Logo Area */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 70px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-collapsed .sidebar-logo-icon {
    margin: 0 auto;
}

.sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-fast);
}

.sidebar-collapsed .sidebar-logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-logo-subtitle {
    font-size: 0.7rem;
    color: var(--color-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 22px;
    right: -14px;
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
    z-index: 10;
}

.sidebar-toggle:hover {
    background: var(--color-gray-50);
}

.sidebar-toggle svg {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.sidebar-collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
}

/* Section Headers */
.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    display: flex;
    align-items: center;
    padding: 8px 20px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-gray-400);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-collapsed .nav-section-title {
    text-align: center;
    padding: 8px 0 6px;
    font-size: 0;
}

.sidebar-collapsed .nav-section-title::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-gray-600);
    margin: 0 auto;
    border-radius: 1px;
}

/* Nav Items */
.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--color-gray-300);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    white-space: nowrap;
    gap: 12px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-primary-light);
    border-left-color: var(--color-primary);
}

.nav-link-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link-icon svg {
    width: 20px;
    height: 20px;
}

.nav-link-text {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 1;
    transition: opacity var(--transition-fast);
}

.sidebar-collapsed .nav-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-link-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: var(--color-danger);
    color: white;
    min-width: 18px;
    text-align: center;
}

.sidebar-collapsed .nav-link-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 1px 4px;
    font-size: 0.6rem;
}

/* Submenu / Nested Items */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    background: rgba(0, 0, 0, 0.15);
}

.nav-item.open > .nav-submenu {
    max-height: 500px;
}

.nav-submenu .nav-link {
    padding-left: 52px;
    font-size: 0.8125rem;
}

.sidebar-collapsed .nav-submenu {
    display: none;
}

/* Submenu Arrow */
.nav-arrow {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
    opacity: 0.7;
}

.nav-item.open > .nav-link .nav-arrow {
    transform: rotate(90deg);
}

.sidebar-collapsed .nav-arrow {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-collapsed .sidebar-user-info {
    display: none;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--color-gray-400);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-fixed) - 1);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================================================
   6. HEADER / TOP BAR
   ============================================================================ */

.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: var(--z-sticky);
    transition: left var(--transition-slow);
}

.sidebar-collapsed .header {
    left: var(--sidebar-collapsed-width);
}

/* Mobile Menu Button */
.header-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    margin-right: 12px;
}

.header-menu-btn:hover {
    background: var(--bg-hover);
}

/* Page Title Area */
.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title h1 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin-right: 8px;
    color: var(--color-gray-300);
}

.breadcrumb-item:last-child {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 480px;
    margin: 0 24px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-body);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Notification Bell */
.header-notification {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.header-notification:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-icon {
    width: 20px;
    height: 20px;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--color-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-header);
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
}

.header-notification.open + .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.dropdown-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
}

.dropdown-header a {
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 500;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: var(--color-primary-50);
}

.notification-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon-wrapper.info {
    background: var(--color-info-50);
    color: var(--color-info);
}

.notification-icon-wrapper.success {
    background: var(--color-success-50);
    color: var(--color-success);
}

.notification-icon-wrapper.warning {
    background: var(--color-warning-50);
    color: var(--color-warning);
}

.notification-icon-wrapper.danger {
    background: var(--color-danger-50);
    color: var(--color-danger);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Profile Menu */
.header-profile {
    position: relative;
    margin-left: 8px;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.profile-trigger:hover {
    background: var(--bg-hover);
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
}

.profile-info {
    line-height: 1.2;
}

.profile-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.profile-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
    padding: 8px;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.profile-menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.profile-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.profile-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.profile-menu-item.danger {
    color: var(--color-danger);
}

.profile-menu-item.danger:hover {
    background: var(--color-danger-50);
}

/* ============================================================================
   7. MAIN CONTENT AREA
   ============================================================================ */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-left {
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Content Sections */
.section {
    margin-bottom: 32px;
}

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

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-action {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.section-action:hover {
    color: var(--color-primary-dark);
}

/* ============================================================================
   8. CARDS & PANELS
   ============================================================================ */

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

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--color-gray-50);
}

/* Card Variants */
.card-flat {
    box-shadow: none;
    border-color: var(--border-light);
}

.card-bordered {
    border: 2px solid var(--border-color);
}

.card-elevated {
    box-shadow: var(--shadow-lg);
}

.card-interactive {
    cursor: pointer;
}

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

/* Card with no padding */
.card-no-padding .card-body {
    padding: 0;
}

/* ============================================================================
   9. STATISTICS CARDS
   ============================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition-base);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.primary {
    background: var(--color-primary-50);
    color: var(--color-primary);
}

.stat-icon.success {
    background: var(--color-success-50);
    color: var(--color-success);
}

.stat-icon.warning {
    background: var(--color-warning-50);
    color: var(--color-warning);
}

.stat-icon.danger {
    background: var(--color-danger-50);
    color: var(--color-danger);
}

.stat-icon.info {
    background: var(--color-info-50);
    color: var(--color-info);
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-icon.orange {
    background: #fff7ed;
    color: #ea580c;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.stat-change.positive {
    background: var(--color-success-50);
    color: var(--color-success-dark);
}

.stat-change.negative {
    background: var(--color-danger-50);
    color: var(--color-danger-dark);
}

.stat-change.neutral {
    background: var(--color-gray-100);
    color: var(--text-secondary);
}

/* Mini Stat Card (for compact layouts) */
.stat-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.stat-mini .stat-icon {
    width: 40px;
    height: 40px;
}

.stat-mini .stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-mini .stat-value {
    font-size: 1.25rem;
}

/* ============================================================================
   10. DATA TABLES
   ============================================================================ */

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.table-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-search {
    position: relative;
    width: 260px;
}

.table-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.table-search input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

.table-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

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

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--color-gray-50);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--color-gray-50);
}

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

.data-table tbody tr.selected {
    background: var(--color-primary-50);
}

/* Striped Rows */
.data-table.striped tbody tr:nth-child(even) {
    background: var(--color-gray-50);
}

.data-table.striped tbody tr:nth-child(even):hover {
    background: var(--color-gray-100);
}

/* Cell Content */
.table-cell-primary {
    font-weight: 500;
    color: var(--text-primary);
}

.table-cell-secondary {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.table-cell-mono {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8125rem;
}

/* Table Actions */
.table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.table-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.table-action-btn.danger:hover {
    background: var(--color-danger-50);
    color: var(--color-danger);
}

.table-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Table Footer */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--color-gray-50);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.table-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty Table State */
.table-empty {
    padding: 48px 24px;
    text-align: center;
}

.table-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.table-empty-icon svg {
    width: 32px;
    height: 32px;
}

.table-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.table-empty-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Responsive Table Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================================
   11. FORMS & INPUTS
   ============================================================================ */

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label.required::after {
    content: '*';
    color: var(--color-danger);
    margin-left: 4px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--color-danger);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Text Inputs */
.form-control {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:hover {
    border-color: var(--color-gray-400);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

.form-control:disabled {
    background: var(--color-gray-100);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Input with Icon */
.input-group {
    position: relative;
}

.input-group .form-control {
    padding-left: 40px;
}

.input-group-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-group-append {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

/* Textarea */
textarea.form-control {
    height: auto;
    min-height: 100px;
    padding: 10px 12px;
    resize: vertical;
}

/* Select */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Switch/Toggle */
.form-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.form-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.form-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.form-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.form-switch input:checked + .form-switch-slider {
    background: var(--color-primary);
}

.form-switch input:checked + .form-switch-slider::before {
    transform: translateX(20px);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-50);
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.file-upload-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.file-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Form Row (Multiple columns) */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Form Inline */
.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
}

/* ============================================================================
   12. BUTTONS
   ============================================================================ */

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

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

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* Secondary Button */
.btn-secondary {
    background: var(--color-white);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--color-gray-300);
}

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

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

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

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

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

.btn-warning:hover {
    background: var(--color-warning-dark);
    border-color: var(--color-warning-dark);
}

/* Ghost/Text Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

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

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

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

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

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

/* Button Sizes */
.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 0.8125rem;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

.btn-lg {
    height: 48px;
    padding: 0 24px;
    font-size: 1rem;
}

.btn-lg svg {
    width: 20px;
    height: 20px;
}

.btn-xl {
    height: 56px;
    padding: 0 32px;
    font-size: 1.125rem;
}

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

.btn-icon.btn-sm {
    width: 32px;
}

.btn-icon.btn-lg {
    width: 48px;
}

/* Button Group */
.btn-group {
    display: inline-flex;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.btn-group .btn:not(:last-child) {
    border-right: none;
}

/* Full Width Button */
.btn-block {
    width: 100%;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}

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

/* ============================================================================
   13. BADGES & TAGS
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* Badge Variants */
.badge-primary {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

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

.badge-success {
    background: var(--color-success-100);
    color: var(--color-success-600);
}

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

.badge-warning {
    background: var(--color-warning-100);
    color: var(--color-warning-600);
}

.badge-warning .badge-dot {
    background: var(--color-warning);
}

.badge-danger {
    background: var(--color-danger-100);
    color: var(--color-danger-600);
}

.badge-danger .badge-dot {
    background: var(--color-danger);
}

.badge-info {
    background: var(--color-info-100);
    color: var(--color-info-dark);
}

.badge-info .badge-dot {
    background: var(--color-info);
}

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

.badge-secondary .badge-dot {
    background: var(--color-gray-500);
}

/* Badge Sizes */
.badge-sm {
    padding: 2px 8px;
    font-size: 0.6875rem;
}

.badge-lg {
    padding: 4px 14px;
    font-size: 0.8125rem;
}

/* Pill Badge (with border) */
.badge-pill {
    border: 1px solid currentColor;
    opacity: 0.85;
}

/* Status Badges */
.status-active {
    background: var(--color-success-50);
    color: var(--color-success-dark);
    border: 1px solid var(--color-success-200);
}

.status-inactive {
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    border: 1px solid var(--color-gray-200);
}

.status-pending {
    background: var(--color-warning-50);
    color: var(--color-warning-600);
    border: 1px solid var(--color-warning-200);
}

.status-error {
    background: var(--color-danger-50);
    color: var(--color-danger-600);
    border: 1px solid var(--color-danger-200);
}

/* Role Badges */
.role-superadmin {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.role-principal {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
    border: 1px solid var(--color-primary-200);
}

.role-teacher {
    background: var(--color-success-100);
    color: var(--color-success-dark);
    border: 1px solid var(--color-success-200);
}

.role-student {
    background: var(--color-warning-100);
    color: var(--color-warning-600);
    border: 1px solid var(--color-warning-200);
}

.role-parent {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.role-accountant {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.role-librarian {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.role-receptionist {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

/* ============================================================================
   14. ALERTS & NOTIFICATIONS
   ============================================================================ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid;
    margin-bottom: 16px;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.alert-message {
    font-size: 0.875rem;
    opacity: 0.9;
}

.alert-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* Alert Variants */
.alert-success {
    background: var(--color-success-50);
    border-color: var(--color-success-200);
    color: var(--color-success-dark);
}

.alert-success .alert-icon {
    color: var(--color-success);
}

.alert-danger {
    background: var(--color-danger-50);
    border-color: var(--color-danger-200);
    color: var(--color-danger-dark);
}

.alert-danger .alert-icon {
    color: var(--color-danger);
}

.alert-warning {
    background: var(--color-warning-50);
    border-color: var(--color-warning-200);
    color: var(--color-warning-600);
}

.alert-warning .alert-icon {
    color: var(--color-warning);
}

.alert-info {
    background: var(--color-info-50);
    border-color: #a5f3fc;
    color: var(--color-info-dark);
}

.alert-info .alert-icon {
    color: var(--color-info);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

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

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================================================
   15. MODALS & DIALOGS
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    padding: 24px;
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-base);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }
.modal-full { max-width: calc(100vw - 48px); }

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

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--color-gray-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Confirmation Dialog */
.confirm-dialog .modal-body {
    text-align: center;
    padding: 32px 24px;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon.danger {
    background: var(--color-danger-50);
    color: var(--color-danger);
}

.confirm-icon.warning {
    background: var(--color-warning-50);
    color: var(--color-warning);
}

.confirm-icon svg {
    width: 32px;
    height: 32px;
}

.confirm-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.confirm-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================================================
   16. PAGINATION
   ============================================================================ */

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--color-gray-300);
    color: var(--text-primary);
}

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

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

.pagination-ellipsis {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Pagination Info */
.pagination-info {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Page Size Selector */
.page-size-select {
    height: 36px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    font-size: 0.8125rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ============================================================================
   17. PROGRESS BARS
   ============================================================================ */

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

.progress-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar.animated {
    animation: progressStripe 1s linear infinite;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

@keyframes progressStripe {
    to { background-position: 1rem 0; }
}

/* Progress Sizes */
.progress-sm { height: 4px; }
.progress-lg { height: 12px; }

/* Progress Colors */
.progress-success .progress-bar { background: var(--color-success); }
.progress-warning .progress-bar { background: var(--color-warning); }
.progress-danger .progress-bar { background: var(--color-danger); }
.progress-info .progress-bar { background: var(--color-info); }

/* Progress with Label */
.progress-labeled {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-labeled .progress {
    flex: 1;
}

.progress-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

/* ============================================================================
   18. AVATARS
   ============================================================================ */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    font-weight: 600;
    text-transform: uppercase;
}

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

.avatar-xs { width: 24px; height: 24px; font-size: 0.625rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar-2xl { width: 96px; height: 96px; font-size: 1.75rem; }

/* Avatar Colors */
.avatar-blue { background: var(--color-primary-100); color: var(--color-primary-700); }
.avatar-green { background: var(--color-success-100); color: var(--color-success-dark); }
.avatar-yellow { background: var(--color-warning-100); color: var(--color-warning-600); }
.avatar-red { background: var(--color-danger-100); color: var(--color-danger-600); }
.avatar-purple { background: #f3e8ff; color: #7c3aed; }
.avatar-indigo { background: #eef2ff; color: #4338ca; }
.avatar-pink { background: #fdf2f8; color: #be185d; }
.avatar-orange { background: #fff7ed; color: #ea580c; }
.avatar-teal { background: #ccfbf1; color: #0d9488; }
.avatar-cyan { background: #cffafe; color: #0891b2; }

/* Avatar Group */
.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    border: 2px solid var(--bg-card);
    margin-left: -8px;
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

.avatar-count {
    background: var(--color-gray-200);
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ============================================================================
   19. DROPDOWNS & MENUS
   ============================================================================ */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-base);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu.right {
    left: auto;
    right: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.dropdown-item.danger {
    color: var(--color-danger);
}

.dropdown-item.danger:hover {
    background: var(--color-danger-50);
}

/* ============================================================================
   20. TABS
   ============================================================================ */

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    gap: 0;
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

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

.tab-content {
    padding: 20px 0;
}

.tab-pane {
    display: none;
}

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

/* Pill Tabs */
.tabs-pills {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--color-gray-100);
    border-radius: var(--radius-lg);
}

.tabs-pills .tab {
    border-bottom: none;
    border-radius: var(--radius-md);
    padding: 8px 16px;
}

.tabs-pills .tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================================================
   21. ACCORDION
   ============================================================================ */

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

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

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

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: none;
    text-align: left;
}

.accordion-header:hover {
    background: var(--bg-hover);
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

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

.accordion-item.open .accordion-content {
    max-height: 1000px;
}

.accordion-body {
    padding: 0 20px 20px;
    color: var(--text-secondary);
}

/* ============================================================================
   22. TOOLTIPS
   ============================================================================ */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 12px;
    background: var(--color-gray-900);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: var(--z-tooltip);
    pointer-events: none;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip Arrow */
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-gray-900);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: var(--z-tooltip);
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ============================================================================
   23. BREADCRUMBS
   ============================================================================ */

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 0.875rem;
}

.breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb-separator {
    color: var(--color-gray-300);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================================================
   24. EMPTY STATES
   ============================================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.empty-state-icon svg {
    width: 56px;
    height: 56px;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 24px;
}

.empty-state-action {
    /* Button styles apply */
}

/* Compact Empty State */
.empty-state-sm {
    padding: 32px 16px;
}

.empty-state-sm .empty-state-icon {
    width: 64px;
    height: 64px;
}

.empty-state-sm .empty-state-icon svg {
    width: 28px;
    height: 28px;
}

.empty-state-sm .empty-state-title {
    font-size: 1rem;
}

.empty-state-sm .empty-state-description {
    font-size: 0.8125rem;
}

/* ============================================================================
   25. LOADING STATES
   ============================================================================ */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }
.spinner-xl { width: 56px; height: 56px; border-width: 5px; }

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-gray-200) 25%,
        var(--color-gray-100) 50%,
        var(--color-gray-200) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

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

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-heading {
    height: 24px;
    width: 50%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: var(--radius-md);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-screen-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loading-screen-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 16px;
}

/* ============================================================================
   26. UTILITIES
   ============================================================================ */

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: 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-50 { z-index: 50; }

/* Borders */
.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); }
.border-l { border-left: 1px solid var(--border-color); }
.border-r { border-right: 1px solid var(--border-color); }
.border-0 { border: none; }

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

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

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

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

/* Pointer Events */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

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

/* Screen Reader Only */
.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;
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    .sidebar, .header { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .content-wrapper { margin-top: 0 !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================================
   27. ANIMATIONS
   ============================================================================ */

/* Fade In */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

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

/* Fade In Up */
.fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

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

/* Fade In Down */
.fade-in-down {
    animation: fadeInDown 0.4s ease forwards;
}

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

/* Scale In */
.scale-in {
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Left */
.slide-in-left {
    animation: slideInLeft 0.3s ease forwards;
}

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

/* Slide In Right */
.slide-in-right {
    animation: slideInRight 0.3s ease forwards;
}

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

/* Bounce */
.bounce {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 53%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translateY(0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translateY(-16px);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translateY(-8px);
    }
    80% {
        transform: translateY(0);
    }
    90% {
        transform: translateY(-4px);
    }
}

/* Shake (for errors) */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

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

/* Wiggle */
.wiggle {
    animation: wiggle 0.5s ease;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Focus Ring */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

/* ============================================================================
   28. RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Screens (1200px - 1399px) */
@media (max-width: 1399px) {
    .grid-cols-5 { grid-template-columns: repeat(4, 1fr); }
    .grid-cols-6 { grid-template-columns: repeat(4, 1fr); }
}

/* Medium-Large Screens (992px - 1199px) */
@media (max-width: 1199px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-cols-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-cols-6 { grid-template-columns: repeat(3, 1fr); }
    
    .header-search {
        max-width: 320px;
    }
    
    .notification-dropdown {
        width: 320px;
    }
}

/* Tablet Screens (768px - 991px) */
@media (max-width: 991px) {
    :root {
        --header-height: 60px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: var(--z-modal);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    
    .app-main {
        margin-left: 0;
    }
    
    .header {
        left: 0;
    }
    
    .sidebar-collapsed .header {
        left: 0;
    }
    
    .header-menu-btn {
        display: flex;
    }
    
    .header-search {
        display: none;
    }
    
    .content-wrapper {
        padding: 16px;
        margin-top: var(--header-height);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-5 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-6 { grid-template-columns: repeat(2, 1fr); }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .profile-info {
        display: none;
    }
    
    .modal {
        max-width: calc(100vw - 32px);
        margin: 16px;
    }
    
    .notification-dropdown {
        width: 100%;
        right: -60px;
    }
}

/* Small Tablets / Large Phones (576px - 767px) */
@media (max-width: 767px) {
    html {
        font-size: 15px;
    }
    
    .content-wrapper {
        padding: 12px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .grid-cols-2 { grid-template-columns: 1fr; }
    .grid-cols-3 { grid-template-columns: 1fr; }
    .grid-cols-4 { grid-template-columns: 1fr; }
    .grid-cols-5 { grid-template-columns: 1fr; }
    .grid-cols-6 { grid-template-columns: 1fr; }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-toolbar-left,
    .table-toolbar-right {
        justify-content: space-between;
    }
    
    .table-search {
        width: 100%;
    }
    
    .table-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 0.8125rem;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab {
        padding: 10px 16px;
        font-size: 0.8125rem;
    }
    
    .modal-lg,
    .modal-xl,
    .modal-full {
        max-width: calc(100vw - 24px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .toast-container {
        right: 12px;
        left: 12px;
        max-width: none;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
}

/* Mobile Phones (below 576px) */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }
    
    .content-wrapper {
        padding: 10px;
    }
    
    .header {
        padding: 0 12px;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .profile-trigger {
        padding: 6px;
    }
    
    .profile-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    
    .btn {
        height: 36px;
        padding: 0 12px;
        font-size: 0.8125rem;
    }
    
    .btn-lg {
        height: 42px;
        padding: 0 18px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .stat-value {
        font-size: 1.375rem;
    }
    
    .empty-state {
        padding: 40px 16px;
    }
    
    .empty-state-icon {
        width: 80px;
        height: 80px;
    }
    
    .empty-state-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .empty-state-title {
        font-size: 1.125rem;
    }
    
    .empty-state-description {
        font-size: 0.875rem;
    }
    
    /* Responsive table - stack on mobile */
    .table-responsive-mobile .data-table,
    .table-responsive-mobile thead {
        display: none;
    }
    
    .table-responsive-mobile tbody tr {
        display: block;
        padding: 12px;
        margin-bottom: 8px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
    }
    
    .table-responsive-mobile tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
    }
    
    .table-responsive-mobile tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        margin-right: 12px;
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

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

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: dark) {
    /* Can be enabled in future versions */
}
