/**
 * HAMMERTIME CREATORS LIMITED
 * Enterprise Design System v5.0
 * Premium, Simple, Standardized
 * 
 * A clean, professional design system focused on:
 * - Minimalist design with purposeful spacing
 * - Consistent color palette
 * - Enterprise-grade typography
 * - Smooth, subtle interactions
 */

/* ===================================
   CORE DESIGN TOKENS
   =================================== */
:root {
    /* ----------------------
       BRAND COLORS (JCB Construction Theme)
       ---------------------- */
    --brand-primary: #FFCB05;
    --brand-primary-hover: #E6B800;
    --brand-primary-light: #FFF9E5;
    --brand-secondary: #1A1A1A;
    --brand-secondary-light: #2D2D2D;
    
    /* ----------------------
       NEUTRAL SCALE (Zinc palette)
       ---------------------- */
    --gray-50: #FAFAFA;
    --gray-100: #F4F4F5;
    --gray-200: #E4E4E7;
    --gray-300: #D4D4D8;
    --gray-400: #A1A1AA;
    --gray-500: #71717A;
    --gray-600: #52525B;
    --gray-700: #3F3F46;
    --gray-800: #27272A;
    --gray-900: #18181B;
    
    /* ----------------------
       SEMANTIC COLORS
       ---------------------- */
    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --error: #EF4444;
    --error-light: #FEF2F2;
    --info: #3B82F6;
    --info-light: #EFF6FF;
    
    /* ----------------------
       SURFACE & BACKGROUND
       ---------------------- */
    --surface-primary: #FFFFFF;
    --surface-secondary: var(--gray-50);
    --surface-tertiary: var(--gray-100);
    --surface-inverse: var(--gray-900);
    --overlay: rgba(0, 0, 0, 0.5);
    
    /* ----------------------
       TEXT COLORS
       ---------------------- */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-400);
    --text-inverse: #FFFFFF;
    --text-link: var(--brand-primary);
    
    /* ----------------------
       BORDER COLORS
       ---------------------- */
    --border-light: var(--gray-100);
    --border-default: var(--gray-200);
    --border-strong: var(--gray-300);
    
    /* ----------------------
       TYPOGRAPHY
       ---------------------- */
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Consolas', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
    
    /* Font Weights */
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* ----------------------
       SPACING (4px base)
       ---------------------- */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* ----------------------
       BORDER RADIUS
       ---------------------- */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* ----------------------
       SHADOWS (Subtle, enterprise-grade)
       ---------------------- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16);
    
    /* ----------------------
       TRANSITIONS
       ---------------------- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    
    /* ----------------------
       Z-INDEX SCALE
       ---------------------- */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
    
    /* ----------------------
       CONTAINER WIDTHS
       ---------------------- */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    
    /* ----------------------
       LEGACY ALIASES (backward compatibility)
       ---------------------- */
    /* DEPRECATED: These aliases will be removed in v6.0. Please migrate to --brand-* and --gray-* variables. */
    
    /* JCB Construction Theme Colors (Legacy Support) */
    --jcb-yellow: #FFCB05;
    --jcb-yellow-dark: #E6B800;
    --jcb-yellow-light: #FFD633;
    --jcb-yellow-pale: #FFF9E5;

    /* Colors */
    --color-primary: var(--brand-primary);
    --color-primary-dark: var(--brand-primary-hover);
    --color-primary-light: #FFD633;
    --color-primary-pale: var(--brand-primary-light);
    
    --color-secondary: var(--brand-secondary);
    --color-secondary-light: var(--brand-secondary-light);
    --color-secondary-dark: #0D0D0D;
    
    --color-accent: #FF6B35;
    --color-accent-dark: #E65520;
    --color-accent-light: #FF8C61;

    /* Grays */
    --color-gray-50: var(--gray-50);
    --color-gray-100: var(--gray-100);
    --color-gray-200: var(--gray-200);
    --color-gray-300: var(--gray-300);
    --color-gray-400: var(--gray-400);
    --color-gray-500: var(--gray-500);
    --color-gray-600: var(--gray-600);
    --color-gray-700: var(--gray-700);
    --color-gray-800: var(--gray-800);
    --color-gray-900: var(--gray-900);

    /* Status */
    --color-available: var(--success);
    --color-booked: var(--warning);
    --color-maintenance: var(--error);
    --color-in-transit: var(--info);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FFCB05 0%, #E6B800 100%);
    --gradient-dark: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    --gradient-hero: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(45, 45, 45, 0.90) 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);

    /* Shadows */
    --shadow-yellow: 0 10px 30px -5px rgba(255, 203, 5, 0.3);
    --shadow-orange: 0 10px 30px -5px rgba(255, 107, 53, 0.3);

    /* Backgrounds */
    --bg-primary: var(--surface-primary);
    --bg-secondary: var(--surface-secondary);
    --bg-dark: var(--brand-secondary);
    --bg-overlay: var(--overlay);

    /* Fonts */
    --font-primary: var(--font-body);
    --font-heading: var(--font-display);

    /* Legacy Mappings */
    --primary-color: var(--brand-primary);
    --primary-500: var(--brand-primary);
    --primary-600: var(--brand-primary-hover);
    --primary-100: var(--brand-primary-light);
    --primary-400: #FBBF24;
    --primary-700: #B45309;
    --primary-800: #92400E;
    --primary-900: #78350F;
    --secondary-color: var(--brand-secondary);
    --color-primary: var(--brand-primary);
    --color-primary-hover: var(--brand-primary-hover);
    --white: #FFFFFF;
    --black: #000000;
    --neutral-50: var(--gray-50);
    --neutral-100: var(--gray-100);
    --neutral-200: var(--gray-200);
    --neutral-300: var(--gray-300);
    --neutral-400: var(--gray-400);
    --neutral-500: var(--gray-500);
    --neutral-600: var(--gray-600);
    --neutral-700: var(--gray-700);
    --neutral-800: var(--gray-800);
    --neutral-900: var(--gray-900);
    --color-success: var(--success);
    --color-success-light: var(--success-light);
    --color-warning: var(--warning);
    --color-warning-light: var(--warning-light);
    --color-error: var(--error);
    --color-error-light: var(--error-light);
    --color-info: var(--info);
    --color-info-light: var(--info-light);
    --font-family-display: var(--font-display);
    --font-family-body: var(--font-body);
    --surface-base: var(--surface-primary);
    --surface-subtle: var(--surface-secondary);
    --transition-base: var(--duration-normal) var(--ease-out);
    --transition-fast: var(--duration-fast) var(--ease-out);
    --font-size-xs: var(--text-xs);
    --font-size-sm: var(--text-sm);
    --font-size-base: var(--text-base);
    --font-size-lg: var(--text-lg);
    --font-size-xl: var(--text-xl);
    --font-size-2xl: var(--text-2xl);
    --font-size-3xl: var(--text-3xl);
    --font-size-4xl: var(--text-4xl);
    --font-size-5xl: var(--text-5xl);
    --font-weight-normal: var(--weight-normal);
    --font-weight-medium: var(--weight-medium);
    --font-weight-semibold: var(--weight-semibold);
    --font-weight-bold: var(--weight-bold);
    --font-weight-extrabold: var(--weight-extrabold);
    --line-height-tight: var(--leading-tight);
    --line-height-normal: var(--leading-normal);
    --line-height-relaxed: var(--leading-relaxed);
}

/* ===================================
   DARK MODE THEME
   =================================== */
[data-theme="dark"] {
    /* Surface Colors */
    --surface-primary: #111827;
    --surface-secondary: #1F2937;
    --surface-tertiary: #374151;
    --surface-inverse: #F9FAFB;
    
    /* Text Colors */
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-tertiary: #9CA3AF;
    --text-inverse: #111827;
    
    /* Border Colors */
    --border-light: #374151;
    --border-default: #4B5563;
    --border-strong: #6B7280;
    
    /* Shadows (lighter for dark mode visibility) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5);
    
    /* Legacy Mappings Update */
    --bg-primary: var(--surface-primary);
    --bg-secondary: var(--surface-secondary);
    --bg-dark: #000000;
    --white: #111827; /* Invert white for legacy usage */
    --black: #FFFFFF;
}

/* ===================================
   GLOBAL RESET & BASE
   =================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--surface-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, var(--text-5xl));
    font-weight: var(--weight-extrabold);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: clamp(1.75rem, 4vw, var(--text-4xl));
    margin-bottom: var(--space-5);
}

h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

h5 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

h6 {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--brand-primary-hover);
}

strong, b {
    font-weight: var(--weight-semibold);
}

small {
    font-size: var(--text-sm);
}

/* ===================================
   LAYOUT
   =================================== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-4);
    }
}

.section {
    padding: var(--space-16) 0;
}

.section-sm {
    padding: var(--space-12) 0;
}

.section-lg {
    padding: var(--space-24) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-12);
}

.section-title {
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ===================================
   GRID SYSTEM
   =================================== */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { 
        grid-template-columns: 1fr; 
    }
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    line-height: 1.25;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    user-select: none;
    position: relative;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary Button */
.btn-primary {
    background: var(--brand-primary);
    color: var(--brand-secondary);
    border-color: var(--brand-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background: var(--brand-secondary);
    color: var(--text-inverse);
    border-color: var(--brand-secondary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--brand-secondary-light);
    border-color: var(--brand-secondary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--brand-primary);
    color: var(--brand-secondary);
}

/* Outline White (for dark backgrounds) */
.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-white:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* Danger Button */
.btn-danger {
    background: var(--error);
    color: var(--text-inverse);
    border-color: var(--error);
}

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
    border-color: #DC2626;
}

/* Success Button */
.btn-success {
    background: var(--success);
    color: var(--text-inverse);
    border-color: var(--success);
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-xl);
}

/* Button Variants */
.btn-block { width: 100%; }
.btn-pill { border-radius: var(--radius-full); }

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon-lg {
    width: 3rem;
    height: 3rem;
}

/* ===================================
   FORMS
   =================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
}

.form-label-required::after {
    content: '*';
    color: var(--error);
    margin-left: var(--space-1);
}

.form-control,
.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.form-control:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-control:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-control.is-invalid {
    border-color: var(--error);
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.form-error {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--error);
}

/* Input Group */
.input-group {
    display: flex;
}

.input-group .form-control {
    flex: 1;
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    color: var(--text-secondary);
    background: var(--gray-100);
    border: 1px solid var(--border-default);
}

/* Search Input */
.search-input {
    background-color: var(--gray-50);
    border: 1px solid var(--border-default);
    padding: var(--space-3) var(--space-12) var(--space-3) var(--space-4);
    border-radius: var(--radius-full);
}

.search-input:focus {
    background-color: var(--surface-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* ===================================
   CARDS
   =================================== */
.card {
    background: var(--surface-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--duration-normal) var(--ease-out), 
                transform var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
    background: var(--surface-secondary);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-light);
    background: var(--surface-secondary);
}

.card-title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
}

.card-subtitle {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Interactive Cards */
.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

/* Elevated Card */
.card-elevated {
    box-shadow: var(--shadow-md);
    border: none;
}

.card-elevated:hover {
    box-shadow: var(--shadow-lg);
}

/* Flat Card */
.card-flat {
    box-shadow: none;
}

/* ===================================
   BADGES
   =================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    line-height: 1.5;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: var(--brand-primary-light);
    color: #92400E;
}

.badge-success {
    background: var(--success-light);
    color: #065F46;
}

.badge-error {
    background: var(--error-light);
    color: #991B1B;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400E;
}

.badge-info {
    background: var(--info-light);
    color: #1E40AF;
}

.badge-neutral {
    background: var(--gray-100);
    color: var(--text-secondary);
}

/* ===================================
   ALERTS
   =================================== */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert-success {
    background: var(--success-light);
    color: #065F46;
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400E;
    border-left: 4px solid var(--warning);
}

.alert-error {
    background: var(--error-light);
    color: #991B1B;
    border-left: 4px solid var(--error);
}

.alert-info {
    background: var(--info-light);
    color: #1E40AF;
    border-left: 4px solid var(--info);
}

/* ===================================
   MODALS
   =================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: var(--z-modal-backdrop);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-backdrop.active {
    display: flex;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    background: var(--surface-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-modal);
}

.modal-lg {
    max-width: 700px;
}

.modal-xl {
    max-width: 900px;
}

.modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
}

.modal-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--duration-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* ===================================
   TABLES
   =================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    background: var(--surface-secondary);
}

.table tbody tr:hover {
    background: var(--surface-secondary);
}

.table-responsive {
    overflow-x: auto;
}

/* ===================================
   DROPDOWNS
   =================================== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--surface-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--duration-normal) var(--ease-out);
    z-index: var(--z-dropdown);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--duration-fast);
}

.dropdown-item:hover {
    background: var(--surface-secondary);
    color: var(--brand-primary);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-tertiary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-2) 0;
}

/* ===================================
   LOADING STATES
   =================================== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--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: 1em;
    margin-bottom: var(--space-2);
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: var(--space-3);
}

.skeleton-image {
    height: 200px;
}

.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--gray-200);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    gap: var(--space-4);
}

/* ===================================
   EMPTY STATES
   =================================== */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-4);
}

.empty-state-icon {
    font-size: var(--text-5xl);
    color: var(--gray-300);
    margin-bottom: var(--space-4);
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state-message {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* ===================================
   AVATARS
   =================================== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm { width: 32px; height: 32px; font-size: var(--text-sm); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--text-lg); }
.avatar-xl { width: 80px; height: 80px; font-size: var(--text-2xl); }

/* ===================================
   TOOLTIPS
   =================================== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-3);
    background: var(--gray-900);
    color: var(--text-inverse);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-fast);
    z-index: var(--z-tooltip);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   PROGRESS BARS
   =================================== */
.progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--brand-primary);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
}

.progress-success .progress-bar { background: var(--success); }
.progress-error .progress-bar { background: var(--error); }
.progress-info .progress-bar { background: var(--info); }

/* ===================================
   UTILITY CLASSES
   =================================== */
/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-around { justify-content: space-around; }

/* Gap */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* Margin */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }
.p-12 { padding: var(--space-12); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

/* Text */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-normal { font-weight: var(--weight-normal); }
.font-medium { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold { font-weight: var(--weight-bold); }
.font-extrabold { font-weight: var(--weight-extrabold); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-brand { color: var(--brand-primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-white { color: var(--white); }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Background */
.bg-white { background-color: var(--surface-primary); }
.bg-subtle { background-color: var(--surface-secondary); }
.bg-tertiary { background-color: var(--surface-tertiary); }
.bg-dark { background-color: var(--surface-inverse); color: var(--text-inverse); }
.bg-brand { background-color: var(--brand-primary); }
.bg-brand-light { background-color: var(--brand-primary-light); }

/* Border */
.border { border: 1px solid var(--border-default); }
.border-0 { border: none; }
.border-t { border-top: 1px solid var(--border-default); }
.border-b { border-bottom: 1px solid var(--border-default); }
.border-l { border-left: 1px solid var(--border-default); }
.border-r { border-right: 1px solid var(--border-default); }

/* Border Radius */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow */
.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); }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.h-auto { height: auto; }
.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: var(--container-sm); }
.max-w-md { max-width: var(--container-md); }
.max-w-lg { max-width: var(--container-lg); }
.max-w-xl { max-width: var(--container-xl); }
.max-w-full { max-width: 100%; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Z-Index */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.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; }
.cursor-default { cursor: default; }

/* Transition */
.transition { transition: all var(--duration-normal) var(--ease-out); }
.transition-fast { transition: all var(--duration-fast) var(--ease-out); }
.transition-slow { transition: all var(--duration-slow) var(--ease-out); }
.transition-none { transition: none; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Pointer Events */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* User Select */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* ===================================
   RESPONSIVE UTILITIES
   =================================== */
@media (max-width: 639px) {
    .sm\:hidden { display: none !important; }
}

@media (max-width: 767px) {
    .mobile-hidden { display: none !important; }
    .md\:hidden { display: none !important; }
}

@media (min-width: 768px) {
    .mobile-only { display: none !important; }
    .md\:block { display: block; }
    .md\:flex { display: flex; }
    .md\:grid { display: grid; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:flex { display: flex; }
    .lg\:grid { display: grid; }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */
/* Focus States */
:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--brand-primary-light), 0 0 0 1px var(--brand-primary);
    outline: none;
}

.form-control:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-light);
    outline: none;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    padding: var(--space-3) var(--space-6);
    background: var(--brand-primary);
    color: var(--brand-secondary);
    border-radius: var(--radius-md);
    font-weight: var(--weight-bold);
    z-index: 9999;
    transition: top var(--duration-fast);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
}

.skip-link:focus {
    top: var(--space-4);
    outline: 2px solid var(--brand-secondary);
    outline-offset: 2px;
}

/* 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;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   LOADING STATES (Skeletons)
   =================================== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--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: 1em;
    margin-bottom: var(--space-2);
    width: 100%;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: var(--space-4);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-button {
    height: 2.5rem;
    width: 100px;
    border-radius: var(--radius-md);
}

.skeleton-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    background: var(--surface-primary);
}

.skeleton-image {
    height: 200px;
    width: 100%;
    margin-bottom: var(--space-4);
    border-radius: var(--radius-md);
}

/* ===================================
   ENTERPRISE COMPONENTS (Migrated)
   =================================== */

/* Glass Card - Premium Effect */
.card-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

/* Equipment Card */
.equipment-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--duration-normal) var(--ease-out);
}

.equipment-card:hover {
    transform: translateY(-4px);
}

.equipment-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    transition: transform var(--duration-normal) var(--ease-out);
}

.equipment-card:hover .equipment-card-image {
    transform: scale(1.05);
}

.equipment-card-badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    padding: var(--space-2) var(--space-3);
    background: var(--brand-primary);
    color: var(--brand-secondary);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.equipment-card-specs {
    display: flex;
    gap: var(--space-4);
    margin: var(--space-4) 0;
    padding: var(--space-3) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.equipment-card-spec {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.equipment-card-spec i {
    color: var(--brand-primary);
}

.equipment-card-price {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--brand-primary);
}

.equipment-card-price-unit {
    font-size: var(--text-sm);
    font-weight: var(--weight-normal);
    color: var(--text-secondary);
}

/* Status Badges */
.badge-available {
    background: var(--success-light);
    color: var(--success);
}

.badge-booked {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-maintenance {
    background: var(--error-light);
    color: var(--error);
}

.badge-in-transit {
    background: var(--info-light);
    color: var(--info);
}

/* Wizard Steps (Project Estimator) */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gray-200);
    z-index: 0;
}

.wizard-progress-line {
    position: absolute;
    top: 24px;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1;
    transition: width 0.5s ease;
}

.wizard-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.wizard-step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface-primary);
    border: 3px solid var(--gray-300);
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-circle {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: var(--brand-secondary);
    box-shadow: 0 0 0 4px var(--brand-primary-light);
}

.wizard-step.completed .wizard-step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.wizard-step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===================================
   GPU OPTIMIZATION - WILL-CHANGE
   =================================== */

/* Performance optimization for hover animations */
.card,
.equipment-card,
.btn,
.hero-btn,
.filter-chip,
.nav-link,
.dropdown-item,
.wishlist-btn,
.compare-btn,
[class*="hover-lift"],
[class*="hover-scale"] {
    will-change: transform;
}

/* Optimize shadow transitions separately */
.card:hover,
.equipment-card:hover,
.btn:hover {
    will-change: transform, box-shadow;
}

/* Reset will-change after animation for memory optimization */
.card:not(:hover),
.equipment-card:not(:hover),
.btn:not(:hover) {
    will-change: auto;
}

/* ===================================
   CUSTOM FOCUS RINGS - ACCESSIBILITY
   =================================== */

/* Remove default outline and add custom focus ring */
*:focus {
    outline: none;
}

/* Visible focus ring for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Custom focus styles for interactive elements */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(255, 203, 5, 0.25);
}

/* Form input focus ring */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.25);
}

/* Dark mode focus adjustments */
[data-theme="dark"] *:focus-visible {
    outline-color: var(--brand-primary);
    box-shadow: 0 0 0 6px rgba(255, 203, 5, 0.15);
}

/* Skip link visibility on focus */
.skip-link:focus {
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    z-index: 9999;
    padding: var(--space-3) var(--space-6);
    background: var(--brand-primary);
    color: var(--brand-secondary);
    font-weight: var(--weight-bold);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

/* ===================================
   ENHANCED ERROR STATES
   =================================== */

/* Error input styling */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea,
input.error,
select.error,
textarea.error {
    border-color: var(--error) !important;
    background-color: var(--error-light);
    padding-right: 2.5rem; /* Space for error icon */
}

/* Error icon inside input */
.form-group.has-error::after,
.input-wrapper.has-error::after {
    content: '\f06a'; /* Font Awesome exclamation-circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--error);
    font-size: 1rem;
    pointer-events: none;
}

/* Error message styling */
.error-message,
.field-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    font-size: var(--text-sm);
    color: var(--error);
    animation: slideDown 0.2s ease;
}

.error-message i,
.field-error i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Success input styling */
.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea,
input.success,
select.success,
textarea.success {
    border-color: var(--success) !important;
    background-color: var(--success-light);
    padding-right: 2.5rem;
}

/* Success icon inside input */
.form-group.has-success::after,
.input-wrapper.has-success::after {
    content: '\f058'; /* Font Awesome check-circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-size: 1rem;
    pointer-events: none;
}

/* Make form-group relative for icon positioning */
.form-group {
    position: relative;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.animate-shake {
    animation: shake 0.5s ease;
}

/* Slide down animation for error messages */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   SKELETON LOADING SCREENS
   =================================== */

/* Base skeleton shimmer */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 0%,
        var(--gray-100) 50%,
        var(--gray-200) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite ease-in-out;
    border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Dark mode skeleton */
[data-theme="dark"] .skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-700) 0%,
        var(--gray-600) 50%,
        var(--gray-700) 100%
    );
    background-size: 200% 100%;
}

/* Skeleton variants */
.skeleton-text {
    height: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-heading {
    height: 1.5rem;
    width: 40%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

.skeleton-button {
    height: 44px;
    width: 120px;
}

/* Equipment card skeleton */
.skeleton-card {
    background: var(--surface-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.skeleton-card .skeleton-image {
    height: 180px;
}

.skeleton-card-body {
    padding: var(--space-4);
}

.skeleton-card-body .skeleton-text:last-child {
    margin-bottom: 0;
}

/* Full page skeleton container */
.page-skeleton {
    padding: var(--space-8) 0;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* Hero skeleton */
.skeleton-hero {
    height: 400px;
    background: var(--gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.skeleton-hero .skeleton-heading {
    width: 300px;
    height: 2.5rem;
}

.skeleton-hero .skeleton-text {
    width: 500px;
    max-width: 90%;
}

/* Pulse animation for loading states */
.skeleton-pulse {
    animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .no-print { display: none !important; }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}
