/* Rest Hours 1.1 design (owner's mock-up "New design for Rest Hours", ADR-108).
   Loaded after site.css. Everything is scoped to body.officer-ui, so the crew phone pages keep their own look.
   :where() keeps the specificity of the original site.css rules, so page-specific rules there still win. */

.officer-ui {
    --ink: #182b3d;
    --muted: #617083;
    --line: #dce3e9;
    --teal: #314fc0;          /* accent; the old name stays so every existing rule follows the new colour */
    --teal-hover: #253da0;
    --teal-soft: #eef2ff;
    --paper: #f4f6f8;
    --card: #ffffff;
    --success: #226147;
    --success-bg: #e9f3ed;
    --danger: #a73532;
    --danger-bg: #fbedeb;
    --warning: #85612c;
    --warning-bg: #faf2e3;
    --radius: 9px;
    --shadow: 0 6px 24px #182b3d0c;
    font-size: 14px;
    background: var(--paper);
    color: var(--ink);
}
:where(.officer-ui) a:focus-visible, :where(.officer-ui) button:focus-visible,
:where(.officer-ui) input:focus-visible, :where(.officer-ui) select:focus-visible,
:where(.officer-ui) textarea:focus-visible, :where(.officer-ui) summary:focus-visible {
    outline: 3px solid #7188e4; outline-offset: 3px;
}

/* ---------- Header ---------- */
.officer-ui .site-header { background: #fff; border-bottom: 1px solid var(--line); }
.officer-ui .header-inner {
    max-width: 1560px; min-height: 82px; padding: 12px 32px; gap: 32px;
    display: flex; align-items: center; justify-content: flex-start;
}
.officer-ui .brand { gap: 11px; font-size: 18px; font-weight: 600; letter-spacing: -.5px; min-width: 210px; color: var(--ink); }
.officer-ui .brand:hover { text-decoration: none; }
.officer-ui .brand small { font-size: 10px; font-weight: 400; letter-spacing: .045em; margin-top: 1px; }
.officer-ui .brand-mark { width: 42px; height: 42px; }
.officer-ui .brand-company { max-height: 44px; max-width: 180px; }
.officer-ui nav.main-nav { display: flex; gap: 8px; margin: 0 auto; }
.officer-ui nav.main-nav a {
    padding: 10px 20px; border-radius: 6px; color: var(--muted); font-weight: 500; font-size: 13px;
}
.officer-ui nav.main-nav a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.officer-ui nav.main-nav a[aria-current="page"] { background: var(--teal-soft); color: var(--teal); font-weight: 500; }

/* Account menu under the name: Guide and Sign out live here (ADR-108). */
.account-menu { position: relative; min-width: 210px; display: flex; justify-content: flex-end; }
.account-menu > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px;
    padding: 5px 8px; border-radius: 8px; font-size: 12px; color: var(--ink);
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary::after { content: none; }
@media (max-width: 600px) { .officer-ui .account-menu[open] { flex-basis: auto; } }
.account-menu > summary:hover, .account-menu[open] > summary { background: var(--paper); }
.account-menu .account-name { display: flex; flex-direction: column; line-height: 1.3; text-align: left; }
.account-menu .account-name small { font-size: 10px; color: var(--muted); margin-top: 1px; }
.account-menu .account-caret { font-size: 10px; color: var(--muted); }
.avatar {
    width: 31px; height: 31px; border-radius: 50%; background: #edf0f5; color: #5b6d81;
    display: grid; place-items: center; font-size: 10px; font-weight: 600; flex-shrink: 0;
}
.account-panel {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; padding: 5px;
    background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); z-index: 120;
}
.account-panel a { display: block; padding: 9px 11px; border-radius: 5px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.account-panel a:hover { background: var(--teal-soft); color: var(--teal); text-decoration: none; }
.account-panel .account-sep { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

/* ---------- Page frame ---------- */
.officer-ui .content { max-width: 1560px; padding: 28px 32px 36px; min-height: calc(100vh - 195px); }
.officer-ui .content.content-wide, .officer-ui .content:has(.workrest-workspace-grid) { max-width: 1560px; padding: 20px 32px 28px; }
.officer-ui .site-footer {
    max-width: 1560px; margin: 0 auto; padding: 20px 32px 24px; font-size: 10px; color: var(--muted);
    border-top: 1px solid var(--line);
}
.officer-ui .site-footer .footer-vessel strong { font-weight: 500; color: #43566a; }
body.officer-ui:has(.workrest-workspace-grid) .site-footer { padding: 10px 32px; }

.officer-ui h1 { font-weight: 600; letter-spacing: -1px; }
.officer-ui .page-header { margin-bottom: 24px; align-items: center; }
.officer-ui .page-header h1 { font-size: 29px; font-weight: 600; letter-spacing: -1px; line-height: 1.2; }
.officer-ui .page-header p { font-size: 13px; margin-top: 6px; max-width: 780px; }
.page-eyebrow { font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-bottom: 9px; }
.officer-ui .page-header-actions { gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
:where(.officer-ui) .btn {
    min-height: 36px; padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1.4;
}
:where(.officer-ui) .btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; }
:where(.officer-ui) .btn-primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
:where(.officer-ui) .btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
:where(.officer-ui) .btn-secondary:hover { background: #f8f9fb; border-color: #c5d0da; }
:where(.officer-ui) .btn-danger { background: #fff; color: var(--danger); border-color: #e9cfcd; }
:where(.officer-ui) .btn-danger:hover { background: var(--danger-bg); }
:where(.officer-ui) .btn-sm { min-height: 29px; padding: 4px 9px; font-size: 11px; }
:where(.officer-ui) .btn-lg { min-height: 42px; padding: 9px 18px; font-size: 13px; }
:where(.officer-ui) .btn:active:not(:disabled) { transform: translateY(1px); }
:where(.officer-ui) .button { min-height: 36px; padding: 7px 12px; font-size: 12px; font-weight: 500; background: var(--teal); }

/* ---------- Forms ---------- */
:where(.officer-ui) .form-control, :where(.officer-ui) .form-select {
    min-height: 38px; padding: 8px 11px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px;
}
:where(.officer-ui) .form-control:hover { border-color: #b9c6d3; }
:where(.officer-ui) .form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px #314fc01f; }
:where(.officer-ui) .form-group label, :where(.officer-ui) .form-label { font-size: 12px; color: #53667b; font-weight: 500; }
:where(.officer-ui) .form-hint { font-size: 11px; }
:where(.officer-ui) input[type=checkbox], :where(.officer-ui) input[type=radio] { accent-color: var(--teal); }

/* ---------- Cards and tables ---------- */
:where(.officer-ui) .card, :where(.officer-ui) .table-card, :where(.officer-ui) .form-card,
:where(.officer-ui) .details-card, :where(.officer-ui) .filter-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none;
}
:where(.officer-ui) .filter-card { background: #fff; }
:where(.officer-ui) table { font-size: 12px; }
:where(.officer-ui) th {
    font-size: 10px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted);
    background: #fafbfc; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
:where(.officer-ui) td { padding: 12px 14px; border-bottom: 1px solid #edf0f3; }
:where(.officer-ui) tbody tr:hover { background: #fafbfe; }

/* ---------- Badges, notices ---------- */
:where(.officer-ui) .badge { padding: 3px 7px; border-radius: 4px; font-size: 10px; font-weight: 500; background: #edf1f5; color: #53667b; }
:where(.officer-ui) .badge-active, :where(.officer-ui) .badge-onboard { background: var(--success-bg); color: var(--success); border: 0; }
:where(.officer-ui) .badge-inactive, :where(.officer-ui) .badge-ashore { background: #edf1f5; color: #58647c; border: 0; }
:where(.officer-ui) .badge-planned { background: var(--warning-bg); color: var(--warning); }
:where(.officer-ui) .alert { border-radius: 6px; font-size: 12px; }
:where(.officer-ui) .alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #e9cfcd; }
:where(.officer-ui) .alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #eedcb9; }
.status-banner { margin-bottom: 16px; padding: 10px 16px; background: var(--success-bg, #ecfdf5); color: var(--success, #065f46); border: 1px solid #cfe3d6; border-radius: 6px; font-weight: 500; font-size: 13px; }

/* Settings back link and organisation tabs: a quiet breadcrumb, not a second menu. */
:where(.officer-ui) .sub-nav { background: transparent; padding: 0; gap: 8px; align-items: center; font-size: 11px; margin-bottom: 18px; }
:where(.officer-ui) .sub-nav a { padding: 5px 10px; font-size: 12px; font-weight: 500; border-radius: 5px; }
:where(.officer-ui) .sub-nav a:first-child { padding-left: 0; }
:where(.officer-ui) .sub-nav a[aria-current="page"] { background: var(--teal-soft); color: var(--teal); box-shadow: none; }

/* ---------- Dialogs ---------- */
:where(.officer-ui) dialog { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 80px #182b3d33; }
:where(.officer-ui) dialog::backdrop { background: #182b3d66; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
    .officer-ui .header-inner { gap: 16px; padding-left: 24px; padding-right: 24px; }
    .officer-ui .brand, .account-menu { min-width: 175px; }
    .officer-ui nav.main-nav a { padding-left: 16px; padding-right: 16px; }
    .officer-ui .content { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 850px) {
    .account-menu { min-width: 0; }
    .account-menu .account-name, .account-menu .account-caret { display: none; }
    .officer-ui .brand { min-width: 0; }
}
@media (max-width: 600px) {
    .officer-ui .header-inner { padding: 12px 16px; gap: 12px; min-height: 72px; flex-wrap: wrap; }
    .officer-ui .brand { font-size: 17px; gap: 8px; }
    .officer-ui .brand-mark { width: 35px; height: 35px; }
    .account-menu { margin-left: auto; order: 2; }
    .officer-ui nav.main-nav { order: 3; width: 100%; margin: 2px 0 -4px; justify-content: space-between; gap: 6px; }
    .officer-ui nav.main-nav a { flex: 1; text-align: center; padding: 8px 14px; font-size: 12px; }
    .officer-ui .content { padding: 22px 16px 28px; }
    .officer-ui .page-header h1 { font-size: 26px; }
}
@media print { .account-menu { display: none; } }

/* ========== Hours overview (mock-up "Hours", Compact / Days) ========== */
.officer-ui .hov { background: transparent; border: 0; border-radius: 0; padding: 0; }
.officer-ui .hov .month-message { margin-bottom: 14px; }
.officer-ui .hov-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.officer-ui .hov-title { font-size: 29px; font-weight: 600; letter-spacing: -1px; line-height: 1.2; margin: 0; }
.officer-ui .hov-subtitle { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.officer-ui .hov-month { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.officer-ui .hov-month strong { min-width: 120px; text-align: center; font-size: 13px; font-weight: 600; }
.officer-ui .hov-month .hov-step { width: 36px; min-width: 36px; padding: 6px; font-size: 18px; font-weight: 400; }
.officer-ui .hov-month .btn { padding-top: 6px; padding-bottom: 6px; }
.officer-ui .month-closed-box { font-size: 12px; color: var(--muted); padding: 6px 10px; background: #edf0f8; border-radius: 6px; }

.officer-ui .hov-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.hov-search-wrap { flex: 1; min-width: 180px; position: relative; display: block; }
.hov-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-52%); color: #8994a1; font-size: 15px; pointer-events: none; }
.officer-ui .hov-search { width: 100%; min-height: 38px; padding: 8px 11px 8px 32px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff; }
.officer-ui .hov-search:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px #314fc01f; }
.officer-ui .hov-dept-filter { min-height: 38px; min-width: 160px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff; }
.officer-ui .hov-views { display: inline-flex; gap: 3px; padding: 3px; background: #e8edf2; border: 0; border-radius: 7px; overflow: visible; flex-shrink: 0; }
.officer-ui .hov-view { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; padding: 6px 13px; min-height: 30px; border-radius: 5px; }
.officer-ui .hov-view + .hov-view { border-left: 0; }
.officer-ui .hov-view.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #182b3d0d; }

.officer-ui .hov-line2 { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 16px; margin: 0 0 18px; }
.officer-ui .hov-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.officer-ui .hov-filter { border: 0; background: none; border-radius: 5px; padding: 7px 10px; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.officer-ui .hov-filter:hover { background: #e9edf2; }
.officer-ui .hov-filter.is-active { background: #e8eefc; color: var(--teal); }
.officer-ui .hov-filter b { font-size: 11px; font-weight: 500; opacity: .85; }
.officer-ui .hov-line2-note { margin-left: auto; font-size: 11px; color: var(--muted); }

/* Compact: two cards per row, three on wide screens; each card shows the month as one thin strip. */
.officer-ui .hcv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.officer-ui .hcv-item { min-width: 0; }
.officer-ui .hcv-card {
    display: block; background: #fff; border: 1px solid var(--line);
    padding: 20px 22px 22px; border-radius: 12px; min-width: 0; transition: border-color 140ms, box-shadow 140ms; color: var(--ink);
}
.officer-ui .hcv-card:hover { border-color: #b9c7df; box-shadow: 0 2px 9px #182b3d08; text-decoration: none; }
.hcv-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.officer-ui .hcv-no { font-size: 13px; font-variant-numeric: tabular-nums; color: #8090a1; min-width: 26px; font-weight: 400; }
.officer-ui .hcv-who { display: flex; flex-direction: column; min-width: 0; }
.hcv-name { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.hcv-name:hover { color: var(--teal); }
.officer-ui .hcv-who small { font-size: 13px; color: #617083; margin-top: 3px; }
.officer-ui .hcv-who small span { color: #8a97a6; }
.hcv-status { margin-left: auto; text-align: right; flex-shrink: 0; line-height: 1.3; }
.officer-ui .hcv-count { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.officer-ui .hcv-count span { font-size: 15px; color: var(--muted); font-weight: 400; }
.hcv-state { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.is-bad .hcv-state { color: var(--danger); }
.is-ok .hcv-state { color: var(--success); }
.is-part .hcv-state { color: var(--muted); }
.hcv-strip { display: grid; grid-template-columns: repeat(var(--days, 31), minmax(0, 1fr)); gap: 4px; margin: 26px 0 0; }
.hcv-day { display: block; min-width: 0; height: 11px; border-radius: 2px; background: #dfe3ea; }
.hcv-day[data-status=ok] { background: #9dbfa9; }
.hcv-day[data-status=issue] { background: #c96963; }
.hcv-day[data-status=offboard], .hcv-day[data-status=future] { background: #d6e1da; }
a.hcv-day:hover { outline: 2px solid var(--teal); outline-offset: 1px; filter: brightness(.95); position: relative; z-index: 1; }
a.hcv-day:focus-visible { outline-offset: 1px; position: relative; z-index: 2; }

/* Days: the whole month, one small square per day with the hours worked. */
.officer-ui .hov-scroll { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 300px); }
.officer-ui .hov-table { font-size: 12px; }
.officer-ui .hov-table thead th { background: #fafbfc; font-size: 10px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; padding: 9px 3px; }
.officer-ui .hov-table thead .hov-name-h { padding-left: 14px; font-size: 10px; }
.officer-ui .hov-name-h, .officer-ui .hov-name { min-width: 175px; padding: 6px 12px 6px 14px; border-right: 1px solid #edf0f3; }
.officer-ui .hov-name a { font-weight: 500; font-size: 12px; }
.officer-ui .hov-rank { font-size: 10px; }
.officer-ui .hov-no { font-size: 10px; color: #8090a1; float: left; min-width: 18px; margin-top: 2px; }
.officer-ui .hov-day-h { min-width: 28px; }
.officer-ui .hov-day-h .n { font-size: 10px; font-weight: 500; color: var(--ink); }
.officer-ui .hov-day-h .w { font-size: 9px; }
.officer-ui .hov-day-h.is-today { background: var(--teal-soft); color: var(--teal); }
.officer-ui .hov-day-h.is-today .n { color: var(--teal); }
.officer-ui .hov-day-h.is-today .w { color: var(--teal); }
.officer-ui .hov-dept th { background: #f7f9fb; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; padding: 6px 14px; }
.officer-ui .hov-row > * { border-bottom: 1px solid #edf0f3; }
.officer-ui .hov-row:hover .hov-name, .officer-ui .hov-row:hover { background: #fafbfe; }
.officer-ui .hov-cell { padding: 3px 2px; height: 34px; }
.officer-ui .hov-cell a { height: 28px; min-width: 24px; border: 0; border-radius: 3px; font-size: 10px; font-weight: 500; }
.officer-ui .hov-cell.is-ok a { background: #b5d1be; color: #244231; }
.officer-ui .hov-cell.is-bad a { background: #c96963; color: #fff; }
.officer-ui .hov-cell.is-empty a { background: #dce2e8; color: #5f7083; }
.officer-ui .hov-cell .hov-out, .officer-ui .hov-cell.is-future::after {
    border: 0; border-radius: 3px; height: 28px; min-width: 24px;
    background: repeating-linear-gradient(135deg, #f0f3f6, #f0f3f6 3px, #dce2e8 3px, #dce2e8 4px);
}
.officer-ui .hov-cell.is-future::after { content: ""; display: block; opacity: .6; }
.officer-ui .hov-cell a:hover { outline: 2px solid var(--teal); outline-offset: 1px; }
.officer-ui .hov-filled-h, .officer-ui .hov-filled { padding: 6px 12px; text-align: right; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--muted); white-space: nowrap; }

.officer-ui .hov-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; font-size: 11px; color: var(--muted); margin: 16px 0 0; }
.officer-ui .hov-legend i { width: 9px; height: 9px; border-radius: 2px; border: 0; }
.officer-ui .hov-legend i.is-ok { background: #b5d1be; border: 0; }
.officer-ui .hov-legend i.is-bad { background: #c96963; border: 0; }
.officer-ui .hov-legend i.is-empty { background: #dce2e8; border: 0; }
.officer-ui .hov-legend i.is-out { background: repeating-linear-gradient(135deg, #f0f3f6, #f0f3f6 2px, #c9d2db 2px, #c9d2db 3px); border: 0; }
.officer-ui .hov-empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px 24px; }
.officer-ui .hov-nomatch { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px 24px; text-align: center; }

@media (min-width: 1380px) {
    .officer-ui .hcv-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .hcv-strip { gap: 2px; }
    .officer-ui .hov-line2-note { margin-left: 0; }
}
@media (max-width: 700px) {
    .officer-ui .hcv-list { grid-template-columns: 1fr; }
}

/* ========== Seafarer month editor (mock-up "editor"): same page and behaviour, new look ========== */
.officer-ui .workrest-workspace-grid { gap: 18px; grid-template-columns: 236px minmax(0, 1fr); }
.officer-ui .workrest-sidebar-card,
.officer-ui .workrest-particulars-card,
.officer-ui .workrest-month-card,
.officer-ui .workrest-day-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.officer-ui .workrest-main-column { gap: 14px; }

/* Crew list */
.officer-ui .workrest-back-overview { font-size: 12px; font-weight: 500; }
.officer-ui .workrest-search-input { border: 1px solid var(--line); border-radius: 6px; font-size: 12px; min-height: 34px; }
.officer-ui .workrest-sidebar-header { font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.officer-ui .workrest-crew-item { min-height: 44px; border-left: 3px solid transparent; border-bottom: 1px solid #f0f3f6; border-radius: 0; }
.officer-ui .workrest-crew-item:hover { background: #f6f8fc; }
.officer-ui .workrest-crew-item.active { background: var(--teal-soft); border-left: 3px solid var(--teal); }
.officer-ui .workrest-crew-item.active:hover { background: #e4eaff; }
.officer-ui .workrest-crew-item .crew-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.officer-ui .workrest-crew-item.active .crew-name { color: var(--teal); font-weight: 600; }
.officer-ui .workrest-crew-item .crew-rank { font-size: 10.5px; color: var(--muted); }
.officer-ui .workrest-crew-item.active .crew-rank { color: #4a5f9e; }

/* Header of the person */
.officer-ui .workrest-particulars-card { padding: 16px 18px; }
.officer-ui .particulars-seafarer-name { font-size: 20px; font-weight: 600; letter-spacing: -.5px; }
.officer-ui .particulars-rank-badge { font-size: 10px; font-weight: 500; background: #edf1f5; color: #53667b; border: 0; padding: 3px 7px; }
.officer-ui .particulars-meta-row { font-size: 12px; }
.officer-ui .particulars-meta-row strong { font-weight: 500; }
.officer-ui .wk-label { font-size: 12px; }
.officer-ui .wk-segmented-control { border: 0; background: #e8edf2; padding: 3px; border-radius: 7px; gap: 3px; }
.officer-ui .wk-btn { border: 0; border-radius: 5px; font-size: 11px; font-weight: 500; }

/* Month card and table */
.officer-ui .workrest-month-card, .officer-ui .workrest-day-card { padding: 14px 18px; }
.officer-ui .workrest-card-title { font-size: 15px; font-weight: 600; }
.officer-ui .workrest-card-subtitle { font-size: 11px; }
.officer-ui .workrest-table-container { border: 0; border-radius: 0; }
.officer-ui .workrest-month-table { font-size: 11px; }
.officer-ui .workrest-month-table thead th {
    background: #fff; font-size: 9px; font-weight: 500; text-transform: none; letter-spacing: 0;
    color: var(--muted); border-bottom: 1px solid var(--line);
}
.officer-ui .workrest-hours-header { font-size: 9px; font-weight: 500; }
.officer-ui .workrest-hours-header span { border-right: 0; }
.officer-ui .workrest-day-row { border-bottom: 0; }
.officer-ui .workrest-day-row td { padding: 2px 6px; }
.officer-ui .workrest-day-row:hover { background: #f6f8fc; }
.officer-ui .workrest-day-row.selected-row { background: var(--teal-soft) !important; }
.officer-ui .td-w-date { font-weight: 600; }
.officer-ui .td-w-work { color: var(--ink); font-weight: 500; }
.officer-ui .workrest-day-row.selected-row .td-w-date, .officer-ui .workrest-day-row.selected-row .td-w-day { color: var(--teal); }
.officer-ui .workrest-day-row:focus-visible { outline: 2px solid #7188e4; }

/* Timelines: separate half-hour blocks with thin white gaps, a wider gap every 6 hours (as in the mock-up). */
.officer-ui .workrest-row-timeline { height: 16px; border: 0; border-radius: 2px; background: #fff; }
.officer-ui .w-slot, .officer-ui .day-interactive-slot { border-right: 1px solid #fff; }
.officer-ui .w-slot:nth-child(2n), .officer-ui .day-interactive-slot:nth-child(2n) { border-right: 1px solid #fff; }
.officer-ui .w-slot:nth-child(12n), .officer-ui .day-interactive-slot:nth-child(12n) { border-right: 3px solid #fff; }
.officer-ui .w-slot:last-child, .officer-ui .day-interactive-slot:last-child { border-right: 0; }
.officer-ui .w-slot.slot-rest, .officer-ui .day-interactive-slot.slot-rest { background-color: #e7ecf1; }
.officer-ui .w-slot.slot-work, .officer-ui .day-interactive-slot.slot-work { background-color: var(--teal); }
.officer-ui .w-slot.slot-unknown, .officer-ui .day-interactive-slot.slot-unknown { background-color: #d5dce4; }
.officer-ui .w-slot.slot-outside, .officer-ui .day-interactive-slot.slot-outside {
    background: repeating-linear-gradient(135deg, #f1f3f6, #f1f3f6 2px, #dce2e8 2px, #dce2e8 3px);
}
.officer-ui .day-interactive-slot.slot-work:hover { background-color: #8295dc; }
.officer-ui .day-interactive-slot.slot-rest:hover { background-color: #c9d4f3; }
.officer-ui .day-interactive-slot.slot-unknown:hover { background-color: #c3ccd6; }
.officer-ui .day-total-val-work { color: var(--teal); }
.officer-ui .swatch-box-work { background-color: var(--teal); border-color: var(--teal); }

/* ========== Settings: one quiet list, state on the right (owner 2026-11-01: no cards) ========== */
.set-page { max-width: 920px; }
.officer-ui .set-heading { text-align: left; margin-bottom: 24px; }
.officer-ui .set-heading h1 { font-size: 29px; font-weight: 600; letter-spacing: -1px; text-transform: none; margin: 0; }
.officer-ui .set-heading p { font-size: 13px; margin-top: 6px; }
.set-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 0 8px; }
.set-group { padding: 0; }
.set-group + .set-group { border-top: 1px solid var(--line); margin-top: 4px; }
.officer-ui .set-group-title {
    margin: 0; padding: 18px 22px 6px; text-align: left; text-transform: none;
    font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--ink);
}
.set-group-title span { color: #8090a1; font-weight: 400; font-variant-numeric: tabular-nums; margin-right: 10px; }
.officer-ui .settings-link.set-row {
    display: flex; flex-direction: row; align-items: center; gap: 16px;
    padding: 13px 22px; margin: 0; border: 0; border-radius: 0; background: transparent;
    border-bottom: 1px solid #f0f3f6; color: var(--ink); text-decoration: none; width: 100%; text-align: left;
}
.set-group .set-row:last-child, .set-group .settings-stop:last-child .set-row { border-bottom: 0; }
.officer-ui .settings-link.set-row:hover { background: #f8f9fc; }
.officer-ui .settings-link.set-row:hover strong { color: var(--teal); }
.officer-ui .settings-link.set-row:focus-visible { outline: 3px solid #7188e4; outline-offset: -3px; }
.set-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.officer-ui .set-row .set-text strong { font-size: 13px; font-weight: 600; color: inherit; }
.officer-ui .set-row .set-text small { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.officer-ui .set-row .set-value { flex-shrink: 0; font-size: 12px; color: var(--muted); text-align: right; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.officer-ui .set-row .set-go { flex-shrink: 0; width: 14px; text-align: center; font-size: 16px; color: #a3aebb; }
.officer-ui .set-row-danger strong { color: var(--danger); }
/* On / off state shown as a switch on the right; the switch itself is changed on its own page. */
.set-state { display: inline-block; width: 34px; height: 20px; border-radius: 999px; background: #d5dce4; position: relative; vertical-align: middle; }
.set-state i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #182b3d33; transition: left 140ms; }
.set-state.is-on { background: var(--teal); }
.set-state.is-on i { left: 16px; }
@media (max-width: 600px) {
    .officer-ui .settings-link.set-row { padding: 12px 16px; gap: 10px; }
    .officer-ui .set-group-title { padding-left: 16px; }
    .officer-ui .set-row .set-value { max-width: 34%; }
}

/* ---------- Month on top, Day Editor under it as one 24-hour strip ---------- */
.officer-ui .wr-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.officer-ui .wr-stack .workrest-day-card .workrest-card-header { align-items: center; flex-wrap: wrap; gap: 10px; }
.officer-ui .wr-stack #selectedDayTitleText { color: var(--ink) !important; font-weight: 600; }
.officer-ui .wr-stack .workrest-day-actions { flex-wrap: wrap; gap: 6px; }
.officer-ui .wr-stack .workrest-day-actions .day-nav-btn { width: 32px; min-width: 32px; padding: 4px; }
.officer-ui .wr-stack .day-timeline-box { background: #fff; border: 0; padding: 0; gap: 18px; }
.officer-ui .wr-stack .day-hour-markers { font-size: 10px; font-weight: 500; color: var(--muted); }
.officer-ui .wr-stack .day-hour-markers span { border-right: 0; }
.officer-ui .wr-stack .day-slots-48 { height: 34px; border: 0; border-radius: 4px; background: #fff; }
.officer-ui .wr-stack .day-interactive-slot.slot-unknown { background: #d5dce4; }
.officer-ui .wr-stack .day-totals-summary-box { border-left: 1px solid var(--line); padding-left: 18px; min-width: 120px; }
.officer-ui .wr-stack .day-total-lbl { font-size: 10px; font-weight: 500; letter-spacing: .06em; }
.officer-ui .wr-stack .day-total-val { font-size: 17px; font-weight: 600; }
.officer-ui .wr-stack .day-total-val-rest { color: var(--success); }
.officer-ui .wr-stack .workrest-bottom-row { border-top: 1px solid #edf0f3; padding-top: 10px; }
.officer-ui .wr-stack .day-comment-input { border: 1px solid var(--line); border-radius: 6px; min-height: 32px; }

/* Crew list in the editor: running number before the name */
.officer-ui .crew-item-no { flex: 0 0 20px; font-size: 10px; color: #8090a1; font-variant-numeric: tabular-nums; text-align: right; margin-right: 2px; align-self: flex-start; padding-top: 2px; }
.officer-ui .workrest-crew-item { justify-content: flex-start; }
.officer-ui .workrest-crew-item .roster-attention-dot { margin-left: auto; }


/* ========== Crew list (mock-up "crew") ========== */
.officer-ui .crew-filter { padding: 14px 16px; }
.officer-ui .crew-filter label { font-size: 10px; font-weight: 500; letter-spacing: .06em; color: var(--muted); }
/* "Hours" in each row: a quiet link-button, the blue fill stays for the main actions above the list. */
.officer-ui td .btn-primary.btn-sm[href*="/WorkRest"] { background: #fff; color: var(--teal); border-color: var(--line); }
.officer-ui td .btn-primary.btn-sm[href*="/WorkRest"]:hover { background: var(--teal-soft); border-color: #bbc8ee; }
.officer-ui td .btn-primary.btn-sm[href*="/WorkRest"]::after { content: " ↗"; font-size: 10px; }
.officer-ui .crew-no, .officer-ui td.crew-no { color: #8090a1; font-variant-numeric: tabular-nums; }

/* Crew header and one filter row, as in the mock-up */
.officer-ui .crew-page-header { align-items: center; margin-bottom: 22px; }
.officer-ui .crew-page-header p a { margin-left: 4px; }
.officer-ui .crew-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 18px;
    background: transparent; border: 0; padding: 0; box-shadow: none;
}
.crew-tabs { display: inline-flex; gap: 3px; padding: 3px; background: #e8edf2; border-radius: 7px; flex-shrink: 0; }
.crew-tabs a { padding: 7px 14px; border-radius: 5px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.crew-tabs a:hover { color: var(--ink); text-decoration: none; }
.crew-tabs a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #182b3d0d; }
.crew-tabs .tab-count { font-size: 11px; color: #8994a1; margin-left: 5px; font-variant-numeric: tabular-nums; }
.crew-search { flex: 1; min-width: 200px; position: relative; display: block; margin: 0; }
.crew-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: #8994a1; font-size: 15px; pointer-events: none; }
.officer-ui .crew-search input {
    width: 100%; min-height: 40px; padding: 8px 12px 8px 34px; font-size: 13px;
    border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.officer-ui .crew-search input:focus, .officer-ui .crew-select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px #314fc01f; }
.officer-ui .crew-select { min-height: 40px; min-width: 170px; padding: 8px 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.visually-hidden-submit { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.crew-bar-more { flex-basis: 100%; display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-top: -4px; }
.officer-ui .crew-bar-more .filter-more { border: 0; padding: 0; margin: 0; background: transparent; }
.officer-ui .crew-bar-more .filter-more-summary { font-size: 12px; color: var(--muted); padding: 0; }
.officer-ui .crew-bar-more .filter-more[open] { flex-basis: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.officer-ui .crew-bar-more .btn-reset { font-size: 12px; }
/* Table: left-aligned columns like the mock-up */
.officer-ui .crew-table th, .officer-ui .crew-table td { text-align: left; }
.officer-ui .crew-table th.actions-cell, .officer-ui .crew-table td.actions-cell { text-align: right; }
.officer-ui .crew-table .sort-header { color: var(--muted); font-weight: 500; font-size: 10px; }
.officer-ui .crew-table .crew-name-link { color: var(--ink); font-weight: 600; font-size: 13px; }
.officer-ui .crew-table .rank-title { font-weight: 400; color: var(--ink); }
@media (max-width: 700px) {
    .crew-tabs { flex-wrap: wrap; }
    .officer-ui .crew-select { flex: 1; }
}
.crew-since { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.officer-ui .crew-table .action-menu > summary { min-width: 30px; padding: 3px 8px; font-size: 14px; letter-spacing: 1px; color: var(--muted); border-color: transparent; background: transparent; }
.officer-ui .crew-table .action-menu > summary:hover, .officer-ui .crew-table .action-menu[open] > summary { background: #edf1f5; color: var(--ink); }
.officer-ui .crew-table td .btn-primary.btn-sm[href*="/WorkRest"] { border-color: transparent; background: transparent; font-weight: 600; color: var(--ink); }
.officer-ui .crew-table td .btn-primary.btn-sm[href*="/WorkRest"]:hover { background: var(--teal-soft); color: var(--teal); }

/* ========== Settings shell: sections on the left, the chosen section on the right (owner 2026-11-01) ========== */
.set-shell { max-width: none; }
.set-shell-heading { margin-bottom: 26px; }
.set-shell-title { display: block; font-size: 29px; font-weight: 600; letter-spacing: -1px; line-height: 1.2; color: var(--ink); }
.set-shell-heading p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.set-shell-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }

.set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.set-nav a { display: block; padding: 11px 14px; border-radius: 7px; font-size: 13px; color: var(--muted); text-decoration: none; transition: background-color 120ms, color 120ms; }
.set-nav a:hover { background: #e9edf3; color: var(--ink); text-decoration: none; }
.set-nav a[aria-current="page"] { background: #e8eefc; color: var(--teal); font-weight: 500; }

/* The right side: one white sheet. Whatever the section page draws inside sits on it without boxes of its own. */
.set-content {
    min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 30px 34px 34px; box-shadow: 0 1px 2px #182b3d08;
}
.set-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: -8px 0 26px; flex-wrap: wrap; }
.set-tabs a { padding: 10px 0 12px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.set-tabs a:hover { color: var(--ink); text-decoration: none; }
.set-tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--teal); }

/* Headings: page title, then section titles; inline sizes from the older pages give way. */
.set-content h1, .set-content .page-header h1, .set-content .records-header h1 { font-size: 22px !important; font-weight: 600 !important; letter-spacing: -.5px !important; margin: 0 0 6px !important; color: var(--ink) !important; text-transform: none !important; }
.set-content h2 { font-size: 16px !important; font-weight: 600 !important; letter-spacing: -.2px !important; color: var(--ink) !important; margin: 26px 0 10px !important; }
.set-content > :first-child h2:first-child, .set-content > .card:first-child > div:first-child > h2,
.set-content > .set-tabs + * h2:first-child { font-size: 22px !important; letter-spacing: -.5px !important; margin-top: 0 !important; }
.set-content h3 { font-size: 13px !important; font-weight: 600 !important; color: var(--ink) !important; margin: 22px 0 8px !important; }
.set-content p, .set-content .lead { font-size: 13px; line-height: 1.6; color: var(--muted); }
.set-content > :first-child p:first-of-type, .set-content .page-header p, .set-content .lead { margin-bottom: 4px; }
.set-content .page-header { margin-bottom: 18px; align-items: flex-start; }
.set-content .page-header-actions { margin-left: auto; }

/* Boxes from the older pages become plain sections, separated by a thin line. */
.set-content :is(.card, .table-card, .form-card, .filter-card, .details-card, .status-panel, .reliability-container) {
    border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: transparent !important;
    padding: 0 !important; max-width: none !important; margin: 0 !important;
}
.set-content :is(.card, .form-card, .status-panel) + :is(.card, .form-card, .status-panel, .table-card) { border-top: 1px solid var(--line) !important; margin-top: 28px !important; padding-top: 26px !important; }
.set-content .table-card, .set-content .table-wrap { border: 1px solid var(--line) !important; border-radius: 9px !important; overflow-x: auto; margin-top: 8px !important; }
.set-content .filter-card { margin-bottom: 16px !important; }

/* Form fields */
.set-content label { color: var(--ink); }
.set-content .form-group { margin-bottom: 16px; }
.set-content .form-group > label, .set-content form label[style*="font-weight: 600"] { font-size: 12px !important; font-weight: 500 !important; color: #53667b !important; }
.set-content .form-control, .set-content select, .set-content input[type=text], .set-content input[type=number], .set-content input[type=date], .set-content textarea {
    border: 1px solid var(--line) !important; border-radius: 7px !important; min-height: 40px; font-size: 13px !important; background: #fff;
}
.set-content .form-control:focus, .set-content select:focus, .set-content input:focus { border-color: var(--teal) !important; box-shadow: 0 0 0 3px #314fc01f !important; outline: none; }
.set-content .form-hint, .set-content small, .set-content .muted { color: var(--muted) !important; }
.set-content .form-actions, .set-content form > div:last-child:has(> .btn-primary) { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; display: flex; gap: 8px; justify-content: flex-end; }

/* Choice cards (print template etc.): blue when chosen. */
.set-content .template-options label { border: 1px solid var(--line) !important; background: #fff !important; border-radius: 9px !important; padding: 14px 16px !important; transition: border-color 120ms, background-color 120ms; }
.set-content .template-options label:hover { border-color: #b9c7df !important; }
.set-content .template-options label:has(input:checked) { border-color: #8da0e4 !important; background: #f3f6ff !important; }
.set-content input[type=radio] { accent-color: var(--teal); width: 16px; height: 16px; }

/* On / off settings: the text on the left, a switch on the right. */
.set-content .portal-switch, .set-content .form-check,
.set-content label:has(> input[type=checkbox][name="SettingsInput.AutoBackupEnabled"]) {
    display: flex !important; flex-direction: row-reverse; justify-content: space-between; align-items: center !important;
    gap: 16px !important; padding: 14px 0; margin: 0 0 8px !important; border-bottom: 1px solid #edf0f3; cursor: pointer; font-weight: 500 !important;
}
.set-content .portal-switch > input[type=checkbox], .set-content .form-check > input[type=checkbox],
.set-content input[type=checkbox][name="SettingsInput.AutoBackupEnabled"] {
    appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 40px !important; height: 23px !important; margin: 0 !important;
    border-radius: 999px; background: #d5dce4; position: relative; cursor: pointer; transition: background-color 140ms;
}
.set-content .portal-switch > input[type=checkbox]::after, .set-content .form-check > input[type=checkbox]::after,
.set-content input[type=checkbox][name="SettingsInput.AutoBackupEnabled"]::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px #182b3d40; transition: left 140ms;
}
.set-content .portal-switch > input:checked, .set-content .form-check > input:checked,
.set-content input[type=checkbox][name="SettingsInput.AutoBackupEnabled"]:checked { background: var(--teal); }
.set-content .portal-switch > input:checked::after, .set-content .form-check > input:checked::after,
.set-content input[type=checkbox][name="SettingsInput.AutoBackupEnabled"]:checked::after { left: 19px; }
.set-content .portal-switch > input:disabled, .set-content .form-check > input:disabled { opacity: .5; cursor: not-allowed; }
.set-content .du-right:has(input:checked) { background: #f3f6ff; border-color: #8da0e4; }
.set-content .du-right-icon { background: #edf1f5; }

/* Tables inside the sheet */
.set-content table { font-size: 12px; }
.set-content th { background: #fafbfc; }

/* "System & help" page and other short lists of links */
.set-panel { margin: 0; }
.set-panel-head { margin-bottom: 18px; }
.set-panel-head p { margin: 0; }
.set-rows { border-top: 1px solid var(--line); }
.officer-ui .set-rows .settings-link.set-row { padding: 15px 4px; }
.officer-ui .set-rows .settings-link.set-row:hover { background: #f8f9fc; }

/* Status page inside the sheet */
.set-content .status-panel dl.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 16px 0; border-top: 1px solid var(--line); }
.set-content .status-panel dl.details > div { padding: 12px 0; border-bottom: 1px solid #edf0f3; }
.set-content .status-panel dt { font-size: 11px; color: var(--muted); }
.set-content .status-panel dd { margin: 2px 0 0; font-size: 13px; color: var(--ink); }

@media (max-width: 900px) {
    .set-shell-grid { grid-template-columns: 1fr; gap: 14px; }
    .set-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
    .set-nav a { white-space: nowrap; padding: 8px 12px; }
    .set-content { padding: 22px 18px 24px; }
}

.set-content .btn { white-space: nowrap; }

/* Vessel details as a sheet (one vessel) */
.vessel-sheet { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin-top: 6px; }
.vessel-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid #edf0f3; }
.vessel-sheet-kicker { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.vessel-sheet-name { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.4px; color: var(--ink); }
.vessel-sheet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; margin: 20px 0 0; }
.vessel-sheet-grid dt { font-size: 11px; color: var(--muted); }
.vessel-sheet-grid dd { margin: 4px 0 0; font-size: 14px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.vessel-sheet-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid #edf0f3; }
.vessel-sheet-quiet { display: inline-flex; gap: 14px; align-items: center; font-size: 12px; }
.vessel-sheet-note { margin: 18px 0 0; }
@media (max-width: 900px) { .vessel-sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Filter rows inside the sheet: fields side by side, labels small */
.set-content .filter-bar { background: #f8f9fb !important; border: 1px solid #edf0f3 !important; border-radius: 9px !important; padding: 14px 16px !important; }
.set-content .filter-row, .set-content .filter-main-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.set-content .filter-row .filter-group, .set-content .filter-main-row .filter-group { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.set-content .filter-row .filter-search, .set-content .filter-main-row .filter-search { flex: 2 1 260px; }
.set-content .filter-group label { font-size: 10px !important; font-weight: 500 !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) !important; }
.set-content .filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.set-content .filter-more-summary { font-size: 12px; color: var(--muted); }

/* Hours: status tabs in the same row and the same look as the Crew tabs */
.officer-ui .hov-tools { gap: 12px; margin-bottom: 8px; }
.officer-ui .hov-filters.crew-tabs { display: inline-flex; flex-wrap: nowrap; gap: 3px; padding: 3px; background: #e8edf2; border-radius: 7px; }
.officer-ui .crew-tabs .hov-filter { border: 0; background: transparent; padding: 7px 14px; border-radius: 5px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; gap: 0; }
.officer-ui .crew-tabs .hov-filter:hover { background: transparent; color: var(--ink); }
.officer-ui .crew-tabs .hov-filter.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #182b3d0d; }
.officer-ui .hov-search-wrap.crew-search { flex: 1; min-width: 180px; }
.officer-ui .crew-search .hov-search { min-height: 40px; padding-left: 34px; }
.officer-ui .hov-dept-filter.crew-select { min-height: 40px; }
.officer-ui .hov-views { min-height: 40px; align-items: stretch; }
.officer-ui p.hov-line2-note { margin: 0 0 14px; text-align: right; font-size: 11px; color: var(--muted); }
@media (max-width: 1100px) { .officer-ui .hov-filters.crew-tabs { flex-wrap: wrap; } }
.officer-ui .wk-btn.active-yes { background: var(--teal); color: #fff; }
.officer-ui .wk-btn.active-no { background: #fff; color: var(--ink); box-shadow: 0 1px 3px #182b3d14; }

/* Seafarer header, compact (owner 2026-11-01): name and a small position tag on the left, department / vessel /
   watchkeeper on the right of the same line, the month and the actions under it. Same height as the crew-list top. */
.officer-ui .workrest-particulars-card { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 18px; }
.officer-ui .particulars-info { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.officer-ui .particulars-title-row { gap: 8px; flex-wrap: nowrap; min-width: 0; }
.officer-ui .particulars-seafarer-name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.officer-ui .particulars-rank-badge { font-size: 10px; padding: 2px 6px; white-space: nowrap; }
.officer-ui .particulars-meta-row { margin-left: auto; font-size: 12px; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.officer-ui .particulars-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.officer-ui .particulars-actions .btn, .officer-ui .particulars-actions .save-status-box { min-height: 34px; }

/* Month table you can paint in */
.officer-ui .workrest-month-table.is-paintable .w-slot:not(.slot-outside) { cursor: crosshair; }
.officer-ui .workrest-month-table.is-paintable .workrest-row-timeline:hover { box-shadow: 0 0 0 1px #8da0e4; }
.officer-ui .workrest-month-table.is-paintable .w-slot.slot-rest:hover { background: #c9d4f3; }
.officer-ui .workrest-month-table.is-paintable .w-slot.slot-unknown:hover { background: #c3ccd6; }
.officer-ui .workrest-month-table.is-paintable .w-slot.slot-work:hover { background: #4560c9; }
.officer-ui .workrest-month-table.is-painting, .officer-ui .workrest-month-table.is-painting .w-slot { cursor: crosshair !important; user-select: none; }
.officer-ui .workrest-month-table.is-paintable .workrest-row-timeline { height: 18px; }

/* Watchkeeper: the chosen answer is blue, Yes or No (owner 2026-11-01) */
.officer-ui .wk-btn.active-yes, .officer-ui .wk-btn.active-no { background: var(--teal); color: #fff; box-shadow: none; font-weight: 600; }
.officer-ui .wk-segmented-control.wk-readonly .wk-btn.active-yes, .officer-ui .wk-segmented-control.wk-readonly .wk-btn.active-no { background: #8da0e4; color: #fff; }

/* Header actions: month, Preview / Print, Close month on the left; Save and its status at the far right */
.officer-ui .particulars-actions .save-button-cluster { order: 10; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.officer-ui .wr-strict-note { color: #85612c; }
.officer-ui .wr-strict-note a { color: inherit; text-decoration: underline; }

/* System & help: a choice inside a row */
.officer-ui .set-rows .set-row-form { display: flex; align-items: center; gap: 16px; padding: 15px 4px; border-bottom: 1px solid #f0f3f6; }
.officer-ui .set-row-form .set-text strong { font-size: 13px; font-weight: 600; color: var(--ink); }
.officer-ui .set-row-form .set-text small { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.officer-ui .set-select { flex-shrink: 0; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; background: #fff; color: var(--ink); }
.officer-ui .filter-more-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
/* Month table keeps usable half-hour squares in a narrow window: it scrolls sideways inside its box. */
.officer-ui .workrest-month-table { min-width: 860px; }
.officer-ui .day-comment-container { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.officer-ui .day-comment-container input { min-width: 0; max-width: 100%; }
/* Legend squares in the same colours as the table */
.officer-ui .swatch-box-rest { background-color: #e7ecf1; border-color: #e7ecf1; }
.officer-ui .swatch-box-unknown { background-color: #d5dce4; border-color: #d5dce4; }
.officer-ui .hov-filters.crew-tabs { max-width: 100%; }
@media (max-width: 700px) {
    .officer-ui .particulars-meta-row { margin-left: 0; justify-content: flex-start; }
    .officer-ui .particulars-title-row { flex-wrap: wrap; }
}
@media (max-width: 1024px) { .officer-ui .workrest-workspace-grid { grid-template-columns: minmax(0, 1fr); } }
.officer-ui .particulars-info, .officer-ui .particulars-title-row, .officer-ui .workrest-particulars-card { min-width: 0; }
.officer-ui .particulars-info > * { min-width: 0; }
