/* 
 * BOOTH MANAGEMENT SYSTEM - WORLD CLASS PREMIUM UI
 * Version: 2.0
 * Design: Premium Enterprise PWA
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ======================================== */

:root {
    /* Brand Colors */
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-300: #a5b4fc;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-800: #3730a3;
    --brand-900: #312e81;
    
    /* Accent Colors */
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-orange: #f97316;
    --accent-emerald: #10b981;
    
    /* Semantic Colors */
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-25: #fcfcfd;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-brand-dark: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, hsla(240, 100%, 74%, 0.15) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, hsla(280, 100%, 70%, 0.1) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, hsla(220, 100%, 70%, 0.1) 0px, transparent 50%),
                     radial-gradient(at 80% 50%, hsla(340, 100%, 70%, 0.1) 0px, transparent 50%),
                     radial-gradient(at 0% 100%, hsla(260, 100%, 70%, 0.1) 0px, transparent 50%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.95) 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-warning: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    
    /* Glow Effects */
    --glow-brand: 0 0 20px rgba(99, 102, 241, 0.4), 0 0 40px rgba(99, 102, 241, 0.2);
    --glow-success: 0 0 20px rgba(34, 197, 94, 0.4);
    --glow-error: 0 0 20px rgba(239, 68, 68, 0.4);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
    
    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* 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;
}

/* ========================================
   BASE STYLES
   ======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--brand-500);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */

.app-background {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -1;
}

.app-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    animation: mesh-move 30s ease-in-out infinite;
}

.app-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

@keyframes mesh-move {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-2%, 2%) scale(1.02); }
    50% { transform: translate(2%, -2%) scale(0.98); }
    75% { transform: translate(-1%, -1%) scale(1.01); }
}

/* Floating Orbs Animation */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--brand-400);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-pink);
    top: 50%;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-cyan);
    bottom: -100px;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(5deg); }
    50% { transform: translate(-20px, 20px) rotate(-5deg); }
    75% { transform: translate(20px, 30px) rotate(3deg); }
}

/* ========================================
   NAVIGATION - LEFT SIDEBAR
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: var(--z-fixed);
    background: white;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform var(--duration-base) var(--ease-out);
}

.navbar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 0 24px 24px 24px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 24px;
    transition: transform var(--duration-base) var(--ease-out);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.brand-logo {
    width: 44px;
    height: 44px;
    /*background: var(--gradient-brand);*/
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    /*box-shadow: var(--glow-brand);*/
    transition: all var(--duration-base) var(--ease-out);
    flex-shrink: 0;
}

.brand-logo:hover {
    transform: rotate(-5deg) scale(1.05);
}

.brand-logo .icon {
    width: 24px;
    height: 24px;
    color: white;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.125rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.6875rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-brand);
    border-radius: 0 2px 2px 0;
    transition: height var(--duration-base) var(--ease-out);
}

.nav-link:hover {
    color: var(--brand-600);
    background: var(--brand-50);
}

.nav-link:hover::before {
    height: 70%;
}

.nav-link.active {
    color: var(--brand-600);
    background: var(--brand-50);
}

.nav-link.active::before {
    height: 70%;
}

.nav-link .icon {
    width: 20px;
    height: 20px;
    transition: transform var(--duration-base);
    flex-shrink: 0;
}

.nav-link:hover .icon {
    transform: scale(1.1);
}

.nav-section-title {
    padding: 16px 16px 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 16px;
}

.user-section {
    padding: 24px 24px 0 24px;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
    border: 2px solid white;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-brand);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    width: fit-content;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: var(--gradient-error);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration-base) var(--ease-out);
    box-shadow: var(--shadow-md);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-error);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: calc(var(--z-fixed) + 1);
    transition: all var(--duration-base);
}

.mobile-menu-toggle:hover {
    background: var(--brand-50);
    color: var(--brand-600);
}

.mobile-menu-toggle .icon {
    width: 24px;
    height: 24px;
}

.mobile-menu-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(--duration-base);
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* Dropdown in Sidebar */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--duration-base) var(--ease-out);
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.dropdown-trigger:hover {
    color: var(--brand-600);
    background: var(--brand-50);
}

.dropdown-trigger .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.dropdown-trigger .icon-chevron {
    width: 16px;
    height: 16px;
    margin-left: auto;
    transition: transform var(--duration-base);
}

.dropdown.active .icon-chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    padding: 4px 0 4px 32px;
    margin-top: 4px;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-lg);
    transition: all var(--duration-fast);
}

.dropdown-item:hover {
    background: var(--brand-50);
    color: var(--brand-600);
}

.dropdown-item .icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
    transition: margin-left var(--duration-base) var(--ease-out);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
    position: relative;
}

.page-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 32px;
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--duration-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title-icon {
    width: 40px;
    height: 40px;
    background: var(--brand-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-600);
}

.card-title-icon .icon {
    width: 20px;
    height: 20px;
}

/* ========================================
   STATS GRID
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-50) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--duration-base);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--duration-base) var(--ease-out);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon .icon {
    width: 28px;
    height: 28px;
    color: white;
}

.stat-icon.primary {
    background: var(--gradient-brand);
    box-shadow: var(--glow-brand);
}

.stat-icon.success {
    background: var(--gradient-success);
    box-shadow: var(--glow-success);
}

.stat-icon.warning {
    background: var(--gradient-warning);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.stat-icon.danger {
    background: var(--gradient-error);
    box-shadow: var(--glow-error);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-top: 8px;
}

.stat-trend.up {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn .icon {
    width: 20px;
    height: 20px;
    transition: transform var(--duration-base);
}

.btn:hover .icon {
    transform: scale(1.1);
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: var(--shadow-md), var(--glow-brand);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--glow-brand);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-md), var(--glow-success);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--glow-success);
}

.btn-danger {
    background: var(--gradient-error);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--glow-error);
}

.btn-outline {
    background: white;
    color: var(--brand-600);
    border: 2px solid var(--brand-200);
}

.btn-outline:hover {
    background: var(--brand-50);
    border-color: var(--brand-600);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-label-required::after {
    content: '*';
    color: var(--error);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--gray-900);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all var(--duration-base) var(--ease-out);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:hover {
    border-color: var(--gray-300);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-100), var(--shadow-sm);
}

.form-control.is-invalid {
    border-color: var(--error);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: var(--success);
}

.invalid-feedback {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--error);
}

.invalid-feedback::before {
    content: '?';
}

/* Show validation feedback when there's an error */
.form-control.is-invalid ~ .invalid-feedback,
.form-control.input-validation-error ~ .invalid-feedback {
    display: flex;
}

/* ASP.NET Core MVC validation classes */
.field-validation-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--error);
}

.field-validation-error::before {
    content: '?';
}

.field-validation-valid {
    display: none !important;
}

.input-validation-error {
    border-color: var(--error) !important;
}

.input-validation-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1), var(--shadow-md) !important;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 14px center;
    background-size: 18px;
    padding-right: 48px;
    cursor: pointer;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Form Input Group */
.input-group {
    position: relative;
}

.input-group-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.input-group-icon .icon {
    width: 20px;
    height: 20px;
}

.input-group .form-control {
    padding-left: 48px;
}

/* ========================================
   TABLES
   ======================================== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--gray-50);
}

.table th {
    padding: 16px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    padding: 16px 20px;
    font-size: 0.9375rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--duration-fast);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-primary {
    background: var(--brand-100);
    color: var(--brand-700);
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    border: 1px solid;
    animation: slide-in-down 0.3s var(--ease-out);
}

@keyframes slide-in-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 0.9375rem;
    opacity: 0.9;
}

.alert-success {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.05);
    border-color: rgba(234, 179, 8, 0.2);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 64px 32px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--gray-100);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon .icon {
    width: 40px;
    height: 40px;
    color: var(--gray-400);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ========================================
   SEARCH BOX
   ======================================== */

.search-box {
    position: relative;
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--gray-900);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    transition: all var(--duration-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-100);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    width: 20px;
    height: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .navbar {
        transform: translateX(-100%);
        transition: transform var(--duration-base) var(--ease-out);
        width: 280px;
        max-width: 80vw;
    }
    
    .navbar.active {
        transform: translateX(0);
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 16px 40px 16px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 20px;
        border-radius: var(--radius-lg);
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .form-group {
        width: 100%;
    }

    /* Fix for form inputs */
    .input-group {
        width: 100%;
        max-width: 100%;
    }

    .form-control {
        width: 100%;
        max-width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Stats cards responsive */
    .stat-card {
        width: 100%;
    }

    /* Buttons stack on mobile */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Fix overflow issues */
    * {
        max-width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    /* Page header adjustments */
    .page-header {
        margin-bottom: 32px;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 70px 12px 32px 12px;
    }

    .card {
        padding: 16px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.875rem;
    }

    .table {
        font-size: 0.875rem;
    }
}

/* Prevent horizontal scroll on all screen sizes */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.main-content, .card, .form-group, .input-group {
    max-width: 100%;
    box-sizing: border-box;
}
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 80px 16px 24px 16px;
    }
    
    .brand-text {
        display: none;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-icon {
        width: 52px;
        height: 52px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.875rem;
    }
}

/* ========================================
   ICONS
   ======================================== */

.icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.w-full { width: 100%; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* ========================================
   LOGIN PAGE
   ======================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-2xl);
    padding: 48px;
    position: relative;
    overflow: hidden;
    animation: slide-up 0.6s var(--ease-out);
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-brand);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 72px;
    height: 72px;
/*    background: var(--gradient-brand);
    border-radius: var(--radius-2xl);*/
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    /*box-shadow: var(--glow-brand);*/
}

.login-logo .icon {
    width: 36px;
    height: 36px;
    color: white;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.login-footer p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.login-footer strong {
    color: var(--gray-700);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-600);
}

.remember-me label {
    font-size: 0.9375rem;
    color: var(--gray-600);
    cursor: pointer;
}
