/* ===================================================
   SMART ATTENDANCE SYSTEM - ENHANCED MODERN DESIGN
   Professional, Clean, Eye-Catching UI with Theme Plates
   =================================================== */

/* ===== COLOR PALETTE & GRADIENTS ===== */
:root {
    /* Primary Colors - Blue Theme */
    --primary-700: #1d4ed8;
    --primary-600: #2563eb;
    --primary-500: #3b82f6;
    --primary-400: #60a5fa;
    --primary-300: #93c5fd;
    --primary-100: #dbeafe;
    
    /* Accent Colors - Purple */
    --accent-700: #6b21a8;
    --accent-600: #7c3aed;
    --accent-500: #a855f7;
    --accent-400: #c084fc;
    --accent-300: #d8b4fe;
    --accent-100: #ede9fe;
    
    /* Cyan Accent */
    --cyan-700: #0e7490;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --cyan-400: #22d3ee;
    
    /* Indigo Accent */
    --indigo-700: #4338ca;
    --indigo-600: #4f46e5;
    --indigo-500: #6366f1;
    
    /* Pink Accent */
    --pink-700: #be185d;
    --pink-600: #db2777;
    --pink-500: #ec4899;
    
    /* Emerald - Success */
    --success-700: #047857;
    --success-600: #059669;
    --success-500: #10b981;
    --success-400: #34d399;
    
    /* Orange - Warning */
    --warning-700: #b45309;
    --warning-600: #d97706;
    --warning-500: #f59e0b;
    --warning-400: #fbbf24;
    
    /* Red - Error */
    --error-700: #b91c1c;
    --error-600: #dc2626;
    --error-500: #ef4444;
    --error-400: #f87171;
    
    /* Neutral Grays */
    --gray-950: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    
    /* Semantic */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px -5px rgba(37, 99, 235, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

small {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

/* ===== BUTTONS - ENHANCED ===== */
button, .button, input[type="button"], input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    user-select: none;
    font-family: inherit;
    letter-spacing: 0.3px;
}

button:disabled, .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary Button - Blue to Navy */
.button-primary, button.primary, .button.primary {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 15px -3px rgba(37, 99, 235, 0.2);
}

.button-primary:hover:not(:disabled), button.primary:hover:not(:disabled), .button.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 25px -5px rgba(37, 99, 235, 0.4);
}

.button-primary:active:not(:disabled), button.primary:active:not(:disabled), .button.primary:active:not(:disabled) {
    transform: translateY(-1px);
}

/* Secondary Button - Purple to Indigo */
.button-secondary, button.secondary, .button.secondary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 15px -3px rgba(124, 58, 237, 0.2);
}

.button-secondary:hover:not(:disabled), button.secondary:hover:not(:disabled), .button.secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 25px -5px rgba(124, 58, 237, 0.4);
}

/* Tertiary Button - Light Blue Border */
.button-tertiary, button.tertiary, .button.tertiary {
    background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%);
    color: var(--primary-700);
    border: 2px solid var(--primary-500);
    font-weight: 600;
}

.button-tertiary:hover:not(:disabled), button.tertiary:hover:not(:disabled), .button.tertiary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-color: var(--primary-700);
    color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 0 20px -5px rgba(37, 99, 235, 0.3);
}

/* Outline Button */
.button-outline, button.outline, .button.outline {
    background: white;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
}

.button-outline:hover:not(:disabled), button.outline:hover:not(:disabled), .button.outline:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--primary-500);
    color: var(--primary-600);
    transform: translateY(-2px);
}

/* Ghost Button */
.button-ghost, button.ghost, .button.ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
}

.button-ghost:hover:not(:disabled), button.ghost:hover:not(:disabled), .button.ghost:hover:not(:disabled) {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-700);
    transform: translateY(-1px);
}

/* Success Button - Emerald */
.button-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 15px -3px rgba(5, 150, 105, 0.2);
}

.button-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 25px -5px rgba(5, 150, 105, 0.4);
}

/* Danger/Error Button - Red */
.button-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 15px -3px rgba(220, 38, 38, 0.2);
}

.button-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 25px -5px rgba(220, 38, 38, 0.4);
}

/* Warning Button - Amber */
.button-warning {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 15px -3px rgba(217, 119, 6, 0.2);
}

.button-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 25px -5px rgba(217, 119, 6, 0.4);
}

/* Cyan Button */
.button-cyan {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 15px -3px rgba(8, 145, 178, 0.2);
}

.button-cyan:hover:not(:disabled) {
    background: linear-gradient(135deg, #0e7490 0%, #155e75 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 25px -5px rgba(8, 145, 178, 0.4);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

input::placeholder, textarea::placeholder {
    color: var(--text-tertiary);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== ALERTS & MESSAGES ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-700);
    border-left: 4px solid var(--success-500);
}

.alert-error, .alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-700);
    border-left: 4px solid var(--error-500);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-700);
    border-left: 4px solid var(--warning-500);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-700);
    border-left: 4px solid var(--primary-500);
}

.flash-message {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    animation: slideDown var(--transition-base);
}

.flash-message.success {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-700);
    border-left: 4px solid var(--success-500);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600);
}

.header-brand i {
    font-size: 1.75rem;
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.header-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.header-nav a:hover, .header-nav a.active {
    color: var(--primary-600);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 2rem;
    border-left: 1px solid var(--border-color);
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-600) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-transform: capitalize;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    height: calc(100vh - 65px);
    position: sticky;
    top: 65px;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-600);
}

.sidebar-link.active {
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-left-color: var(--primary-600);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 1.1rem;
}

/* ===== LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

.layout-with-sidebar {
    display: flex;
}

.layout-content {
    flex: 1;
}

.page-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== CARDS & CONTAINERS ===== */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-300);
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    margin-bottom: 0;
}

.card-body {
    margin-bottom: 0;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ===== METRIC CARDS ===== */
.metric-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(59, 130, 246, 0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.metric-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-300);
    transform: translateY(-2px);
}

.metric-card.accent-purple::before {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
}

.metric-card.accent-green::before {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-icon {
    font-size: 1.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon.primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-600);
}

.metric-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-600);
}

.metric-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-600);
}

.metric-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-600);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.metric-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.metric-change.positive {
    color: var(--success-600);
}

.metric-change.negative {
    color: var(--error-600);
}

/* ===== STATUS CHIPS & BADGES ===== */
.status-chip, .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-chip.present, .badge.present {
    background-color: rgba(34, 197, 94, 0.15);
    color: var(--success-700);
}

.status-chip.late, .badge.late {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning-700);
}

.status-chip.absent, .badge.absent {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--error-700);
}

.status-chip.pending, .badge.pending {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary-700);
}

/* ===== TABLES ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-primary);
}

thead {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

tbody tr:hover {
    background-color: var(--bg-secondary);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 50%, #f5f3ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* ===== FULL-WIDTH SECTIONS ===== */
.section-full {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 4rem 2rem;
}

.section-full.bg-gradient-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
}

.section-full.bg-gradient-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
}

.section-full.bg-gradient-cyan {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: white;
}

.section-full.bg-gradient-emerald {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.section-full.bg-light-blue {
    background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%);
    color: var(--text-primary);
}

.section-full.bg-light-purple {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    color: var(--text-primary);
}

.section-full h2, .section-full h3 {
    color: inherit;
}

.section-full p {
    color: inherit;
    opacity: 0.95;
}

/* ===== THEME PLATES ===== */
.theme-plate {
    border-radius: 1rem;
    overflow: hidden;
    transition: all var(--transition-base);
}

.theme-plate.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 5px solid #2563eb;
}

.theme-plate.purple {
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    border-left: 5px solid #7c3aed;
}

.theme-plate.cyan {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    border-left: 5px solid #0891b2;
}

.theme-plate.emerald {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 5px solid #059669;
}

.theme-plate.pink {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-left: 5px solid #db2777;
}

.theme-plate.amber {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #d97706;
}

.theme-plate:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.hero-card {
    background: var(--bg-primary);
    border: none;
    border-radius: 1.5rem;
    padding: 4rem;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

.hero-card h1 {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
}

.hero-card p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-actions .button {
    width: 100%;
}

/* ===== GRID LAYOUTS ===== */
.grid, .card-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(4, 1fr);
}

/* ===== FEATURE CARDS - ENHANCED ===== */
.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.feature-card:hover {
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-300);
    transform: translateY(-8px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-600);
    margin: 0 auto;
    transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ===== LOGIN OPTION CARDS ===== */
.login-option {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
}

.login-option::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.login-option:hover {
    box-shadow: 0 25px 50px -10px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-400);
    transform: translateY(-10px);
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.login-option-icon {
    font-size: 3.5rem;
    color: var(--primary-600);
    transition: transform var(--transition-base);
}

.login-option:hover .login-option-icon {
    transform: scale(1.15) rotate(-5deg);
}

.login-option h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-option p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-option a {
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #2563eb, #7c3aed, #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue-purple {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ENHANCED HEADINGS ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== FEATURE GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===== LOGIN OPTIONS GRID ===== */
.login-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin: 3rem 0;
}

@media (max-width: 1024px) {
    .login-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .login-options-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===== LOADING & SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.spinner {
    border: 3px solid var(--bg-tertiary);
    border-top: 3px solid var(--primary-600);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-6 { margin-bottom: 2rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.text-muted {
    color: var(--text-tertiary);
}

.text-success {
    color: var(--success-600);
}

.text-danger, .text-error {
    color: var(--error-600);
}

.text-warning {
    color: var(--warning-600);
}

.text-primary {
    color: var(--primary-600);
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.cursor-pointer {
    cursor: pointer;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .header-nav {
        gap: 1rem;
    }
    
    .sidebar {
        width: 240px;
    }
    
    .section-full {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .sidebar {
        display: none;
    }
    
    .layout-with-sidebar {
        flex-direction: column;
    }
    
    .page-container {
        padding: 1.5rem;
    }
    
    .hero-card {
        padding: 1.5rem;
    }
    
    .hero-card h1 {
        font-size: 2rem;
    }
    
    .grid, .card-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .login-option {
        padding: 2rem;
    }
    
    .login-option-icon {
        font-size: 2.5rem;
    }
    
    .login-option h3 {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .features-grid {
        gap: 1.5rem;
    }
    
    .login-options-grid {
        gap: 1.5rem;
    }
    
    .header-container {
        gap: 1rem;
    }
    
    .header-nav {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .card-footer {
        flex-direction: column;
    }
    
    .card-footer {
        flex-direction: column;
    }
    
    .card-footer .button {
        width: 100%;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 0.95rem;
    }
    
    .header {
        padding: 0.75rem 1rem;
    }
    
    .header-brand {
        font-size: 1.25rem;
    }
    
    .page-container {
        padding: 1rem;
    }
    
    .card, .hero-card {
        padding: 1.25rem;
    }
    
    .button, button, input[type="button"], input[type="submit"] {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }
    
    .button-primary, .button-secondary {
        width: 100%;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .section-full {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-card h1 {
        font-size: 1.5rem;
    }
    
    .hero-card {
        padding: 1rem;
    }
    
    .metric-card {
        padding: 1.25rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
}

/* ===== EXTRA SMALL DEVICES (Mobile Phones) ===== */
@media (max-width: 480px) {
    body {
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    h2 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    p {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }
    
    .header {
        padding: 0.5rem 0.75rem;
    }
    
    .header-container {
        gap: 0.5rem;
    }
    
    .header-brand {
        font-size: 1.1rem;
        gap: 0.5rem;
    }
    
    .header-brand i {
        font-size: 1.3rem;
    }
    
    .user-avatar {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .page-container {
        padding: 0.75rem;
        gap: 1rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .card-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .card-footer .button {
        width: 100%;
        padding: 0.6rem 1rem;
    }
    
    .hero-card {
        padding: 1rem;
        border-radius: 1rem;
        max-width: 100%;
    }
    
    .hero-card h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .hero-card p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-actions {
        gap: 0.5rem;
    }
    
    .hero-actions .button {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .button, button, input[type="button"], input[type="submit"] {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        gap: 0.4rem;
        border-radius: 0.6rem;
    }
    
    .button-primary, .button-secondary, .button:not(.button-outline, .button-ghost) {
        width: 100%;
    }
    
    label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    input, select, textarea {
        padding: 0.6rem 0.9rem;
        font-size: 0.95rem;
        border-radius: 0.6rem;
    }
    
    textarea {
        min-height: 100px;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .metric-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
    
    .metric-value {
        font-size: 1.75rem;
    }
    
    .metric-change {
        font-size: 0.75rem;
    }
    
    .metric-icon {
        font-size: 1.5rem;
        padding: 0.6rem;
    }
    
    .feature-card {
        padding: 1rem;
        gap: 0.75rem;
        border-radius: 1rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    .login-option {
        padding: 1.5rem;
        gap: 1rem;
        border-radius: 1rem;
    }
    
    .login-option-icon {
        font-size: 2.5rem;
    }
    
    .login-option h3 {
        font-size: 1.1rem;
    }
    
    .login-option p {
        font-size: 0.9rem;
    }
    
    .grid, .card-grid, .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .login-options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-full {
        padding: 1.5rem 0.75rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    /* Table Responsiveness */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.85rem;
        min-width: 100%;
    }
    
    th, td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
    
    th {
        font-size: 0.8rem;
    }
    
    /* Status Chips */
    .status-chip, .badge {
        padding: 0.3rem 0.7rem;
        font-size: 0.8rem;
    }
    
    /* Alert Messages */
    .alert {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    /* Sidebar Hidden on Mobile */
    .sidebar {
        display: none;
    }
    
    .layout-with-sidebar {
        flex-direction: column;
    }
    
    /* Hide Extra Elements */
    .header-nav {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    /* Gradient Text */
    .gradient-text, .gradient-text-blue-purple {
        background: var(--primary-600);
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
        background-clip: unset;
    }
}

/* ===== TABLET LANDSCAPE (820px - 1024px) ===== */
@media (max-width: 820px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-card {
        padding: 2rem;
    }
    
    .hero-card h1 {
        font-size: 2rem;
    }
    
    .hero-card p {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: row;
    }
    
    .hero-actions .button {
        width: auto;
        flex: 1;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .page-container {
        padding: 1.5rem;
    }
}

/* ===== SMALL TABLETS (768px) ===== */
@media (max-width: 768px) and (min-width: 481px) {
    .header {
        padding: 0.75rem 1rem;
    }
    
    .page-container {
        padding: 1.25rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .button, button, input[type="button"], input[type="submit"] {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .grid {
        gap: 1.5rem;
    }
    
    .metric-value {
        font-size: 2.2rem;
    }
}

/* ===== MOBILE RESPONSIVE FORM LAYOUT ===== */
@media (max-width: 768px) {
    .form-horizontal, .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-group-row .form-group {
        width: 100%;
    }
}

/* ===== HIGH RESOLUTION MOBILE (Pixel Phones) ===== */
@media (max-width: 400px) {
    body {
        font-size: 0.85rem;
    }
    
    h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1rem;
    }
    
    .header-brand {
        font-size: 1rem;
    }
    
    .button, button, input[type="button"], input[type="submit"] {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }
    
    .page-container {
        padding: 0.5rem;
    }
    
    .card {
        padding: 0.85rem;
        margin-bottom: 0.75rem;
    }
}

/* ===== RETINA & HIGH PIXEL DENSITY ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* ===== LANDSCAPE MODE - ALL DEVICES ===== */
@media (max-height: 600px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 1rem;
    }
    
    .page-container {
        padding: 1rem;
    }
    
    .hero-card {
        padding: 1.5rem;
    }
    
    .card {
        margin-bottom: 0.5rem;
    }
}

/* ===== DARK MODE OPTIMIZATIONS ===== */
@media (prefers-color-scheme: dark) {
    /* CSS custom properties will inherit from :root if needed */
    /* Dark mode support can be added here */
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
