/* Custom styles for Workforce Management Platform - Light Theme */
/* Optimized for light Bootstrap theme with minimal overrides */

/* Global Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content .spinner-border {
    border-width: 0.3em;
}

.loading-content h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-content p {
    font-size: 0.9rem;
    opacity: 0.8;
}

:root {
    --custom-primary: #0d6efd;
    --custom-success: #198754;
    --custom-warning: #ffc107;
    --custom-danger: #dc3545;
    --custom-info: #0dcaf0;
    --custom-dark: #212529;
    --custom-light: #f8f9fa;
    --border-radius-lg: 0.5rem;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Body and layout improvements */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    background-color: #ffffff;
    color: #212529;
    padding-top: 60px; /* Space for fixed navbar */
}

/* PROJECT TITLE BAR - Light Theme */
.project-title-bar {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
}

/* Navbar Toggler (Burger Menu) - Make it visible on blue background */
.project-title-bar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0.5rem;
}

.project-title-bar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.project-title-bar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Responsive Navbar */
@media (max-width: 991.98px) {
    .project-title-bar .navbar-collapse {
        background: rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
        padding: 0.5rem;
        border-radius: 0.375rem;
    }
    
    .project-title-bar .navbar-nav {
        gap: 0.25rem;
    }
    
    .project-title-bar .nav-link,
    .project-title-bar .dropdown-toggle {
        padding: 0.5rem 0.75rem;
        border-radius: 0.25rem;
    }
    
    .project-title-bar .nav-link:hover,
    .project-title-bar .dropdown-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* SIDEBAR - Light Theme */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 1px solid #dee2e6;
    height: calc(100vh - 60px);
    position: fixed;
    left: 0;
    top: 60px;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
    scroll-padding-bottom: 2rem;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background: white;
}

.sidebar-header .brand {
    color: var(--custom-dark);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.sidebar-header .brand:hover {
    color: var(--custom-primary);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--custom-dark);
    font-size: 1.2rem;
    display: none;
}

.sidebar-nav {
    list-style: none;
    padding: 0 0 4rem 0;
    margin: 0;
    min-height: calc(100vh - 120px);
}

.sidebar-nav-item {
    border-bottom: 1px solid #dee2e6;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--custom-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background-color: var(--custom-primary);
    color: white;
    padding-left: 1.25rem;
}

.sidebar-nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.sidebar-nav-link.expanded .dropdown-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu {
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-left: 2px solid #dee2e6;
}

.sidebar-submenu.show {
    max-height: 800px;
}

.sidebar-submenu .sidebar-nav-link,
.sidebar-submenu .sidebar-submenu-link {
    padding: 0.5rem 1rem 0.5rem 2.5rem !important;
    color: #6c757d !important;
    font-size: 0.8rem !important;
    font-weight: 400;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    line-height: 1.2;
    text-decoration: none;
    display: block;
}

.sidebar-submenu .sidebar-nav-link i,
.sidebar-submenu .sidebar-submenu-link i {
    width: 14px !important;
    margin-right: 1.5rem !important;
    text-align: center;
    font-size: 0.7rem !important;
    display: inline-block;
}

.sidebar-submenu .sidebar-nav-link:hover,
.sidebar-submenu .sidebar-submenu-link:hover {
    background-color: var(--custom-primary);
    color: white !important;
    padding-left: 2.75rem;
    text-decoration: none;
}

/* CONTENT WRAPPER */
.content-wrapper {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background-color: #f8f9fa;
    transition: margin-left 0.3s ease;
}

/* When sidebar is hidden, expand content to full width */
.sidebar.d-none + .content-wrapper,
body:has(.sidebar.d-none) .content-wrapper {
    margin-left: 0;
}

/* Full width when sidebar is collapsed */
.content-wrapper.sidebar-collapsed {
    margin-left: 0 !important;
}

/* MAIN CONTENT - Light Theme */
.main-content {
    padding: 1rem;
    min-height: 100vh;
}

.main-content .container-fluid {
    padding: 0;
}

.content-area {
    margin-top: 0;
    padding-top: 0;
}

/* Enhanced card styling - Light Theme */
.card {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background-color: white;
    border: 1px solid #dee2e6;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    color: var(--custom-dark);
}

.card-body {
    background-color: white;
    color: var(--custom-dark);
}

/* Status badges enhancement - Light Theme */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Table enhancements - Light Theme */
.table {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background-color: white;
    color: var(--custom-dark);
}

.table th {
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    color: var(--custom-dark);
}

.table td {
    color: var(--custom-dark);
}

.table-responsive {
    border-radius: var(--border-radius-lg);
}

/* Button enhancements - Light Theme */
.btn {
    border-radius: var(--border-radius-lg);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Form enhancements - Light Theme */
.form-control, .form-select {
    border-radius: var(--border-radius-lg);
    transition: all 0.2s ease;
    background-color: white;
    color: var(--custom-dark);
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    border-color: var(--custom-primary);
    background-color: white;
    color: var(--custom-dark);
}

.form-label {
    color: var(--custom-dark);
    font-weight: 500;
}

/* Alert enhancements - Light Theme */
.alert {
    border-radius: var(--border-radius-lg);
    border: 1px solid transparent;
}

/* Clock display - Light Theme */
.clock-display {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    background: white;
    color: var(--custom-dark);
    border: 2px solid var(--custom-primary);
    border-radius: var(--border-radius-lg);
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
}

/* Dashboard stats - Light Theme */
.dashboard-stat-card {
    background: white;
    border: 1px solid #dee2e6;
    color: var(--custom-dark);
}

.dashboard-stat-card .h3 {
    color: var(--custom-dark);
}

.text-primary {
    color: var(--custom-primary) !important;
}

.text-success {
    color: var(--custom-success) !important;
}

.text-warning {
    color: #b8860b !important; /* Darker yellow for better contrast on light background */
}

.text-danger {
    color: var(--custom-danger) !important;
}

.text-info {
    color: var(--custom-info) !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Footer styling */
.app-footer {
    background-color: white;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1040;
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .content-wrapper {
        margin-left: 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .project-title-bar .container-fluid {
        position: relative;
    }
    
    .project-title-bar .sidebar-toggle {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: white;
        background: none;
        border: none;
        font-size: 1.2rem;
    }
    
    /* Sidebar mobile toggle button */
    .sidebar-mobile-toggle {
        text-decoration: none;
    }
    
    .sidebar-mobile-toggle:hover,
    .sidebar-mobile-toggle:focus {
        opacity: 0.8;
        text-decoration: none;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for status indicators */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.status-dot.clocked-in {
    background-color: var(--custom-success);
    animation: pulse 2s infinite;
}

.status-dot.on-break {
    background-color: var(--custom-warning);
    animation: pulse 2s infinite;
}

.status-dot.clocked-out {
    background-color: var(--custom-danger);
}

/* Print styles */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .project-title-bar {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .btn {
        display: none;
    }
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--custom-primary);
    outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers - Light Theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--custom-primary);
}/* Force browser cache refresh */
