:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f4f6f9;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: #164e9a; }
button, input, select, textarea { font: inherit; }

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
    color: white;
    background: #123660;
}

.brand { color: white; font-size: 1.1rem; font-weight: 750; text-decoration: none; }
.site-menu { display: flex; flex: 1; align-items: center; gap: 1rem; min-width: 0; }
.menu-toggle { display: none; min-height: 44px; padding: 0.5rem 0.8rem; border: 1px solid #819bb9; border-radius: 7px; color: white; background: transparent; cursor: pointer; }
.menu-toggle span { margin-right: 0.35rem; font-size: 1.25rem; }
.menu-toggle:focus-visible, .main-nav a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.main-nav { display: flex; flex: 1; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.main-nav a { padding: 0.45rem 0.65rem; border-radius: 7px; color: white; text-decoration: none; font-weight: 650; }
.main-nav a:hover { background: rgb(255 255 255 / 14%); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-actions a { color: white; }
.role { padding: 0.18rem 0.5rem; border-radius: 999px; background: #dceaff; color: #123660; font-size: 0.78rem; }
.inline { display: inline; }

.container { width: min(1180px, calc(100% - 2rem)); margin: 2rem auto; }
.narrow { width: min(460px, calc(100% - 2rem)); }
.card { padding: 1.4rem; border: 1px solid #dbe2ea; border-radius: 12px; background: white; box-shadow: 0 8px 30px rgb(18 54 96 / 7%); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
h1 { margin: 0 0 0.35rem; font-size: clamp(1.55rem, 4vw, 2.1rem); }
.muted { margin: 0; color: #657086; }
.review-note { color: #a12626; font-weight: 650; }

.field { display: grid; align-content: start; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 0.65rem 0.75rem; border: 1px solid #aeb8c7; border-radius: 7px; background: white; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid #b9d7ff; border-color: #165da7; }
.field small, .choice small { display: block; margin-top: 0.2rem; color: #657086; font-weight: 400; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.6rem 0.9rem; border: 0; border-radius: 7px; color: white; background: #165da7; cursor: pointer; text-decoration: none; font-weight: 650; }
.button:hover { background: #0f4a87; }
.button-secondary { color: #172033; background: #e9eef5; }
.button-link { padding: 0; min-height: auto; color: white; background: transparent; }
.button-danger { background: #a12626; }
.button-danger:hover { background: #7e1b1b; }
.button-small { min-height: 36px; padding: 0.42rem 0.65rem; font-size: 0.9rem; }
.actions, .form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

.alert { padding: 0.8rem 1rem; margin-bottom: 1rem; border-radius: 7px; }
.alert-error { color: #781a1a; background: #fde8e8; border: 1px solid #f4b8b8; }
.alert-success { color: #155d34; background: #e4f7eb; border: 1px solid #a8dfbc; }

.table-wrap { overflow-x: auto; border: 1px solid #dbe2ea; border-radius: 10px; background: white; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; border-bottom: 1px solid #e5eaf0; text-align: left; vertical-align: top; }
th { color: #41506a; background: #f6f8fb; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.center { text-align: center; }
.empty { padding: 2.5rem 1rem; text-align: center; color: #657086; }
.form-container { width: min(900px, calc(100% - 2rem)); }
.visit-form { display: grid; gap: 1.25rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid #dbe2ea; border-radius: 8px; }
legend { padding: 0 0.35rem; font-weight: 750; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.55rem; }
.choice { display: flex; gap: 0.55rem; align-items: flex-start; min-height: 42px; padding: 0.55rem; border-radius: 7px; background: #f6f8fb; cursor: pointer; }
.choice input { margin-top: 0.2rem; }
.choice-prominent { padding: 0.9rem; border: 1px solid #b7c9df; background: #edf5ff; }
.language-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; }
.language-row { display: grid; grid-template-columns: minmax(160px, 1fr) 130px; gap: 0.75rem; align-items: center; }
.quantity { width: 100%; min-height: 40px; padding: 0.5rem; border: 1px solid #aeb8c7; border-radius: 7px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.detail-grid > div { display: grid; gap: 0.2rem; }
.detail-grid small { display: block; color: #657086; }
.detail-label { color: #657086; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-wide { grid-column: 1 / -1; }
.detail-wide p { margin: 0; white-space: normal; }
.danger-zone { margin-top: 1rem; border-color: #e4b4b4; }
.danger-zone h2 { margin-top: 0; }
.timeline { display: grid; gap: 1rem; }
.timeline-heading { display: flex; justify-content: space-between; gap: 1rem; }
.timeline-heading p { margin: 0.3rem 0 0; }
details pre { overflow-x: auto; padding: 0.8rem; border-radius: 7px; background: #111827; color: #e5e7eb; }
.admin-nav { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.admin-nav a { padding: 0.5rem 0.75rem; border-radius: 7px; background: #e9eef5; text-decoration: none; font-weight: 650; }
.admin-section { margin: 0 0 2.5rem; scroll-margin-top: 1rem; }
.admin-section h2 { margin-bottom: 0.75rem; }
.compact-form { margin-bottom: 1rem; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1.5fr 0.8fr 1.5fr; gap: 0.8rem; }
.admin-form-grid.two { grid-template-columns: minmax(150px, 0.6fr) minmax(240px, 1.4fr); }
.form-help { margin: -0.35rem 0 1rem; color: #657086; font-size: 0.9rem; }
.admin-table { margin-top: 1rem; }
.row-actions, .reset-form { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.admin-table .row-actions, .admin-table .reset-form { flex-wrap: nowrap; }
.admin-table td[data-label="Actions"] { min-width: max-content; }
.admin-table .row-actions > *, .admin-table .reset-form > * { flex: 0 0 auto; }
.admin-table .row-actions { gap: 0.3rem; }
.admin-table .row-actions .button { min-height: 36px; padding: 0.42rem 0.62rem; font-size: 0.9rem; white-space: nowrap; }
.admin-table .reset-form { gap: 0.3rem; }
.admin-table .reset-form input { width: 150px; min-height: 36px; padding: 0.42rem 0.55rem; font-size: 0.9rem; }
.backoffice-field { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #dbe2ec; border-radius: 0.75rem; }
.backoffice-field .choice { flex: 1 1 260px; border: 0; padding: 0; }
.reset-form input { min-height: 42px; max-width: 190px; padding: 0.5rem 0.6rem; border: 1px solid #aeb8c7; border-radius: 7px; }
.filter-panel { margin-bottom: 1rem; padding-bottom: 1rem; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 0 0.8rem; }
.filter-search { grid-column: span 2; }
.filter-date-range { display: grid; grid-column: span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.deleted-row { background: #fff5f5; }
td small { display: block; color: #8b2f2f; }
.status-pill { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.status-active { color: #155d34; background: #e4f7eb; }
.status-deleted { color: #781a1a; background: #fde8e8; }
.admin-records-table .row-actions { flex-wrap: nowrap; }
.year-selector { display: flex; align-items: end; gap: 0.7rem; width: fit-content; margin-bottom: 1rem; }
.year-selector .field { min-width: 140px; margin: 0; }
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-cards-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card { display: grid; gap: 0.2rem; }
.stat-card span, .stat-card small { color: #657086; }
.stat-card strong { font-size: 1.8rem; color: #123660; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stats-grid h2, .stats-table h2 { margin-top: 0; font-size: 1.15rem; }
.stats-table { margin-bottom: 1rem; }
.bar-list { display: grid; gap: 0.55rem; }
.bar-row { display: grid; grid-template-columns: 7rem minmax(80px, 1fr) 2.5rem; gap: 0.6rem; align-items: center; }
.bar-row strong { text-align: right; }
.bar-track { width: 100%; height: 0.75rem; overflow: hidden; border: 0; border-radius: 999px; background: #e6ebf1; appearance: none; }
.bar-track::-webkit-progress-bar { border-radius: inherit; background: #e6ebf1; }
.bar-track::-webkit-progress-value { border-radius: inherit; background: #367fc5; }
.bar-track::-moz-progress-bar { border-radius: inherit; background: #367fc5; }
.quarter-section { margin-bottom: 1rem; }
.quarter-section h2 { margin: 0 0 0.25rem; }
.quarter-selector { display: flex; align-items: end; gap: 0.7rem; margin: 1rem 0; }
.quarter-selector .field { min-width: 140px; margin: 0; }
.quarter-cards { margin: 0; }
.quarter-cards .stat-card { padding: 1rem; border: 1px solid #dbe2ea; border-radius: 8px; background: #f6f8fb; }
.stats-intro { margin: -0.4rem 0 1rem; }
.info-section { margin-bottom: 1rem; }
.info-section h2 { margin-top: 0; }
.info-table { margin-top: 1rem; }
.country-flag { font-size: 1.55rem; white-space: nowrap; }
.country-flag.missing-flag { color: #657086; font-size: 0.78rem; font-weight: 650; }
.inactive-reference { color: #657086; background: #f6f8fb; }
.reference-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 0.8rem; }
.reference-notes { grid-column: span 2; }
.vessel-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.vessel-type { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem; border: 1px solid #dbe2ea; border-radius: 8px; }
.vessel-type div { display: grid; gap: 0.15rem; }
.vessel-type span { color: #657086; }
.vessel-color { flex: 0 0 1.35rem; width: 1.35rem; height: 1.35rem; border: 1px solid #738096; border-radius: 50%; }
.vessel-yellow { background: #f4d03f; }
.vessel-blue { background: #2878c8; }
.vessel-green { background: #36a269; }
.vessel-orange { background: #e8882d; }
.vessel-purple { background: #8e5bb7; }
.vessel-red { background: #d94848; }
.vessel-white { background: #fff; }
.vessel-cargo { background: #f4d03f; }
.vessel-tanker { background: #2878c8; }
.vessel-passenger { background: #36a269; }
.vessel-special { background: #e8882d; }
.vessel-leisure { background: #8e5bb7; }
.vessel-fishing { background: #d94848; }
.vessel-unknown { background: #fff; }
.live-map-page { width: min(1320px, calc(100% - 3rem)); padding-bottom: 2rem; }
.map-controls { margin-bottom: 1rem; }
.map-controls-content { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr); gap: 1rem; align-items: center; }
.mobile-disclosure-toggle { display: none; width: 100%; min-height: 44px; padding: 0; border: 0; color: #172033; background: transparent; font: inherit; font-weight: 750; text-align: left; cursor: pointer; }
.mobile-disclosure-toggle > span:first-child { flex: 1; }
.mobile-disclosure-icon { font-size: 1.35rem; line-height: 1; transition: transform 160ms ease; }
.mobile-disclosure-open .mobile-disclosure-icon { transform: rotate(180deg); }
.mobile-disclosure-content[hidden] { display: none !important; }
.map-filter-grid { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.map-filter { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 42px; padding: 0.45rem 0.65rem; border: 1px solid #dbe2ea; border-radius: 8px; background: #f6f8fb; cursor: pointer; }
.map-filter input { width: 1rem; height: 1rem; margin: 0; }
.map-filter .vessel-color { width: 1rem; height: 1rem; flex-basis: 1rem; }
.map-filter > span:last-child { display: grid; gap: 0.1rem; }
.map-filter small { color: #657086; font-size: 0.78rem; }
.map-card { position: relative; padding: 0; overflow: hidden; margin-bottom: 1rem; }
.vesselfinder-map { min-height: 520px; max-height: 66vh; overflow: hidden; background: #dce7f3; }
.vesselfinder-map iframe { display: block; width: 100% !important; max-width: 100%; border: 0; }
.map-embed-note { padding: 0 1rem 1rem; }
.live-map { width: 100%; height: min(68vh, 720px); min-height: 480px; background: #dce7f3; }
.vessel-map-marker { width: 15px; height: 15px; border: 1.5px solid #26364d; border-radius: 50%; box-shadow: 0 1px 3px rgba(20, 34, 53, 0.4); }
.map-status { position: absolute; z-index: 500; left: 0.75rem; bottom: 0.75rem; margin: 0; padding: 0.45rem 0.65rem; border-radius: 7px; color: #172033; background: rgb(255 255 255 / 92%); box-shadow: 0 2px 10px rgb(18 54 96 / 18%); font-size: 0.86rem; }
.harbour-list-section { margin-bottom: 1rem; }
.harbour-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.harbour-list-heading h2 { margin: 0 0 0.25rem; }
.harbour-list-heading > strong { white-space: nowrap; color: #123660; }
.vessel-list-type { display: inline-flex; align-items: center; gap: 0.45rem; text-transform: capitalize; }
.vessel-list-type .vessel-color { width: 1rem; height: 1rem; flex-basis: 1rem; }
.compact-status { min-height: 1.2rem; margin: -0.35rem 0 0.45rem; color: #657086; font-size: 0.82rem; }
.vessel-schedule { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; min-width: 5.8rem; }
.vessel-assignment-chip { min-height: 28px; padding: 0.2rem 0.4rem; border: 1px solid #b9c9dc; border-radius: 999px; background: #edf5ff; color: #123660; font: inherit; font-size: 0.78rem; font-weight: 750; cursor: pointer; }
.vessel-assignment-chip:hover, .vessel-assignment-chip:focus { border-color: #165da7; background: #dcecff; }
.vessel-assignment-select { width: 3.15rem; min-height: 28px; padding: 0.1rem 0.25rem; border-radius: 999px; font-size: 0.78rem; }
.button-compact { min-height: 30px; padding: 0.3rem 0.55rem; font-size: 0.78rem; }
.vessel-visited { white-space: nowrap; }
.map-data-note { margin: 0.8rem 0 0; color: #657086; font-size: 0.88rem; }
.limit-form { max-width: 600px; }
.appointment-form { display: grid; grid-template-columns: minmax(180px, 0.45fr) minmax(320px, 1.55fr) auto; align-items: end; gap: 0.8rem; margin-bottom: 1rem; }
.appointment-form .field { margin: 0; }
.coworker-picker { margin: 0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.45rem; }
.checkbox-option { display: flex; align-items: center; gap: 0.45rem; padding: 0.45rem; border-radius: 6px; background: #f6f8fb; cursor: pointer; }
.two-month-calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.calendar-month h3 { text-align: center; }
.calendar-help { margin-top: 0; }
.calendar-section { overflow: hidden; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.calendar-heading h2 { margin: 0; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays strong { padding: 0.55rem; color: #657086; text-align: center; }
.calendar-day { min-height: 112px; padding: 0.5rem; border-top: 1px solid #dbe2ea; border-left: 1px solid #dbe2ea; background: white; }
.calendar-day:nth-child(7n) { border-right: 1px solid #dbe2ea; }
.calendar-day:nth-last-child(-n + 7) { border-bottom: 1px solid #dbe2ea; }
.calendar-empty, .calendar-past { background: #f6f8fb; }
.calendar-today { box-shadow: inset 0 0 0 2px #165da7; }
.calendar-selectable { cursor: pointer; }
.calendar-selectable:hover, .calendar-selectable:focus, .calendar-selectable.is-selected { outline: 2px solid #165da7; outline-offset: -2px; background: #edf5ff; }
.calendar-date { display: block; margin-bottom: 0.35rem; }
.calendar-appointments { display: grid; gap: 0.3rem; }
.appointment-chip { display: flex; align-items: center; justify-content: space-between; gap: 0.3rem; padding: 0.3rem 0.4rem; border-radius: 6px; background: #dceaff; color: #123660; font-weight: 700; }
.appointment-chip form { display: inline; }
.appointment-chip button { padding: 0 0.2rem; border: 0; color: #781a1a; background: transparent; cursor: pointer; font-size: 1.1rem; }
.blog-form { margin-bottom: 1rem; }
.blog-posts { display: grid; gap: 1rem; }
.blog-post h2 { margin: 0; font-size: 1.2rem; }
.blog-meta { margin: 0.3rem 0 1rem; color: #657086; font-size: 0.88rem; }
.blog-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sortable { color: inherit; text-decoration: none; }
.sortable:hover, .sortable.is-active { color: #165da7; text-decoration: underline; }
.report-builder { margin-bottom: 1rem; }
.report-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.65fr) auto; gap: 0.75rem; align-items: end; }
.report-form .field { margin: 0; }
.period-report { margin-top: 1rem; padding: 1rem; border: 1px solid #b7c9df; border-radius: 8px; background: #f6f9fd; }
.period-report-heading { display: flex; justify-content: space-between; gap: 1rem; }
.period-report h3, .period-report h4 { margin-top: 0; }
.report-kicker { margin: 0 0 0.25rem; color: #165da7; font-size: 0.82rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.report-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 1.25rem 0; }
.report-summary-grid article { display: grid; gap: 0.2rem; padding: 1rem; border-radius: 8px; background: white; }
.report-summary-grid span, .report-summary-grid small { color: #657086; }
.report-summary-grid strong { color: #123660; font-size: 1.8rem; }
.report-comparison { margin-bottom: 1.25rem; }
.new-account-card h2 { margin-top: 0; }
.new-account-card dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.new-account-card dl div { padding: 0.65rem; border-radius: 6px; background: rgb(255 255 255 / 55%); }
.new-account-card dt { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.new-account-card dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; }

@media (max-width: 1000px) {
    .site-header { align-items: center; }
    .menu-toggle:not([hidden]) { display: inline-flex; align-items: center; }
    .site-menu { flex-basis: 100%; flex-direction: column; align-items: stretch; }
    .site-header.menu-ready .site-menu { display: none; }
    .site-header.menu-ready.menu-open .site-menu { display: flex; }
    .site-menu .main-nav { flex-direction: column; order: 0; }
    .site-menu .main-nav a { display: block; min-height: 44px; padding: 0.7rem; }
    .site-menu .header-actions { flex-wrap: wrap; padding: 0.75rem; border-top: 1px solid #819bb9; }
}

@media (min-width: 721px) and (max-width: 1100px) {
    .account-table { border: 0; overflow: visible; background: transparent; }
    .account-table table, .account-table tbody { display: block; }
    .account-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .account-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.25rem; margin-bottom: 0.8rem; padding: 0.9rem; border: 1px solid #dbe2ea; border-radius: 10px; background: white; }
    .account-table td { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.5rem; min-width: 0; padding: 0.25rem 0; border: 0; overflow-wrap: anywhere; }
    .account-table td::before { content: attr(data-label); color: #657086; font-weight: 650; }
    .account-table td[data-label="Actions"] { grid-column: 1 / -1; min-width: 0; padding-top: 0.5rem; border-top: 1px solid #e5eaf0; }
}

@media (max-width: 720px) {
    .site-header { align-items: flex-start; }
    .main-nav { order: 3; flex-basis: 100%; justify-content: flex-start; }
    .main-nav a { padding-inline: 0.5rem; }
    .username { display: none; }
    .container { margin-top: 1.2rem; }
    .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .admin-form-grid, .admin-form-grid.two { grid-template-columns: 1fr; }
    .reference-form-grid { grid-template-columns: 1fr; }
    .reference-notes { grid-column: auto; }
    .filter-grid { grid-template-columns: 1fr; }
    .filter-search { grid-column: auto; }
    .filter-date-range { grid-column: auto; grid-template-columns: 1fr; }
    .stat-cards, .stats-grid { grid-template-columns: 1fr; }
    .year-selector { width: 100%; }
    .quarter-selector { align-items: stretch; flex-direction: column; }
    .appointment-form { grid-template-columns: 1fr; }
    .two-month-calendars { grid-template-columns: 1fr; min-width: 650px; }
    .report-form { grid-template-columns: 1fr; }
    .report-summary-grid { grid-template-columns: 1fr; }
    .new-account-card dl { grid-template-columns: 1fr; }
    .map-controls-content { grid-template-columns: 1fr; }
    .mobile-disclosure-toggle { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
    .mobile-disclosure-open .mobile-disclosure-toggle { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #dbe2ea; }
    .harbour-list-heading { align-items: flex-start; flex-direction: column; }
    .live-map { min-height: 420px; height: 60vh; }
    .vesselfinder-map { min-height: 480px; }
    .calendar-section { padding: 0.8rem; overflow-x: auto; }
    .calendar-heading { min-width: 650px; }
    .calendar-grid { min-width: 650px; }
    .detail-wide { grid-column: auto; }
    .language-list { grid-template-columns: 1fr; }
    .language-row { grid-template-columns: 1fr 110px; }
    .table-wrap { border: 0; overflow: visible; background: transparent; }
    .admin-records-table .row-actions { flex-wrap: wrap; }
    .account-table .row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
    .account-table .row-actions > .reset-form { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; }
    .account-table .row-actions > .button, .account-table .row-actions > form:not(.reset-form) .button { width: 100%; }
    .account-table .reset-form input { width: 100%; }
    table, thead, tbody, tr, th, td { display: block; }
    thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    tr { margin-bottom: 0.8rem; padding: 0.8rem; border: 1px solid #dbe2ea; border-radius: 10px; background: white; }
    td { display: grid; grid-template-columns: 7rem 1fr; gap: 0.5rem; padding: 0.4rem 0; border: 0; }
    td::before { content: attr(data-label); color: #657086; font-weight: 650; }
    td.center { text-align: left; }
}

@media print {
    .site-header, .year-selector, .report-builder > div:first-child, .report-form, .print-report,
    .stat-cards, .stats-grid, .stats-table, .quarter-section { display: none !important; }
    .period-report { border: 0; background: white; }
}
/* Keep hidden language rows hidden even when their normal layout is grid. */
.language-row[hidden] { display: none; }
.language-option-list { max-height: 18rem; overflow-y: auto; border: 1px solid var(--border); border-radius: 0.6rem; background: #fff; box-shadow: 0 0.75rem 1.5rem rgb(15 23 42 / 12%); }
.language-option-list[hidden], .language-option-list [hidden] { display: none; }
.language-option-list button { display: block; width: 100%; padding: 0.65rem 0.8rem; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.language-option-list button:hover, .language-option-list button:focus { background: var(--surface-muted); outline: none; }
