html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    max-width: 100%;
}

body:has(.page) {
    overflow: hidden;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.25rem;
    overflow-x: clip;
    min-width: 0;
}

@media (max-width: 640.98px) {
    .content {
        padding-top: 0.9rem;
    }

    .card.p-3 {
        padding: 0.85rem !important;
    }

    .table {
        font-size: 0.82rem;
    }
}

/* Prevent wide tables from overflowing into adjacent columns */
.min-w-0 {
    min-width: 0;
}

.dashboard-split > [class*="col-"] {
    min-width: 0;
    display: flex;
}

.dashboard-split .table-responsive {
    max-width: 100%;
}

/* Side-by-side dashboard panels: equal height, internal scroll */
.dashboard-split-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 28rem;
}

.dashboard-split-toolbar {
    flex: 0 0 auto;
}

.dashboard-split-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    max-width: 100%;
}

.dashboard-split-card .card-header,
.dashboard-split-card .card-footer {
    flex-shrink: 0;
}

.dashboard-split-scroll thead th {
    position: sticky;
    background-color: #f8f9fa;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

.dashboard-split-scroll thead tr:first-child th {
    top: 0;
    z-index: 3;
}

.dashboard-split-scroll thead tr:nth-child(2) th {
    top: 2.15rem;
    z-index: 2;
}

.dashboard-summary-search {
    width: min(22rem, 100%);
}

.dashboard-summary-scroll {
    max-height: 20.5rem;
    overflow: auto;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

.dashboard-summary-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8f9fa;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

/* Keep department and trade tables on the same column grid */
.dashboard-status-table {
    table-layout: fixed;
    width: 100%;
}

.dashboard-status-table col.col-sr {
    width: 5%;
}

.dashboard-status-table col.col-name {
    width: 26%;
}

.dashboard-status-table col.col-status {
    width: 9.5%;
}

.dashboard-status-table col.col-action {
    width: 12%;
}

.dashboard-status-table th,
.dashboard-status-table td {
    vertical-align: middle;
}

.dashboard-status-table th:nth-child(2),
.dashboard-status-table td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1200px) {
    .dashboard-split-card {
        height: 100%;
        max-height: min(36rem, calc(100vh - 10rem));
    }
}

/* Anchor targets clear the sticky top bar */
#hod-directory {
    scroll-margin-top: 4.5rem;
}

/* Page / section loading state */
.page-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 16rem;
    padding: 2.5rem 1rem;
    text-align: center;
}

.page-loader-spinner {
    width: 2.75rem;
    height: 2.75rem;
}

.page-loader-message {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
}

.page-loader-hint {
    max-width: 22rem;
}

.page-loader-card {
    min-height: 12rem;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1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DU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Searchable select focus glow */
.searchable-select .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, .15);
}

/* Card form sections */
.card.shadow-sm {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
}

/* Tables - tighter on small screens */
.table-hover tbody tr { transition: background-color 0.15s; }
.table th { font-weight: 600; white-space: nowrap; }

/* Badge polish */
.badge { font-weight: 500; letter-spacing: 0.3px; }

/* Page headings */
h3 { margin-bottom: 1rem; color: #1e293b; font-weight: 700; }

/* Consistent empty-state look */
.text-muted.text-center.py-3 { font-style: italic; }

/* Person markers on live-location / GPS maps */
.map-person-icon {
    background: transparent;
    border: none;
}

.map-person-pin {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
    line-height: 0;
}

.map-person-pin svg {
    display: block;
}

/* Live Locations map fullscreen shell */
.live-locations-map-shell:fullscreen,
.live-locations-map-shell:-webkit-full-screen {
    width: 100%;
    height: 100%;
    border: none !important;
    border-radius: 0 !important;
    background: #fff;
}

.live-locations-map-shell.map-css-fullscreen {
    position: fixed !important;
    inset: 0;
    z-index: 2000;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff;
}

.leaflet-control-fullscreen a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    line-height: 1;
    color: #333;
}

.leaflet-control-fullscreen a svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* Date-wise employee status (monthly report) */
.datewise-legend {
    border-bottom: 2px solid #052767;
    padding-bottom: 0.5rem;
}

.datewise-scroll {
    max-width: 100%;
}

.datewise-report {
    font-size: 0.78rem;
    margin-bottom: 0;
}

.datewise-report thead th {
    background: #052767;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    font-weight: 600;
}

.datewise-report .day-col {
    min-width: 2.15rem;
    width: 2.15rem;
    text-align: center;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.datewise-report thead th.sunday-col {
    background: #9f1239;
    color: #fff;
}

.datewise-report thead th.sunday-col .sunday-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fecdd3;
    line-height: 1.1;
    margin-top: 0.12rem;
}

.datewise-report tbody td.sunday-col {
    background-color: #fff1f2;
}

.datewise-report .sum-col,
.datewise-report tbody td.sum-col {
    background: #fff3cd;
    text-align: center;
    font-weight: 600;
}

.datewise-report .status-p { color: #198754; font-weight: 600; }
.datewise-report .status-ab { color: #212529; }
.datewise-report .status-l { color: #6c757d; font-weight: 600; }
.datewise-report .status-do { color: #0dcaf0; font-weight: 600; }
.datewise-report .status-t { color: #997404; font-weight: 600; }
.datewise-report .status-i { color: #dc3545; font-weight: 600; }

.datewise-report .sticky-col {
    position: sticky;
    background: #fff;
    z-index: 1;
}

.datewise-report thead .sticky-col {
    background: #052767;
    z-index: 4;
}

.datewise-report .sticky-col-1 { left: 0; min-width: 3.5rem; }
.datewise-report .sticky-col-2 { left: 3.5rem; min-width: 7rem; }
.datewise-report .sticky-col-3 { left: 10.5rem; min-width: 10rem; }

/* Smooth sidebar open/close (unscoped so :checked sibling rules always apply) */
.page .sidebar-slot,
.page .sidebar,
.page .sidebar-backdrop {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 641px) {
    .page .sidebar-slot {
        width: 250px;
        height: 100%;
        overflow: hidden;
        transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .page .sidebar {
        width: 250px;
        min-width: 250px;
        height: 100%;
        transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .page .sidebar-toggle:checked ~ .sidebar-slot {
        width: 0;
    }

    .page .sidebar-toggle:checked ~ .sidebar-slot .sidebar {
        transform: translateX(-100%);
    }
}

@media (max-width: 640.98px) {
    .page .sidebar-slot {
        transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.38s ease;
    }

    .page .sidebar-backdrop {
        transition: opacity 0.38s ease;
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 0.85rem 2.75rem 0.85rem 1.25rem;
    background: #1e1b4b;
    color: #fff;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.28);
    font-size: 0.92rem;
}

#blazor-error-ui a {
    margin-left: 0.85rem;
    color: #93c5fd;
    font-weight: 650;
    text-decoration: none;
}

#blazor-error-ui a:hover {
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.85rem;
    top: 0.7rem;
    color: rgba(255, 255, 255, 0.72);
}

