/* Kalkulačka přepravy – one neutral palette, one muted accent, system font. */
:root {
  --bg: #f5f6f7;
  --surface: #fff;
  --subtle: #f7f8f9;
  --text: #24292e;
  --muted: #5c656e;
  --border: #dfe2e5;
  --input: #9aa1a9;
  --accent: #3f6e1e;
  --accent-hover: #335a18;
  --accent-soft: #f0f6e9;
  --ring: 0 0 0 2px rgba(63, 110, 30, .22);
  --success: #1e6b3c;
  --success-soft: #e8f3ec;
  --warning: #7a4b00;
  --warning-soft: #fdf4e1;
  --warning-line: #c58a16;
  --danger: #a42a1f;
  --danger-soft: #fcefed;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.3; font-weight: 650; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 600; }
h3 { font-size: 15px; line-height: 1.4; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Page chrome */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner, .admin-tabs { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 150px; height: auto; }
.brand-context { padding-left: 12px; border-left: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.user-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.user-nav form { margin: 0; }
.user-email { color: var(--muted); }
.admin-tabs { display: flex; gap: 24px; overflow-x: auto; }
.admin-tabs a { padding: 10px 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.admin-tabs a:hover { color: var(--text); text-decoration: none; }
.admin-tabs a.active { border-bottom-color: var(--accent); color: var(--text); }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }
.page > h1, .page-intro { margin-bottom: 20px; }
.page-intro p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.card + .card { margin-top: 16px; }

/* Forms */
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { float: left; width: 100%; padding: 0; }
legend + * { clear: both; }
.form-section > legend { margin-bottom: 16px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.form-section + .form-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.form-section > * + * { margin-top: 16px; }
.form-section > legend + * { margin-top: 0; }
.legend-meta { margin-left: 8px; color: var(--muted); font-size: 14px; font-weight: 400; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-label { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
legend.form-label { margin-bottom: 6px; }
.form-hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.form-group > .form-hint, .radio-group > .form-hint { margin-top: 2px; }
.field-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.w-xs { width: 100px; }
.w-sm { width: 170px; }
.w-md { width: 240px; }
.w-lg { width: 320px; }
.w-xs, .w-sm, .w-md, .w-lg { max-width: 100%; }
input, select { width: 100%; height: 38px; padding: 0 10px; background: var(--surface); border: 1px solid var(--input); border-radius: var(--radius); font-size: 15px; font-variant-numeric: tabular-nums; }
select { appearance: none; padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235c656e' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; }
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: var(--ring); }
input:disabled, select:disabled { background-color: var(--subtle); color: var(--muted); }
input::placeholder { color: #8a9199; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="file"] { height: auto; padding: 5px; }
input[type="file"]::file-selector-button { height: 26px; margin-right: 10px; padding: 0 10px; background: var(--subtle); border: 1px solid var(--border); border-radius: 4px; font: inherit; font-size: 14px; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
input[type="radio"]:focus, input[type="checkbox"]:focus { box-shadow: none; }
.radios { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.radio, .check { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; cursor: pointer; }
.check-field .check { min-height: 38px; }
@media (pointer: coarse), (max-width: 759px) { .radio, .check { min-height: 40px; } .check-field .check { min-height: 44px; } }
.check-field { justify-content: flex-end; }

/* Pieces: one row per piece, labels only on the first row (desktop) */
.pieces { display: grid; gap: 10px; }
.piece-row { display: grid; grid-template-columns: 48px minmax(220px, 2.4fr) repeat(5, minmax(76px, 1fr)) auto; justify-content: start; gap: 12px; align-items: end; }
.remove-piece { justify-self: start; }
.piece-number { color: var(--muted); font-size: 13px; line-height: 38px; white-space: nowrap; }
.parcel-unit-hidden select { display: none; }
.parcel-unit-label { display: block; height: 38px; padding: 0 10px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); line-height: 36px; }
.cod-row + .form-hint { margin-top: 8px; }
.cod-row:not(:has(#cod-enabled:checked)) > .form-group:not(.check-field), .cod-row:not(:has(#cod-enabled:checked)) + .form-hint { display: none; }
.remove-piece:disabled { visibility: hidden; }
.parcel-unit-hidden { display: none; }

/* Buttons */
button { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary, button.danger { background: var(--surface); border-color: var(--input); color: var(--text); }
button.secondary:hover { background: var(--subtle); }
button.danger { border-color: #e2b4af; color: var(--danger); }
button.danger:hover { background: var(--danger-soft); }
button.ghost, button.link-button { height: auto; padding: 0; background: none; border: 0; font-weight: 500; }
button.link-button { color: var(--accent); font-size: 14px; }
button.ghost:hover, button.link-button:hover { background: none; text-decoration: underline; }
.add-piece { align-self: start; }
.form-actions { margin-top: 24px; }
.form-actions .primary { height: 40px; padding: 0 22px; font-size: 15px; }
a.ghost, .button-link { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; background: var(--surface); border: 1px solid var(--input); border-radius: var(--radius); color: var(--text); font-size: 13px; font-weight: 500; }
a.ghost:hover, .button-link:hover { background: var(--subtle); text-decoration: none; }

/* Notices and badges */
.notice { margin: 0 0 12px; padding: 10px 14px; background: var(--subtle); border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); font-size: 14px; }
.notice-warning { background: var(--warning-soft); border-color: #efd9a6 #efd9a6 #efd9a6 var(--warning-line); color: var(--warning); }
.notice-error { background: var(--danger-soft); border-color: #f1c4bf #f1c4bf #f1c4bf var(--danger); color: var(--danger); }
.notice-success { background: var(--success-soft); border-color: #bfdcc9 #bfdcc9 #bfdcc9 var(--success); color: var(--success); }
.flash-stack { margin-bottom: 8px; }
.error-card h2 { margin-bottom: 4px; color: var(--danger); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge-winner { background: var(--accent); color: #fff; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: #fae6bb; color: var(--warning); }
.badge-error { background: #f8dcd8; color: var(--danger); }
.badge-muted { background: #eceef0; color: var(--muted); }
.status-ok { color: var(--success); font-size: 13px; }

/* Results */
.results:not(:empty) { margin-top: 32px; }
.results-header { margin-bottom: 12px; }
.results-header p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.quote-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.quote-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.col-carrier { width: 23%; } .col-total { width: 15%; } .col-breakdown { width: 26%; } .col-detail { width: 23%; } .col-status { width: 13%; }
.quote-table th { padding: 9px 14px; background: var(--subtle); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
.quote-table th.num, .quote-table td[data-label="Celkem"] { text-align: right; }
.quote-table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.quote-table tr.group-row th { padding: 8px 14px; border-top: 1px solid var(--border); }
.carrier-cell strong { font-weight: 600; }
.quote-variant { color: var(--muted); font-size: 13px; }
.carrier-cell .badge { display: block; width: fit-content; margin-top: 6px; padding: 3px 8px; }
.quote-total strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.original-total { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.quote-row.winner td { background: var(--accent-soft); }
.quote-row.winner td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.quote-row.winner .quote-total strong { color: var(--accent); font-size: 18px; font-weight: 700; }
.quote-row.winner.indicative td { background: var(--warning-soft); }
.quote-row.winner.indicative td:first-child { box-shadow: inset 3px 0 0 var(--warning-line); }
.quote-row.winner.indicative .quote-total strong { color: var(--text); }
.quote-row.failed td { color: var(--muted); padding-top: 9px; padding-bottom: 9px; }
.quote-row.failed .error-cell { color: var(--danger); font-size: 13px; }
.pairs { margin: 0; font-size: 13px; }
.pairs div { display: flex; justify-content: space-between; gap: 12px; }
.pairs div + div { margin-top: 2px; }
.pairs dt { color: var(--muted); }
.pairs dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.breakdown dd { white-space: nowrap; }
.status-details summary { color: var(--warning); font-size: 13px; cursor: pointer; }
.status-details ul, .status-details p { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: 13px; }
.status-details p { padding-left: 0; }
.status-details li + li { margin-top: 4px; }
.unit-legend { margin: 0 0 12px; }
.unit-legend summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.unit-legend .table-scroll { margin-top: 8px; }
.unit-legend td { font-size: 13px; }
.note { margin-top: 8px; color: var(--muted); font-size: 13px; }
.manual-card { margin-top: 24px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.section-heading form { margin: 0; }
.section-heading + .section-hint { margin: -4px 0 12px; }
.section-caption, .manual-recommended { color: var(--muted); font-size: 13px; }
.manual-recommended strong { color: var(--text); }
.manual-steps, .manual-carriers { margin: 0; padding: 0; list-style: none; }
.manual-steps > li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 10px 0; border-top: 1px solid var(--border); }
.manual-step { display: flex; flex-direction: column; }
.manual-ref { color: var(--muted); font-size: 13px; }
.manual-carriers { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.manual-message { margin-top: 8px; color: var(--muted); font-size: 14px; }
.verdict { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--border); border-radius: 0 var(--radius) var(--radius) 0; background: var(--subtle); }
.verdict-cheapest_verified { border-left-color: var(--success); background: var(--success-soft); }
.verdict-more_expensive, .verdict-indicative { border-left-color: var(--warning-line); background: var(--warning-soft); }
.verdict-not_possible, .verdict-no_verified_alternative, .verdict-unknown_carrier { border-left-color: var(--danger); background: var(--danger-soft); }
.verdict-title { font-size: 13px; font-weight: 600; }
.verdict-message { margin-top: 2px; font-size: 14px; }
.verdict-manual { margin-top: 4px; color: var(--muted); font-size: 13px; }
.pallet-fallback { display: grid; justify-items: start; gap: 8px; }

/* Login */
.auth-shell { width: min(100% - 32px, 380px); margin: 72px auto; }
.auth-shell .brand { margin-bottom: 20px; }
.login-card h1 { margin-bottom: 20px; font-size: 20px; }
.stack { display: grid; gap: 16px; }
.stack button { width: 100%; height: 40px; margin-top: 4px; }

/* Admin */
.admin-card > p + p, .admin-card > p + ul, .admin-card > .notice { margin-top: 8px; }
.admin-card > p { font-size: 14px; }
.admin-form, .admin-card .table-scroll + .admin-form { margin-top: 16px; }
.upload-form + .form-hint { margin-top: 8px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.card > .table-scroll, .card .details-table { margin-left: -24px; margin-right: -24px; border-width: 1px 0; border-radius: 0; }
.card .admin-table th:first-child, .card .admin-table td:first-child { padding-left: 24px; }
.card .admin-table th:last-child, .card .admin-table td:last-child { padding-right: 24px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { padding: 8px 12px; background: var(--subtle); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; }
.admin-table td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.admin-table td strong { font-weight: 600; }
.carrier-card > .table-scroll .admin-table { table-layout: fixed; }
.carrier-card > .table-scroll th:nth-child(1) { width: 24%; } .carrier-card > .table-scroll th:nth-child(2) { width: 11%; }
.carrier-card > .table-scroll th:nth-child(3) { width: 23%; } .carrier-card > .table-scroll th:nth-child(4) { width: 15%; }
.carrier-card > .table-scroll th:nth-child(5) { width: 11%; } .carrier-card > .table-scroll th:nth-child(6) { width: 16%; }
.table-subline { display: block; color: var(--muted); font-size: 13px; }
.number-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.source-cell { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.actions, .actions-heading { text-align: right !important; white-space: nowrap; }
.actions > * + * { margin-left: 16px; }
.actions form { display: inline; }
.actions button.danger:not(.ghost) { height: 30px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.actions a.ghost, .actions button.danger { vertical-align: middle; }
button.danger.ghost { color: var(--danger); font-size: 13px; }
.tariff-edited-badge { margin-left: 6px; }
.empty-state { padding: 14px 12px; color: var(--muted); font-size: 14px; text-align: center; }
p.empty-state { padding: 0; text-align: left; }
.admin-details summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.admin-details summary > span { display: inline; }
.details-hint { margin-left: 8px; color: var(--muted); font-weight: 400; }
.carrier-card .admin-details, .details-table { margin-top: 12px; }
.inline-edit { display: inline-block; text-align: left; vertical-align: top; }
.inline-edit summary { color: var(--accent); font-size: 13px; font-weight: 500; cursor: pointer; list-style: none; }
.inline-edit summary::-webkit-details-marker { display: none; }
.inline-edit[open] { display: block; margin-bottom: 8px; }
.inline-edit-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; min-width: 460px; margin-top: 8px; padding: 12px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius); white-space: normal; }
.inline-edit-form .form-group { width: 130px; }
.password-form { display: flex; gap: 8px; margin: 0; }
.password-form .form-group { width: 180px; }
.run-log { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.admin-card > .admin-details { margin-top: 12px; }
.settings-form > .form-hint { margin-bottom: 16px; }
.settings-group + .settings-group { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.settings-group h3 { margin-bottom: 10px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); align-items: end; gap: 16px 24px; }
.settings-field { display: flex; flex-direction: column; gap: 6px; }
.settings-form > .form-actions { margin-top: 24px; }
.tariff-detail-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.back-link { font-size: 14px; }
.tariff-toolbar-actions, .tariff-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tariff-edit-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tariff-edit-status form { margin: 0; }
.tariff-meta-grid, .tariff-facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 24px; }
.tariff-meta-grid > div, .tariff-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meta-label { color: var(--muted); font-size: 13px; }
.tariff-meta-grid strong, .tariff-fact strong { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tariff-fact-missing strong { color: var(--warning); }
.tariff-detail-tables { margin-top: 24px; }
.tariff-detail-tables > .section-heading { margin-bottom: 0; }
.tariff-detail-tables > .card, .tariff-history, .tariff-zone-card { margin-top: 16px; }
.tariff-detail-table td, .tariff-detail-table th { white-space: nowrap; }
.tariff-detail-table td { font-variant-numeric: tabular-nums; }
.tariff-detail-table .row-label { font-weight: 600; }
.tariff-detail-table th:not(:first-child), .tariff-detail-table td:not(:first-child) { text-align: right; }
.tariff-edit-form .tariff-detail-table input, .tariff-edit-form .inline-field input { min-width: 80px; height: 30px; padding: 0 6px; font-size: 14px; }
.tariff-table-details summary { cursor: pointer; }
.tariff-table-details .table-scroll, .tariff-table-details .details-hint { margin-top: 12px; }
.tariff-edit-actions { justify-content: flex-end; margin-top: 16px; }
.zone-result { margin-top: 10px; color: var(--success); font-size: 14px; }
.zone-result.muted { color: var(--muted); }
.zone-result-missing { color: var(--danger); }
.tariff-unknown-note { margin-top: 16px; }

@media (max-width: 899px) {
  .piece-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding-top: 12px; border-top: 1px solid var(--border); }
  .pieces { gap: 14px; }
  .piece-row:first-child { padding-top: 0; border-top: 0; }
  .piece-number { grid-column: 1 / -1; color: var(--text); font-weight: 600; line-height: 1.4; }
  .unit-field { grid-column: 1 / -1; }
}
@media (pointer: coarse), (max-width: 759px) {
  input:not([type="radio"]):not([type="checkbox"]):not([type="file"]), select, button:not(.ghost):not(.link-button) { height: 44px !important; }
  a.ghost, .button-link { height: 44px; padding: 0 14px; }
}
@media (min-width: 900px) {
  .piece-row:has(.parcel-unit-hidden) { grid-template-columns: 48px repeat(5, minmax(76px, 140px)) auto; }
  .piece-row + .piece-row .form-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 759px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px 16px; min-height: 0; padding: 10px 16px; }
  .admin-tabs { gap: 20px; padding: 0 16px; }
  .brand-logo { width: 120px; }
  .brand-context { font-size: 13px; }
  .user-email { display: none; }
  .page { padding: 20px 16px 48px; }
  .card { padding: 16px; }
  .card > .table-scroll, .card .details-table { margin-left: -16px; margin-right: -16px; }
  .card .admin-table th:first-child, .card .admin-table td:first-child { padding-left: 16px; }
  .card .admin-table th:last-child, .card .admin-table td:last-child { padding-right: 16px; }
  .w-md, .w-lg { width: 100%; }
  .field-row { gap: 14px 16px; }
  .form-actions .primary { width: 100%; }
  .quote-table-wrap { background: none; border: 0; border-radius: 0; overflow: visible; }
  .quote-table, .quote-table tbody, .quote-table tr, .quote-table td, .quote-table th { display: block; }
  .quote-table thead { display: none; }
  .quote-table tbody { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
  .quote-table tbody + tbody { margin-top: 12px; }
  .quote-table tr.quote-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 14px; border-top: 1px solid var(--border); }
  .quote-table tbody > tr:first-child { border-top: 0; }
  .quote-table td { padding: 0; border: 0; background: none !important; box-shadow: none !important; }
  .quote-table td:nth-child(n+3), .quote-table td.error-cell { grid-column: 1 / -1; }
  .quote-table tr.group-row th { padding: 8px 14px; border-top: 0; }
  .quote-row.winner { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
  .quote-row.winner.indicative { background: var(--warning-soft); box-shadow: inset 3px 0 0 var(--warning-line); }
  .quote-row.failed td { padding: 0; }
  .settings-grid { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .tariff-detail-table { min-width: 560px; }
  .admin-table:not(.tariff-detail-table) thead { display: none; }
  .admin-table:not(.tariff-detail-table), .admin-table:not(.tariff-detail-table) tbody, .admin-table:not(.tariff-detail-table) tr { display: block; }
  .admin-table:not(.tariff-detail-table) tr { padding: 10px 16px; border-top: 1px solid var(--border); }
  .admin-table:not(.tariff-detail-table) tr:first-child { border-top: 0; }
  .card .admin-table:not(.tariff-detail-table) td, .admin-table:not(.tariff-detail-table) td { display: inline-block; margin: 0 12px 4px 0; padding: 0; border: 0; vertical-align: baseline; }
  .admin-table:not(.tariff-detail-table) td:first-child, .admin-table:not(.tariff-detail-table) td.actions { display: block; margin-right: 0; }
  .admin-table:not(.tariff-detail-table) td.actions { margin-top: 6px; text-align: left !important; }
  .admin-table:not(.tariff-detail-table) td.empty-state { display: block; }
  .carrier-card > .table-scroll .admin-table { table-layout: auto; }
  .source-cell { max-width: 100%; }
  .inline-edit-form { min-width: 0; }
}
