/* Satlink brand (Brandbook 24.1, through the organization's design system): blues with teal highlights, text in
   #084F6A, Montserrat. Rojo Satlink (#E41612) is reserved for the logo: never an accent. */

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-latin-wght-normal.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --sl-blue-cta: #0a77a9;
    --sl-blue-mid: #1f4f7c;
    --sl-blue-dark: #1f3460;
    --sl-blue-light: #4e81a8;
    --sl-teal: #458d99;
    --sl-ink: #084f6a;
    --sl-ink-deep: #0b3041;
    --sl-steel: #23688a;
    --sl-aqua: #8fd4de;
    --sl-mist: #9fc3cf;
    --sl-tint-1: #eaf4f5;
    --sl-tint-2: #e2f0f4;
    --sl-tint-3: #f4f7fa;
    --bs-font-sans-serif: 'Montserrat', Arial, Helvetica, sans-serif;
    --bs-primary: var(--sl-blue-cta);
    --bs-primary-rgb: 10, 119, 169;
    --app-sidebar-width: 244px;
    --app-radius: 10px;
}

[data-bs-theme=light] {
    --bs-body-bg: var(--sl-tint-3);
    --bs-body-bg-rgb: 244, 247, 250;
    --bs-body-color: var(--sl-ink);
    --bs-body-color-rgb: 8, 79, 106;
    --bs-emphasis-color: var(--sl-ink-deep);
    --bs-emphasis-color-rgb: 11, 48, 65;
    --bs-heading-color: var(--sl-ink);
    --bs-secondary-color: var(--sl-steel);
    --bs-secondary-bg: var(--sl-tint-2);
    --bs-tertiary-bg: var(--sl-tint-1);
    --bs-border-color: #d3e3ea;
    --bs-link-color: var(--sl-blue-cta);
    --bs-link-color-rgb: 10, 119, 169;
    --bs-link-hover-color: var(--sl-blue-mid);
    --bs-link-hover-color-rgb: 31, 79, 124;
    --bs-secondary-text-emphasis: var(--sl-ink);
    --bs-secondary-bg-subtle: var(--sl-tint-1);
    --bs-secondary-border-subtle: var(--sl-tint-2);
    --bs-info-text-emphasis: var(--sl-ink);
    --bs-info-bg-subtle: var(--sl-tint-2);
    --bs-info-border-subtle: #b8cbd9;
    --app-surface: #fff;
    --app-shadow: 0 2px 10px rgba(8, 79, 106, .10);
    --app-accent: var(--sl-blue-cta);
    --app-highlight: var(--sl-teal);
    --strip-track: #e3ecf1;
    --strip-run: var(--sl-blue-cta);
    --app-overlay: rgba(255, 255, 255, .94);
    --bs-code-color: #0a658c;
    --tag-ok: #0a658c;
    --tag-ok-bg: rgba(69, 141, 153, .14);
    --tag-info: var(--sl-blue-cta);
    --tag-info-bg: rgba(10, 119, 169, .1);
    --tag-warn: #8a5a00;
    --tag-warn-bg: rgba(240, 173, 78, .18);
}

[data-bs-theme=dark] {
    --bs-body-bg: #071d29;
    --bs-body-bg-rgb: 7, 29, 41;
    --bs-body-color: var(--sl-tint-1);
    --bs-body-color-rgb: 234, 244, 245;
    --bs-emphasis-color: #fff;
    --bs-heading-color: #fff;
    --bs-secondary-color: var(--sl-mist);
    --bs-secondary-bg: #123649;
    --bs-tertiary-bg: #0f3043;
    --bs-border-color: rgba(143, 212, 222, .18);
    --bs-link-color: var(--sl-aqua);
    --bs-link-color-rgb: 143, 212, 222;
    --bs-link-hover-color: #c3eaf0;
    --bs-link-hover-color-rgb: 195, 234, 240;
    --bs-secondary-text-emphasis: var(--sl-mist);
    --bs-secondary-bg-subtle: #0f3043;
    --bs-secondary-border-subtle: rgba(143, 212, 222, .18);
    --bs-info-text-emphasis: var(--sl-aqua);
    --bs-info-bg-subtle: rgba(10, 119, 169, .18);
    --bs-info-border-subtle: rgba(143, 212, 222, .3);
    --app-surface: #0d2b3b;
    --app-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    --app-accent: var(--sl-aqua);
    --app-highlight: var(--sl-aqua);
    --strip-track: rgba(143, 212, 222, .1);
    --strip-run: var(--sl-blue-light);
    --app-overlay: rgba(13, 43, 59, .92);
    --bs-code-color: var(--sl-aqua);
    --tag-ok: var(--sl-aqua);
    --tag-ok-bg: rgba(143, 212, 222, .14);
    --tag-info: #9cc8ee;
    --tag-info-bg: rgba(78, 129, 168, .25);
    --tag-warn: #f0c36d;
    --tag-warn-bg: rgba(240, 195, 109, .14);
}

/* ---------------------------------------------------------------- shell: sidebar, teal band and content */

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    --bs-offcanvas-width: 272px;
    background-color: var(--sl-ink-deep) !important; /* Bootstrap makes .offcanvas-md transparent from md up */
    color: #e6f0f3;
    display: flex;
    flex-direction: column;
    padding: 22px 14px 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .app-shell {
        display: grid;
        grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
    }

    .app-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.sidebar-logo {
    height: 30px;
    display: block;
}

.sidebar-product {
    padding: 8px 10px 20px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sl-mist);
}

.sidebar-product strong {
    color: #fff;
    letter-spacing: .06em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #b9cfd8;
    text-decoration: none;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(69, 141, 153, .24);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--sl-aqua);
}

.sidebar-section {
    margin: 18px 12px 6px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6f97a8;
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    position: relative;
    z-index: 1;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--sl-teal);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}

.sidebar-user-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.sidebar-user-name small {
    color: var(--sl-mist);
}

.sidebar-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.btn-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #cfe0e6;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    font-size: .85rem;
    font-weight: 500;
}

.btn-sidebar:hover,
.btn-sidebar:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .2);
}

[data-bs-theme=dark] .icon-to-dark,
[data-bs-theme=light] .icon-to-light {
    display: none;
}

.sidebar-waves {
    height: 84px;
    margin: 12px -14px 0;
    background: url('../img/waves.png') top center / cover no-repeat;
    opacity: .5;
    flex: none;
}

.app-main {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh; /* phones: the visible height, without the browser bars */
    display: flex;
    flex-direction: column;
}

.app-band {
    background: var(--sl-teal);
    color: #fff;
    min-height: 68px;
    padding: 12px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.app-title {
    margin: 0 auto 0 0;
    color: #fff;
    font-size: 1.5rem; /* 24px regular: large text, readable on the teal band */
    font-weight: 400;
}

.btn-band {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    padding: 6px 8px;
}

.btn-band:hover {
    color: #fff;
    background: rgba(11, 48, 65, .25);
}

/* Main action of the screen, in the band (pages fill the "Band" section). */
.btn-band-action {
    color: var(--sl-ink);
    background: #fff;
    border: 1px solid #fff;
    font-weight: 600;
}

.btn-band-action:hover,
.btn-band-action:focus-visible {
    color: var(--sl-ink-deep);
    background: var(--sl-tint-1);
    border-color: var(--sl-tint-1);
}

.app-content {
    padding: 20px 24px 32px;
    flex: 1;
}

@media (max-width: 767.98px) {
    .app-band {
        padding: 10px 16px;
    }

    .app-content {
        padding: 16px;
    }
}

/* ---------------------------------------------------------------- sign in (no session: no sidebar) */

.bare-main {
    min-height: 100vh;
}

/* Signed out, other than the sign-in page: logged out, errors. */
.bare-center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px 16px 140px;
    background: var(--sl-ink-deep);
    overflow: hidden;
}

.bare-logo {
    height: 36px;
    position: relative;
    z-index: 1;
}

.bare-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 8px 28px 28px;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.bare-card > .row {
    margin-inline: 0; /* the pages' grid rows, without negative gutters inside the card */
}

.bare-card .row > * {
    width: 100%; /* their columns are sized for the full page: the card is already narrow */
}

.bare-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 140px;
    background: url('../img/waves.png') top center / cover no-repeat;
    opacity: .55;
}

.login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 48px 56px;
    background: var(--sl-ink-deep);
    color: #fff;
    overflow: hidden;
}

.login-logo {
    height: 40px;
    align-self: flex-start;
}

.login-pitch {
    margin: auto 0;
    max-width: 30rem;
    position: relative;
    z-index: 1;
}

.login-kicker {
    margin-bottom: 12px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--sl-aqua);
}

.login-title {
    color: #fff;
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.25;
}

.login-text {
    margin-top: 16px;
    color: var(--sl-mist);
    font-size: 1.05rem;
    line-height: 1.5;
}

.login-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 160px;
    background: url('../img/waves.png') top center / cover no-repeat;
    opacity: .55;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 24px;
}

.login-form {
    width: 100%;
    max-width: 360px;
}

.login-form-title {
    margin-bottom: 4px;
    font-size: 1.6rem;
    font-weight: 600;
}

.login-form-hint {
    margin-bottom: 28px;
    color: var(--bs-secondary-color);
}

.login-foot {
    margin-top: 40px;
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

@media (max-width: 767.98px) {
    .login {
        grid-template-columns: 1fr;
    }

    .login-brand {
        padding: 28px 24px 96px;
    }

    .login-title {
        font-size: 1.6rem;
    }

    .login-waves {
        height: 90px;
    }
}

/* ---------------------------------------------------------------- Bootstrap components in brand colours */

.card {
    --bs-card-bg: var(--app-surface);
    --bs-card-border-color: var(--bs-border-color);
    --bs-card-border-radius: var(--app-radius);
    --bs-card-inner-border-radius: calc(var(--app-radius) - 1px);
    box-shadow: var(--app-shadow);
}

.btn {
    --bs-btn-font-weight: 500;
    --bs-btn-border-radius: 8px;
}

.btn-primary {
    --bs-btn-bg: var(--sl-blue-cta);
    --bs-btn-border-color: var(--sl-blue-cta);
    --bs-btn-hover-bg: var(--sl-blue-mid);
    --bs-btn-hover-border-color: var(--sl-blue-mid);
    --bs-btn-active-bg: var(--sl-blue-dark);
    --bs-btn-active-border-color: var(--sl-blue-dark);
    --bs-btn-disabled-bg: var(--sl-blue-cta);
    --bs-btn-disabled-border-color: var(--sl-blue-cta);
    --bs-btn-focus-shadow-rgb: 10, 119, 169;
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-link-color);
    --bs-btn-border-color: var(--bs-link-color);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--sl-blue-cta);
    --bs-btn-hover-border-color: var(--sl-blue-cta);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--sl-blue-mid);
    --bs-btn-active-border-color: var(--sl-blue-mid);
    --bs-btn-focus-shadow-rgb: 10, 119, 169;
}

.btn-outline-secondary {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--bs-tertiary-bg);
    --bs-btn-hover-border-color: var(--bs-border-color);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--bs-secondary-bg);
    --bs-btn-active-border-color: var(--bs-border-color);
}

.form-control,
.form-select {
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--sl-blue-light);
    box-shadow: 0 0 0 .25rem rgba(10, 119, 169, .25);
}

.form-check-input:checked {
    background-color: var(--sl-blue-cta);
    border-color: var(--sl-blue-cta);
}

.table {
    --bs-table-bg: transparent;
}

.list-group {
    --bs-list-group-bg: var(--app-surface);
    --bs-list-group-active-bg: var(--sl-blue-cta);
    --bs-list-group-active-border-color: var(--sl-blue-cta);
}

.nav-tabs {
    --bs-nav-tabs-link-active-bg: var(--app-surface);
}

/* ---------------------------------------------------------------- screens */

/* Shared by the administration and audit screens: tables in panels, status tags, empty lists, filters. */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 14px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}

.section-head {
    margin: 4px 0 12px;
}

.section-head + .section-head,
.data-panel + .section-head,
.empty-state + .section-head,
.alert + .section-head {
    margin-top: 28px;
}

.section-head h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
}

.section-head p {
    margin: 0;
    max-width: 75rem;
    color: var(--bs-secondary-color);
    font-size: .85rem;
}

.card h2.h6 {
    margin-bottom: 12px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--app-highlight);
}

.data-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.data-panel .table {
    margin: 0;
}

.data-panel .table > thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding-top: 10px;
    padding-bottom: 10px;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-panel .table > :not(caption) > * > * {
    padding-top: 9px;
    padding-bottom: 9px;
}

.data-panel .table > :not(caption) > * > :first-child {
    padding-left: 16px;
}

.data-panel .table > :not(caption) > * > :last-child {
    padding-right: 16px;
}

.data-panel .table > tbody > tr:last-child > * {
    border-bottom: 0;
}

.data-panel .table a {
    font-weight: 600;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: .74rem;
    font-weight: 600;
    white-space: nowrap;
}

.tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tag-ok {
    background: var(--tag-ok-bg);
    color: var(--tag-ok);
}

.tag-info {
    background: var(--tag-info-bg);
    color: var(--tag-info);
}

.tag-warn {
    background: var(--tag-warn-bg);
    color: var(--tag-warn);
}

.empty-state {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px dashed var(--bs-border-color);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    color: var(--bs-secondary-color);
}

.empty-state .icon {
    width: 26px;
    height: 26px;
    flex: none;
    color: var(--app-highlight);
}

.empty-state p {
    margin: 0;
}

.filter-panel {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.filter-panel .form-label {
    color: var(--bs-secondary-color);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.contact-card {
    max-width: 34rem;
}

.contact-card .icon {
    color: var(--app-highlight);
}

.kicker {
    margin: 0;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--app-highlight);
}

.icon-sm {
    width: 14px;
    height: 14px;
}

.icon-lg {
    width: 36px;
    height: 36px;
}

/* Controls of a screen inside the teal band: dark translucent fields keep white text readable. */
.band-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.band-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(11, 48, 65, .3);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
}

.band-field:focus-within {
    border-color: #fff;
}

.band-control {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 500;
    color-scheme: dark; /* light calendar and arrow icons on the band */
}

.band-control option {
    color: var(--sl-ink);
    background: #fff;
}

.band-suffix {
    font-size: .8rem;
    opacity: .75;
}

.band-steps {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    height: 38px;
    border-radius: 8px;
    background: rgba(11, 48, 65, .3);
    border: 1px solid rgba(255, 255, 255, .25);
}

.band-steps a {
    display: grid;
    place-items: center;
    padding: 0 10px;
    border-radius: 6px;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.band-steps a:hover,
.band-steps a:focus-visible {
    background: rgba(255, 255, 255, .18);
}

.band-steps button {
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}

.band-steps button:hover,
.band-steps button:focus-visible {
    background: rgba(255, 255, 255, .18);
}

.band-steps button[aria-pressed="true"] {
    background: #fff;
    color: var(--sl-ink);
}

@media (max-width: 767.98px) {
    .band-form,
    .band-field {
        width: 100%;
    }

    .band-field .band-control {
        flex: 1;
    }
}

/* Records: the selected picture with its data on top, and every camera beside it. */
.records {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.records-hero {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 9;
    border-radius: var(--app-radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--app-shadow);
}

.records-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(11, 48, 65, .55) 0%, transparent 22%, transparent 62%, rgba(11, 48, 65, .75) 100%);
}

.records-hero:fullscreen {
    aspect-ratio: auto;
    border-radius: 0;
}

.records-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.records-hero-top,
.records-hero-bottom {
    position: absolute;
    left: 14px;
    right: 14px;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.records-hero-top {
    top: 14px;
}

.records-hero-bottom {
    bottom: 14px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(11, 48, 65, .8);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(8px);
}

.hero-chip .icon {
    width: 15px;
    height: 15px;
    color: var(--sl-aqua);
}

.hero-muted {
    font-weight: 500;
    opacity: .7;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sl-aqua);
    box-shadow: 0 0 0 4px rgba(143, 212, 222, .25);
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    color: var(--sl-aqua);
    font-weight: 500;
}

.hero-link:hover {
    color: #fff;
}

.hero-buttons {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.hero-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    background: rgba(11, 48, 65, .8);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
}

.hero-button:hover,
.hero-button:focus-visible {
    background: var(--sl-blue-cta);
    color: #fff;
}

.records-empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    aspect-ratio: 16 / 9;
    padding: 24px;
    border-radius: var(--app-radius);
    border: 1px dashed var(--bs-border-color);
    background: var(--app-surface);
    color: var(--bs-secondary-color);
    text-align: center;
}

.records-empty p {
    margin: 0;
}

.records-cameras-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--bs-secondary-color);
    font-size: .8rem;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.records-cam {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--app-shadow);
    transition: transform .15s;
}

.records-cam:hover {
    transform: translateY(-2px);
}

.records-cam.selected {
    outline: 3px solid var(--app-accent);
    outline-offset: 2px;
}

.records-cam img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.records-cam-label {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 18px 9px 7px;
    background: linear-gradient(180deg, transparent, rgba(11, 48, 65, .85));
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.records-cam-empty {
    display: grid;
    place-content: center;
    gap: 2px;
    padding: 8px;
    background: var(--app-surface);
    border: 1px dashed var(--bs-border-color);
    box-shadow: none;
    color: var(--bs-secondary-color);
    font-size: .8rem;
    text-align: center;
}

.records-cam-empty:hover {
    transform: none;
}

/* The 24-hour strip: the vessel's pictures as runs on a thin track (a break = no picture from any camera), the
   instant shown as a marker; hover shows the time under the pointer and a click jumps to it. */
.records-timeline {
    position: relative;
    grid-column: 1 / -1;
    padding: 12px 16px 6px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    margin-bottom: 8px;
    color: var(--bs-secondary-color);
    font-size: .78rem;
}

.timeline-range {
    margin-right: auto;
    font-variant-numeric: tabular-nums;
}

.timeline-strip {
    position: relative;
    height: 22px;
    cursor: pointer;
}

.timeline-track,
.timeline-run {
    position: absolute;
    top: 7px;
    height: 8px;
    border-radius: 4px;
}

.timeline-track {
    left: 0;
    right: 0;
    background: var(--strip-track);
}

.timeline-run {
    background: var(--strip-run);
}

.timeline-marker,
.timeline-hover {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    border-radius: 2px;
    pointer-events: none;
}

.timeline-marker {
    background: var(--bs-emphasis-color);
}

.timeline-hover {
    background: var(--app-accent);
    opacity: .8;
}

.timeline-ticks {
    position: relative;
    height: 18px;
    margin-top: 2px;
    color: var(--bs-secondary-color);
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
}

.timeline-ticks span {
    position: absolute;
    transform: translateX(-50%);
}

.timeline-summary {
    margin: 4px 0 6px;
    color: var(--bs-secondary-color);
    font-size: .8rem;
}

.timeline-tip {
    position: absolute;
    z-index: 5;
    display: grid;
    gap: 1px;
    padding: 6px 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--app-overlay);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    font-size: .75rem;
    pointer-events: none;
    white-space: nowrap;
}

.timeline-tip strong {
    color: var(--bs-emphasis-color);
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}

.timeline-tip span {
    color: var(--bs-secondary-color);
}

.timeline-modes {
    display: inline-flex;
    padding: 2px;
    gap: 2px;
    border: 1px solid var(--bs-border-color);
    border-radius: 7px;
    background: var(--bs-tertiary-bg);
}

.timeline-modes button {
    padding: 2px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: .74rem;
    font-weight: 600;
}

.timeline-modes button[aria-pressed="true"] {
    background: var(--app-surface);
    color: var(--bs-emphasis-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

/* By camera: a strip per camera with its number of pictures in these hours. */
.timeline-cameras {
    --camera-label: 76px;
    --camera-total: 96px;
    display: grid;
    gap: 2px;
}

.timeline-camera {
    display: grid;
    grid-template-columns: var(--camera-label) minmax(0, 1fr) var(--camera-total);
    gap: 10px;
    align-items: center;
}

.timeline-camera .timeline-strip {
    height: 20px;
}

.timeline-camera .timeline-track,
.timeline-camera .timeline-run {
    top: 6px;
}

.timeline-label {
    overflow: hidden;
    color: var(--bs-secondary-color);
    font-size: .75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-camera.selected .timeline-label {
    color: var(--bs-emphasis-color);
    font-weight: 700;
}

.timeline-total {
    color: var(--bs-secondary-color);
    font-size: .74rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.timeline-total strong {
    color: var(--bs-emphasis-color);
    font-size: .82rem;
}

.timeline-total.none strong {
    color: var(--tag-warn);
}

.timeline-camera-ticks {
    margin-left: calc(var(--camera-label) + 10px);
    margin-right: calc(var(--camera-total) + 10px);
}

@media (max-width: 575.98px) {
    .timeline-cameras {
        --camera-label: 62px;
        --camera-total: 76px;
    }
}

/* A camera with an hour or more without pictures, on its thumbnail. */
.records-cam-alert {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(11, 48, 65, .88);
    color: #f0c36d;
    font-size: .7rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.records-cam-alert .icon {
    width: 13px;
    height: 13px;
    flex: none;
}

@media (max-width: 575.98px) {
    .timeline-hint {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .records {
        grid-template-columns: 1fr;
    }

    .records-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .records-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Phone: the course, speed and position go below the picture instead of covering it. */
    .records-hero {
        aspect-ratio: auto;
        background: var(--sl-ink-deep);
    }

    .records-hero-img {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .records-hero::after {
        background: linear-gradient(180deg, rgba(11, 48, 65, .55) 0%, transparent 25%);
    }

    .records-hero-bottom {
        position: static;
        padding: 10px;
    }
}

/* Map: full height under the band, the vessel panel floating over it. */
.app-content:has(.map-page) {
    display: flex;
    padding: 0;
}

.map-page {
    position: relative;
    flex: 1;
    min-height: 480px;
}

.map-canvas {
    position: absolute;
    inset: 0;
    background: var(--bs-body-bg);
}

.map-fleet {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    width: 310px;
    max-height: calc(100% - 32px);
    overflow: auto;
    padding: 14px;
    border-radius: var(--app-radius);
    border: 1px solid var(--bs-border-color);
    background: var(--app-overlay);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    backdrop-filter: blur(8px);
}

.map-fleet-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--bs-secondary-color);
    font-size: .78rem;
}

.map-fleet-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-vessel {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 2px 10px;
    align-items: center;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bs-body-color);
    text-align: left;
}

.map-vessel:hover,
.map-vessel:focus-visible {
    background: var(--bs-tertiary-bg);
}

.map-vessel.selected {
    background: var(--bs-tertiary-bg);
    box-shadow: inset 3px 0 0 var(--app-accent);
}

.map-vessel .map-dot {
    grid-row: span 2;
}

.map-vessel-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-vessel-age {
    color: var(--bs-secondary-color);
    font-size: .76rem;
    white-space: nowrap;
}

.map-vessel-data {
    grid-column: 2 / 4;
    color: var(--bs-secondary-color);
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
}

.map-status {
    margin: 10px 2px 0;
    color: var(--bs-secondary-color);
    font-size: .76rem;
}

.map-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7f95a3;
}

.map-dot.live {
    background: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(143, 212, 222, .25);
}

.map-dot.picture {
    background: #fff;
    border: 2px solid var(--app-accent);
}

.map-legend {
    position: absolute;
    right: 16px;
    bottom: 32px;
    z-index: 2;
    display: flex;
    gap: 14px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
    background: var(--app-overlay);
    color: var(--bs-secondary-color);
    font-size: .74rem;
}

.map-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.maplibregl-popup-content {
    padding: 0;
    overflow: hidden;
    border-radius: var(--app-radius);
    background: var(--app-overlay);
    color: var(--bs-body-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    font-family: var(--bs-font-sans-serif);
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
    border-top-color: var(--app-overlay);
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
    border-bottom-color: var(--app-overlay);
}

.maplibregl-popup-close-button {
    right: 4px;
    top: 2px;
    color: var(--bs-body-color);
    font-size: 18px;
}

.map-popup-picture {
    display: block;
    width: 300px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}

.map-popup-body {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    font-size: .8rem;
}

.map-popup-body a {
    font-weight: 600;
}

[data-bs-theme=dark] .maplibregl-ctrl-group {
    background: #0d2b3b;
}

[data-bs-theme=dark] .maplibregl-ctrl-group button + button {
    border-top-color: rgba(143, 212, 222, .18);
}

[data-bs-theme=dark] .maplibregl-ctrl-icon {
    filter: invert(1) hue-rotate(180deg);
}

@media (max-width: 767.98px) {
    .map-fleet {
        top: auto;
        bottom: 8px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 42%;
    }

    .map-legend {
        display: none;
    }
}

.table-audit {
    font-size: .85rem;
}

.table-audit td {
    white-space: nowrap;
}

.table-audit td.wrap {
    white-space: normal;
    word-break: break-word;
}
