:root {
    --primary-bg: #0d1117;
    --secondary-bg: #161b22;
    --card-bg: #21262d;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-red: #da3633;
    --accent-red-hover: #f85149;
    --accent-green: #238636;
    --accent-blue: #1f6feb;
    --accent-yellow: #d29922;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #0a0e13 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Enhanced Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-blue);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Enhanced Navigation */
.navbar {
    background: var(--secondary-bg) !important;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary) !important;
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

/* Enhanced Sidebar */
.list-group-item {
    background: transparent !important;
    border: 1px solid var(--border-color);
    color: var(--text-secondary) !important;
    transition: var(--transition);
    margin-bottom: 0.25rem;
    border-radius: 8px !important;
}

.list-group-item:hover {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    transform: translateX(4px);
}

.list-group-item.bg-danger {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover)) !important;
    color: white !important;
    border-color: var(--accent-red);
}

/* Enhanced Button Visibility - Fixed Low Contrast Issue */
.btn-outline-success {
    border: 2px solid #28a745;
    color: #40d760;
    background: rgba(40, 167, 69, 0.1);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.btn-outline-success:hover {
    background: #28a745;
    border-color: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.4);
}

.btn-outline-warning {
    border: 2px solid #ffc107;
    color: #ffda6a;
    background: rgba(255, 193, 7, 0.1);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.btn-outline-warning:hover {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4);
}

.btn-outline-info {
    border: 2px solid #17a2b8;
    color: #5bc0de;
    background: rgba(23, 162, 184, 0.1);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.2);
}

.btn-outline-info:hover {
    background: #17a2b8;
    border-color: #17a2b8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.4);
}

.btn-outline-light {
    border: 2px solid #f8f9fa;
    color: #ffffff;
    background: rgba(248, 249, 250, 0.1);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(248, 249, 250, 0.2);
}

.btn-outline-light:hover {
    background: #f8f9fa;
    border-color: #f8f9fa;
    color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(248, 249, 250, 0.4);
}

/* Alternative: Solid Colored Buttons for Better Visibility */
.btn-success-solid {
    background: linear-gradient(135deg, #28a745, #34ce57);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success-solid:hover {
    background: linear-gradient(135deg, #34ce57, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-warning-solid {
    background: linear-gradient(135deg, #ffc107, #ffca2c);
    border: none;
    color: #212529;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-warning-solid:hover {
    background: linear-gradient(135deg, #ffca2c, #ffc107);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-info-solid {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info-solid:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-primary-solid {
    background: linear-gradient(135deg, #1f6feb, #2d7ff9);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.3);
}

.btn-primary-solid:hover {
    background: linear-gradient(135deg, #2d7ff9, #1f6feb);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 111, 235, 0.4);
}

.btn-light-solid {
    background: linear-gradient(135deg, #6c757d, #868e96);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-light-solid:hover {
    background: linear-gradient(135deg, #868e96, #6c757d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #adb5bd;
    background: rgba(108, 117, 125, 0.1);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.4);
}

.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #f87171;
    background: rgba(220, 53, 69, 0.1);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
}

.btn-danger-solid {
    background: linear-gradient(135deg, #dc3545, #e4606d);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger-solid:hover {
    background: linear-gradient(135deg, #e4606d, #dc3545);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    color: white;
}

/* Enhanced Forms */
.form-control {
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: var(--transition);
    padding: 0.75rem;
}

.form-control:focus {
    background: var(--card-bg);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Enhanced Alerts */
.alert-danger {
    background: rgba(218, 54, 51, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red-hover);
    border-radius: 8px;
}

/* Enhanced Badges */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.bg-danger {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-hover)) !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--accent-yellow), #e6a429) !important;
    color: var(--primary-bg) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--accent-blue), #2d7ff9) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--accent-green), #2ea043) !important;
}

/* Enhanced Stats Cards */
.card .d-flex .flex-grow-1 h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.text-success {
    color: var(--accent-green) !important;
}

.text-warning {
    color: var(--accent-yellow) !important;
}

.text-danger {
    color: var(--accent-red) !important;
}

.text-info {
    color: var(--accent-blue) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

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

/* Enhanced Dropdown */
.dropdown-menu {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.dropdown-item {
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

/* Enhanced List Groups */
.list-group-item.bg-dark {
    background: var(--secondary-bg) !important;
    border-color: var(--border-color);
}

/* Improved Readability */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}

p, small {
    color: var(--text-secondary);
}

strong {
    color: var(--text-primary);
}

/* Enhanced Container - Smart max-width for ultrawide monitors */
.container-fluid {
    margin: 0 auto;
    max-width: 2200px; /* Prevents over-stretching while allowing more space than default */
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation for Future Use */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s infinite;
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .container-fluid {
        padding: 0.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
}

/* Enhanced Card Content Contrast - Fix Dim Text Issue */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

/* Make card backgrounds slightly darker for better contrast */
.card.bg-secondary {
    background: #1c2128 !important; /* Darker than default */
    border: 1px solid #373e47;
}

/* Enhanced text contrast within cards */
.card .text-muted {
    color: #9ca3af !important; /* Lighter muted text */
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #ffffff !important; /* Pure white for headings */
    font-weight: 600;
}

.card .display-4 {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Enhanced number visibility in stats cards */
.card .display-4.text-success {
    color: #22c55e !important; /* Brighter green */
}

.card .display-4.text-warning {
    color: #fbbf24 !important; /* Brighter yellow */
}

.card .display-4.text-danger {
    color: #ef4444 !important; /* Brighter red */
}

.card .display-4.text-info {
    color: #3b82f6 !important; /* Brighter blue */
}

/* Better contrast for card titles */
.card-title {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Enhanced small text visibility */
.card small {
    color: #d1d5db !important; /* Much lighter than default muted */
}

/* Better visibility for regular card text */
.card .text-light {
    color: #f9fafb !important;
}

/* Enhanced badge contrast */
.badge {
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Progress bar enhancements for better visibility */
.progress {
    background-color: #374151 !important; /* Darker progress background */
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced nav text contrast */
.navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
}

/* Make sure all important numbers pop */
.card .fs-6, .card .display-1, .card .display-2, .card .display-3 {
    font-weight: 700;
    color: #ffffff !important;
}

/* Alternative: Even darker cards for maximum contrast */
.card-dark {
    background: #111827 !important; /* Very dark background */
    border: 1px solid #4b5563;
}

/* Equal height cards in rows - DISABLED to prevent stretching issues */
/* 
.row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.row > [class*="col-"] > .card {
    flex: 1;
}
*/

/* Team Hierarchy Styles */
.hierarchy-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.hierarchy-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.hierarchy-line {
    width: 2px;
    height: 30px;
    background-color: #495057;
}

/* Enhanced hierarchy with connecting lines */
.hierarchy-level:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, #495057, transparent);
}

/* Team Lead's Direct Reports Styling */
.hierarchy-level .team-members-grid {
    position: relative;
    margin-top: 20px;
}

.hierarchy-level .team-members-grid::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background-color: #495057;
}

/* Multiple direct reports connecting lines */
.hierarchy-level .team-members-grid:has(.user-card:nth-child(n+3))::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 20%;
    right: 20%;
    height: 2px;
    background-color: #495057;
}

.user-card {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #495057;
    background-color: #343a40;
    min-width: 220px;
    text-align: center;
}

.user-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.user-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-card.vp {
    border-color: #ffc107;
}

.user-card.manager {
    border-color: #17a2b8;
}

.user-card.team-lead {
    border-color: #28a745;
}

.user-card.tech {
    border-color: #007bff;
}

/* VP Direct Reports (Legacy) Styling */
.user-card.vp-direct {
    border-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
}

.user-card.vp-direct:hover {
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.3);
    border-color: #ffb300;
}

.user-card-icon {
    margin-right: 10px;
}

.team-members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
}

.profile-avatar-large-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 2.5rem;
}

/* Profile photo centering fixes - Apply to all profile photo classes */
.profile-photo,
.schedule-avatar-photo,
.profile-avatar-large {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Additional centering for inline photos */
.profile-avatar-large-circle,
.schedule-avatar-circle,
.avatar-circle {
    margin-left: auto;
    margin-right: auto;
}

/* Navbar Avatar Styles - Global to prevent profile picture explosion */
.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    transition: border-color 0.3s ease;
}

.nav-avatar-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
}

/* Enhanced Disabled Form Controls for Better Visibility */
.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
.form-select[readonly] {
    background-color: rgba(108, 117, 125, 0.15) !important; /* Semi-transparent gray background */
    border-color: rgba(108, 117, 125, 0.4) !important; /* Muted border */
    color: #e9ecef !important; /* Light gray text that's still readable */
    cursor: not-allowed;
    opacity: 0.9; /* Slightly transparent to indicate disabled state */
}

/* Ensure placeholder text is visible in disabled fields */
.form-control:disabled::placeholder,
.form-control[readonly]::placeholder {
    color: #adb5bd !important; /* Lighter placeholder text */
}

/* Add subtle pattern for disabled fields (optional - comment out if not desired) */
.form-control:disabled,
.form-control[readonly] {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.02) 10px,
        rgba(255, 255, 255, 0.02) 20px
    );
}

