html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Kiosk layout */
.kiosk-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.kiosk-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.kiosk-header {
    background: #ff8c00;
    color: white;
    padding: 0.5rem 1rem;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.kiosk-title {
    margin: 0;
    font-size: 1.50rem;
    font-weight: 600;
}

.header-date, .header-time {
    margin-left: auto;
    font-size: 1.25rem;
}

.error-banner {
    background: #b71c1c;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.kiosk-main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 1rem;
    background: #343434;
    display: flex;
    flex-direction: column;
}

.kiosk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    flex: 1;
    min-height: 0;
    height: 100%;
}

/* Mobile tab bar (hidden on desktop, shown via media query below) */
.mobile-tab-bar {
    display: none;
    background: #424242;
    padding: 0 0.5rem;
}

.tab-btn {
    flex: 1;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    background: transparent;
    background-color: transparent;
    background-image: none;
    border: none;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    box-shadow: none;
    color: #aaa;
    padding: 0.75rem 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.15s, border-color 0.15s;
}

.tab-btn:focus-visible {
    outline: 2px solid #ff8c00;
    outline-offset: 2px;
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: #ff8c00;
}

.tab-badge {
    background: #ff8c00;
    color: #fff;
    border-radius: 10px;
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
}

/* Structural wrapper — no visual style on desktop */
.kiosk-column-wrapper {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (max-width: 900px) {
    /* Show the mobile tab bar */
    .mobile-tab-bar {
        display: flex;
    }

    /* Grid collapses to single column */
    .kiosk-grid {
        grid-template-columns: 1fr;
    }

    /* Hide all column wrappers; only the active one is shown */
    .kiosk-column-wrapper {
        display: none;
    }

    .kiosk-column-wrapper.mobile-active {
        display: block;
        height: 100%;
        overflow-y: auto;
    }

    /* Compact header */
    .kiosk-title {
        font-size: 1.1rem;
    }

    .header-date,
    .header-time {
        font-size: 0.9rem;
        margin-left: 0;
    }

    /* Compact footer */
    .kiosk-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .kiosk-footer-version {
        margin-left: 0;
        font-size: 0.75rem;
        opacity: 0.7;
    }
}

.project-column {
    background: #666666;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.column-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #FEFEFE;
    border-bottom: 2px solid #ff8c00;
    padding-bottom: 0.5rem;
}

.column-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.column-empty {
    color: #999;
    font-style: italic;
}

/* ── Syncfusion SfCard overrides — Foresight palette ─────────────────────── */

.foresight-card.e-card {
    background: #858585;
    border-left: 6px solid #ff8c00;
    border-radius: 6px;
    color: #fefefe;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.foresight-card.e-card .e-card-header {
    padding: 0.6rem 0.75rem 0.3rem;
}

.foresight-card.e-card .e-card-header-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fefefe;
}

.foresight-card.e-card .e-card-sub-title {
    font-size: 0.82rem;
    color: #e0e0e0;
}

.foresight-card.e-card .e-card-content {
    padding: 0 0.75rem 0.6rem;
    font-size: 0.85rem;
    color: #fefefe;
}

.foresight-card.e-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.foresight-card.e-card:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.foresight-card.e-card:focus-visible {
    outline: 2px solid #ff8c00;
    outline-offset: 2px;
}

.project-statuses,
.project-vehicle {
    font-size: 0.85rem;
    color: #fefefe;
}

/* ── Pulse indicator pills ────────────────────────────────────────────────── */

.project-pulses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

/* Inverted "reversed text" pill: solid fill with contrasting dark text */
.pulse-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
}

/* Happening-now hint (current crew work block) */
.pulse-pill.pulse-active {
    background: #ff8c00;
    color: #1f1f1f;
}

/* Ambient informational hint (long run) */
.pulse-pill.pulse-info {
    background: #e0e0e0;
    color: #1f1f1f;
}

/* ── Shimmer skeleton cards ───────────────────────────────────────────────── */

@keyframes shimmer-sweep {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.shimmer-card {
    background: #858585;
    border-left: 6px solid #ff8c00;
    border-radius: 6px;
    padding: 0.6rem 0.75rem 0.75rem;
    overflow: hidden;
}

.shimmer-line {
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        #787878 25%,
        #9c9c9c 50%,
        #787878 75%
    );
    background-size: 200% 100%;
    animation: shimmer-sweep 1.6s ease-in-out infinite;
}

.shimmer-title {
    height: 0.95rem;
    width: 68%;
    margin-bottom: 0.35rem;
}

.shimmer-subtitle {
    height: 0.75rem;
    width: 44%;
    margin-bottom: 0.65rem;
    opacity: 0.8;
}

.shimmer-body {
    height: 0.78rem;
    width: 86%;
    margin-bottom: 0.3rem;
}

.shimmer-body-short {
    height: 0.78rem;
    width: 54%;
}

.kiosk-footer {
    display: flex;
    align-items: center;
    background: #424242;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.kiosk-footer-status {
    flex: 1;
}

.kiosk-footer-version {
    margin-left: auto;
    text-align: right;
}

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.1rem;
}

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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

/* ── Project detail popup ─────────────────────────────────────────────────── */

.foresight-dialog .e-dlg-container {
    z-index: 1050;
}

/* SfTooltip for grid cells inside the detail dialog (above modal layer) */
.foresight-dialog ~ .e-tooltip-wrap,
.e-tooltip-wrap.equipment-name-tooltip {
    z-index: 1100;
}

.foresight-dialog .e-dialog {
    background: #343434;
    color: #fefefe;
    border-top: 4px solid #ff8c00;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.foresight-dialog .e-dlg-header-content {
    background: #424242;
    color: #fefefe;
    border-bottom: 1px solid rgba(255, 140, 0, 0.35);
    padding: 0.75rem 1rem;
}

.foresight-dialog .e-dlg-header,
.foresight-dialog .e-dlg-header * {
    color: #fefefe;
}

.foresight-dialog .e-dlg-content {
    background: #343434;
    color: #fefefe;
    padding: 1rem;
}

.foresight-dialog .e-btn.e-dlg-closeicon-btn {
    color: #fefefe;
}

.foresight-dialog .e-btn.e-dlg-closeicon-btn:hover,
.foresight-dialog .e-btn.e-dlg-closeicon-btn:focus-visible {
    background: rgba(255, 140, 0, 0.2);
    color: #ff8c00;
    outline: none;
}

.foresight-dialog-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 0;
}

.foresight-dialog-header-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.foresight-dialog-usage-period {
    font-size: 0.75rem;
    color: rgba(254, 254, 254, 0.7);
}

.foresight-dialog-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fefefe;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foresight-dialog-phase {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 140, 0, 0.18);
    color: #ff8c00;
    border: 1px solid rgba(255, 140, 0, 0.55);
}

.foresight-dialog-phase.phase-prep { color: #ffd27a; border-color: rgba(255, 210, 122, 0.55); background: rgba(255, 210, 122, 0.14); }
.foresight-dialog-phase.phase-production { color: #ff8c00; }
.foresight-dialog-phase.phase-return { color: #7abfff; border-color: rgba(122, 191, 255, 0.55); background: rgba(122, 191, 255, 0.14); }

/* ── Tabs inside the dialog ───────────────────────────────────────────────── */

.foresight-tabs.e-tab {
    background: transparent;
}

.foresight-tabs .e-tab-header {
    background: #2b2b2b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.foresight-tabs .e-tab-header .e-toolbar-items {
    background: #2b2b2b;
}

.foresight-tabs .e-tab-header .e-tab-wrap,
.foresight-tabs .e-tab-header .e-toolbar-item {
    background: transparent;
}

.foresight-tabs .e-tab-header .e-tab-text {
    color: #e0e0e0;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.foresight-tabs .e-tab-header .e-toolbar-item.e-active .e-tab-text {
    color: #ffffff;
}

.foresight-tabs .e-tab-header .e-indicator {
    background: #ff8c00;
    height: 3px;
}

.foresight-tabs .e-content {
    background: #343434;
    color: #fefefe;
}

/* ── Location tab layout ──────────────────────────────────────────────────── */

.location-tab {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0.25rem;
    max-height: 70vh;
    overflow-y: auto;
}

.location-warning {
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.55);
    color: #ffd27a;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.location-empty {
    background: #3d3d3d;
    color: #bdbdbd;
    border-left: 4px solid #6e6e6e;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-style: italic;
}

/* Venue panel */

.venue-panel {
    background: #3d3d3d;
    border-left: 6px solid #ff8c00;
    border-radius: 6px;
    padding: 0.75rem 1rem 1rem;
}

.venue-heading {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffb266;
}

.venue-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fefefe;
    margin-bottom: 0.5rem;
}

.venue-address {
    font-style: normal;
    color: #e8e8e8;
    line-height: 1.35;
    margin: 0 0 0.6rem 0;
}

.venue-address-line {
    font-size: 0.95rem;
}

.venue-address-country {
    color: #bdbdbd;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.venue-address-empty {
    color: #bdbdbd;
    font-style: italic;
    margin-bottom: 0.6rem;
}

.venue-contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.25rem;
}

/* Get directions button */

.venue-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    background: #ff8c00;
    color: #fefefe;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 120ms ease;
}

.venue-directions-btn:hover,
.venue-directions-btn:focus-visible {
    background: #e07d00;
    color: #fefefe;
    outline: none;
}

.venue-directions-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.45);
}

.venue-directions-icon {
    font-size: 1.15rem;
    line-height: 1;
}

/* Contact cards */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.contact-card {
    background: #858585;
    border-left: 6px solid #ff8c00;
    border-radius: 6px;
    padding: 0.6rem 0.75rem 0.75rem;
    color: #fefefe;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.contact-card-header {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffd27a;
    margin-bottom: 0.15rem;
}

.contact-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fefefe;
}

.contact-function {
    color: #e0e0e0;
    font-size: 0.85rem;
    font-style: italic;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.25rem;
}

.contact-card-empty {
    color: #e0e0e0;
    font-style: italic;
    font-size: 0.85rem;
}

.contact-link {
    color: #fefefe;
    text-decoration: underline;
    text-decoration-color: rgba(255, 140, 0, 0.55);
    text-underline-offset: 2px;
    font-size: 0.9rem;
    word-break: break-word;
}

.contact-link:hover,
.contact-link:focus-visible {
    color: #ff8c00;
    text-decoration-color: #ff8c00;
    outline: none;
}

/* Loading state */

.location-loading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Responsive stacking */

@media (max-width: 720px) {
    .foresight-dialog .e-dialog {
        width: 96vw !important;
        max-width: 96vw !important;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .location-tab {
        max-height: 80vh;
    }
}

@media (max-width: 600px) {
    .venue-directions-btn {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}

/* ========== Equipment tab ========== */

.equipment-tab {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 0.1rem;
    max-height: 70vh;
}

.equipment-loading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.equipment-summary {
    color: #e0e0e0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.equipment-empty {
    background: #3d3d3d;
    color: #bdbdbd;
    border-left: 4px solid #6e6e6e;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-style: italic;
    font-size: 0.95rem;
}

/* ── Equipment grouped grid wrapper ── */

.equipment-grid-wrapper {
    overflow: auto;
    border-radius: 6px;
    flex: 1 1 auto;
    min-height: 0;
    background: #2e2e2e;
    border-top: 2px solid rgba(255, 140, 0, 0.5);
}

/* SfGrid base — strip the default white/light card look */
.equipment-tab .equipment-sf-grid.e-grid {
    background: transparent;
    border: none;
    color: #fefefe;
    font-size: 0.95rem;
}

/* Fixed layout so Qty / Name / Location / Code share dialog width predictably */
.equipment-tab .equipment-sf-grid .e-table {
    table-layout: fixed;
    width: 100%;
    min-width: 17.5rem;
}

.equipment-tab .equipment-sf-grid .e-gridheader,
.equipment-tab .equipment-sf-grid .e-gridheader .e-headercontent {
    background-color: #2e2e2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.equipment-tab .equipment-sf-grid .e-headercell,
.equipment-tab .equipment-sf-grid .e-headercell .e-headercelldiv {
    background-color: #2e2e2e;
    color: #ffd27a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-color: transparent;
}

.equipment-tab .equipment-sf-grid .e-gridcontent,
.equipment-tab .equipment-sf-grid .e-content {
    background: #2e2e2e;
}

/* Data rows */
.equipment-tab .equipment-sf-grid .e-row .e-rowcell {
    background: #2e2e2e;
    color: #fefefe;
    border-color: rgba(255, 255, 255, 0.07);
    padding: 0.45rem 0.75rem;
    vertical-align: top;
}

.equipment-tab .equipment-sf-grid .e-row.e-altrow .e-rowcell {
    background: #2e2e2e;
}

/* Column widths: Qty (3), Name/Location (flex), Code (8) */
.equipment-tab .equipment-sf-grid .e-headercell[aria-colindex="2"],
.equipment-tab .equipment-sf-grid .e-rowcell[aria-colindex="2"] {
    width: 3rem;
    min-width: 2.75rem;
    max-width: 3.25rem;
}

.equipment-tab .equipment-sf-grid .e-headercell[aria-colindex="3"],
.equipment-tab .equipment-sf-grid .e-rowcell[aria-colindex="3"] {
    width: auto;
    min-width: 4.5rem;
    max-width: 250px;
    overflow: hidden;
    white-space: normal;
}

.equipment-name-location-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.25;
    min-width: 0;
}

.equipment-name-line {
    color: #fefefe;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equipment-location-line {
    font-size: 0.82rem;
    color: #b0b0b0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equipment-tab .equipment-sf-grid .e-headercell[aria-colindex="4"],
.equipment-tab .equipment-sf-grid .e-rowcell[aria-colindex="4"] {
    width: 5.25rem;
    min-width: 5rem;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Qty column: right-aligned tabular numbers */
.equipment-tab .equipment-sf-grid .e-row .e-rowcell[aria-colindex="2"] {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
}

/* Code column: monospace */
.equipment-tab .equipment-sf-grid .e-row .e-rowcell[aria-colindex="4"] {
    font-family: "Consolas", "Menlo", monospace;
    color: #e0e0e0;
}

/* Group caption rows — match crew-block headers */
.equipment-tab .equipment-sf-grid .e-groupcaption {
    background: #2e2e2e;
    border-top: 2px solid rgba(255, 140, 0, 0.5);
    border-bottom: none;
}

.equipment-tab .equipment-sf-grid .e-groupcaption .e-groupcaptionrow td {
    background: transparent;
    padding: 0.4rem 0.6rem;
}

/* Expand/collapse chevrons */
.equipment-tab .equipment-sf-grid .e-recordplusexpand,
.equipment-tab .equipment-sf-grid .e-recordpluscollapse {
    color: #ff8c00;
}

/* Group caption text */
.equipment-caption-group {
    font-size: 1rem;
    font-weight: 700;
    color: #fefefe;
}

/* No pager, no toolbar */
.equipment-tab .equipment-sf-grid .e-pager,
.equipment-tab .equipment-sf-grid .e-toolbar {
    display: none;
}

@media (max-width: 720px) {
    .equipment-tab {
        max-height: 80vh;
    }

    .equipment-tab .equipment-sf-grid .e-row .e-rowcell,
    .equipment-tab .equipment-sf-grid .e-headercell {
        padding: 0.35rem 0.4rem;
        font-size: 0.85rem;
    }

    .equipment-tab .equipment-sf-grid .e-headercell .e-headercelldiv {
        font-size: 0.72rem;
    }

    /* Narrow dialog: cap fixed columns so Name/Location stays visible */
    .equipment-tab .equipment-sf-grid .e-headercell[aria-colindex="2"],
    .equipment-tab .equipment-sf-grid .e-rowcell[aria-colindex="2"] {
        width: 2.5rem;
        min-width: 2.35rem;
        max-width: 2.65rem;
    }

    .equipment-tab .equipment-sf-grid .e-headercell[aria-colindex="3"],
    .equipment-tab .equipment-sf-grid .e-rowcell[aria-colindex="3"] {
        min-width: 3.25rem;
        max-width: min(250px, 42vw);
    }

    .equipment-tab .equipment-sf-grid .e-headercell[aria-colindex="4"],
    .equipment-tab .equipment-sf-grid .e-rowcell[aria-colindex="4"] {
        width: 4.5rem;
        min-width: 4.25rem;
        max-width: 4.75rem;
    }
}

/* ========== Crew tab ========== */

.crew-tab {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 0.1rem;
    max-height: 70vh;
}

.crew-loading {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crew-summary {
    color: #e0e0e0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.crew-empty {
    color: #e0e0e0;
    font-style: italic;
    font-size: 0.95rem;
    padding: 0.75rem 0;
}

/* ── Crew work-block layout ── */

.crew-blocks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

/* Work block <details> container */
.crew-block {
    background: #2e2e2e;
    border-radius: 6px;
    border-top: 2px solid rgba(255, 140, 0, 0.5);
    overflow: hidden;
}

/* Work block header / summary */
.crew-block-header {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fefefe;
    cursor: pointer;
    list-style: none;
    user-select: none;
    gap: 0.5rem;
}

.crew-block-header::-webkit-details-marker { display: none; }

/* Chevron indicator */
.crew-block-header::before {
    content: "\25B6";
    font-size: 0.6rem;
    color: #ff8c00;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.crew-block[open] > .crew-block-header::before {
    transform: rotate(90deg);
}

/* Time slot within a block */
.crew-slot {
    padding: 0.4rem 0.85rem 0.55rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Date/time line */
.crew-slot-time {
    margin: 0 0 0.3rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffd27a;
    font-variant-numeric: tabular-nums;
}

/* Name list */
.crew-slot-crew {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.crew-slot-person {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.crew-slot-name {
    color: #fefefe;
    font-size: 0.95rem;
}

.crew-slot-role {
    color: #b0b0b0;
    font-size: 0.82rem;
}

@media (max-width: 720px) {
    .crew-tab {
        max-height: 80vh;
    }

    .crew-slot {
        padding-left: 1rem;
    }
}
