/*
 | Native date/time controls ignore CSS color tokens unless color-scheme
 | matches the theme — otherwise Chrome paints black glyphs on dark fields.
 */
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']::-webkit-calendar-picker-indicator,
html.dark input[type='time']::-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 {
    filter: invert(1);
    opacity: 0.9;
    cursor: pointer;
}

/* —— 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: none;
    align-items: center;
    gap: 0.25rem;
    margin-inline-start: 0.25rem;
}

@media (min-width: 1024px) {
    .hd-quick-menu {
        display: inline-flex;
    }
}

.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-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);
}

/* 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);
}

/* 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;
}

.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-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-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-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;
}

.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: 3.35rem;
    border-bottom: 1px solid var(--border);
}

.hd-agenda-day__resource {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    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: 4.6rem;
    --lane-gap: 0.25rem;
    --lane-pad: 0.3rem;
    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.3rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

/* 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;
    }
}

/* 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-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;
    }
}

.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%;
}

/* CRM customer form */
.hd-customer-form-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 48rem;
    padding-bottom: 5.5rem;
}

.hd-customer-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hd-customer-form-page__intro {
    margin-bottom: -0.25rem;
}

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

.hd-customer-type__option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 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-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-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, #16a34a);
    -webkit-mask: var(--hd-marker-icon) center / contain no-repeat;
    mask: var(--hd-marker-icon) center / contain no-repeat;
    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));
}

.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-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-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__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;
}

.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;
    }
}



