/* Header and Navigation */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.75rem 2rem;
    margin-bottom: 1rem;
}

.navbar {
    background-color: white;
    padding: 1rem;
}

.navbar-brand img {
    height: 20px;
    width: auto;
}

.admin-buttons {
    display: flex;
    gap: 1rem;
}

.admin-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.store-admin-btn {
    background: #0066FF;
    color: white;
}

.store-admin-btn:hover {
    background: #0052CC;
    color: white;
}

.costing-admin-btn {
    background: #10B981;
    color: white;
}

.costing-admin-btn:hover {
    background: #059669;
    color: white;
}

.back-btn {
    background: #6B7280;
    color: white;
}

.back-btn:hover {
    background: #4B5563;
    color: white;
}

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

/* Card Styles */
.card {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #374151;
}

.form-control {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Button Styles */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background: #0066FF;
    border-color: #0066FF;
}

.btn-primary:hover {
    background: #0052CC;
    border-color: #0052CC;
}

/* Utility Classes */
.mt-4 {
    margin-top: 1.5rem;
}

.mb-0 {
    margin-bottom: 0;
}

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

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Calendar Styles */
.calendar-container {
    width: 100%;
    overflow-x: auto;
}

#calendar {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

#calendar th, #calendar td {
    border: 1px solid #dee2e6;
    padding: 8px;
    vertical-align: top;
    height: 120px;
    width: calc(100% / 7);
}

#calendar th {
    background-color: #f8f9fa;
    text-align: center;
    height: auto;
    padding: 12px;
}

.calendar-day {
    min-height: 100px;
    padding: 5px;
}

.shift-item {
    background-color: #e3f2fd;
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.shift-item:hover {
    background-color: #bbdefb;
}

/* Controls Container */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    padding: 1rem;
}

#storeSelect {
    min-width: 200px;
}

.navigation-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-month {
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

.save-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.save-status {
    color: #6c757d;
}

/* Metrics Container */
.metrics-container {
    display: flex;
    gap: 24px;
    margin: 24px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
}

.metrics-container > div {
    flex: 1;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.metrics-container > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.label {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Add icons for each metric */
.labor-costs .value::before {
    content: "💰";
    font-size: 24px;
}

.revenue .value::before {
    content: "📈";
    font-size: 24px;
}

.gross-profit .value::before {
    content: "💵";
    font-size: 24px;
}

.net-profit .value::before {
    content: "🎯";
    font-size: 24px;
}

/* Add color indicators */
.labor-costs .value { color: #e74c3c; }
.revenue .value { color: #2ecc71; }
.gross-profit .value { color: #3498db; }
.net-profit .value { color: #9b59b6; }

/* Add subtle animations */
.metrics-container > div {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .metrics-container {
        flex-direction: column;
        gap: 16px;
    }

    .value {
        font-size: 24px;
    }
}

/* Calendar styling */
.shifts-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
}

.shift-card {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 8px;
    margin-bottom: 6px;
}

.shift-card:hover {
    background-color: #bbdefb;
}

.shift-time {
    font-weight: 500;
    font-size: 0.9em;
}

.shift-details {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

.break-duration {
    margin-left: 4px;
    color: #888;
}

.total-hours {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
    font-size: 0.9em;
    font-weight: 500;
    color: #666;
}

.date-header {
    background-color: #f8f9fa;
    padding: 6px 8px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.date-number {
    font-weight: 600;
    color: #212529;
    font-size: 0.9rem;
}

.store-hours {
    font-size: 0.7rem;
    color: #6c757d;
}

.daily-hours, .daily-cost {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
}

.daily-cost {
    color: #198754;
    font-weight: 500;
}

/* Update calendar cell styling */
#calendar td {
    padding: 8px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

/* Add zebra striping to calendar rows */
#calendar tr:nth-child(even) td {
    background-color: #fbfbfb;
}

/* Add hover effect to cells */
#calendar td:hover {
    background-color: #f5f5f5;
}

/* Calendar Controls Styling */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    margin-bottom: 1rem;
    gap: 1rem;
}

.store-select-container {
    flex: 1;
    max-width: 300px;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-month {
    font-size: 1.1rem;
    font-weight: 500;
    color: #344767;
    min-width: 200px;
    text-align: center;
}

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

.save-status {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Button hover effects */
.btn-outline-primary:hover {
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .store-select-container {
        width: 100%;
        max-width: none;
    }
    
    .month-navigation {
        width: 100%;
        justify-content: center;
    }
    
    .save-container {
        width: 100%;
        justify-content: center;
    }
}

.month-navigation button {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.month-navigation button:hover {
    opacity: 0.7;
}

.cell-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 8px;
}

.shifts-container {
    flex-grow: 1;
    min-height: 0;
}

.add-shift-btn {
    width: auto !important;
    padding: 4px 12px !important;
    border-radius: 4px;
    background-color: transparent !important;
    border: 1px solid #0d6efd !important;
    color: #0d6efd !important;
    font-size: 16px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.add-shift-btn:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

/* Update calendar cell styles */
#calendar td {
    position: relative;
    padding: 8px;
    min-height: 120px;
    vertical-align: top;
}

/* Remove old button positioning */
/* .add-shift-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    ...
} */

.navbar-nav {
    width: 100%;
    max-width: 300px;
}

@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        padding: 2rem;
        width: 300px;
        height: 100%;
        z-index: 1000;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%);
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }
}

.nav-link {
    color: #333;
    transition: background-color 0.2s;
    border-radius: 4px;
    margin: 2px 0;
}

.nav-link:hover {
    background-color: rgba(0,0,0,0.05);
    color: #333;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

#userInfo {
    width: 100%;
}

.admin-buttons {
    width: 100%;
}

#logoutContainer {
    width: 100%;
}

/* Position hamburger on far right */
.navbar .container-fluid {
    justify-content: space-between;
}

/* Ensure hamburger is always visible */
.navbar-toggler {
    display: block !important;
    padding: 0.5rem;
    border: none !important;
    margin-left: auto;
    cursor: pointer;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

.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%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Offcanvas styling */
.offcanvas {
    width: 280px !important;
}

.offcanvas-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.offcanvas-body .nav {
    margin-top: 1rem;
}

#logoutContainer {
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}

#logoutContainer button {
    color: #dc3545;
}

#logoutContainer button:hover {
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

/* Calendar cell styling */
.calendar-table td {
    vertical-align: top;
    padding: 8px !important;
    min-height: 120px;
}

/* Shift card styling */
.shift-card {
    background-color: #e3f2fd;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Add to existing styles or create new file */
.holiday-hours {
    background-color: rgba(220, 53, 69, 0.05) !important; /* Light red background */
}

.special-hours {
    background-color: rgba(13, 110, 253, 0.05) !important; /* Light blue background */
}

/* Special hours text color - Orange */
.special-hours .store-hours,
.special-hours .operating-hours,
.special-hours .hours {
    color: #ff9800 !important; /* Orange text color */
    font-weight: 500;
}

.holiday-indicator {
    color: #dc3545;
    font-size: 0.8em;
    font-weight: bold;
    margin-top: 4px;
}

.special-indicator {
    color: #ff9800; /* Changed from blue to orange */
    font-size: 0.8em;
    margin-top: 4px;
}

/* Public holiday text color - Red */
.public-holiday .store-hours,
.public-holiday .operating-hours,
.public-holiday .hours {
    color: #dc3545 !important; /* Red text color */
    font-weight: 500;
}

/* Make sure special hours stand out in the calendar */
td.special-hours .hours,
td.holiday-hours .hours {
    font-weight: bold;
}

/* Add a subtle border to special days */
td.special-hours,
td.holiday-hours {
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.table-responsive {
    margin-top: 1rem;
}

.table th {
    cursor: pointer;
}

.table th:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.badge {
    font-size: 0.9em;
    padding: 0.5em 0.7em;
}

/* Add these styles for the modal alerts */
.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-info {
    background-color: rgba(70, 130, 180, 0.15);
    border: 1px solid rgba(70, 130, 180, 0.3);
    color: #0066cc;
}

.alert-danger {
    background-color: rgba(255, 99, 71, 0.15);
    border: 1px solid rgba(255, 99, 71, 0.3);
    color: #dc3545;
}

.bi-info-circle {
    margin-right: 5px;
}
.shifts-container {
    margin: 5px 0;
}

.shift {
    background: #f8f9fa;
    padding: 5px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.shift:hover {
    background: #e9ecef;
}

.daily-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 0.85em;
    color: #495057;
    margin-left: auto; /* Push to right side */
}

.daily-hours, .daily-cost {
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.daily-hours {
    color: #495057;
}

.daily-cost {
    color: #2196f3;
    font-weight: 500;
}

.date-and-totals {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 4px;
}

.date {
    font-size: 1.2em;
    font-weight: bold;
    color: #212529;
    margin-right: auto;
}

.cell-header {
    padding: 2px 8px 4px 8px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
}

.date {
    font-size: 1.1em;
    font-weight: bold;
    color: #212529;
}

.operating-times {
    font-size: 0.75em;
    color: #6c757d;
    margin-top: 0px;
    line-height: 1.2;
}

.daily-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0px;
    font-size: 0.75em;
    line-height: 1.2;
}

.daily-hours, .daily-cost {
    white-space: nowrap;
}

/* Update shifts container to take advantage of extra space */
.shifts-container {
    margin-top: 4px;
    padding: 0 4px;
    flex-grow: 1;
}

/* Ensure cells maintain good proportions */
td {
    min-width: 160px; /* Slightly smaller minimum width */
    vertical-align: top;
    height: 120px; /* Set consistent height */
}

/* Update other month styling */
.other-month {
    background-color: #f1f3f5 !important; /* Lighter grey background */
}

.other-month .cell-header {
    background-color: #f1f3f5;
}

.other-month .date {
    color: #adb5bd;  /* Light grey text */
    font-weight: normal;
}

.other-month .operating-times,
.other-month .daily-totals,
.other-month .shifts-container,
.other-month .add-shift-btn {
    display: none;
}

/* Ensure the date is always visible */
.date {
    font-size: 1.2em;
    font-weight: bold;
    color: #212529;
}

/* Add some padding to the date when it includes month */
.other-month .date {
    padding: 2px 4px;
    background-color: #e9ecef;
    border-radius: 4px;
    display: inline-block;
}

/* Keep the compact header styling */
.cell-header {
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    max-height: 52px;
    overflow: hidden;
}

.header-left {
    max-width: 65%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Operating hours styling */
.operating-times {
    font-size: 0.75em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.regular-hours {
    color: #6c757d; /* Grey color for regular hours */
}

.special-hours {
    color: #6610f2;
}

.holiday-hours {
    color: #dc3545;
}

/* Restore Deputy-like shift styling */
.shift {
    background: #e3f2fd;
    padding: 8px;
    margin: 4px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    border: none;
    color: #1976d2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.shift:hover {
    background: #bbdefb;
}

.shift strong {
    color: #0d47a1;
}

.shift small {
    color: #1976d2;
    opacity: 0.8;
}

/* Update shifts container */
.shifts-container {
    margin-top: 4px;
    padding: 0 4px;
    flex-grow: 1;
}

/* Keep the compact daily totals */
.daily-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    font-size: 0.75em;
    margin-left: auto;
}

.daily-hours, .daily-cost {
    white-space: nowrap;
    padding: 1px 4px;
    border-radius: 3px;
    background-color: #f8f9fa;
}

.daily-cost {
    color: #2196f3;
    font-weight: 500;
}

/* Cell sizing */
td {
    min-width: 160px;
    vertical-align: top;
    height: 120px;
}

/* Clean up and consolidate the styles */
.cell-header {
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    max-height: 52px;
    overflow: hidden;
}

.header-left {
    max-width: 65%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-and-totals {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

/* Date styling */
.date {
    font-size: 1.1em;
    font-weight: bold;
    color: #212529;
    flex-shrink: 0; /* Prevent date from shrinking */
}

/* Operating hours styling */
.operating-times {
    font-size: 0.75em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px; /* Space between date and hours */
    display: block; /* Ensure it's on its own line */
    width: 100%; /* Take full width */
}

.regular-hours {
    color: #6c757d;
}

/* Daily totals styling */
.daily-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align to the right */
    gap: 1px;
    font-size: 0.75em;
    margin-left: auto;
}

.daily-hours, .daily-cost {
    white-space: nowrap;
    padding: 1px 4px;
    border-radius: 3px;
    background-color: #f8f9fa;
}

.daily-cost {
    color: #2196f3;
    font-weight: 500;
}

/* Update other month styling to show operating hours */
.other-month .operating-times {
    display: block; /* Override the previous none */
    opacity: 0.7; /* Make it slightly faded */
}

.other-month .daily-totals,
.other-month .shifts-container,
.other-month .add-shift-btn {
    display: none;
}

/* Operating hours styling */
.operating-times {
    font-size: 0.75em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    display: block;
    width: 100%;
}

.regular-hours {
    color: #6c757d;
}

.special-hours {
    color: #6610f2;
}

.holiday-hours {
    color: #dc3545;
}

/* Clean, simplified styles */
.cell-header {
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.date {
    font-size: 1.1em;
    font-weight: bold;
    color: #212529;
}

.operating-times {
    font-size: 0.75em;
    color: #6c757d;
    margin-top: 1px;
}

.daily-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    font-size: 0.75em;
}

.daily-hours, .daily-cost {
    white-space: nowrap;
}

/* Remove all the other conflicting styles */

/* Out of month styling */
.other-month {
    background-color: #f1f3f5 !important; /* Lighter grey background */
}

.other-month .cell-header {
    background-color: #f1f3f5;
    opacity: 0.7;
}

.other-month .date {
    color: #adb5bd;  /* Light grey text */
    font-weight: normal;
}

.other-month .operating-times,
.other-month .daily-totals,
.other-month .shifts-container,
.other-month .add-shift-btn {
    display: none;
}

/* Regular cell styling */
.cell-header {
    padding: 2px 8px 4px 8px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
}

.date {
    font-size: 1.1em;
    font-weight: bold;
    color: #212529;
}

.operating-times {
    font-size: 0.75em;
    color: #6c757d;
    margin-top: 0px;
    line-height: 1.2;
}

/* Out of month styling - simplified */
.other-month {
    background-color: #f8f9fa;
}

.other-month .cell-header {
    opacity: 0.7;
}

.other-month .date {
    color: #adb5bd;  /* Light grey for out-of-month dates */
    font-weight: normal;  /* Less bold */
}

.other-month .operating-times,
.other-month .daily-totals,
.other-month .shifts-container,
.other-month .add-shift-btn,
.other-month .clock-icon,
.other-month .money-icon {
    display: none;  /* Hide everything except the date */
}

/* Special hours styling */
.holiday-hours {
    background-color: rgba(220, 53, 69, 0.05) !important; /* Light red background */
}

.special-hours {
    background-color: rgba(13, 110, 253, 0.05) !important; /* Light blue background */
}

/* Operating hours text colors */
.operating-times .holiday-hours {
    color: #dc3545;
    font-weight: 500;
}

.operating-times .special-hours {
    color: #0d6efd;
    font-weight: 500;
}

.operating-times small {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 1px;
}

/* Make sure other-month styling doesn't override special hours */
.other-month.holiday-hours,
.other-month.special-hours {
    opacity: 0.5;
}

/* Keep existing styles */
.other-month .operating-times,
.other-month .daily-totals,
.other-month .shifts-container,
.other-month .add-shift-btn {
    display: none;
}

.task-completion {
    font-size: 1.25rem;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 0.5rem;
    min-width: 4rem;
    text-align: center;
}

.task-completion .completion-percentage {
    display: inline-block;
    transition: all 0.3s ease;
}

/* Task type specific colors */
#importantTasksCompletion {
    color: var(--incomplete-color);
}

#adhocTasksCompletion {
    color: var(--primary-color);
}

#dailyTasksCompletion {
    color: var(--completed-color);
}