/**
 * CMinusB - Modern Professional Dashboard Design
 * Fortune 500 Style - Clean, Sophisticated, Professional
 */

/* ============================================================================
   DESIGN TOKENS - Professional Color Palette
   ============================================================================ */
:root {
    /* Primary Brand Colors - Deep Professional Blues */
    --brand-primary: #0066CC;
    --brand-primary-dark: #004C99;
    --brand-primary-light: #3D8FDB;
    --brand-primary-subtle: #E6F2FF;

    /* Neutral Grays - Clean & Professional */
    --gray-900: #1A1D1F;
    --gray-800: #272B30;
    --gray-700: #3F4448;
    --gray-600: #6F767E;
    --gray-500: #9A9FA5;
    --gray-400: #B1B5BD;
    --gray-300: #D5D7DD;
    --gray-200: #E8EAED;
    --gray-100: #F3F4F6;
    --gray-50: #F9FAFB;

    /* Semantic Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Shadows - Subtle Depth */
    --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 0 rgba(0, 0, 0, 0.06);
    --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);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

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

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* ============================================================================
   GLOBAL OVERRIDES
   ============================================================================ */
body {
    font-family: var(--font-sans);
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   MODERN CARDS
   ============================================================================ */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.125rem;
}

.card-header h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================================================
   MODERN BUTTONS - Professional & Refined
   ============================================================================ */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: 1px solid transparent;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

/* Primary - Subtle blue, not overwhelming */
.btn-primary {
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F7FF 100%);
    color: #0052A3;
    border: 1px solid #D0E4F7;
    box-shadow: 0 1px 2px rgba(0, 82, 163, 0.08);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #F0F7FF 0%, #E6F2FF 100%);
    border-color: #B3D7F0;
    box-shadow: 0 2px 4px rgba(0, 82, 163, 0.12);
    color: #003D7A;
}

/* Secondary - Clean gray, professional */
.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    color: var(--gray-900);
}

/* Success - Soft green, not bright */
.btn-success {
    background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
    color: #047857;
    border: 1px solid #D1FAE5;
    box-shadow: 0 1px 2px rgba(4, 120, 87, 0.08);
}

.btn-success:hover {
    background: linear-gradient(180deg, #F0FDF4 0%, #DCFCE7 100%);
    border-color: #A7F3D0;
    box-shadow: 0 2px 4px rgba(4, 120, 87, 0.12);
    color: #065F46;
}

/* Warning - Subtle amber, not orange */
.btn-warning {
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFBEB 100%);
    color: #B45309;
    border: 1px solid #FEF3C7;
    box-shadow: 0 1px 2px rgba(180, 83, 9, 0.08);
}

.btn-warning:hover {
    background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%);
    border-color: #FDE68A;
    box-shadow: 0 2px 4px rgba(180, 83, 9, 0.12);
    color: #92400E;
}

/* Danger - Soft red, not alarming */
.btn-danger {
    background: linear-gradient(180deg, #FFFFFF 0%, #FEF2F2 100%);
    color: #DC2626;
    border: 1px solid #FECACA;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.08);
}

.btn-danger:hover {
    background: linear-gradient(180deg, #FEF2F2 0%, #FEE2E2 100%);
    border-color: #FCA5A5;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.12);
    color: #B91C1C;
}

/* Info - Light blue */
.btn-info {
    background: linear-gradient(180deg, #FFFFFF 0%, #EFF6FF 100%);
    color: #1E40AF;
    border: 1px solid #DBEAFE;
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.08);
}

.btn-info:hover {
    background: linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: #BFDBFE;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.12);
    color: #1E3A8A;
}

/* Outline Buttons - Even Lighter */
.btn-outline-primary {
    background: transparent;
    color: #0066CC;
    border: 1px solid #D0E4F7;
}

.btn-outline-primary:hover {
    background: #F0F7FF;
    border-color: #0066CC;
    color: #0052A3;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-outline-success {
    background: transparent;
    color: #047857;
    border: 1px solid #D1FAE5;
}

.btn-outline-success:hover {
    background: #F0FDF4;
    border-color: #047857;
    color: #065F46;
}

.btn-outline-danger {
    background: transparent;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.btn-outline-danger:hover {
    background: #FEF2F2;
    border-color: #DC2626;
    color: #B91C1C;
}

/* Small Button */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Large Button */
.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* ============================================================================
   MODERN TABS / NAVIGATION
   ============================================================================ */
.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
    gap: 0.5rem;
    padding-left: 1rem;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--gray-600);
    font-weight: 500;
    padding: 1rem 1.5rem;
    position: relative;
    transition: all var(--transition-base);
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--brand-primary);
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--brand-primary);
    background: transparent;
    border-bottom: 3px solid var(--brand-primary);
}

/* Modern Pill-Style Tabs (Alternative) */
.nav-pills-modern {
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    display: inline-flex;
    gap: 0.25rem;
}

.nav-pills-modern .nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
}

.nav-pills-modern .nav-link:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.nav-pills-modern .nav-link.active {
    background: white;
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================================================
   BADGES
   ============================================================================ */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #DBEAFE;
}

.badge-success {
    background: #F0FDF4;
    color: #15803D;
    border: 1px solid #D1FAE5;
}

.badge-warning {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FEF3C7;
}

.badge-danger {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.badge-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #DBEAFE;
}

.badge-secondary {
    background: #F9FAFB;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

/* ============================================================================
   MODERN TABLES
   ============================================================================ */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead {
    background: var(--gray-50);
}

.table-modern thead th {
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}

.table-modern tbody tr {
    transition: background var(--transition-fast);
}

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

.table-modern tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

/* ============================================================================
   MODERN ALERTS
   ============================================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-light);
    border-color: var(--success);
    color: #065F46;
}

.alert-warning {
    background: var(--warning-light);
    border-color: var(--warning);
    color: #92400E;
}

.alert-danger {
    background: var(--danger-light);
    border-color: var(--danger);
    color: #991B1B;
}

.alert-info {
    background: var(--info-light);
    border-color: var(--info);
    color: #1E40AF;
}

/* ============================================================================
   MODERN FORMS
   ============================================================================ */
.form-control {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    background: white;
}

.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-subtle);
    outline: none;
}

/* Dropdown and select specific styling */
select.form-control {
    line-height: 1.5;
    min-height: 2.5rem;
}

select.form-control option {
    padding: 0.5rem;
    line-height: 1.5;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* ============================================================================
   ACCORDION / COLLAPSIBLE SECTIONS
   ============================================================================ */
.accordion-modern {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-header-modern {
    background: white;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-base);
    border-bottom: 1px solid var(--gray-200);
}

.accordion-header-modern:hover {
    background: var(--gray-50);
}

.accordion-header-modern.active {
    background: var(--brand-primary-subtle);
}

/* ============================================================================
   ICON STYLING
   ============================================================================ */
.icon-primary {
    color: var(--brand-primary);
}

.icon-success {
    color: var(--success);
}

.icon-warning {
    color: var(--warning);
}

.icon-danger {
    color: var(--danger);
}

.icon-gray {
    color: var(--gray-500);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

/* Spacing */
.section-spacing {
    margin-bottom: 2rem;
}

/* Text Utilities */
.text-muted {
    color: var(--gray-600) !important;
}

.text-primary {
    color: var(--brand-primary) !important;
}

/* Background Utilities */
.bg-subtle {
    background: var(--gray-50);
}

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Glass Effect (Optional - for hero sections) */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   DASHBOARD SPECIFIC STYLES
   ============================================================================ */
.dashboard-header {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--brand-primary);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

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

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */
@media print {
    .btn, .nav-tabs, .accordion-header-modern {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}