@media (min-width: 768px) {
    .my-container {
        display: flex;
/*        height: 640px;
        overflow:scroll;
*/    }
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

.modalMap {
    width: 100%;
    min-height: 400px;
    height: 70vh;
    border-radius: 16px;
    overflow: hidden;
    background: #cfe1f6;
    border: 1px solid #dbe5f1;
}

.modalMap .ol-viewport {
    border-radius: 16px;
}

/* styles.css */
.hidden {
    display: none;
}

#dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000 !important;
}

#close-dialog {
    margin-top: 10px;
}

#settingMail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 10001 !important;
}

#settingMail:not(.hidden) {
    display: flex; /* Show when not hidden */
}

.dialog-content {
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dialog-content-scrollable {
    text-align: left;
    background-color: white !important;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: visible;
    width: 100%;
    max-width: 600px;
    border: none !important;
    position: relative;
}

/* Allow timepicker dropdown to overflow the modal */
.dialog-content-scrollable .ui-timepicker-container {
    z-index: 10002 !important;
}

/* Ensure schedule list items don't clip the timepicker */
#scheduleList {
    overflow: visible !important;
}

#scheduleList li {
    overflow: visible !important;
    position: relative;
}

/* Ensure the modal container allows overflow for timepicker */
#settingMail {
    overflow: visible !important;
}

#settingMail .dialog-content-scrollable {
    overflow-y: auto;
    overflow-x: visible;
}

.dialog-content-scrollable h1 {
    margin: 0 0 20px 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
}

.dialog-text-left {
    margin-bottom: 20px;
}

.dialog-text-bold {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.dialog-text-muted {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 8px;
    margin-bottom: 0;
}

.dialog-flex-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dialog-button-spacing {
    margin-right: 10px;
}

.dialog-button-spacing-left {
    margin-left: 10px;
}

#scheduleList {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

#scheduleList li {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.dialog-checkbox-spacing {
    margin-left: 10px;
}

/* --- New dashboard layout --- */
.app-body {
    min-height: 100vh;
    background: #f5f6fb;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 250px;
    background: #0d1224;
    color: #fff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: flex-start;
}

.sidebar-header {
    margin-bottom: 0;
}

.sidebar-brand-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sidebar-brand-link:hover {
    opacity: 0.8;
}

.sidebar-brand {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 0.05em;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-profile {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 0;
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #4f6ef7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.sidebar-name {
    margin: 0;
    font-weight: 600;
}

.sidebar-role {
    font-size: 12px;
    color: #9aa5c6;
}

.sidebar-label {
    text-transform: uppercase;
    font-size: 12px;
    color: #9aa5c6;
    letter-spacing: .1em;
    margin-bottom: 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
    flex: 1;
}

.sidebar-nav hr {
    margin-top: auto;
    margin-bottom: 16px;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: #d9deed;
    text-decoration: none;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.link-button {
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    color: inherit;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px;
}

.main-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .2em;
    margin-bottom: 4px;
    color: #7c889f;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.role-select label {
    font-size: 12px;
    color: #7c889f;
    margin-bottom: 4px;
    display: block;
}

.role-select select {
    border-radius: 8px;
    padding: 6px 12px;
}

.header-buttons {
    display: flex;
    gap: 12px;
}

.app-main {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(15, 23, 42, 0.08);
}

.public-shell {
    min-height: 100vh;
}

/* Planning Page Styles for Holidays and Stoppages */
.planning-cell {
    position: relative;
    vertical-align: top !important;
    min-height: 60px;
    color: #212529 !important;
}

/* Ensure all text in planning cells is visible */
.planning-cell,
.planning-cell * {
    color: inherit;
}

.planning-cell small {
    color: #6c757d !important;
}

.planning-cell .text-muted {
    color: #6c757d !important;
}

.planning-cell-clickable {
    transition: background-color 0.2s ease;
}

.planning-cell-clickable:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    cursor: pointer;
}

.planning-cell-clickable:hover .add-shift-hint {
    color: #007bff !important;
    font-weight: 500;
}

.shift-item {
    cursor: pointer;
    transition: transform 0.1s ease;
}

.shift-item:hover {
    transform: scale(1.02);
}

.shift-item:hover .badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Ensure shift item text is visible */
.shift-item {
    color: #212529 !important;
    display: block !important;
    text-align: left !important;
}

.shift-item small {
    color: #495057 !important;
    display: block !important;
}

.shift-item .badge {
    display: inline-block !important;
    margin-bottom: 0.25rem !important;
    text-align: center !important;
}

.shift-item .badge-regular {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

.shift-item .badge-holiday {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

.shift-item .badge p {
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
}

/* Mission and worksite names visibility */
.shift-item > div > small {
    color: #495057 !important;
    display: block !important;
    margin-top: 0.25rem !important;
}

/* Holiday styling */
.planning-holiday {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
}

.planning-holiday.planning-cell-clickable:hover {
    background-color: rgba(255, 193, 7, 0.2) !important;
}

.planning-holiday-header {
    background-color: #fff3cd !important;
    color: #856404;
}

.planning-holiday-indicator {
    color: #ffc107;
    font-size: 16px;
    font-weight: bold;
}

/* Company stoppage styling */
.planning-company-stoppage {
    background-color: #f8d7da !important;
    border-left: 4px solid #dc3545 !important;
}

.planning-company-stoppage.planning-cell-clickable:hover {
    background-color: rgba(220, 53, 69, 0.15) !important;
    cursor: not-allowed !important;
}

.planning-company-stoppage-header {
    background-color: #f8d7da !important;
    color: #721c24;
}

.planning-company-stoppage-indicator {
    color: #dc3545;
    font-size: 16px;
    font-weight: bold;
}

/* Employee stoppage styling */
.planning-employee-stoppage {
    background-color: #e2e3e5 !important;
    border-left: 4px solid #6c757d !important;
}

.planning-employee-stoppage.planning-cell-clickable:hover {
    background-color: rgba(108, 117, 125, 0.15) !important;
    cursor: not-allowed !important;
}

.planning-employee-stoppage-indicator {
    color: #6c757d;
    font-size: 16px;
    font-weight: bold;
}

/* Multiple conditions styling */
.planning-cell.planning-holiday.planning-company-stoppage {
    background: linear-gradient(45deg, #fff3cd 50%, #f8d7da 50%) !important;
    border-left: 4px solid #dc3545 !important;
}

.planning-cell.planning-holiday.planning-employee-stoppage {
    background: linear-gradient(45deg, #fff3cd 50%, #e2e3e5 50%) !important;
    border-left: 4px solid #6c757d !important;
}

/* Warning badge for shifts on holidays */
.badge.bg-warning {
    border: 1px solid #ffc107;
}

/* Badge styles for planning shifts */
.badge-regular {
    background-color: #28a745 !important;
    color: #ffffff !important;
    display: inline-block !important;
    padding: 0.5em 0.75em !important;
    border-radius: 0.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.badge-holiday {
    background-color: #ffc107 !important;
    color: #000000 !important;
    display: inline-block !important;
    padding: 0.5em 0.75em !important;
    border-radius: 0.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.badge-regular p,
.badge-holiday p {
    color: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
}

/* Legend styling - only for legend badges */
.legend .badge,
.badge.legend-badge {
    font-size: 16px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px !important;
}

/* Planning shift badges should not use legend styling */
.shift-item .badge,
.badge-regular,
.badge-holiday,
.shift-item .badge-regular,
.shift-item .badge-holiday {
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    border-radius: 0.25rem !important;
    display: inline-block !important;
    padding: 0.5em 0.75em !important;
    font-size: 0.875rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
    vertical-align: baseline !important;
}

/* Ensure badge text is visible and properly positioned */
.shift-item .badge-regular,
.badge-regular {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: none !important;
}

.shift-item .badge-holiday,
.badge-holiday {
    background-color: #ffc107 !important;
    color: #000000 !important;
    border: none !important;
}

/* Add shift hint styling */
.add-shift-hint {
    opacity: 0.7;
    transition: all 0.2s ease;
    color: #212529 !important;
}

.add-shift-hint small {
    color: #6c757d !important;
}

.add-shift-hint:hover {
    opacity: 1;
    color: #007bff !important;
}

.add-shift-hint:hover small {
    color: #007bff !important;
}

/* Modal improvements */
.modal-body .alert {
    margin-bottom: 1rem;
}

.modal-body .alert:last-child {
    margin-bottom: 0;
}

/* Selected employees container styling */
.selected-employees-container {
    min-height: 38px;
    padding: 0.375rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    color: #000000 !important;
}

.selected-employees-container .badge {
    color: #000000 !important;
    background-color: #e9ecef !important;
    padding: 0.35em 0.65em !important;
    font-size: 0.875em !important;
    font-weight: 500 !important;
    border-radius: 0.25rem !important;
    display: inline-block !important;
    white-space: nowrap;
    border: 1px solid #ced4da !important;
}

.selected-employees-container .employee-badge-modal {
    color: #000000 !important;
    background-color: #e9ecef !important;
}

.selected-employees-container small {
    color: #6c757d !important;
}