/* TriVA Global - Ultra Modern Design System */
/* "Your three person team for all your virtual needs" */

/* Light Mode (Default) */
:root {
    /* TriVA Brand Colors - Modern Interpretation */
    --primary: #3b82f6;        /* Modern Blue */
    --secondary: #10b981;      /* Fresh Green */
    --accent: #f59e0b;         /* Vibrant Orange */
    
    /* Light Mode Palette */
    --background: #fafafa;     /* Ultra Light Gray */
    --surface: #ffffff;        /* Pure White */
    --surface-alt: #f8fafc;    /* Subtle Gray */
    --foreground: #0f172a;     /* Rich Dark */
    --muted: #64748b;          /* Modern Gray */
    --border: #e2e8f0;         /* Soft Border */
    
    /* Glass Morphism */
    --glass: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    
    /* Shadows - Modern Depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Modern Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-surface: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    
    /* Spacing & Typography */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}



/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Vertical Sidebar Layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--foreground);
}

.sidebar-brand img {
    height: 32px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: var(--surface-alt);
    color: var(--primary);
    text-decoration: none;
}

.sidebar-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-right: 4px solid var(--primary);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-name {
    font-weight: 600;
    color: var(--foreground);
    font-size: 14px;
}

.logout-link {
    color: var(--muted);
    text-decoration: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.logout-link:hover {
    background: var(--surface-alt);
    color: var(--primary);
}

.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 32px;
    background: var(--background);
}

.login-content {
    padding: 0;
}

/* Sidebar Brand Text */
.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Ultra Modern Button System */
.btn {
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    backdrop-filter: blur(10px);
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

/* Glass Morphism Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(59, 130, 246, 0.2);
}

.card-header {
    background: var(--gradient-surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    font-weight: 600;
    font-size: 16px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}

/* Ultra Modern Stats Cards */
.stats-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 16px;
}

.stats-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--foreground);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stats-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Modern Form Elements */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
    transition: all 0.2s ease;
    -webkit-text-fill-color: var(--foreground);
}

.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
    background: var(--surface);
    color: var(--foreground);
    -webkit-text-fill-color: var(--foreground);
}

/* Placeholder styling */
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.form-label {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

/* Modern Status Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bg-success {
    background: var(--gradient-secondary) !important;
    color: white;
}

.bg-primary {
    background: var(--gradient-primary) !important;
    color: white;
}

.bg-warning {
    background: var(--gradient-accent) !important;
    color: white;
}

.bg-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: white;
}

/* Modern Table Design */
.table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    background: var(--surface-alt);
    border: none;
    padding: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.table td {
    border: none;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--surface-alt);
}

/* Modern Avatar */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
}

/* Modal Modernization */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    backdrop-filter: blur(20px);
    background: var(--surface);
    color: var(--foreground);
}

.modal-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 24px;
}

.modal-title {
    font-weight: 700;
    font-size: 20px;
}

.modal-body {
    padding: 24px;
}

/* Alert System */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 16px 20px;
    font-weight: 500;
    position: relative;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
    border-left: 4px solid var(--secondary);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    border-left: 4px solid var(--accent);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-left: 4px solid #ef4444;
}



/* Page Headers */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 16px;
    color: var(--muted);
    font-weight: 500;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.surface-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .stats-card {
        margin-bottom: 16px;
        padding: 24px 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 16px;
    }
}

/* Smooth Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

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

/* Focus States */
*:focus {
    outline: none;
}

.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner-border {
    color: var(--primary);
}

/* Dark Mode Preparation */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --surface-alt: #334155;
        --foreground: #f1f5f9;
        --muted: #94a3b8;
        --border: #334155;
    }
}