/* 
 * CSIMS Premium Design System
 * Elegant, Modern, Simple Color Palette
 * Version: 2.0
 */

:root {
    /* Primary Brand Colors - Elegant Blues & Purples */
    --primary-50: #f0f4ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    /* Main Primary */
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    /* Secondary - Sophisticated Slate */
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-400: #94a3b8;
    --secondary-500: #64748b;
    /* Main Secondary */
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;

    /* Accent Colors - Simple & Elegant */
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-teal: #14b8a6;
    --accent-orange: #f97316;

    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Neutral Grays */
    --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;

    /* Background & Surface */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --surface-elevated: #ffffff;

    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-inverse: #ffffff;

    /* Border & Divider */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;

    /* Shadows - Subtle & Modern */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Spacing Scale */
    --space-xs: 0.25rem;
    /* 4px */
    --space-sm: 0.5rem;
    /* 8px */
    --space-md: 1rem;
    /* 16px */
    --space-lg: 1.5rem;
    /* 24px */
    --space-xl: 2rem;
    /* 32px */
    --space-2xl: 3rem;
    /* 48px */

    /* Border Radius */
    --radius-sm: 0.375rem;
    /* 6px */
    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */
    --radius-2xl: 1.5rem;
    /* 24px */
    --radius-full: 9999px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Card Component */
.premium-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

/* Gradient Stat Cards */
.stat-card-gradient {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    color: white;
    transition: transform var(--transition-base);
}

.stat-card-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.stat-card-gradient:hover {
    transform: translateY(-4px);
}

/* Gradient Variations */
.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.gradient-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
}

.gradient-pink {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

/* Button Styles */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-premium-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-premium-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-premium-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--border-medium);
}

.btn-premium-secondary:hover {
    background: var(--gray-200);
}

/* Input Styles */
.input-premium {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    background: var(--bg-primary);
}

.input-premium:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Badge Component */
.badge-premium {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* Typography */
.heading-1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.heading-2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

.heading-3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.text-body {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Progress Bar */
.progress-premium {
    width: 100%;
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

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

/* Table Styles */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-premium thead th {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%) !important;
    /* Vibrant Green Gradient */
    color: white !important;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1rem;
    text-align: left;
    border: none;
}

/* Force children in premium table header to be white */
.table-premium thead th * {
    color: white !important;
}

.table-premium tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.875rem;
}

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

/* Modal Overlay */
.modal-overlay-premium {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal-content-premium {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 32rem;
    margin: 2rem auto;
}

/* Loading Spinner */
.spinner-premium {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Utility Classes */
.surface-elevated {
    background: var(--surface-elevated);
    box-shadow: var(--shadow-lg);
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}