/* © 2026 Dennis Andres */
.card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 16px var(--pad); border-bottom: 1px solid var(--line-soft); }
.card-head > .muted.small { text-align: right; }
.card-title { font-size: 17px; font-weight: 600; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-body { padding: var(--pad); }
.card-body > :last-child { margin-bottom: 0; }
.card-foot { padding: 14px var(--pad); border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13.5px; }
.card-link { font-size: 14px; font-weight: 600; white-space: nowrap; }
.card-link:hover { text-decoration: underline; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.stat { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 18px var(--pad); box-shadow: -1px 0 0 var(--line-soft), 0 -1px 0 var(--line-soft); }
.stat-label { color: var(--muted); font-size: 14px; font-weight: 600; }
.stat-value { margin: 2px 0; font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-value-text { font-size: 26px; }
.stat-sub { color: var(--muted); font-size: 13px; }
.stat.is-live .stat-value { color: var(--olive); }
@media (max-width: 899px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px 16px; }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-value { font-size: 26px; }
  .stat-value-text { font-size: 22px; }
}

.duty { display: grid; gap: 16px; padding: var(--pad); }
.duty-state { display: flex; align-items: center; gap: 14px; min-width: 0; }
.duty-dot { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.duty.is-on .duty-dot { background: var(--ok); }
.duty-title { font-size: 18px; font-weight: 600; }
.duty-action { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
@media (min-width: 760px) {
  .duty { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.table th:first-child, .table td:first-child { padding-left: var(--pad); }
.table th:last-child, .table td:last-child { padding-right: var(--pad); }
.table thead th { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; border-bottom-color: var(--line); }
.table tbody tr:last-child > td { border-bottom: 0; }
.table tbody tr:not(.table-section):hover > td { background: #F7F8F9; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .tabular { white-space: nowrap; }
.table-section th { padding-top: 10px; padding-bottom: 10px; background: var(--surface-sunk); color: var(--ink-2); font-size: 13px; font-weight: 600; border-top: 1px solid var(--line-soft); }
.table tbody .table-section:first-child th { border-top: 0; }
.table-actions { text-align: right; white-space: nowrap; }
.table-actions form { display: inline; }
.table td.table-actions > * + * { margin-left: 6px; }
.table input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .table select { min-width: 140px; }
.cell-sub { display: none; }
@media (max-width: 899px) {
  .hide-m { display: none; }
  .table td { white-space: nowrap; }
  .table td.details, .table td.answer { min-width: 220px; white-space: normal; }
  .cell-sub { display: block; color: var(--muted); font-size: 13px; }
}

.callsign { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 7px; border: 1px solid var(--tan-line); border-radius: var(--radius-chip); background: var(--tan); color: var(--tan-ink); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; vertical-align: middle; }

.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--radius-chip); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; line-height: 1; white-space: nowrap; vertical-align: middle; }
.chip-green { border-color: var(--ok-line); color: var(--ok); }
.chip-gold { border-color: var(--warn-line); color: var(--warn); }
.chip-red { border-color: var(--bad-line); color: var(--bad); }
.chip-muted { border-color: var(--line); color: var(--muted); }
.chip-blue { border-color: var(--info-line); color: var(--info); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: 600 14.5px/1.2 var(--font); text-align: center; cursor: pointer; text-decoration: none; transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.btn:hover { border-color: var(--muted); background: var(--surface-sunk); color: var(--ink); text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-gold, .btn-primary { border-color: var(--olive); background: var(--olive); color: #fff; }
.btn-gold:hover, .btn-primary:hover { border-color: var(--olive-hover); background: var(--olive-hover); color: #fff; }
.btn-danger { border-color: var(--bad); background: var(--surface); color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); background: var(--bad); color: #fff; }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-sunk); color: var(--ink); }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn.is-disabled, .btn:disabled { opacity: .45; cursor: default; pointer-events: none; }

.form { display: grid; gap: 16px; min-width: 0; }
.fieldset { min-width: 0; margin: 0; padding: 18px var(--pad) var(--pad); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.fieldset > legend { float: left; width: 100%; margin: 0 0 14px; padding: 0; color: var(--ink); font-size: 16px; font-weight: 600; }
.fieldset > legend + * { clear: both; }
.card .fieldset { padding: 18px 0 0; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
.card .card-body > .fieldset:first-child, .card form.card-body > input[type=hidden] + .fieldset { padding-top: 0; border-top: 0; }
.card .table-wrap + .card-body, .card .empty + .card-body { border-top: 1px solid var(--line-soft); }
.fieldset > .hint { margin: 0 0 12px; }
.fieldset > .hint:last-child { margin-bottom: 0; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field-label { color: var(--ink); font-size: 14px; font-weight: 600; }
.hint, .field .hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.field-error { color: var(--bad); font-size: 13px; font-weight: 600; }
.field-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: 400 15px/1.4 var(--font); transition: border-color var(--ease), box-shadow var(--ease); }
input::placeholder, textarea::placeholder { color: #7A838C; opacity: 1; }
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: var(--muted); }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2358616A' stroke-width='1.8' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
select[multiple], select[size] { padding-right: 12px; background-image: none; }
select option { background: var(--surface); color: var(--ink); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: var(--focus-ring); }
input:disabled, select:disabled, textarea:disabled { background-color: var(--surface-sunk); color: var(--muted); cursor: not-allowed; }
input[readonly], textarea[readonly] { background-color: var(--surface-sunk); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 0; accent-color: var(--olive); cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 24px; font-size: 14.5px; cursor: pointer; }
.check input { flex: none; margin-top: 2px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 16px var(--pad); border-bottom: 1px solid var(--line-soft); }
.filter-bar .field { flex: 1 1 200px; }
.filter-bar .check { align-self: center; }
.inline-form { display: inline; }

.flash { position: fixed; top: 16px; right: 16px; z-index: 60; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: min(440px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 10px 28px rgba(21, 25, 29, .16); animation: flash-in 180ms ease-out; }
.flash-success { border-left-color: var(--ok); }
.flash-error { border-left-color: var(--bad); }
.flash-warning { border-left-color: var(--warn-mark); }
.flash-info { border-left-color: var(--info); }
.flash-close { flex: none; width: 28px; height: 28px; margin: -4px -6px -4px 0; padding: 0; border: 0; border-radius: var(--radius-control); background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.flash-close:hover { background: var(--surface-sunk); color: var(--ink); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 899px) { .flash { top: calc(var(--topbar) + 10px); left: 16px; right: 16px; width: auto; } }

.notice { padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--warn-mark); border-radius: 8px; background: var(--surface); color: var(--ink); }
.notice-error { border-left-color: var(--bad); }

.empty { padding: 28px var(--pad); color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); }
.dl { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.dl dt { color: var(--muted); font-size: 14px; }
.dl dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px var(--pad); border-bottom: 1px solid var(--line-soft); }
.list li:last-child { border-bottom: 0; }
.list-time { min-width: 96px; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.details { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--pad); border-top: 1px solid var(--line-soft); }
.pagination-info { color: var(--muted); font-size: 13.5px; }
@media (max-width: 559px) {
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd + dt { margin-top: 10px; }
}
