/*
 | Native date/time controls: color-scheme drives the popup (and Firefox
 | glyphs). WebKit’s indicator is a dark bitmap — color-scheme: dark already
 | lightens it, so invert() would paint it black again on dark fields.
 | A light SVG replaces the indicator so it stays readable.
 */
html.light,
html:not(.dark) {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

input[type='date'],
input[type='time'],
input[type='datetime-local'],
input[type='month'],
input[type='week'] {
    color: var(--foreground);
}

html.dark input[type='date'],
html.dark input[type='time'],
html.dark input[type='datetime-local'],
html.dark input[type='month'],
html.dark input[type='week'] {
    color-scheme: dark;
}

html.dark input[type='date']::-webkit-calendar-picker-indicator,
html.dark input[type='datetime-local']::-webkit-calendar-picker-indicator,
html.dark input[type='month']::-webkit-calendar-picker-indicator,
html.dark input[type='week']::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    filter: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1rem 1rem;
}

html.dark input[type='time']::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    filter: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1rem 1rem;
}

/* —— Helidesk UX primitives —— */
.hd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25rem;
    white-space: nowrap;
}

.hd-badge-neutral {
    background: color-mix(in oklab, var(--muted) 80%, transparent);
    border-color: var(--border);
    color: var(--foreground);
}

.hd-badge-muted {
    background: color-mix(in oklab, var(--muted) 60%, transparent);
    border-color: var(--border);
    color: var(--muted-foreground);
}

.hd-badge-info {
    background: color-mix(in oklab, #0ea5e9 14%, transparent);
    border-color: color-mix(in oklab, #0ea5e9 35%, transparent);
    color: #0369a1;
}

.hd-badge-primary {
    background: color-mix(in oklab, var(--color-primary, #006ae6) 14%, transparent);
    border-color: color-mix(in oklab, var(--color-primary, #006ae6) 40%, transparent);
    color: var(--color-primary, #006ae6);
}

.hd-badge-warning {
    background: color-mix(in oklab, #f59e0b 16%, transparent);
    border-color: color-mix(in oklab, #f59e0b 40%, transparent);
    color: #b45309;
}

.hd-badge-success {
    background: color-mix(in oklab, #10b981 14%, transparent);
    border-color: color-mix(in oklab, #10b981 40%, transparent);
    color: #047857;
}

.hd-badge-danger {
    background: color-mix(in oklab, #ef4444 14%, transparent);
    border-color: color-mix(in oklab, #ef4444 40%, transparent);
    color: #b91c1c;
}

html.dark .hd-badge-info {
    color: #7dd3fc;
}

html.dark .hd-badge-primary {
    color: color-mix(in oklab, var(--color-primary, #60a5fa) 90%, white);
}

html.dark .hd-badge-warning {
    color: #fcd34d;
}

html.dark .hd-badge-success {
    color: #6ee7b7;
}

html.dark .hd-badge-danger {
    color: #fca5a5;
}

.hd-status-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    background: var(--muted-foreground, #9ca3af);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foreground, #111827) 12%, transparent);
}

.hd-status-dot--success { background: #10b981; }
.hd-status-dot--warning { background: #f59e0b; }
.hd-status-dot--danger { background: #ef4444; }
.hd-status-dot--info { background: #0ea5e9; }
.hd-status-dot--primary { background: var(--color-primary, #006ae6); }
.hd-status-dot--muted { background: #9ca3af; }
.hd-status-dot--neutral { background: #6b7280; }

.hd-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--muted) 35%, transparent);
    padding: 1.25rem 1.5rem;
}

.hd-empty-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--foreground);
}

.hd-empty-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    max-width: 36rem;
}

.hd-section-help {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.hd-quick-menu {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-inline-start: 0.15rem;
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .hd-quick-menu__link {
        min-width: 2.25rem;
        min-height: 2.25rem;
        justify-content: center;
        padding: 0.4rem 0.5rem;
    }

    .hd-quick-menu__link i {
        font-size: 1.05rem;
    }

    /* Touch devices have no hover titles — keep Live ops readable. */
    .hd-quick-menu__link--display .hd-quick-menu__label {
        display: inline;
    }
}

.hd-quick-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.5rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 550;
    color: var(--muted-foreground);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hd-quick-menu__link i {
    font-size: 0.95rem;
    line-height: 1;
}

.hd-quick-menu__link:hover {
    background: color-mix(in oklab, var(--muted) 55%, transparent);
    color: var(--foreground);
}

.hd-quick-menu__link.is-active {
    color: var(--color-primary, #006ae6);
    background: color-mix(in oklab, var(--color-primary, #006ae6) 10%, transparent);
    border-color: color-mix(in oklab, var(--color-primary, #006ae6) 30%, var(--border));
}

.hd-quick-menu__link--accent {
    color: var(--color-primary, #006ae6);
}

.hd-quick-menu__link--primary {
    background: color-mix(in oklab, var(--color-primary, #006ae6) 12%, transparent);
    color: var(--color-primary, #006ae6);
    border-color: color-mix(in oklab, var(--color-primary, #006ae6) 35%, var(--border));
}

.hd-quick-menu__link--primary:hover {
    background: color-mix(in oklab, var(--color-primary, #006ae6) 18%, transparent);
    color: var(--color-primary, #006ae6);
}

.hd-quick-menu__label {
    display: none;
}

@media (min-width: 1280px) {
    .hd-quick-menu__label {
        display: inline;
    }
}

.hd-ops-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
    padding: 0.375rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--muted) 40%, transparent);
}

.hd-ops-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hd-ops-nav a:hover {
    background: color-mix(in oklab, var(--background) 80%, transparent);
    color: var(--foreground);
}

.hd-sidebar-subnav {
    padding: 0.15rem 0 0.25rem 0.85rem;
}

button.kt-menu-link[data-hd-sidebar-accordion-trigger] {
    appearance: none;
    background: transparent;
    border: 0;
    font: inherit;
    color: inherit;
}

[data-hd-sidebar-accordion] > .kt-menu-link .kt-menu-arrow {
    transition: transform 0.2s ease;
}

[data-hd-sidebar-accordion].show > .kt-menu-link .kt-menu-arrow {
    transform: rotate(180deg);
}

.hd-ops-nav a.is-active {
    background: var(--background);
    color: var(--color-primary, #006ae6);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
    border: 1px solid color-mix(in oklab, var(--color-primary, #006ae6) 35%, var(--border));
}

.hd-kpi {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--background);
    padding: 1rem 1.25rem;
}

.hd-kpi-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
    margin-bottom: 0.35rem;
}

.hd-kpi-value {
    font-size: 1.75rem;
    font-weight: 650;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.hd-dashboard-top {
    display: grid;
    gap: 1.25rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hd-dashboard-top {
        grid-template-columns: minmax(12rem, 1.4fr) minmax(8rem, 0.7fr) minmax(9rem, 0.8fr) auto;
        gap: 1.5rem;
    }
}

.hd-dashboard-top__kpi {
    min-width: 0;
    padding: 0.15rem 0;
}

@media (min-width: 1024px) {
    .hd-dashboard-top__kpi {
        padding-inline: 1.25rem;
        border-inline-start: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    }
}

.hd-dashboard-top__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .hd-dashboard-top__actions {
        justify-content: flex-end;
    }
}

.hd-row-link {
    transition: background-color 0.12s ease;
}

.hd-row-link:hover {
    background: color-mix(in oklab, var(--color-primary, #006ae6) 6%, transparent);
}

.hd-dashboard-missions {
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0;
}

.hd-dashboard-missions__empty {
    padding: 1.5rem 1.25rem;
}

.hd-dashboard-mission {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.85rem;
    padding: 0.7rem 1.25rem;
    text-decoration: none;
    color: inherit;
}

.hd-dashboard-mission + .hd-dashboard-mission {
    border-top: 1px solid var(--border);
}

.hd-dashboard-mission__time {
    color: var(--muted-foreground, #6b7280);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    line-height: 1.3;
    white-space: nowrap;
}

.hd-dashboard-mission__body {
    min-width: 0;
}

.hd-dashboard-mission__title {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    min-width: 0;
}

.hd-dashboard-mission__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hd-dashboard-mission__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--muted-foreground, #6b7280);
}

.hd-dashboard-mission__meta > span:not(:last-child)::after {
    content: "·";
    margin: 0 0.4rem;
    opacity: 0.45;
}

.hd-dashboard-mission__meta .hd-aircraft-reg {
    color: var(--hd-aircraft-color, #64748b);
}

.hd-dashboard-mission__status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/*
 * Dark OSM: invert the tile images only.
 * A filter on `.leaflet-layer` creates a containing block and breaks Leaflet
 * tile transforms (blank / misaligned map).
 */
.hd-dashboard-map {
    background: #e5e7eb;
}

html.dark .hd-dashboard-map {
    background: #0b1220;
}

.hd-map-tiles-dark--invert .leaflet-tile {
    filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9) saturate(0.55);
}

/* Relief swissALTI3D: blend on tiles only (not the Leaflet layer container). */
.hd-map-tiles-terrain .leaflet-tile {
    mix-blend-mode: multiply;
}

/* OpenFlightMaps community VFR overlay — license notice + error report */
.hd-ofm-notice {
    max-width: 16.75rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    background: color-mix(in oklab, var(--background) 86%, transparent);
    border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
    color: var(--foreground);
    font-size: 0.7rem;
    line-height: 1.35;
}

.hd-ofm-notice__title {
    font-weight: 650;
}

.hd-ofm-unofficial {
    color: #dc2626;
    font-weight: 700;
}

html.dark .hd-ofm-unofficial {
    color: #f87171;
}

.hd-ofm-notice__warn {
    margin: 0.2rem 0 0.4rem;
    color: var(--muted-foreground);
}

.hd-ofm-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
}

.hd-ofm-notice__link {
    color: var(--primary, #0f766e);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.hd-ofm-notice__link:hover {
    color: var(--foreground);
}

/* Fleet map — rotation start/end on trail */
.hd-rotation-endpoint {
    background: transparent;
    border: 0;
}

.hd-rotation-endpoint__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}

.hd-rotation-endpoint--start .hd-rotation-endpoint__dot {
    background: var(--hd-trail-color, #0f766e);
    color: #fff;
    border: 2px solid #fff;
}

.hd-rotation-endpoint--end .hd-rotation-endpoint__dot {
    background: #fff;
    color: var(--hd-trail-color, #0f766e);
    border: 2px solid var(--hd-trail-color, #0f766e);
}

.hd-confirm-dialog {
    margin: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--foreground, #111);
    overflow: visible;
}

.hd-confirm-dialog[open] {
    display: grid;
    place-items: center;
}

.hd-confirm-dialog::backdrop {
    background: rgb(15 23 42 / 0.45);
}

.hd-confirm-dialog__panel {
    width: min(92vw, 28rem);
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 0.75rem;
    background: var(--background, #fff);
    box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.35);
}

.hd-confirm-dialog__footer {
    justify-content: flex-end;
}

.hd-confirm-dialog__ok {
    background-color: var(--destructive, #dc2626);
    border-color: transparent;
    color: #fff;
}

.hd-confirm-dialog__ok:hover,
.hd-confirm-dialog__ok:focus-visible {
    background-color: color-mix(in srgb, var(--destructive, #dc2626) 88%, #000);
    color: #fff;
}

html.dark .hd-confirm-dialog__panel {
    background: var(--background, #111827);
    border-color: var(--border, #374151);
}

.hd-rotation-map-dialog {
    margin: auto;
    width: min(96vw, 72rem);
    max-width: none;
    max-height: min(92vh, 52rem);
    padding: 0;
    border: none;
    background: transparent;
    color: var(--foreground, #111);
    overflow: visible;
}

.hd-rotation-map-dialog::backdrop {
    background: rgb(15 23 42 / 0.45);
}

.hd-rotation-map-dialog__panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 0.75rem;
    background: var(--background, #fff);
    box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.35);
    max-height: min(92vh, 52rem);
}

.hd-rotation-map-dialog__body {
    min-height: 0;
}

.hd-rotation-map-canvas {
    height: min(70vh, 36rem);
    width: 100%;
}

/* Transport note / mission report — weight bands (beat Metronic table styles) */
.hd-weight-row > td {
    font-weight: 600 !important;
}

.hd-weight-row--ok > td {
    background-color: #bbf7d0 !important;
    color: #14532d !important;
}

.hd-weight-row--warn > td {
    background-color: #fed7aa !important;
    color: #9a3412 !important;
}

.hd-weight-row--danger > td {
    background-color: #fecaca !important;
    color: #991b1b !important;
}

html.dark .hd-weight-row--ok > td {
    background-color: #14532d !important;
    color: #bbf7d0 !important;
}

html.dark .hd-weight-row--warn > td {
    background-color: #9a3412 !important;
    color: #ffedd5 !important;
}

html.dark .hd-weight-row--danger > td {
    background-color: #7f1d1d !important;
    color: #fecaca !important;
}

/* Same sky-400 (#38bdf8) as the lifting app refuel kind / REFUELLING pill */
.hd-weight-row--refuel > td {
    background-color: #bae6fd !important;
    color: #0c4a6e !important;
}

html.dark .hd-weight-row--refuel > td {
    background-color: rgba(56, 189, 248, 0.2) !important;
    color: #38bdf8 !important;
}

.hd-weight-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 0.25rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.hd-weight-pill--ok { background: #16a34a; }
.hd-weight-pill--warn { background: #ea580c; }
.hd-weight-pill--danger { background: #dc2626; }
.hd-weight-pill--refuel { background: #0284c7; }

.hd-weight-attention {
    border-color: #dc2626 !important;
}

html.dark .hd-weight-attention {
    border-color: #f87171 !important;
}

/* Live status watermark over dashboard map */
.hd-map-live-watermark {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: min(100% - 1.5rem, 22rem);
    padding: 0.4rem 0.7rem;
    border-radius: 9999px;
    background: color-mix(in oklab, var(--background) 55%, transparent);
    border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
    backdrop-filter: blur(4px);
    pointer-events: none;
    opacity: 0.72;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.hd-map-live-watermark__pulse {
    position: relative;
    display: flex;
    width: 0.55rem;
    height: 0.55rem;
    flex-shrink: 0;
}

.hd-map-live-watermark__ping {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #34d399;
    opacity: 0.55;
    animation: hd-map-live-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hd-map-live-watermark__dot {
    position: relative;
    display: inline-flex;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    background: #10b981;
}

.hd-map-live-watermark__text {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes hd-map-live-ping {
    75%,
    100% {
        transform: scale(2.1);
        opacity: 0;
    }
}

/* Operations agenda (Google-like week / resource day) */
.hd-agenda-week__header,
.hd-agenda-week__body {
    display: grid;
    grid-template-columns: 4.5rem repeat(7, minmax(0, 1fr));
}

.hd-agenda-week__header {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

.hd-agenda-week__gutter {
    border-inline-end: 1px solid var(--border);
}

.hd-agenda-week__day-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.65rem 0.35rem;
    border-inline-end: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.hd-agenda-week__day-head:last-child {
    border-inline-end: 0;
}

.hd-agenda-week__day-head.is-today .hd-agenda-week__day-name,
.hd-agenda-week__day-head.is-today .hd-agenda-week__day-num {
    color: var(--primary);
}

.hd-agenda-week__day-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground);
}

.hd-agenda-week__day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 650;
}

.hd-agenda-week__day-head.is-today .hd-agenda-week__day-num {
    background: var(--primary);
    color: var(--primary-foreground, #fff);
}

.hd-agenda-week__body {
    min-height: 36rem;
}

.hd-agenda-week__hour-label {
    position: relative;
    height: calc(36rem / var(--hd-agenda-hours, 16));
    border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}

.hd-agenda-week__hour-label span {
    position: absolute;
    top: -0.55rem;
    inset-inline-end: 0.35rem;
    font-size: 0.65rem;
    color: var(--muted-foreground);
    background: var(--background);
    padding-inline: 0.15rem;
}

.hd-agenda-week__day-col {
    position: relative;
    border-inline-end: 1px solid var(--border);
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent calc(100% / var(--hd-agenda-hours, 16) - 1px),
            color-mix(in oklab, var(--border) 70%, transparent) calc(100% / var(--hd-agenda-hours, 16) - 1px),
            color-mix(in oklab, var(--border) 70%, transparent) calc(100% / var(--hd-agenda-hours, 16))
        );
}

.hd-agenda-week__day-col:last-child {
    border-inline-end: 0;
}

.hd-agenda-week__day-col.is-today {
    background-color: color-mix(in oklab, var(--primary) 4%, transparent);
}

.hd-agenda-week__slot {
    height: calc(36rem / var(--hd-agenda-hours, 16));
}

.hd-agenda-event {
    position: absolute;
    inset-inline: 0.2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
    border-radius: 0.4rem;
    padding: 0.25rem 0.35rem;
    font-size: 0.68rem;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 1px 0 color-mix(in oklab, #000 12%, transparent);
}

.hd-agenda-event__body {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    overflow: hidden;
}

.hd-agenda-event__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.hd-agenda-bar .hd-status-dot {
    width: 0.55rem;
    height: 0.55rem;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
}

.hd-agenda-bar .hd-badge {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.55);
    color: #0f172a;
    font-size: 0.62rem;
    line-height: 1.05rem;
    padding: 0.05rem 0.45rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-agenda-bar--warning .hd-badge {
    color: #1c1917;
}

/* Planning mission bars — solid status colors (Metronic build has no Tailwind color utils) */
.hd-agenda-bar {
    color: #fff;
    transition: filter 0.12s ease, background-color 0.12s ease;
}

.hd-agenda-bar:hover {
    filter: brightness(0.94);
    color: #fff;
}

.hd-agenda-bar--muted {
    background: #71717a;
}

.hd-agenda-bar--info {
    background: #0284c7;
}

.hd-agenda-bar--primary {
    background: var(--color-primary, #006ae6);
}

.hd-agenda-bar--warning {
    background: #f59e0b;
    color: #1c1917;
}

.hd-agenda-bar--warning:hover {
    color: #1c1917;
}

.hd-agenda-bar--success {
    background: #059669;
}

.hd-agenda-bar--neutral {
    background: #9ca3af;
}

.hd-agenda-bar--danger {
    background: #dc2626;
}

.hd-agenda-bar--aircraft {
    background: color-mix(in srgb, var(--hd-aircraft-color, #64748b) 14%, var(--background, #fff));
    color: var(--foreground, #111827);
    box-shadow: inset 0 0 0 2.5px var(--hd-aircraft-color, #64748b);
}

.hd-agenda-bar--aircraft:hover {
    color: var(--foreground, #111827);
    filter: none;
    background: color-mix(in srgb, var(--hd-aircraft-color, #64748b) 22%, var(--background, #fff));
}

.hd-agenda-bar--aircraft .hd-badge {
    background: color-mix(in srgb, var(--background, #fff) 88%, var(--hd-aircraft-color, #64748b));
    border-color: color-mix(in srgb, var(--hd-aircraft-color, #64748b) 35%, transparent);
    color: var(--foreground, #0f172a);
}

.hd-agenda-bar--aircraft .hd-status-dot {
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--background, #fff) 80%, var(--hd-aircraft-color, #64748b));
}

.hd-aircraft-swatch {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    flex: none;
    border-radius: 0.2rem;
    background: var(--hd-aircraft-color, #64748b);
    box-shadow: 0 0 0 1px color-mix(in srgb, #000 12%, transparent);
}

.hd-aircraft-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 0.85rem;
    font-size: 0.8rem;
}

.hd-aircraft-legend__label {
    color: var(--muted-foreground, #6b7280);
    font-weight: 650;
}

.hd-aircraft-legend__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hd-aircraft-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hd-aircraft-reg {
    color: var(--hd-aircraft-color, #64748b);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.hd-color-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
}

.hd-color-picker__native {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
}

.hd-color-picker__native input[type="color"] {
    width: 2.75rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 0.4rem;
    background: transparent;
    cursor: pointer;
}

.hd-color-picker__native input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.hd-color-picker__native input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 0.28rem;
}

.hd-color-picker__hex {
    min-width: 4.6rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.hd-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.hd-color-swatches__btn {
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border-radius: 0.35rem;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--swatch, #64748b);
}

.hd-color-swatches__btn.is-auto {
    width: auto;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 650;
    background: var(--muted, #f3f4f6);
    color: var(--foreground, #111827);
}

.hd-color-swatches__btn.is-selected {
    border-color: var(--foreground, #111827);
    box-shadow: 0 0 0 1px #fff;
}

.hd-agenda-event__time {
    font-weight: 650;
    opacity: 0.95;
}

.hd-agenda-event__title {
    font-weight: 600;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hd-agenda-event__meta {
    opacity: 0.92;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hd-agenda-event__meta--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Month calendar */
.hd-agenda-month__weekdays,
.hd-agenda-month__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.hd-agenda-month__weekday {
    padding: 0.55rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground, #6b7280);
    border-bottom: 1px solid color-mix(in srgb, var(--border, #d1d5db) 85%, transparent);
    text-align: center;
}

.hd-agenda-month__cell {
    min-height: 7.5rem;
    padding: 0.4rem;
    border-right: 1px solid color-mix(in srgb, var(--border, #d1d5db) 80%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--border, #d1d5db) 80%, transparent);
}

.hd-agenda-month__cell:nth-child(7n) {
    border-right: 0;
}

.hd-agenda-month__cell.is-outside {
    background: color-mix(in srgb, var(--muted, #f3f4f6) 45%, transparent);
    opacity: 0.72;
}

.hd-agenda-month__cell.is-today {
    background: color-mix(in srgb, var(--color-primary, #006ae6) 8%, transparent);
}

.hd-agenda-month__daynum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    margin-bottom: 0.25rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 650;
    color: inherit;
    text-decoration: none;
}

.hd-agenda-month__cell.is-today .hd-agenda-month__daynum {
    background: var(--color-primary, #006ae6);
    color: #fff;
}

.hd-agenda-month__events {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hd-agenda-month__chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.15rem 0.35rem;
    border-radius: 0.3rem;
    font-size: 0.72rem;
    line-height: 1.2;
    text-decoration: none;
    color: inherit;
}

.hd-agenda-month__chip-time {
    flex: none;
    font-weight: 650;
    opacity: 0.9;
}

.hd-agenda-month__chip-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Agenda list */
.hd-agenda-list__day + .hd-agenda-list__day {
    border-top: 1px solid color-mix(in srgb, var(--border, #d1d5db) 85%, transparent);
}

.hd-agenda-list__dayhead {
    padding: 0.75rem 1.25rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 650;
}

.hd-agenda-list__dayhead a {
    color: inherit;
    text-decoration: none;
}

.hd-agenda-list__day.is-today .hd-agenda-list__dayhead {
    color: var(--color-primary, #006ae6);
}

.hd-agenda-list__row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.7rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid color-mix(in srgb, var(--border, #d1d5db) 70%, transparent);
}

.hd-agenda-list__row--aircraft {
    box-shadow: inset 4px 0 0 var(--hd-aircraft-color, #64748b);
}

.hd-agenda-list__row:hover {
    background: color-mix(in srgb, var(--color-primary, #006ae6) 6%, transparent);
}

.hd-agenda-list__time {
    font-size: 0.9rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.hd-agenda-list__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.hd-agenda-list__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--muted-foreground, #6b7280);
}

.hd-agenda-now {
    position: absolute;
    z-index: 3;
    pointer-events: none;
}

.hd-agenda-now--vertical {
    inset-inline: 0;
    height: 2px;
    background: #ea4335;
}

.hd-agenda-now--horizontal {
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ea4335;
}

.hd-agenda-now__dot {
    position: absolute;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    background: #ea4335;
}

.hd-agenda-now--vertical .hd-agenda-now__dot {
    top: 50%;
    inset-inline-start: 0;
    transform: translate(-40%, -50%);
}

.hd-agenda-now--horizontal .hd-agenda-now__dot {
    top: 0;
    inset-inline-start: 50%;
    transform: translate(-50%, -35%);
}

.hd-agenda-day__header {
    display: grid;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

.hd-agenda-day__corner,
.hd-agenda-day__hour {
    padding: 0.5rem 0.35rem;
    font-size: 0.7rem;
    color: var(--muted-foreground);
    border-inline-end: 1px solid var(--border);
    text-align: center;
}

.hd-agenda-day__corner {
    text-align: start;
    padding-inline: 0.75rem;
}

.hd-agenda-day__hour:last-child {
    border-inline-end: 0;
}

.hd-agenda-day__row {
    display: grid;
    min-height: 9rem;
    border-bottom: 1px solid var(--border);
}

.hd-agenda-day__resource {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.85rem 0.75rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border-inline-end: 1px solid var(--border);
}

.hd-agenda-day__resource.is-muted {
    font-weight: 500;
    color: var(--muted-foreground);
    font-family: inherit;
}

.hd-agenda-day__track {
    --lanes: 1;
    --lane-h: 8.25rem;
    --lane-gap: 0.4rem;
    --lane-pad: 0.4rem;
    position: relative;
    min-height: calc(
        (var(--lane-pad) * 2)
        + (var(--lanes) * var(--lane-h))
        + ((var(--lanes) - 1) * var(--lane-gap))
    );
}

.hd-agenda-day__slots {
    position: absolute;
    inset: 0;
    display: grid;
    pointer-events: none;
}

.hd-agenda-day__slot {
    border-inline-end: 1px solid color-mix(in oklab, var(--border) 65%, transparent);
}

.hd-agenda-day__slot:last-child {
    border-inline-end: 0;
}

.hd-agenda-day__event {
    --lane: 0;
    position: absolute;
    top: calc(var(--lane-pad) + (var(--lane) * (var(--lane-h) + var(--lane-gap))));
    height: var(--lane-h);
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0.4rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
}

.hd-agenda-day__event .hd-agenda-event__body {
    gap: 0.18rem;
}

/* Weather webcam portlets — explicit aspect ratio (Tailwind aspect-video absent from Metronic build) */
.hd-cameras {
    width: 100%;
    max-width: min(100%, 100vw);
    box-sizing: border-box;
    overflow-x: clip;
}

.hd-cameras__grid {
    width: 100%;
    max-width: min(100%, 100vw);
    box-sizing: border-box;
}

.hd-webcam-card {
    width: 100%;
    max-width: min(100%, 100vw);
    box-sizing: border-box;
    overflow: hidden;
}

.hd-webcam-frame {
    position: relative;
    width: 100%;
    max-width: min(100%, 100vw);
    background: color-mix(in oklab, var(--muted) 55%, transparent);
    overflow: hidden;
    box-sizing: border-box;
}

/* Iframe mode: fixed 25rem. Image/fallback keep a normal 16:9 frame. */
.hd-webcam-frame[data-mode="iframe"],
.hd-webcam-frame:not([data-mode]) {
    height: 25rem;
    min-height: 25rem;
    max-height: 25rem;
    aspect-ratio: auto;
}

.hd-webcam-frame[data-mode="img"],
.hd-webcam-frame[data-mode="link"] {
    height: auto;
    min-height: 14rem;
    max-height: none;
    aspect-ratio: 16 / 9;
}

.hd-webcam-frame__media {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    background: transparent;
}

.hd-webcam-frame__iframe {
    z-index: 1;
    height: 25rem;
    max-height: 25rem;
}

.hd-webcam-frame__img {
    z-index: 0;
    height: 100%;
    max-height: none;
}

.hd-webcam-frame__fallback {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    text-align: center;
    background: color-mix(in oklab, var(--muted) 70%, var(--background));
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.hd-webcam-frame__fallback a {
    color: var(--primary);
    text-decoration: underline;
}

.hd-webcam-frame .is-hidden,
.hd-webcam-frame.is-hidden {
    display: none !important;
}

/* Mission express — map left, form column right */
.hd-express-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.hd-express-layout__map {
    min-width: 0;
}

.hd-express-layout__form {
    min-width: 0;
}

@media (min-width: 1024px) {
    .hd-express-layout {
        grid-template-columns: minmax(0, 1fr) 22rem;
    }

    .hd-express-layout__form {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* Landing site create/edit — fields left, map right */
.hd-landing-site-form {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.hd-landing-site-form__fields,
.hd-landing-site-form__map {
    min-width: 0;
}

.hd-landing-site-form__map {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hd-landing-site-form__canvas {
    width: 100%;
    height: 24rem;
    min-height: 24rem;
    background: color-mix(in oklab, var(--muted) 70%, transparent);
}

@media (min-width: 1024px) {
    .hd-landing-site-form {
        grid-template-columns: minmax(20rem, 24rem) minmax(0, 1fr);
    }

    .hd-landing-site-form__map {
        position: sticky;
        top: calc(var(--header-height, 70px) + 1rem);
    }

    .hd-landing-site-form__canvas {
        flex: 1 1 auto;
        height: calc(100vh - var(--header-height, 70px) - 13.5rem);
        min-height: 28rem;
    }
}

/* METAR visual gauges */
.hd-metar-gauges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .hd-metar-gauges {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .hd-metar-gauges {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.hd-metar-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.hd-metar-gauge__title {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-foreground, #6b7280);
}

.hd-metar-gauge__value {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
}

.hd-metar-gauge__unit {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted-foreground, #6b7280);
}

.hd-metar-gauge__sub {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted-foreground, #6b7280);
}

/* Wind rose */
.hd-metar-compass {
    width: 5.5rem;
    height: 5.5rem;
}

.hd-metar-compass__ring {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--border, #d1d5db) 80%, transparent);
    background:
        radial-gradient(circle at center, transparent 58%, color-mix(in srgb, var(--muted, #f3f4f6) 70%, transparent) 59% 100%),
        conic-gradient(from 0deg, transparent 0 1deg, color-mix(in srgb, var(--border, #d1d5db) 35%, transparent) 1deg 2deg, transparent 2deg 90deg);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border, #d1d5db) 40%, transparent);
}

.hd-metar-compass__mark {
    position: absolute;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--muted-foreground, #6b7280);
    line-height: 1;
}

.hd-metar-compass__mark--n { top: 0.2rem; left: 50%; transform: translateX(-50%); }
.hd-metar-compass__mark--e { right: 0.3rem; top: 50%; transform: translateY(-50%); }
.hd-metar-compass__mark--s { bottom: 0.2rem; left: 50%; transform: translateX(-50%); }
.hd-metar-compass__mark--w { left: 0.3rem; top: 50%; transform: translateY(-50%); }

.hd-metar-compass__sector {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: conic-gradient(
        from var(--from),
        color-mix(in srgb, var(--primary, #2563eb) 22%, transparent) 0 var(--span),
        transparent var(--span)
    );
    pointer-events: none;
}

.hd-metar-compass__needle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.18rem;
    height: 38%;
    margin-left: -0.09rem;
    margin-top: -38%;
    transform-origin: 50% 100%;
    background: linear-gradient(to top, var(--primary, #2563eb) 55%, #ef4444 55%);
    border-radius: 0.1rem 0.1rem 0 0;
    transition: transform 0.45s ease;
}

.hd-metar-compass__needle--vrb {
    transition: transform 1.1s cubic-bezier(0.4, 0.05, 0.2, 1);
    opacity: 0.9;
}

.hd-metar-compass__needle::before {
    content: "";
    position: absolute;
    top: -0.2rem;
    left: 50%;
    transform: translateX(-50%);
    border-left: 0.28rem solid transparent;
    border-right: 0.28rem solid transparent;
    border-bottom: 0.4rem solid #ef4444;
}

.hd-metar-compass__hub {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    margin: -0.275rem 0 0 -0.275rem;
    border-radius: 50%;
    background: var(--foreground, #111827);
    z-index: 2;
}

.hd-metar-compass__calm,
.hd-metar-compass__vrb {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted-foreground, #6b7280);
}

/* Speed bar */
.hd-metar-speed {
    width: 100%;
    max-width: 7.5rem;
}

.hd-metar-speed__track {
    position: relative;
    height: 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted, #e5e7eb) 90%, transparent);
    overflow: hidden;
}

.hd-metar-speed__gust {
    position: absolute;
    inset: 0 auto 0 0;
    background: color-mix(in srgb, #f59e0b 45%, transparent);
    border-radius: 999px;
}

.hd-metar-speed__fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--primary, #2563eb);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.hd-metar-speed__scale {
    display: flex;
    justify-content: space-between;
    margin-top: 0.2rem;
    font-size: 0.6rem;
    color: var(--muted-foreground, #6b7280);
}

/* Temperature strip */
.hd-metar-temp {
    width: 100%;
    max-width: 7.5rem;
}

.hd-metar-temp__track {
    position: relative;
    height: 0.55rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8 0%, #86efac 35%, #fbbf24 65%, #f87171 100%);
}

.hd-metar-temp__marker {
    position: absolute;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    margin-left: -0.275rem;
    margin-top: -0.275rem;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--foreground, #111827) 25%, transparent);
}

.hd-metar-temp__marker--t { background: #111827; }
.hd-metar-temp__marker--d { background: #38bdf8; }

.hd-metar-temp__scale {
    display: flex;
    justify-content: space-between;
    margin-top: 0.2rem;
    font-size: 0.6rem;
    color: var(--muted-foreground, #6b7280);
}

/* Visibility */
.hd-metar-vis {
    width: 100%;
    max-width: 7.5rem;
}

.hd-metar-vis__track {
    height: 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted, #e5e7eb) 90%, transparent);
    overflow: hidden;
}

.hd-metar-vis__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #94a3b8, #0ea5e9);
    transition: width 0.4s ease;
}

/* QNH dial */
.hd-metar-qnh__dial {
    position: relative;
    width: 4.25rem;
    height: 2.35rem;
    border-radius: 4.25rem 4.25rem 0 0;
    border: 2px solid color-mix(in srgb, var(--border, #d1d5db) 80%, transparent);
    border-bottom: 0;
    background: color-mix(in srgb, var(--muted, #f3f4f6) 55%, transparent);
    overflow: hidden;
}

.hd-metar-qnh__needle {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0.14rem;
    height: 85%;
    margin-left: -0.07rem;
    transform-origin: 50% 100%;
    background: var(--primary, #2563eb);
    transition: transform 0.45s ease;
}

.hd-metar-qnh__hub {
    position: absolute;
    left: 50%;
    bottom: -0.2rem;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: -0.25rem;
    border-radius: 50%;
    background: var(--foreground, #111827);
}

/* Mission create/edit form */
.hd-mission-form-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 5.5rem;
}

.hd-mission-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.hd-mission-form__columns {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
    .hd-mission-form__columns {
        grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.75fr);
        align-items: start;
    }
}

.hd-mission-form__side {
    min-width: 0;
}

.hd-mission-form__schedule {
    align-items: center;
}

.hd-mission-form__schedule > div {
    flex: 1 1 10rem;
    min-width: 0;
}

.hd-mission-form .hd-mission-show__schedule-sep {
    padding-bottom: 0;
}

.hd-mission-crew-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--muted, #f3f4f6) 35%, transparent);
}

.hd-mission-crew-row + .hd-mission-crew-row {
    margin-top: 0.15rem;
}

.hd-mission-route {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
}

@media (min-width: 640px) {
    .hd-mission-route {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 0.85rem;
    }
}

.hd-mission-route__arrow {
    display: none;
    padding-bottom: 0.65rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--muted-foreground, #6b7280);
    line-height: 1;
}

@media (min-width: 640px) {
    .hd-mission-route__arrow {
        display: grid;
        place-items: center;
    }
}

/* Mission show (read-only detail) */
.hd-mission-show {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hd-mission-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.hd-ops-display__ref {
    margin: 0 0 0.2rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #38bdf8;
}

.hd-mission-show__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.hd-mission-show__actions-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.hd-mission-show__actions-danger {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}

.hd-documents-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hd-documents-menu__toggle {
    list-style: none;
    gap: 0.4rem;
}

.hd-documents-menu__toggle::-webkit-details-marker {
    display: none;
}

.hd-documents-menu__toggle::marker {
    content: '';
}

.hd-documents-menu__panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 40;
    min-width: 12.5rem;
    padding: 0.35rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--background);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.hd-documents-menu__item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--foreground);
    font: inherit;
    font-size: 0.875rem;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.hd-documents-menu__item:hover,
.hd-documents-menu__item:focus-visible {
    background: color-mix(in srgb, var(--accent) 60%, transparent);
    outline: none;
}

.hd-mission-show__top {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
}

@media (min-width: 900px) {
    .hd-mission-show__top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .hd-mission-show__top {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(16rem, 0.9fr);
    }
}

.hd-mission-show__card {
    min-width: 0;
    height: 100%;
}

.hd-mission-show__field-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-foreground, #6b7280);
    margin-bottom: 0.2rem;
}

.hd-mission-show__field-value {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.hd-mission-show__fields {
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}

.hd-mission-show__schedule-range {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    margin-top: 0.25rem;
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.hd-mission-show__schedule-sep {
    color: var(--muted-foreground, #6b7280);
    font-weight: 500;
}

.hd-mission-show__crew-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
}

.hd-mission-show__crew-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.hd-mission-show__zones-canvas {
    height: 60rem;
    min-height: 60rem;
}

.hd-planned-route-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    align-items: baseline;
    min-height: 1.25rem;
    font-size: 0.875rem;
}

.hd-planned-route-summary__ete {
    font-weight: 600;
    color: var(--foreground, #0f172a);
}

.hd-planned-route-summary__hint {
    color: var(--muted-foreground, #64748b);
}

.hd-route-waypoint {
    background: transparent;
    border: 0;
}

.hd-route-waypoint .hd-rotation-endpoint__dot {
    background: #1d4ed8;
    color: #fff;
    border: 2px solid #fff;
}

.hd-mission-form__actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 0.25rem;
    padding: 0.85rem 0;
    background: color-mix(in srgb, var(--background, #fff) 92%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--border, #d1d5db) 85%, transparent);
    backdrop-filter: blur(8px);
}

.hd-mission-form__actions-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100%;
}

/* List tables — Metronic bundle has px-0/px-5 but no px-6; kt-card-content px-0
   flushed the table to the card edges. Match card content (1.25rem) on first/last cells. */
.hd-customer-list,
.hd-user-list {
    overflow: hidden;
}

.hd-customer-list .kt-table-wrapper,
.hd-user-list .kt-table-wrapper {
    overflow-x: auto;
}

.hd-customer-list .kt-table :is(th, td),
.hd-user-list .kt-table :is(th, td) {
    padding-block: 0.75rem;
    padding-inline: 1rem;
    vertical-align: middle;
}

.hd-customer-list .kt-table :is(th, td):first-child,
.hd-user-list .kt-table :is(th, td):first-child {
    padding-inline-start: 1.25rem;
}

.hd-customer-list .kt-table :is(th, td):last-child,
.hd-user-list .kt-table :is(th, td):last-child {
    padding-inline-end: 1.25rem;
}

.hd-customer-list .kt-table tbody tr:last-child :is(th, td),
.hd-user-list .kt-table tbody tr:last-child :is(th, td) {
    padding-bottom: 1rem;
}

.hd-customer-list .kt-table thead th,
.hd-user-list .kt-table thead th {
    padding-top: 0.85rem;
}

.hd-customer-list__name,
.hd-user-list__name {
    font-weight: 600;
    color: var(--foreground);
    text-decoration: none;
}

.hd-customer-list__name:hover {
    color: var(--primary, #2563eb);
}

.hd-user-list__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.hd-customer-list__meta {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--muted-foreground);
    margin-top: 0.15rem;
}

/* CRM customer form (fiche édition / création) */
.hd-customer-form-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 72rem;
}

.hd-customer-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 960px) {
    .hd-customer-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.hd-customer-form .kt-card {
    min-width: 0;
}

.hd-customer-form .kt-card-header {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
}

.hd-customer-form .kt-card-content {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1.25rem;
}

.hd-customer-form__subsection {
    margin: 0.35rem 0 0;
    padding-top: 1.15rem;
    border-top: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    font-size: 0.8rem;
    font-weight: 600;
}

.hd-customer-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hd-customer-form__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .hd-customer-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hd-customer-form__grid--city {
        grid-template-columns: 8rem minmax(0, 1fr);
    }
}

.hd-customer-form__country {
    max-width: 18rem;
}

.hd-customer-form__people {
    grid-column: 1 / -1;
}

.hd-customer-form__people .kt-card-header {
    align-items: center;
}

.hd-customer-show {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 72rem;
}

.hd-customer-show__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

@media (min-width: 960px) {
    .hd-customer-show__top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hd-customer-show .kt-card {
    min-width: 0;
}

.hd-customer-show .kt-card-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
}

.hd-customer-show .kt-card-content {
    padding: 1.25rem;
}

.hd-customer-show__fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hd-customer-show__pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .hd-customer-show__pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hd-customer-show__notes {
    white-space: pre-wrap;
}

.hd-customer-show__block {
    min-width: 0;
}

.hd-customer-reference {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hd-customer-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hd-customer-contact {
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--muted, #f3f4f6) 35%, transparent);
}

.hd-customer-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem 1rem;
}

.hd-customer-contact__remove {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

@media (min-width: 640px) {
    .hd-customer-contact__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hd-customer-contact__remove {
        grid-column: 1 / -1;
    }
}

@media (min-width: 960px) {
    .hd-customer-contact__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hd-customer-contact__remove {
        grid-column: auto;
    }
}

.hd-customer-type__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.hd-customer-type__option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    border-radius: 0.5rem;
    background: var(--background, #fff);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.hd-customer-type__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hd-customer-type__option:hover {
    border-color: color-mix(in srgb, var(--primary, #2563eb) 45%, var(--border, #d1d5db));
}

.hd-customer-type__option:has(input:checked) {
    border-color: var(--primary, #2563eb);
    background: color-mix(in srgb, var(--primary, #2563eb) 8%, transparent);
    color: var(--primary, #2563eb);
}

.hd-customer-type__option:has(input:focus-visible) {
    outline: 2px solid color-mix(in srgb, var(--primary, #2563eb) 45%, transparent);
    outline-offset: 2px;
}

.hd-customer-form__actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 0 -0.25rem;
    padding: 0.85rem 0.25rem;
    background: color-mix(in srgb, var(--background, #fff) 92%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--border, #d1d5db) 85%, transparent);
    backdrop-filter: blur(8px);
}

.hd-customer-form__actions-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* CRM customer address suggestions */
.hd-address-suggest {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    border-radius: 0.5rem;
    background: var(--background, #fff);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--foreground, #111827) 12%, transparent);
}

.hd-address-suggest__item {
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.hd-address-suggest__item:hover,
.hd-address-suggest__item:focus {
    background: color-mix(in srgb, var(--muted, #f3f4f6) 90%, transparent);
}

/* Tenant logo (square or rectangular) */
.hd-tenant-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.35rem;
    background: transparent;
}

.hd-tenant-logo--sm {
    height: 1.65rem;
    max-width: 5.5rem;
    width: auto;
}

.hd-tenant-logo--preview {
    height: 4.5rem;
    max-width: 12rem;
    width: auto;
}

.hd-tenant-logo-frame {
    display: grid;
    place-items: center;
    min-width: 5rem;
    max-width: 12rem;
    height: 5rem;
    padding: 0.35rem;
    border: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    border-radius: 0.55rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--muted, #f3f4f6) 40%, transparent);
}

.hd-aircraft-icon-frame {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0.35rem;
    border: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--muted, #f3f4f6) 40%, transparent);
}

.hd-aircraft-icon-preview {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

.hd-aircraft-icon-preview--default {
    opacity: 0.75;
}

/*
 * Metronic flattens every Leaflet pane to z-index:1 (!important), which can hide
 * vector overlays (trails / zones) under later tile layers (e.g. WMS obstacles).
 * Restore Leaflet’s stacking order for ops maps.
 */
.leaflet-container .leaflet-tile-pane {
    z-index: 200 !important;
}
.leaflet-container .leaflet-overlay-pane {
    z-index: 400 !important;
}
.leaflet-container .leaflet-hdTrailPane {
    z-index: 450 !important;
}
.leaflet-container .leaflet-shadow-pane {
    z-index: 500 !important;
}
.leaflet-container .leaflet-marker-pane {
    z-index: 600 !important;
}
.leaflet-container .leaflet-tooltip-pane {
    z-index: 650 !important;
}
.leaflet-container .leaflet-popup-pane {
    z-index: 700 !important;
}
.leaflet-container .leaflet-top,
.leaflet-container .leaflet-bottom {
    z-index: 1000 !important;
}
.leaflet-container .leaflet-control {
    z-index: 1000 !important;
}
.leaflet-container .leaflet-overlay-pane svg {
    max-width: none !important;
    max-height: none !important;
}

.hd-aircraft-marker {
    background: transparent;
    border: 0;
}

.hd-aircraft-marker__icon {
    display: block;
    width: 72px;
    height: 72px;
    background-color: var(--hd-marker-color, #111111);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    /* Prefer alpha masks so orange/black/gray tint the silhouette reliably. */
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
    filter: drop-shadow(0 2px 4px rgb(15 23 42 / 0.45));
}

.hd-aircraft-marker.is-stale .hd-aircraft-marker__icon,
.hd-aircraft-marker--offline .hd-aircraft-marker__icon {
    opacity: 0.85;
}

.hd-aircraft-marker.is-dimmed {
    opacity: 0.35;
    filter: grayscale(0.35);
}

.hd-aircraft-marker.is-selected .hd-aircraft-marker__icon {
    transform: scale(1.18);
    filter:
        drop-shadow(0 0 0 2px rgba(255, 255, 255, 0.95))
        drop-shadow(0 0 12px rgba(14, 165, 233, 0.85))
        drop-shadow(0 2px 4px rgb(15 23 42 / 0.45));
}

/* Aircraft cockpit gauge — dual thumbs (warn + max), red beyond max */
.hd-gauge-scale {
    width: 100%;
    max-width: none;
}

.hd-gauge-scale__range {
    position: relative;
    height: 2.5rem;
}

.hd-gauge-scale__track {
    position: absolute;
    inset-inline: 0;
    top: 0.85rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #dc2626;
}

.hd-gauge-scale__slider {
    position: absolute;
    inset-inline: 0;
    top: 0.85rem;
    width: 100%;
    height: 0.5rem;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
}

.hd-gauge-scale__slider::-webkit-slider-runnable-track {
    height: 0.5rem;
    background: transparent;
}

.hd-gauge-scale__slider::-moz-range-track {
    height: 0.5rem;
    background: transparent;
    border: 0;
}

.hd-gauge-scale__slider::-webkit-slider-thumb {
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: -0.375rem;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #1f2937;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.35);
    cursor: pointer;
}

.hd-gauge-scale__slider::-moz-range-thumb {
    pointer-events: auto;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #1f2937;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.35);
    cursor: pointer;
}

.hd-gauge-scale__labels {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--muted-foreground, #64748b);
}

.hd-gauge-scale__lbl--warn {
    color: #ea580c;
}

.hd-gauge-scale__lbl--danger {
    color: #b45309;
}

.hd-gauge-scale__lbl--max {
    color: #dc2626;
}

.leaflet-container .leaflet-hdAircraftPane {
    z-index: 620 !important;
}

.hd-map-marker-label {
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    border: 0;
    border-radius: 0.35rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    box-shadow: none;
}

.hd-map-annotation {
    background: transparent;
    border: 0;
}

.hd-map-annotation__pin {
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #ea580c;
    box-shadow: 0 1px 4px rgb(15 23 42 / 0.45);
}

.hd-map-place {
    background: transparent;
    border: 0;
}

.hd-map-place__dot {
    display: block;
    width: 12px;
    height: 12px;
    margin: 1px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.4);
}

.hd-map-place--catalog .hd-map-place__dot {
    background: #0f766e;
}

.hd-map-place--manual .hd-map-place__dot {
    background: #ea580c;
}

.hd-map-annotation__label {
    display: block;
    margin-top: 2px;
    max-width: 9rem;
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
    background: rgba(15, 23, 42, 0.88);
    color: #fff7ed;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-map-marker-label::before {
    border-top-color: rgba(15, 23, 42, 0.85);
}

.hd-tenant-logo-placeholder {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--muted-foreground, #6b7280);
}

.hd-sidebar-header--has-logo {
    min-height: var(--header-height, 70px);
}

.hd-sidebar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.hd-sidebar-brand--logo {
    width: 100%;
}

/* One full-width logo in expanded sidebar; compact icon when collapsed */
.hd-sidebar-brand--logo .hd-tenant-logo--sidebar {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 2.75rem;
    object-fit: contain;
    object-position: left center;
}

.hd-sidebar-brand--logo .hd-tenant-logo--sidebar-compact {
    width: 2rem;
    max-width: 2rem;
    height: 2rem;
    object-fit: contain;
    object-position: center;
}

@media (min-width: 64rem) {
    .demo1 .kt-sidebar .hd-sidebar-brand--logo > .small-logo {
        display: none;
    }

    .demo1.kt-sidebar-collapse .kt-sidebar:not(:hover) .hd-sidebar-brand--logo > .default-logo {
        display: none;
    }

    .demo1.kt-sidebar-collapse .kt-sidebar:not(:hover) .hd-sidebar-brand--logo > .small-logo {
        display: block;
    }
}

/* Ops display — fullscreen wallboard */
.hd-ops-display-body {
    margin: 0;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
}

.hd-ops-display {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #0b1220;
}

.hd-ops-display__map {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.hd-ops-display__overlay {
    position: absolute;
    z-index: 500;
    top: 1rem;
    left: 1rem;
    bottom: 1rem;
    width: min(24rem, calc(100vw - 2rem));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(11, 18, 32, 0.82);
    color: #f8fafc;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hd-ops-display__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.hd-ops-display__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.65);
}

.hd-ops-display__title {
    margin: 0.2rem 0 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
}

.hd-ops-display__exit {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.8);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.hd-ops-display__exit:hover {
    color: #fff;
}

.hd-ops-display__feed {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.hd-ops-display__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    padding: 1rem;
    text-align: center;
    color: rgba(248, 250, 252, 0.7);
    font-size: 0.95rem;
}

.hd-ops-display__list {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.15rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.hd-ops-display__card {
    flex: 0 0 auto;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.hd-ops-display__card:hover,
.hd-ops-display__card:focus-visible {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.hd-ops-display__card.is-selected {
    border-color: rgba(56, 189, 248, 0.85);
    background: rgba(14, 165, 233, 0.18);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.hd-ops-display__card.is-overdue {
    background: rgba(185, 28, 28, 0.42);
    border-color: rgba(248, 113, 113, 0.7);
}

.hd-ops-display__card.is-overdue:hover,
.hd-ops-display__card.is-overdue:focus-visible {
    background: rgba(185, 28, 28, 0.55);
    border-color: rgba(252, 165, 165, 0.9);
}

.hd-ops-display__card.is-overdue.is-selected {
    border-color: rgba(56, 189, 248, 0.9);
    background: rgba(185, 28, 28, 0.5);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
}

.hd-ops-display__card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.hd-ops-display__card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.hd-ops-display__meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hd-ops-display__meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: rgba(248, 250, 252, 0.72);
}

.hd-ops-display__meta-row strong {
    color: #fff;
    font-weight: 560;
    text-align: right;
}

.hd-ops-display__meta-row--refuel strong {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 0.35rem;
    font-weight: 700;
}

.hd-ops-display__footer {
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.6);
}

@media (max-width: 48rem) {
    .hd-ops-display__overlay {
        top: auto;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        width: auto;
        max-height: 42vh;
    }
}

/* Guest auth — split visual + form */
.hd-guest-body {
    margin: 0;
    min-height: 100%;
    height: 100%;
    overflow: auto;
    background: #0b1220;
}

.hd-guest-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 28rem);
    min-height: 100vh;
    min-height: 100dvh;
}

.hd-guest-visual {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(15, 118, 110, 0.55), rgba(11, 18, 32, 0.85)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.28), transparent 40%),
        linear-gradient(160deg, #0f766e 0%, #0b1220 55%, #111827 100%);
    background-size: cover;
    background-position: center;
}

.hd-guest-visual[style*="--hd-login-bg"] {
    background-image:
        linear-gradient(120deg, rgba(11, 18, 32, 0.35), rgba(11, 18, 32, 0.72)),
        var(--hd-login-bg);
    background-size: cover;
    background-position: center;
}

.hd-guest-visual__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(11, 18, 32, 0.72), transparent 45%),
        linear-gradient(to right, rgba(11, 18, 32, 0.2), transparent 35%);
    pointer-events: none;
}

.hd-guest-visual__caption {
    position: absolute;
    left: 2.5rem;
    right: 2.5rem;
    bottom: 2.5rem;
    z-index: 1;
    color: #f8fafc;
}

.hd-guest-visual__brand {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hd-guest-visual__tagline {
    margin: 0.85rem 0 0;
    max-width: 28rem;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(248, 250, 252, 0.85);
}

.hd-guest-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #f8fafc;
}

.hd-guest-panel__inner {
    width: 100%;
    max-width: 24rem;
}

.hd-guest-brand {
    margin-bottom: 1.75rem;
}

.hd-guest-brand__logo {
    display: block;
    max-width: 10rem;
    max-height: 3.5rem;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.hd-guest-brand__title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.hd-guest-brand__subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.95rem;
    color: #64748b;
}

.hd-guest-card {
    padding: 0;
}

/* Secondary actions stay readable on the light guest panel, even if dark tokens leak. */
.hd-guest-panel .kt-btn-ghost {
    color: #0f172a;
    background-color: transparent;
    border: 1px solid #cbd5e1;
}

.hd-guest-panel .kt-btn-ghost:hover,
.hd-guest-panel .kt-btn-ghost:focus-visible {
    background-color: #e2e8f0;
    color: #0f172a;
}

.hd-login-bg-preview {
    width: 12rem;
    height: 7.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border, #e2e8f0);
    background: #0b1220;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-login-bg-preview__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hd-login-bg-preview__empty {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.7);
}

@media (max-width: 64rem) {
    .hd-guest-shell {
        grid-template-columns: 1fr;
    }

    .hd-guest-visual {
        min-height: 34vh;
    }

    .hd-guest-visual__caption {
        left: 1.25rem;
        right: 1.25rem;
        bottom: 1.25rem;
    }

    .hd-guest-visual__brand {
        font-size: 1.75rem;
    }

    .hd-guest-visual__tagline {
        display: none;
    }
}

/* Central landing — helidesk.ch */
.hd-central-body {
    margin: 0;
    min-height: 100%;
    height: 100%;
    overflow: hidden;
    background: #071018;
    color: #f4f7f5;
    font-family: "Manrope", sans-serif;
}

.hd-central-hero {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hd-central-hero__video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.04);
    animation: hd-central-drift 28s ease-in-out infinite alternate;
}

.hd-central-hero__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(7, 16, 24, 0.78) 0%, rgba(7, 16, 24, 0.42) 42%, rgba(7, 16, 24, 0.18) 100%),
        linear-gradient(0deg, rgba(7, 16, 24, 0.88) 0%, rgba(7, 16, 24, 0.28) 42%, rgba(7, 16, 24, 0.35) 100%);
    pointer-events: none;
}

.hd-central-hero__content {
    position: relative;
    z-index: 2;
    width: min(42rem, calc(100% - 3rem));
    margin: 0 0 clamp(2.5rem, 8vh, 5.5rem) clamp(1.25rem, 5vw, 4.5rem);
    animation: hd-central-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hd-central-hero__brand {
    margin: 0 0 1.1rem;
    font-family: "Sora", sans-serif;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: #f7fbf9;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    animation: hd-central-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hd-central-hero__headline {
    margin: 0;
    max-width: 18ch;
    font-family: "Sora", sans-serif;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #e8f3ee;
    animation: hd-central-rise 1000ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hd-central-hero__lede {
    margin: 1rem 0 0;
    max-width: 34rem;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.55;
    font-weight: 500;
    color: rgba(232, 243, 238, 0.84);
    animation: hd-central-rise 1100ms 140ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hd-central-hero__actions {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    animation: hd-central-rise 1200ms 200ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hd-central-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.75rem 1.35rem;
    border-radius: 999px;
    background: #dceee6;
    color: #0b1c18;
    font-family: "Sora", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease;
}

.hd-central-hero__cta:hover {
    background: #f4fbf8;
    transform: translateY(-1px);
}

.hd-central-hero__hint {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(232, 243, 238, 0.68);
}

@keyframes hd-central-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hd-central-drift {
    from {
        transform: scale(1.04) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.08) translate3d(-1.2%, -0.8%, 0);
    }
}

@media (max-width: 48rem) {
    .hd-central-hero {
        align-items: flex-end;
    }

    .hd-central-hero__content {
        width: calc(100% - 2rem);
        margin: 0 1rem 2rem;
    }

    .hd-central-hero__headline {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hd-central-hero__video,
    .hd-central-hero__content,
    .hd-central-hero__brand,
    .hd-central-hero__headline,
    .hd-central-hero__lede,
    .hd-central-hero__actions {
        animation: none;
    }

    .hd-central-hero__video {
        transform: none;
    }
}

.hd-wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1rem;
}

.hd-wiki-card {
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.hd-wiki-card:hover {
    border-color: color-mix(in oklab, var(--color-primary, #006ae6) 45%, var(--border));
    box-shadow: 0 8px 24px color-mix(in oklab, #000 8%, transparent);
}

.hd-wiki-card__body {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.hd-wiki-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex: none;
    border-radius: 0.6rem;
    background: color-mix(in oklab, var(--color-primary, #006ae6) 12%, var(--muted));
    color: var(--color-primary, #006ae6);
}

.hd-wiki-card__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 650;
}

.hd-wiki-card__summary {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.hd-wiki-card__open {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--color-primary, #006ae6);
}

.hd-wiki-article__intro {
    margin: 0 0 1.25rem;
    max-width: 42rem;
    color: var(--muted-foreground);
}

.hd-wiki-status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hd-wiki-status {
    display: grid;
    grid-template-columns: minmax(8.5rem, 10rem) 1fr;
    gap: 0.85rem 1.1rem;
    align-items: start;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: color-mix(in oklab, var(--muted) 28%, var(--background));
}

.hd-wiki-status__text {
    margin: 0;
    font-size: 0.925rem;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .hd-wiki-status {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }
}

.hd-wiki-notes {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 42rem;
}

.hd-wiki-notes p {
    margin: 0;
    font-size: 0.925rem;
    line-height: 1.45;
    color: var(--muted-foreground);
}

.hd-wiki-section {
    margin-top: 1.75rem;
    max-width: 46rem;
}

.hd-wiki-section:first-of-type {
    margin-top: 0;
}

.hd-wiki-section__title {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
    font-weight: 650;
}

.hd-wiki-section__text {
    margin: 0 0 0.85rem;
    font-size: 0.925rem;
    line-height: 1.5;
}

.hd-wiki-section .hd-wiki-status-list,
.hd-wiki-section .hd-wiki-notes {
    margin-top: 0.85rem;
}

.hd-wiki-section .hd-wiki-section__text + .hd-wiki-section__text {
    margin-top: 0.65rem;
}

.hd-wiki-bullets {
    margin: 0 0 0.25rem;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.925rem;
    line-height: 1.45;
}

.hd-wiki-bullets li::marker {
    color: var(--color-primary, #006ae6);
}

.hd-wiki-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hd-wiki-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--muted-foreground);
}

.hd-wiki-article--wide .hd-wiki-section--wide {
    max-width: none;
}

.hd-wiki-table-wrap {
    overflow-x: auto;
    margin: 0.15rem 0 1rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: color-mix(in oklab, var(--muted) 18%, var(--background));
}

.hd-wiki-table {
    width: 100%;
    min-width: 52rem;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.hd-wiki-table caption {
    caption-side: bottom;
}

.hd-wiki-table th,
.hd-wiki-table td {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.hd-wiki-table thead th {
    font-weight: 650;
    background: color-mix(in oklab, var(--muted) 48%, var(--background));
}

.hd-wiki-table th:first-child,
.hd-wiki-table td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 1;
    font-weight: 650;
    box-shadow: 1px 0 0 var(--border);
}

.hd-wiki-table thead th:first-child {
    background: color-mix(in oklab, var(--muted) 48%, var(--background));
    z-index: 2;
}

.hd-wiki-table tbody th {
    background: color-mix(in oklab, var(--muted) 22%, var(--background));
}

.hd-wiki-table tbody tr:last-child :is(th, td) {
    border-bottom: 0;
}

.hd-wiki-table tbody tr:hover :is(th, td) {
    background: color-mix(in oklab, var(--color-primary, #006ae6) 7%, var(--background));
}

.hd-wiki-status-list--compact {
    margin-top: 0.35rem;
}

.hd-wiki-status-list--compact .hd-wiki-status {
    padding: 0.55rem 0.75rem;
}

.hd-wiki-card__visual {
    height: 5.5rem;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(120% 80% at 10% 0%, color-mix(in oklab, var(--color-primary, #006ae6) 16%, transparent), transparent 55%),
        color-mix(in oklab, var(--muted) 42%, var(--background));
}

.hd-wiki-card-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hd-wiki-card-svg__bg {
    fill: transparent;
}

.hd-wiki-card-svg__node {
    fill: color-mix(in oklab, var(--color-primary, #006ae6) 22%, var(--background));
    stroke: color-mix(in oklab, var(--color-primary, #006ae6) 45%, var(--border));
    stroke-width: 1.5;
}

.hd-wiki-card-svg__node--accent {
    fill: var(--color-primary, #006ae6);
    stroke: none;
}

.hd-wiki-card-svg__line {
    fill: none;
    stroke: color-mix(in oklab, var(--color-primary, #006ae6) 40%, var(--border));
    stroke-width: 2;
    stroke-linecap: round;
}

.hd-wiki-card-svg__curve {
    fill: none;
    stroke: color-mix(in oklab, var(--color-primary, #006ae6) 55%, var(--foreground));
    stroke-width: 2.5;
    stroke-linecap: round;
}

.hd-wiki-card-svg__median {
    stroke: var(--color-primary, #006ae6);
    stroke-width: 2;
    stroke-dasharray: 4 3;
}

.hd-wiki-card-svg__device {
    fill: color-mix(in oklab, var(--muted) 55%, var(--background));
    stroke: color-mix(in oklab, var(--color-primary, #006ae6) 35%, var(--border));
    stroke-width: 1.5;
}

.hd-wiki-card-svg__device--accent {
    fill: color-mix(in oklab, var(--color-primary, #006ae6) 18%, var(--background));
    stroke: var(--color-primary, #006ae6);
}

.hd-wiki-card-svg__bar {
    fill: color-mix(in oklab, var(--color-primary, #006ae6) 18%, var(--muted));
}

.hd-wiki-card-svg__bar--accent {
    fill: var(--color-primary, #006ae6);
}

.hd-wiki-section--diagram {
    max-width: 52rem;
}

.hd-wiki-figure {
    margin: 0.85rem 0 1.15rem;
    padding: 0.9rem 1rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background:
        linear-gradient(180deg, color-mix(in oklab, var(--color-primary, #006ae6) 6%, var(--background)), var(--background) 42%);
    --hd-wiki-accent: var(--color-primary, #006ae6);
}

.hd-wiki-figure__title {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    font-weight: 650;
}

.hd-wiki-figure__canvas {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hd-wiki-figure__caption {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--muted-foreground);
    max-width: 46rem;
}

.hd-wiki-figure__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    margin: 0.7rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.78rem;
    color: var(--muted-foreground);
}

.hd-wiki-figure__legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hd-wiki-swatch {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    flex: none;
    background: var(--border);
}

.hd-wiki-swatch--cruise {
    background: color-mix(in oklab, var(--color-primary, #006ae6) 35%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-primary, #006ae6) 45%, var(--border));
}

.hd-wiki-swatch--transition {
    background: color-mix(in oklab, var(--muted-foreground) 18%, transparent);
    box-shadow: inset 0 0 0 1px var(--border);
}

.hd-wiki-swatch--median {
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--color-primary, #006ae6);
}

.hd-wiki-swatch--max,
.hd-wiki-swatch--drop {
    background: var(--color-primary, #006ae6);
}

.hd-wiki-svg {
    display: block;
    width: 100%;
    min-width: 34rem;
    height: auto;
    color: var(--foreground);
}

.hd-wiki-svg__axis {
    stroke: color-mix(in oklab, var(--muted-foreground) 35%, var(--border));
    stroke-width: 1.25;
}

.hd-wiki-svg__threshold {
    stroke: color-mix(in oklab, var(--muted-foreground) 45%, var(--border));
    stroke-width: 1.25;
    stroke-dasharray: 5 4;
}

.hd-wiki-svg__guide {
    stroke: color-mix(in oklab, var(--color-primary, #006ae6) 35%, var(--border));
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.hd-wiki-svg__curve {
    fill: none;
    stroke: color-mix(in oklab, var(--foreground) 72%, var(--color-primary, #006ae6));
    stroke-width: 2.75;
    stroke-linecap: round;
}

.hd-wiki-svg__median {
    stroke: var(--color-primary, #006ae6);
    stroke-width: 2.25;
    stroke-dasharray: 6 4;
}

.hd-wiki-svg__brace {
    fill: none;
    stroke: color-mix(in oklab, var(--muted-foreground) 40%, var(--border));
    stroke-width: 1.5;
}

.hd-wiki-svg__band--cruise {
    fill: color-mix(in oklab, var(--color-primary, #006ae6) 12%, transparent);
}

.hd-wiki-svg__band--transition {
    fill: color-mix(in oklab, var(--muted-foreground) 7%, transparent);
}

.hd-wiki-svg__band--return {
    fill: color-mix(in oklab, var(--muted) 55%, transparent);
}

.hd-wiki-svg__label {
    fill: var(--foreground);
    font-size: 11px;
    font-weight: 650;
}

.hd-wiki-svg__label--accent {
    fill: var(--color-primary, #006ae6);
}

.hd-wiki-svg__muted {
    fill: var(--muted-foreground);
    font-size: 10px;
}

.hd-wiki-svg__formula {
    fill: var(--color-primary, #006ae6);
    font-size: 18px;
    font-weight: 700;
}

.hd-wiki-svg__card {
    fill: color-mix(in oklab, var(--muted) 28%, var(--background));
    stroke: var(--border);
    stroke-width: 1;
}

.hd-wiki-svg__arrow {
    stroke: var(--color-primary, #006ae6);
    stroke-width: 2.5;
    fill: none;
}

.hd-wiki-svg__arrow-head {
    fill: var(--color-primary, #006ae6);
}

.hd-wiki-svg__dot {
    fill: var(--color-primary, #006ae6);
}

.hd-wiki-svg__dot--muted {
    fill: color-mix(in oklab, var(--muted-foreground) 45%, var(--background));
}

.hd-wiki-svg__dot--drop {
    fill: var(--color-primary, #006ae6);
    stroke: color-mix(in oklab, var(--background) 70%, white);
    stroke-width: 2;
}

.hd-wiki-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
}

.hd-wiki-flow__phase {
    flex: 1 1 12rem;
    min-width: 11rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--muted) 22%, var(--background));
}

.hd-wiki-flow__phase--commercial {
    background: color-mix(in oklab, #64748b 10%, var(--background));
}

.hd-wiki-flow__phase--ops {
    background: color-mix(in oklab, var(--color-primary, #006ae6) 10%, var(--background));
}

.hd-wiki-flow__phase--billing {
    background: color-mix(in oklab, #16a34a 8%, var(--background));
}

.hd-wiki-flow__phase-title {
    margin: 0 0 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

.hd-wiki-flow__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.hd-wiki-flow__arrow,
.hd-wiki-flow__bridge,
.hd-wiki-screens__arrow {
    color: var(--muted-foreground);
    font-weight: 650;
    user-select: none;
}

.hd-wiki-flow__bridge {
    display: flex;
    align-items: center;
    padding: 0 0.15rem;
}

.hd-wiki-screens {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: stretch;
}

.hd-wiki-screens__arrow {
    display: none;
}

.hd-wiki-screen {
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    overflow: hidden;
    background: color-mix(in oklab, var(--muted) 20%, var(--background));
}

.hd-wiki-screen__chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklab, var(--muted) 45%, var(--background));
}

.hd-wiki-screen__dots {
    width: 2.1rem;
    height: 0.45rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 0.2rem 50%, #f87171 0.18rem, transparent 0.2rem),
        radial-gradient(circle at 0.85rem 50%, #fbbf24 0.18rem, transparent 0.2rem),
        radial-gradient(circle at 1.5rem 50%, #34d399 0.18rem, transparent 0.2rem);
}

.hd-wiki-screen__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-primary, #006ae6);
    background: color-mix(in oklab, var(--color-primary, #006ae6) 14%, var(--background));
}

.hd-wiki-screen__body {
    padding: 0.7rem 0.75rem 0.85rem;
}

.hd-wiki-screen__title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 650;
}

.hd-wiki-screen__text {
    margin: 0 0 0.7rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--muted-foreground);
}

.hd-wiki-screen__mock {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 4.5rem;
}

.hd-wiki-screen__bar,
.hd-wiki-screen__row,
.hd-wiki-screen__chip {
    display: block;
    height: 0.55rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--muted-foreground) 16%, var(--muted));
}

.hd-wiki-screen__bar--short {
    width: 62%;
}

.hd-wiki-screen__btn {
    display: block;
    margin-top: 0.25rem;
    height: 1.35rem;
    border-radius: 0.45rem;
    background: color-mix(in oklab, var(--color-primary, #006ae6) 55%, #0f172a);
}

.hd-wiki-screen__chip {
    width: 72%;
    height: 0.85rem;
    border-radius: 0.4rem;
}

.hd-wiki-screen__chip--accent {
    width: 84%;
    background: color-mix(in oklab, var(--color-primary, #006ae6) 28%, var(--muted));
}

.hd-wiki-screen__gauge {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto 0.2rem;
    border-radius: 999px;
    border: 0.35rem solid color-mix(in oklab, var(--color-primary, #006ae6) 35%, var(--border));
    border-top-color: var(--color-primary, #006ae6);
}

.hd-wiki-screen__row--dim {
    opacity: 0.45;
}

@media (max-width: 720px) {
    .hd-wiki-screens {
        grid-template-columns: 1fr;
    }

    .hd-wiki-svg {
        min-width: 28rem;
    }

    .hd-wiki-flow__bridge {
        display: none;
    }
}

@media (min-width: 900px) {
    .hd-wiki-screens {
        grid-template-columns: 1fr auto 1fr auto 1fr;
        align-items: center;
    }

    .hd-wiki-screens__arrow {
        display: flex;
        justify-content: center;
        font-size: 1.15rem;
    }
}

.hd-changelog-grid {
    display: grid;
    gap: 1.25rem;
    align-items: stretch;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .hd-changelog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hd-changelog-col {
        max-height: calc(100dvh - 14rem);
    }
}

.hd-changelog-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.hd-changelog-col__visual {
    height: 5.5rem;
    flex: none;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(120% 80% at 10% 0%, color-mix(in oklab, var(--color-primary, #006ae6) 16%, transparent), transparent 55%),
        color-mix(in oklab, var(--muted) 42%, var(--background));
}

.hd-changelog-visual {
    display: block;
    width: 100%;
    height: 100%;
}

.hd-changelog-visual__bg {
    fill: transparent;
}

.hd-changelog-visual__device {
    fill: color-mix(in oklab, var(--background) 55%, var(--muted));
    stroke: color-mix(in oklab, var(--color-primary, #006ae6) 40%, var(--border));
    stroke-width: 1.5;
}

.hd-changelog-visual__chrome {
    fill: color-mix(in oklab, var(--muted) 70%, var(--background));
    stroke: none;
}

.hd-changelog-visual__screen,
.hd-changelog-visual__pane {
    fill: color-mix(in oklab, var(--color-primary, #006ae6) 10%, var(--background));
    stroke: none;
}

.hd-changelog-visual__pane--accent,
.hd-changelog-visual__gauge {
    fill: color-mix(in oklab, var(--color-primary, #006ae6) 22%, var(--background));
    stroke: color-mix(in oklab, var(--color-primary, #006ae6) 45%, var(--border));
    stroke-width: 1.5;
}

.hd-changelog-visual__dot {
    fill: var(--color-primary, #006ae6);
    stroke: none;
}

.hd-changelog-visual__bar {
    fill: color-mix(in oklab, var(--color-primary, #006ae6) 45%, var(--border));
    stroke: none;
}

.hd-changelog-col__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.85rem;
    flex: none;
    padding: 1rem 1.15rem 0.95rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklab, var(--muted) 18%, var(--background));
}

.hd-changelog-col__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: none;
    border-radius: 0.65rem;
    background: color-mix(in oklab, var(--color-primary, #006ae6) 12%, var(--muted));
    color: var(--color-primary, #006ae6);
}

.hd-changelog-col__heading {
    min-width: 0;
    flex: 1;
}

.hd-changelog-col__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.25;
}

.hd-changelog-col__hint {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--muted-foreground);
}

.hd-changelog-col__header .hd-badge {
    margin-top: 0.15rem;
    flex: none;
}

.hd-changelog-timeline {
    --hd-changelog-rail: 1.15rem;
    list-style: none;
    margin: 0;
    padding: 1.05rem 1.15rem 1.35rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hd-changelog-release {
    position: relative;
    padding: 0 0 1.2rem calc(var(--hd-changelog-rail) + 0.85rem);
}

.hd-changelog-release:last-child {
    padding-bottom: 0;
}

.hd-changelog-release::before {
    content: "";
    position: absolute;
    left: calc(var(--hd-changelog-rail) / 2);
    top: 0.7rem;
    bottom: -0.15rem;
    width: 1px;
    background: var(--border);
}

.hd-changelog-release:last-child::before {
    display: none;
}

.hd-changelog-release::after {
    content: "";
    position: absolute;
    left: calc(var(--hd-changelog-rail) / 2);
    top: 0.48rem;
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
    background: var(--background);
    border: 2px solid color-mix(in oklab, var(--color-primary, #006ae6) 35%, var(--border));
    transform: translateX(-50%);
    box-shadow: 0 0 0 3px var(--background);
}

.hd-changelog-release.is-latest::after {
    background: var(--color-primary, #006ae6);
    border-color: var(--color-primary, #006ae6);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-primary, #006ae6) 18%, var(--background));
}

.hd-changelog-release__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-bottom: 0.45rem;
}

.hd-changelog-release__date {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    color: var(--muted-foreground);
}

.hd-changelog-release__version {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.08rem 0.42rem;
    border-radius: 999px;
    color: var(--foreground);
    background: color-mix(in oklab, var(--muted) 70%, var(--background));
    border: 1px solid var(--border);
}

.hd-changelog-release.is-latest .hd-changelog-release__version {
    color: var(--color-primary, #006ae6);
    background: color-mix(in oklab, var(--color-primary, #006ae6) 12%, var(--muted));
    border-color: color-mix(in oklab, var(--color-primary, #006ae6) 28%, var(--border));
}

.hd-changelog-release__card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.8rem 0.95rem 0.9rem;
    background: color-mix(in oklab, var(--muted) 22%, var(--background));
}

.hd-changelog-release.is-latest .hd-changelog-release__card {
    border-color: color-mix(in oklab, var(--color-primary, #006ae6) 32%, var(--border));
    background: color-mix(in oklab, var(--color-primary, #006ae6) 6%, var(--background));
}

.hd-changelog-release__section + .hd-changelog-release__section {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.hd-changelog-release__section .hd-changelog-release__version {
    margin-bottom: 0.45rem;
}

.hd-changelog-release__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hd-changelog-release__section .hd-changelog-release__items {
    margin-top: 0.45rem;
}

.hd-changelog-release__items li {
    position: relative;
    padding-left: 0.95rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.hd-changelog-release__items li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--color-primary, #006ae6) 55%, var(--border));
}

.hd-changelog-release.is-latest .hd-changelog-release__items li {
    color: var(--foreground);
}

.hd-changelog-release.is-latest .hd-changelog-release__items li::before {
    background: var(--color-primary, #006ae6);
}

.hd-changelog-empty {
    list-style: none;
    padding: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.hd-email-langs {
    display: grid;
    gap: 1rem;
    align-items: stretch;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .hd-email-langs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    .hd-email-langs {
        grid-template-columns: repeat(var(--hd-email-lang-count, 4), minmax(0, 1fr));
    }
}

.hd-email-langs__col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: color-mix(in srgb, var(--muted) 35%, transparent);
}

.hd-email-langs__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
}

.hd-email-langs__body {
    min-height: 14rem;
    resize: vertical;
}

.hd-email-vars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hd-email-vars__chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    border: 1px solid var(--border);
    background: var(--background);
    border-radius: 0.45rem;
    padding: 0.35rem 0.55rem;
    font: inherit;
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    cursor: pointer;
}

.hd-email-vars__chip:hover,
.hd-email-vars__chip:focus-visible {
    border-color: var(--primary);
    outline: none;
}

.hd-email-vars__hint {
    font-family: inherit;
    font-size: 0.68rem;
    color: var(--muted-foreground);
}

.hd-email-preview {
    background: #e8edf2;
    border-radius: 0.6rem;
    padding: 1rem;
}

.hd-email-preview__canvas {
    max-width: 36rem;
    margin: 0 auto;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    color: #111827;
}

.hd-email-preview__bar {
    height: 6px;
}

.hd-email-preview__header,
.hd-email-preview__body,
.hd-email-preview__footer {
    padding: 1rem 1.25rem;
}

.hd-email-preview__logo {
    max-width: 10rem;
    max-height: 3.5rem;
    display: block;
}

.hd-email-preview__name {
    font-size: 1.15rem;
    font-weight: 700;
}

.hd-email-preview__body {
    font-size: 0.95rem;
    line-height: 1.55;
}

.hd-email-preview__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.hd-email-preview__cta {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.4rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.hd-email-preview__actions .hd-email-preview__cta {
    margin-top: 0;
}

.hd-email-preview__footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #64748b;
}

.hd-email-compose {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 48rem;
}

.hd-quote-lines__grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
}

@media (min-width: 900px) {
    .hd-quote-lines__grid {
        grid-template-columns: minmax(12rem, 2.2fr) 5.5rem 5.5rem 7.5rem 7.5rem auto;
    }
}

.hd-quote-lines__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hd-quote-lines__row {
    padding-bottom: 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
}

.hd-quote-lines__row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.hd-quote-lines__live-total {
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.hd-quote-lines__remove {
    display: flex;
    align-items: flex-end;
}

.hd-quote-lines__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.25rem;
}

.hd-quote-lines__summary {
    display: grid;
    gap: 0.75rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(8rem, max-content));
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
}

.hd-quote-amounts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: auto;
}

.hd-quote-amounts__table,
.hd-quote-amounts__totals {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.hd-quote-amounts__table th,
.hd-quote-amounts__table td,
.hd-quote-amounts__totals th,
.hd-quote-amounts__totals td {
    border-bottom: 1px solid color-mix(in srgb, var(--border, #d1d5db) 90%, transparent);
    padding: 0.45rem 0.35rem;
    text-align: left;
    vertical-align: top;
}

.hd-quote-amounts__num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hd-quote-amounts__totals {
    max-width: 22rem;
    margin-left: auto;
}

.hd-quote-amounts__totals th {
    font-weight: 500;
    color: var(--muted-foreground, #6b7280);
}

.hd-quote-amounts__gross th,
.hd-quote-amounts__gross td {
    font-weight: 700;
    border-bottom: 0;
}

.hd-guest-panel__inner--quote {
    max-width: 36rem;
}

.hd-quote-amounts--public {
    color: #0f172a;
}

.hd-quote-amounts--public th,
.hd-quote-amounts--public td {
    border-color: #e2e8f0;
}

/*
 * Mobile list tables — desktop / landscape tablet (≥ 1024px) stay unchanged.
 * Below lg, wide tables become labeled cards so users no longer scroll sideways.
 */
@media (max-width: 1023.98px) {
    #content,
    #content .kt-container-fluid,
    #content .kt-card,
    #content .kt-card-content,
    #content .kt-card-table {
        min-width: 0;
        max-width: 100%;
    }

    #content .overflow-x-auto:has(table.hd-stack-table),
    #content .kt-table-wrapper:has(table.hd-stack-table),
    .hd-customer-list .kt-table-wrapper:has(table.hd-stack-table),
    .hd-user-list .kt-table-wrapper:has(table.hd-stack-table),
    .hd-log-list .kt-table-wrapper:has(table.hd-stack-table),
    .hd-wiki-table-wrap:has(table.hd-stack-table),
    .hd-quote-amounts:has(table.hd-stack-table) {
        overflow-x: visible;
    }

    table.hd-stack-table {
        width: 100%;
        min-width: 0 !important;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
    }

    table.hd-stack-table thead {
        display: none;
    }

    table.hd-stack-table tbody,
    table.hd-stack-table tbody tr,
    table.hd-stack-table tbody th {
        display: block !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    table.hd-stack-table tbody tr {
        margin: 0.65rem 0.75rem;
        padding: 0.85rem 1rem;
        border: 1px solid var(--border);
        border-radius: 0.75rem;
        background: var(--background);
        box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
    }

    table.hd-stack-table tbody th,
    table.hd-stack-table tbody td {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0.4rem 0 !important;
        border: 0 !important;
        white-space: normal;
        text-align: right;
        vertical-align: top;
    }

    table.hd-stack-table tbody td {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
    }

    table.hd-stack-table tbody td::before {
        content: attr(data-label);
        flex: 0 1 42%;
        max-width: 10.5rem;
        text-align: left;
        font-size: 0.7rem;
        font-weight: 650;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: var(--muted-foreground, #6b7280);
        line-height: 1.35;
        padding-top: 0.15rem;
    }

    table.hd-stack-table tbody td:not([data-label])::before,
    table.hd-stack-table tbody td[data-label=""]::before {
        display: none;
    }

    table.hd-stack-table tbody td.hd-stack-table__primary,
    table.hd-stack-table tbody th.hd-stack-table__primary {
        display: block !important;
        text-align: left;
        font-size: 0.95rem;
        font-weight: 650;
        padding-bottom: 0.6rem !important;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid color-mix(in srgb, var(--border, #d1d5db) 85%, transparent) !important;
    }

    table.hd-stack-table tbody td.hd-stack-table__primary::before {
        display: none;
    }

    table.hd-stack-table tbody td.hd-stack-table__actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-top: 0.7rem !important;
        margin-top: 0.25rem;
        border-top: 1px solid color-mix(in srgb, var(--border, #d1d5db) 85%, transparent) !important;
        text-align: left;
    }

    table.hd-stack-table tbody td.hd-stack-table__actions::before {
        display: none;
    }

    table.hd-stack-table tbody tr.hd-stack-table__empty {
        margin: 0;
        padding: 1rem 1.25rem;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    table.hd-stack-table tbody tr.hd-stack-table__empty td {
        display: block !important;
        text-align: left;
        padding: 0 !important;
    }

    table.hd-stack-table tbody tr.hd-stack-table__empty td::before {
        display: none;
    }

    table.hd-stack-table tbody td:has(input, select, textarea) {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    table.hd-stack-table tbody td:has(input, select, textarea) .kt-input,
    table.hd-stack-table tbody td:has(input, select, textarea) input,
    table.hd-stack-table tbody td:has(input, select, textarea) select,
    table.hd-stack-table tbody td:has(input, select, textarea) textarea {
        width: 100%;
        max-width: 100%;
    }

    table.hd-stack-table tbody tr.hd-row-link:hover,
    table.hd-stack-table tbody tr.cursor-pointer:hover {
        background: color-mix(in oklab, var(--color-primary, #006ae6) 6%, var(--background));
    }

    table.hd-wiki-table.hd-stack-table th:first-child,
    table.hd-wiki-table.hd-stack-table td:first-child {
        position: static;
        box-shadow: none;
        z-index: auto;
    }

    table.hd-stack-table tbody tr.hd-weight-row--ok {
        background-color: #bbf7d0;
        color: #14532d;
    }

    table.hd-stack-table tbody tr.hd-weight-row--warn {
        background-color: #fed7aa;
        color: #9a3412;
    }

    table.hd-stack-table tbody tr.hd-weight-row--danger {
        background-color: #fecaca;
        color: #991b1b;
    }

    table.hd-stack-table tbody tr.hd-weight-row--refuel {
        background-color: #bae6fd;
        color: #0c4a6e;
    }

    table.hd-stack-table tbody tr.hd-weight-row > td {
        background-color: transparent !important;
        color: inherit !important;
    }

    .hd-dashboard-mission {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.35rem;
    }

    .hd-dashboard-mission__time {
        white-space: normal;
    }

    .hd-dashboard-mission__status {
        justify-content: flex-start;
    }
}

@media (max-width: 1023.98px) {
    html.dark table.hd-stack-table tbody tr.hd-weight-row--ok {
        background-color: #14532d;
        color: #bbf7d0;
    }

    html.dark table.hd-stack-table tbody tr.hd-weight-row--warn {
        background-color: #9a3412;
        color: #ffedd5;
    }

    html.dark table.hd-stack-table tbody tr.hd-weight-row--danger {
        background-color: #7f1d1d;
        color: #fecaca;
    }

    html.dark table.hd-stack-table tbody tr.hd-weight-row--refuel {
        background-color: rgba(56, 189, 248, 0.2);
        color: #38bdf8;
    }
}

.hd-perf-cursor,
.hd-perf-cursor.leaflet-container,
.hd-perf-cursor .leaflet-grab {
    cursor: crosshair;
}

.hd-perf-panel {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1000;
    width: min(22rem, calc(100% - 1.5rem));
    max-height: calc(100% - 1.5rem);
    overflow: auto;
    background: var(--background, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}

.hd-perf-panel__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.hd-perf-grid {
    border-collapse: collapse;
}

.hd-perf-grid th,
.hd-perf-grid td {
    padding: 0.2rem;
    vertical-align: middle;
}

.hd-perf-grid .kt-input {
    width: 4.75rem;
    min-width: 4.75rem;
}

.hd-perf-grid .hd-perf-pa,
.hd-perf-grid .hd-perf-oat {
    width: 5.25rem;
}

.hd-perf-grid__corner {
    text-align: left;
    font-weight: 600;
    padding-right: 0.5rem;
    white-space: nowrap;
}

.hd-rfm-upload {
    position: relative;
    overflow: hidden;
}

.hd-rfm-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.hd-rfm-canvas-wrap {
    position: relative;
    max-width: 52rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 0.5rem;
    overflow: auto;
    background: #0f172a0a;
}

.hd-rfm-canvas {
    display: block;
    max-width: 100%;
    cursor: crosshair;
    user-select: none;
}

.hd-rfm-canvas.is-drawing {
    cursor: crosshair;
}

.hd-rfm-isolines__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.hd-rfm-swatch {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    flex: none;
}




