/**
 * TrackCard - Law Enforcement Scheduling & Timekeeping System
 * Custom Stylesheet
 */

/* CSS Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar Customization */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Dashboard Stats Cards */
.stat-card {
    transition: transform 0.2s ease-in-out;
}

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

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Time Clock Styles */
.time-clock-display {
    font-size: 4rem;
    font-weight: 300;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.time-clock-date {
    font-size: 1.25rem;
    color: #6c757d;
}

.clock-btn {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clock-btn:hover {
    transform: scale(1.05);
}

.clock-btn.clock-in {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
}

.clock-btn.clock-out {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
}

/* Schedule Calendar */
.schedule-calendar {
    background: white;
    border-radius: 0.5rem;
}

.schedule-calendar .day-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.schedule-calendar .day-cell {
    min-height: 120px;
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    vertical-align: top;
}

.schedule-calendar .day-cell.today {
    background-color: rgba(52, 152, 219, 0.1);
}

.schedule-calendar .day-cell.other-month {
    background-color: #f8f9fa;
    color: #adb5bd;
}

.schedule-calendar .day-number {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Shift Badges */
.shift-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
    cursor: pointer;
}

.shift-badge.day-shift {
    background-color: #f39c12;
    color: white;
}

.shift-badge.night-shift {
    background-color: #2c3e50;
    color: white;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Tables */
.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.table th {
    font-weight: 600;
    color: #495057;
    border-bottom-width: 2px;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 4rem;
    color: var(--primary-color);
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

/* Notifications */
.notification-dropdown {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Timesheet Table */
.timesheet-table td,
.timesheet-table th {
    vertical-align: middle;
}

.timesheet-table .hours-cell {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.timesheet-table .overtime {
    color: var(--danger-color);
}

/* Employee List */
.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Quick Actions */
.quick-action-card {
    text-align: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.quick-action-card:hover {
    background-color: rgba(52, 152, 219, 0.1);
    transform: translateY(-3px);
    color: inherit;
}

.quick-action-card i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

/* Leave Calendar Colors */
.leave-vacation {
    background-color: #1abc9c !important;
    color: white;
}

.leave-sick {
    background-color: #f39c12 !important;
    color: white;
}

.leave-personal {
    background-color: #95a5a6 !important;
    color: white;
}

.leave-comp {
    background-color: #3498db !important;
    color: white;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    main {
        padding: 0 !important;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .time-clock-display {
        font-size: 2.5rem;
    }

    .clock-btn {
        width: 150px;
        height: 150px;
        font-size: 1.25rem;
    }

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

    .schedule-calendar .day-cell {
        min-height: 80px;
        padding: 0.25rem;
    }
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Drag and Drop for Schedule */
.droppable-cell {
    transition: background-color 0.2s ease;
}

.droppable-cell.drag-over {
    background-color: rgba(52, 152, 219, 0.2);
}

.draggable-shift {
    cursor: move;
}

/* FLSA Period Indicator */
.flsa-period-indicator {
    background: linear-gradient(90deg, var(--success-color) var(--progress), #e9ecef var(--progress));
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Certification Expiry Colors */
.cert-valid {
    color: var(--success-color);
}

.cert-expiring {
    color: var(--warning-color);
}

.cert-expired {
    color: var(--danger-color);
}

/* Tooltip customization */
.tooltip-inner {
    max-width: 300px;
}

/* Modal adjustments */
.modal-header {
    background-color: var(--primary-color);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Animation for clock updates */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.time-pulse {
    animation: pulse 1s ease-in-out;
}
