/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Header styles */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h3 {
    color: #1a1a4f;
    margin: 0;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
}

.nav-menu li {
    margin-left: 1rem;
}

.nav-menu a {
    color: #1a1a4f;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 2px solid transparent;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #fff;
    background-color: #1a1a4f;
    border: 2px solid #1a1a4f;
    transform: translateY(-1px);
}

.logout-btn {
    background-color: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
}

.logout-btn:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
}

/* Hero section styles */
.hero {
    background: linear-gradient(135deg, #1a1a4f, #2a2a8a);
    color: #fff;
    text-align: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 50px); /* Subtract header height */
    /* Ensure the container is at least the height of the viewport minus header */
    padding: 2rem;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 100%;
    animation: fadeInUp 1s ease forwards;
}

.login-header h1 {
    color: #1a1a4f;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.login-header p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1a1a4f;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #1a1a4f;
    box-shadow: 0 0 0 3px rgba(26, 26, 79, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.btn {
    background-color: #1a1a4f;
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #2a2a8a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 79, 0.3);
}

.btn-primary {
    background-color: #1a1a4f;
}

.btn-secondary {
    background-color: #6c757d;
    margin-bottom: 1rem;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.login-divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: #666;
    font-weight: bold;
}

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

.alternative-login small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-style: italic;
}

.login-footer {
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem; /* Add some spacing above the footer */
}

.login-footer a {
    color: #1a1a4f;
    text-decoration: none;
    font-weight: bold;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    color: #1a1a4f;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #666;
    font-size: 1.2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.time-window-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    background-color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-size: 0.875rem;
    color: #4a5568;
}

.days-input {
    width: 4rem;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.4rem 0.8rem;
    text-align: center;
    font-weight: 600;
    color: #1a1a4f;
}

.days-input::-webkit-outer-spin-button,
.days-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.days-submit-btn {
    background-color: #1a1a4f;
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.days-submit-btn:hover {
    background-color: #2a2a8a;
}

.progress-circle-bar {
    transition: stroke-dasharray 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
}

.metric-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-weight: 600;
    color: #1a202c;
}

.metric-value.high { color: #38a169; } /* green-600 */
.metric-value.medium { color: #d69e2e; } /* yellow-600 */
.metric-value.low { color: #e53e3e; } /* red-600 */

.progress-bar-container {
    position: relative;
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.progress-bar.high { background: linear-gradient(to right, #68d391, #48bb78); }
.progress-bar.medium { background: linear-gradient(to right, #faf089, #f6e05e); }
.progress-bar.low { background: linear-gradient(to right, #fc8181, #f56565); }

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 60rem; /* 960px */
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-backdrop.visible .modal-content {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.details-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}
.absent-operators-container {
    margin-top: 1rem;
}
/* Tooltip Styles */
.perf-tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none; /* So it doesn't interfere with mouse events */
    z-index: 1010;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.perf-tooltip.visible {
    opacity: 1;
    transform: scale(1);
}

.efficiency-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.efficiency-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}


.card-header h2 {
    color: #1a1a4f;
    font-size: 1.5rem;
    margin: 0;
}

.efficiency-metrics {
    margin-bottom: 2rem;
}

.metric {
    margin-bottom: 2rem;
}

.metric:last-child {
    margin-bottom: 0;
}

.metric h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    position: relative;
}

.progress-bar.large {
    height: 30px;
    border-radius: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: inherit;
    transition: width 2s ease-in-out;
    width: 0%;
}

.progress-bar[data-percentage]:not([data-percentage="0"]) .progress-fill {
    animation: fillProgress 2s ease-in-out forwards;
}

.percentage {
    font-weight: bold;
    font-size: 1.1rem;
    color: #1a1a4f;
    min-width: 60px;
    text-align: right;
}

.card-footer {
    text-align: center;
}

.btn-details {
    background-color: #17a2b8;
    padding: 0.75rem 1.5rem;
    width: auto;
    text-transform: none;
    letter-spacing: normal;
}

.btn-details:hover {
    background-color: #138496;
}

.dashboard-footer {
    text-align: center;
}

.info-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #1a1a4f;
}

.info-card i {
    color: #1a1a4f;
    margin-right: 0.5rem;
}

.btn-refresh {
    background-color: #28a745;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
    margin-top: 1rem;
    text-transform: none;
    letter-spacing: normal;
}

.btn-refresh:hover {
    background-color: #218838;
}

/* Details Page Styles */
.details-header {
    margin-bottom: 3rem;
}

.back-btn {
    display: inline-block;
    color: #1a1a4f;
    text-decoration: none;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.back-btn:hover {
    background-color: #e9ecef;
    transform: translateX(-5px);
}

.details-header h1 {
    color: #1a1a4f;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.details-header p {
    color: #666;
    font-size: 1.2rem;
}

.details-grid {
    display: grid;
    gap: 3rem;
}

.overview-section h2,
.metrics-section h2,
.recommendations-section h2 {
    color: #1a1a4f;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #1a1a4f;
    padding-bottom: 0.5rem;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.overview-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.overview-card.operation {
    border-left: 4px solid #28a745;
}

.overview-card.utilization {
    border-left: 4px solid #17a2b8;
}

.card-icon {
    font-size: 3rem;
    color: #1a1a4f;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.large-percentage {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1a1a4f;
    margin-bottom: 1rem;
}

.metrics-table {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.metric-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

.metric-row:last-child {
    border-bottom: none;
}


.metric-status {
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

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

.metric-status.good {
    background-color: #d1ecf1;
    color: #0c5460;
}

.metric-status.average {
    background-color: #fff3cd;
    color: #856404;
}

.metric-status.needs-improvement {
    background-color: #f8d7da;
    color: #721c24;
}

.metric-status.above-target {
    background-color: #d4edda;
    color: #155724;
}

.metric-status.below-target {
    background-color: #f8d7da;
    color: #721c24;
}

.recommendations-list {
    display: grid;
    gap: 1.5rem;
}

.recommendation {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid #1a1a4f;
}

.recommendation.priority-high {
    border-left-color: #dc3545;
}

.recommendation.priority-medium {
    border-left-color: #ffc107;
}

.recommendation.priority-low {
    border-left-color: #28a745;
}

.recommendation i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.recommendation.priority-high i {
    color: #dc3545;
}

.recommendation.priority-medium i {
    color: #ffc107;
}

.recommendation.priority-low i {
    color: #28a745;
}

.recommendation h4 {
    color: #1a1a4f;
    margin-bottom: 0.5rem;
}

.recommendation p {
    color: #666;
    margin: 0;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

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

.flash-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* Footer */
footer {
    background-color: #1a1a4f;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fillProgress {
    from {
        width: 0%;
    }
    to {
        width: attr(data-percentage percentage);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal Styles */
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #718096;
}
.modal-close-btn:hover {
    color: #1a202c;
}
.detail-item-card {
    background-color: #f7fafc; /* gray-100 */
    border: 1px solid #e2e8f0; /* gray-200 */
    border-radius: 0.5rem;
    padding: 1.5rem;
}
.detail-item-header {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748; /* gray-800 */
}
.clickable-tag {
    display: inline-block;
    background-color: #e2e8f0; /* gray-200 */
    color: #4a5568; /* gray-700 */
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

/* Cumulative Card on Entity Dashboard */
.cumulative-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.07), 0 6px 6px rgba(0,0,0,0.07);
    width: 100%;
    max-width: 50rem; /* 800px */
    border-top: 4px solid #1a1a4f;
}

.cumulative-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748; /* gray-800 */
    margin-bottom: 1.5rem;
}

.cumulative-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.cumulative-metric {
    padding: 1rem;
    border-right: 1px solid #e2e8f0; /* gray-200 */
}

.cumulative-metric:last-child {
    border-right: none;
}

.cumulative-metric .metric-value {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
    color: #1a1a4f;
}

.cumulative-metric .metric-label {
    font-size: 0.875rem; /* text-sm */
    color: #718096; /* gray-500 */
    margin-top: 0.25rem;
    display: block; /* to override flex from other .metric-label */
    justify-content: center;
}

/* Custom Card Styles for different states */

/* Maintenance Card (Yellow/Orange) */
.perf-card.is-maintenance-card {
    background-color: #fffaf0; /* Tailwind orange-50 */
    border: 1px solid #fbd38d; /* Tailwind orange-300 */
}
.perf-card.is-maintenance-card .text-gray-800,
.perf-card.is-maintenance-card .text-gray-700,
.perf-card.is-maintenance-card .font-semibold.text-gray-800 {
    color: #9c4221; /* Tailwind orange-800 */
}
.perf-card.is-maintenance-card .text-gray-500,
.perf-card.is-maintenance-card .text-gray-600,
.perf-card.is-maintenance-card .fa-solid {
    color: #dd6b20; /* Tailwind orange-600 */
}
.perf-card.is-maintenance-card .bg-gray-50 {
    background-color: #fffaf0; /* Tailwind orange-50 */
    border-top-color: #fbd38d; /* Tailwind orange-300 */
    color: #9c4221;
}
.perf-card.is-maintenance-card.group:hover .group-hover\:text-blue-600 {
    color: #7b341e; /* Tailwind orange-900 */
}
.perf-card.is-maintenance-card.group:hover .group-hover\:bg-gray-100 {
    background-color: #feebc8; /* Tailwind orange-200 */
}
.detail-item-card.is-maintenance-card {
    background-color: #fffaf0; /* orange-50 */
    border-color: #fbd38d; /* orange-300 */
}
.detail-item-card.is-maintenance-card .detail-item-header,
.detail-item-card.is-maintenance-card .metric-value,
.detail-item-card.is-maintenance-card .detail-grid-item,
.detail-item-card.is-maintenance-card .detail-grid-item span {
    color: #9c4221; /* orange-800 */
}
.detail-item-card.is-maintenance-card .metric-label span {
    color: #dd6b20; /* orange-600 */
}
.detail-item-card.is-maintenance-card .clickable-tag {
    background-color: #feebc8; /* orange-200 */
    color: #9c4221; /* orange-800 */
}

/* Night Shift Card (Dark) */
.perf-card.is-night-shift {
    background-color: #2d3748; /* Tailwind gray-800 */
}
.perf-card.is-night-shift .text-gray-800,
.perf-card.is-night-shift .text-gray-700,
.perf-card.is-night-shift .font-semibold.text-gray-800 {
    color: #edf2f7; /* Tailwind gray-200 */
}
.perf-card.is-night-shift .text-gray-500,
.perf-card.is-night-shift .text-gray-600,
.perf-card.is-night-shift .fa-solid {
    color: #a0aec0; /* Tailwind gray-500 */
}
.perf-card.is-night-shift .text-gray-200 {
    color: #4a5568; /* Tailwind gray-700 */
}
.perf-card.is-night-shift .bg-gray-50 {
    background-color: #4a5568; /* Tailwind gray-700 */
    border-top-color: #718096; /* Tailwind gray-600 */
    color: #edf2f7;
}
.perf-card.is-night-shift.group:hover .group-hover\:text-blue-600 {
    color: #90cdf4; /* Tailwind blue-300 */
}
.perf-card.is-night-shift.group:hover .group-hover\:bg-gray-100 {
    background-color: #2d3748;
}
.is-night-shift-card {
    background-color: #1f2937; /* bg-gray-800 */
    border-color: #374151; /* border-gray-700 */
    color: #d1d5db; /* text-gray-300 */
}

.is-night-shift-card .detail-item-header,
.is-night-shift-card .metric-label,
.is-night-shift-card .detail-grid-item {
    color: #d1d5db; /* text-gray-300 */
}

.is-night-shift-card .metric-value {
    color: #f9fafb; /* text-gray-50 */
}

.is-night-shift-card .detail-grid-item span {
    color: #f9fafb; /* text-gray-50 */
}

.is-night-shift-card .clickable-tag {
    background-color: #374151; /* bg-gray-700 */
    color: #9ca3af; /* text-gray-400 */
    border: 1px solid #4b5563; /* border-gray-600 */
}

.is-night-shift-card .clickable-tag:hover {
    background-color: #4b5563; /* bg-gray-600 */
    color: #d1d5db; /* text-gray-300 */
}
.detail-item-card.is-night-shift {
    background-color: #2d3748; /* gray-800 */
    border-color: #4a5568; /* gray-700 */
}
.detail-item-card.is-night-shift .detail-item-header,
.detail-item-card.is-night-shift .metric-label span,
.detail-item-card.is-night-shift .metric-value,
.detail-item-card.is-night-shift .detail-grid-item,
.detail-item-card.is-night-shift .detail-grid-item span {
    color: #edf2f7; /* gray-200 */
}
.detail-item-card.is-night-shift .clickable-tag {
    background-color: #4a5568; /* gray-700 */
    color: #e2e8f0; /* gray-300 */
}
.detail-item-card.is-night-shift .progress-bar-container {
    background-color: #4a5568; /* gray-700 */
}
.is-night-shift-card .progress-bar-container {
    background-color: #374151; /* bg-gray-700 */
}
/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .login-box {
        padding: 2rem;
        margin: 1rem;
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .overview-card {
        flex-direction: column;
        text-align: center;
    }
    
    .metric-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
    
    .progress-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .percentage {
        text-align: center;
    }
    
    .flash-messages {
        position: relative;
        top: 0;
        right: 0;
        max-width: none;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
    }
    
    .efficiency-card {
        padding: 1.5rem;
    }
    
    .details-header h1,
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .large-percentage {
        font-size: 2rem;
    }
    
    .recommendation {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .cumulative-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .cumulative-metric {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1.5rem 1rem;
    }
    .cumulative-metric:last-child {
        border-bottom: none;
    }
}

/* Additional styling to ensure login footer is visible */
@media (max-height: 600px) {
    .login-container {
        align-items: flex-start; /* Align login box to the top when screen is short */
        padding-top: 2rem;
    }
}

/* --- Gantt Chart Display Styles --- */
.gantt-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.gantt-chart-wrapper {
    width: 100%;
    min-height: 400px;
    overflow-x: auto;
    overflow-y: hidden;
    background: white;
    padding: 20px;
    overflow-x: auto; /* Allows horizontal scrolling for large charts */
    padding: 1rem 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.gantt-chart-wrapper > div {
    width: 100%;
.gantt .grid-header, .gantt .grid-row, .gantt .tick {
    fill: #666; /* A visible color for text */
}

.gantt .bar.color-3498db { fill: #3498db !important; }
.gantt .bar.color-e74c3c { fill: #e74c3c !important; }
.gantt .bar.color-2ecc71 { fill: #2ecc71 !important; }
.gantt .bar.color-f39c12 { fill: #f39c12 !important; }
.gantt .bar.color-9b59b6 { fill: #9b59b6 !important; }
.gantt .bar.color-1abc9c { fill: #1abc9c !important; }
.gantt .bar.color-e67e22 { fill: #e67e22 !important; }
.gantt .bar.color-34495e { fill: #34495e !important; }
.gantt .bar.color-16a085 { fill: #16a085 !important; }
.gantt .bar.color-c0392b { fill: #c0392b !important; }

/* --- Gantt Chart Display Styles --- */
.gantt-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.gantt-chart-wrapper {
    width: 100%;
    min-height: 400px;
    overflow-x: auto;
    overflow-y: hidden;
    background: white;
    padding: 20px;
    overflow-x: auto; /* Allows horizontal scrolling for large charts */
    padding: 1rem 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.gantt-chart-wrapper > div {
    width: 100%;
.gantt .grid-header, .gantt .grid-row, .gantt .tick {
    fill: #666; /* A visible color for text */
}

.gantt .bar.color-3498db { fill: #3498db !important; }
.gantt .bar.color-e74c3c { fill: #e74c3c !important; }
.gantt .bar.color-2ecc71 { fill: #2ecc71 !important; }
.gantt .bar.color-f39c12 { fill: #f39c12 !important; }
.gantt .bar.color-9b59b6 { fill: #9b59b6 !important; }
.gantt .bar.color-1abc9c { fill: #1abc9c !important; }
.gantt .bar.color-e67e22 { fill: #e67e22 !important; }
.gantt .bar.color-34495e { fill: #34495e !important; }
.gantt .bar.color-16a085 { fill: #16a085 !important; }
.gantt .bar.color-c0392b { fill: #c0392b !important; }