/**
 * Employee Time Tracking Application Styles
 * Mobile-first, responsive design with clean, intuitive interface
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

/* Duration text styling - non-breaking spaces handle line breaking */
.duration-text {
    /* Non-breaking spaces (&nbsp;) prevent breaking between numbers and units */
    /* Natural line breaking still occurs at regular spaces and commas */
    display: inline;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.login-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

.login-form {
    padding: 2rem;
}

.login-footer {
    background: #f8f9fa;
    padding: 1rem 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Unified Button System - Professional Filled Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    line-height: 1.5;
    margin: 0.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white !important;
    text-transform: none;
    letter-spacing: 0.025em;
    /* Default to primary blue, but allow specific button classes to override */
    background-color: #007bff;
    border-color: #007bff;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    color: white !important;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Edit/Update Button - Green */
.btn-edit, .btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.btn-edit:hover:not(:disabled), .btn-success:hover:not(:disabled) {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Delete Button - Red */
.btn-delete, .btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-delete:hover:not(:disabled), .btn-danger:hover:not(:disabled) {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Create Button - Blue */
.btn-create, .btn-primary {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.btn-create:hover:not(:disabled), .btn-primary:hover:not(:disabled) {
    background-color: #0056b3 !important;
    border-color: #004085 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Navigate Button - Blue */
.btn-navigate, .btn-info {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: white !important;
}

.btn-navigate:hover:not(:disabled), .btn-info:hover:not(:disabled) {
    background-color: #138496 !important;
    border-color: #117a8b !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

/* Secondary Button - Gray */
.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* Warning Button - Orange */
.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
}

.btn-warning:hover:not(:disabled) {
    background-color: #e0a800 !important;
    border-color: #d39e00 !important;
    color: #212529 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Success Button - Green (alternative) */
.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.btn-success:hover:not(:disabled) {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Ensure all buttons have filled backgrounds - removed override rule to preserve individual button colors */

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-sm {
    font-size: 0.775rem;
}

.btn-full {
    width: 100%;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: #6c757d;
    font-weight: 500;
}

/* Dashboard Styles */
.dashboard-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 1rem;
    margin-top: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.dashboard-header h2 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Worker Interface */
.worker-interface {
    display: grid;
    gap: 2rem;
}

.clock-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.current-session {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.clock-in-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
}

.clock-in-time {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.duration {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.recent-entries {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Supervisor/Inspector Interface */
.supervisor-interface,
.inspector-interface {
    display: grid;
    gap: 2rem;
}

.workers-section,
.worker-entries-section {
    background: white;
    /* padding: 2rem; */
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Table Styles */
.workers-table,
.entries-table {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

tr:hover {
    background-color: #f8f9fa;
}

.current-entry {
    background-color: #d4edda;
    font-weight: 500;
}

/* Status Indicators */
.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.working {
    background-color: #d4edda;
    color: #155724;
}

.status.offline {
    background-color: #f8d7da;
    color: #721c24;
}

/* Shift Classification Badges */
.shift-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-less {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge-more {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge-double {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-multiple {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* Time Input Styles */
.time-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
}

.time-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Floating alert styles */
.floating-alert {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important;
    max-width: 90%;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
    padding: 1rem;
    margin: 0;
    font-weight: 500;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.floating-alert-error {
    background-color: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.floating-alert-success {
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.floating-alert-info {
    background-color: #d1ecf1;
    border: 2px solid #17a2b8;
    color: #0c5460;
}

.floating-alert .alert-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.floating-alert .alert-close:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

.floating-alert.hide {
    animation: slideUp 0.3s ease-in forwards;
}

/* Mobile responsive floating alerts */
@media (max-width: 768px) {
    .floating-alert {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
        min-width: auto;
    }
}

/* Utility Classes */
.no-entries,
.no-workers {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dashboard-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .clock-section,
    .recent-entries,
    .workers-section,
    .worker-entries-section {
        padding: 1.5rem;
    }
    
    .login-container {
        padding: 0.5rem;
    }
    
    .login-card {
        border-radius: 8px;
    }
    
    .login-header,
    .login-form {
        padding: 1.5rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .time-input {
        font-size: 0.75rem;
        padding: 0.375rem;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.25rem;
    }
    
    .clock-section,
    .recent-entries,
    .workers-section,
    .worker-entries-section {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    table {
        font-size: 0.7rem;
    }
    
    th, td {
        padding: 0.375rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .alert {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .dashboard-header,
    .clock-section,
    .recent-entries,
    .workers-section,
    .worker-entries-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    table {
        border-collapse: collapse;
    }
    
    th, td {
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .btn-success {
        background-color: #006400;
        color: #fff;
    }
    
    .btn-danger {
        background-color: #8b0000;
        color: #fff;
    }
    
    .status.working {
        background-color: #006400;
        color: #fff;
    }
    
    .status.offline {
        background-color: #8b0000;
        color: #fff;
    }
}

/* Month Info Styles */
.month-info {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 4px;
}

/* Workers Section Styles */
.workers-section {
    /* margin: 1.5rem 0; */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.workers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.workers-header:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.workers-header:active {
    transform: translateY(1px);
}

.workers-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}


/* Worker Info Styles */
.worker-info-section {
    /* margin: 1.5rem 0; */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.worker-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.worker-info-header:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.worker-info-header:active {
    transform: translateY(1px);
}

.worker-info-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.toggle-text {
    font-size: 0.7rem;
    color: #666;
    font-weight: 400;
    margin-left: 0.5rem;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #007bff;
    transition: transform 0.3s ease;
    user-select: none;
}

.worker-details {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
}

.worker-details.show {
    padding: 1.5rem;
    max-height: 1000px;
    opacity: 1;
}

.detail-grid {
    display: grid;
    gap: 0.75rem;
}

/* Desktop layout */
@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Mobile layout */
@media (max-width: 767px) {
    .worker-info-section {
        margin: 1rem 0;
    }
    
    .worker-info-header {
        padding: 0.75rem 1rem;
    }
    
    .worker-info-header h3 {
        font-size: 1rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .worker-details.show {
        padding: 1rem;
    }
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.detail-row strong {
    min-width: 180px;
    color: #495057;
    font-weight: 600;
}

.detail-row span {
    color: #333;
    word-break: break-word;
}

/* Responsive worker details */
@media (max-width: 768px) {
    .worker-details {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-row strong {
        min-width: auto;
    }
}

/* Create Entry Form Styles */
.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 1rem;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.create-entry-form {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.create-entry-form.show {
    opacity: 1;
    transform: translateY(0);
}

.create-entry-form h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.create-entry-form .form-group {
    margin-bottom: 1rem;
}

.create-entry-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.create-entry-form input[type="datetime-local"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.create-entry-form .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.create-entry-form .form-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* No Entries Message */
.no-entries {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 1rem;
}

.no-entries p {
    margin: 0.5rem 0;
    color: #666;
}

.no-entries p:first-child {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* Pagination Styles */
.pagination {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.pagination-controls .btn {
    min-width: 40px;
    text-align: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
}

.pagination-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-controls .btn.btn-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-controls .btn.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.pagination-controls .btn.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        padding: 0.75rem;
    }
    
    .pagination-controls {
        gap: 0.25rem;
    }
    
    .pagination-controls .btn {
        min-width: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Bootstrap-like Grid System */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Bootstrap-like Flexbox Utilities */
.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Card Components */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0,0,0,.03);
    border-bottom: 1px solid rgba(0,0,0,.125);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Card Color Variants */
.card.bg-primary { background-color: #007bff !important; color: #fff !important; }
.card.bg-success { background-color: #28a745 !important; color: #fff !important; }
.card.bg-info { background-color: #17a2b8 !important; color: #fff !important; }
.card.bg-warning { background-color: #ffc107 !important; color: #212529 !important; }
.card.bg-danger { background-color: #dc3545 !important; color: #fff !important; }

/* Navigation Tabs */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    margin-bottom: -1px;
    background: none;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    display: block;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    color: #495057;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* Table Components */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(0,0,0,.075);
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-sm th,
.table-sm td {
    padding: 0.3rem;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Form Components */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.text-muted {
    color: #6c757d !important;
}

/* Button Components */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:hover {
    text-decoration: none;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Badge Components */
.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

/* Utility Classes */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.text-center {
    text-align: center !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .col-md-3,
    .col-md-6,
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .table-responsive {
        border: 0;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Work Schedule Management Styles - Reusing existing card and button styles */
.work-schedule-section {
    /* Inherit from existing .card styles */
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.schedule-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    border-radius: 0.25rem 0.25rem 0 0;
}

.schedule-header:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.schedule-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.schedule-content {
    /* Inherit from existing .card-body styles */
    flex: 1 1 auto;
    padding: 1.25rem;
    border-top: 1px solid #e9ecef;
}

.schedule-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    /* Reuse existing card styles with custom accent */
    background: #f8f9fa;
    border-radius: 0.25rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #007bff;
    border: 1px solid rgba(0,0,0,.125);
}

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

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 0.25rem;
}

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

.schedule-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.schedule-actions .btn {
    /* Inherit from existing .btn styles */
    flex: 1;
    min-width: 150px;
}

.recent-violations {
    /* Reuse existing card styles with danger accent */
    background: #fff5f5;
    border-radius: 0.25rem;
    padding: 1rem;
    border-left: 4px solid #dc3545;
    border: 1px solid rgba(0,0,0,.125);
}

.recent-violations h4 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.violations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.violation-item {
    /* Reuse existing card styles */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.25rem;
    border: 1px solid rgba(0,0,0,.125);
}

.violation-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.violation-type {
    font-weight: 600;
    color: #495057;
}

.violation-date {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Worker Schedule Section - Reusing existing card styles */
.worker-schedule-section {
    /* Inherit from existing .card styles */
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.worker-schedule-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.worker-schedule-header:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
}

.worker-schedule-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.worker-schedule-details {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.schedule-info h4,
.worker-violations h4,
.worker-overtime h4 {
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.schedule-table th,
.schedule-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.schedule-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.schedule-table tr:hover {
    background: #f8f9fa;
}

.no-schedule {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.worker-violations,
.worker-overtime {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.overtime-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.overtime-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.overtime-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.overtime-hours {
    font-weight: 600;
    color: #ffc107;
    font-size: 1.1rem;
}

.overtime-date {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

/* Work Schedule Mobile Styles */
@media (max-width: 768px) {
    .schedule-stats {
        grid-template-columns: 1fr;
    }
    
    .schedule-actions {
        flex-direction: column;
    }
    
    .schedule-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .violation-item,
    .overtime-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .schedule-table {
        overflow-x: auto;
    }
    
    .schedule-table table {
        min-width: 600px;
    }
}

/* Button outline variants */
.btn-outline-primary {
    color: #007bff;
    border: 1px solid #007bff;
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-outline-success {
    color: #28a745;
    border: 1px solid #28a745;
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-outline-success:hover {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-outline-danger {
    color: #dc3545;
    border: 1px solid #dc3545;
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Button group */
.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.btn-group > .btn {
    position: relative;
    flex: 1 1 auto;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group > .btn + .btn {
    margin-left: -1px;
}

/* Button group unified styling - All filled buttons */
.btn-group > .btn-primary {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.btn-group > .btn-primary:hover {
    background-color: #0056b3 !important;
    border-color: #004085 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.btn-group > .btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-group > .btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-group > .btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.btn-group > .btn-success:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-group > .btn-warning {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.btn-group > .btn-warning:hover {
    background-color: #0056b3 !important;
    border-color: #004085 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.btn-group > .btn-info {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: white !important;
}

.btn-group > .btn-info:hover {
    background-color: #138496 !important;
    border-color: #117a8b !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

/* Ensure button group buttons don't inherit conflicting styles */
.btn-group .btn-outline-primary,
.btn-group .btn-outline-danger,
.btn-group .btn-outline-success {
    background-color: transparent !important;
    border-style: solid !important;
    border-width: 1px !important;
}

/* Override any potential white background inheritance */
.btn-group .btn-outline-primary:not(:hover),
.btn-group .btn-outline-danger:not(:hover),
.btn-group .btn-outline-success:not(:hover) {
    background-color: transparent !important;
    background: transparent !important;
}

/* Force button group outline buttons to show colors */
.btn-group .btn-outline-primary {
    color: #007bff !important;
    border-color: #007bff !important;
    background-color: transparent !important;
}

.btn-group .btn-outline-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
    background-color: transparent !important;
}

.btn-group .btn-outline-success {
    color: #28a745 !important;
    border-color: #28a745 !important;
    background-color: transparent !important;
}

/* Ensure buttons are visible with proper contrast */
.btn-group .btn-outline-primary:not(:hover) {
    color: #007bff !important;
    border: 1px solid #007bff !important;
    background-color: transparent !important;
}

.btn-group .btn-outline-danger:not(:hover) {
    color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    background-color: transparent !important;
}

.btn-group .btn-outline-success:not(:hover) {
    color: #28a745 !important;
    border: 1px solid #28a745 !important;
    background-color: transparent !important;
}

/* Override general button color for outline buttons */
.btn-outline-primary {
    color: #007bff !important;
}

.btn-outline-danger {
    color: #dc3545 !important;
}

.btn-outline-success {
    color: #28a745 !important;
}

/* Ensure button group buttons have proper colors */
.btn-group .btn-outline-primary {
    color: #007bff !important;
}

.btn-group .btn-outline-danger {
    color: #dc3545 !important;
}

.btn-group .btn-outline-success {
    color: #28a745 !important;
}

/* Small button size */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Button icons */
.btn i {
    margin-right: 0.25rem;
}

.btn-sm i {
    margin-right: 0.125rem;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    display: none;
}

.modal:not(.show) {
    display: none !important;
}

.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
    max-width: 500px;
    margin: 1.75rem auto;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 0.3rem;
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.3rem - 1px);
    border-bottom-left-radius: calc(0.3rem - 1px);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0.5;
}

/* Admin Panel Styles */
.admin-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-panel h3 {
    color: #dc3545;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.admin-panel p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-actions .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
