/* TVöD Rechner Suite: compact tab layout. Colours follow the Kadence palette when available. */
.tvs-app {
  --tvs-brand: var(--global-palette1, #1a73e8);
  --tvs-brand-2: var(--global-palette2, #1765cc);
  --tvs-ink: #202124;
  --tvs-text: #3c4043;
  --tvs-muted: #5f6368;
  --tvs-line: #e3e7ed;
  --tvs-field: #c8ced8;
  --tvs-soft: #f8fafd;
  --tvs-white: #ffffff;
  --tvs-tint: #e8f0fe;
  --tvs-tint-line: #c6dafc;
  --tvs-green: #188038;
  --tvs-green-bg: #e6f4ea;
  --tvs-red: #c5221f;
  --tvs-tax: #f29900;
  --tvs-social: #9aa0a6;
  --tvs-amber: #7a4f00;
  --tvs-amber-bg: #fef7e0;
  --tvs-amber-line: #f0d48a;
  container-type: inline-size;
  display: block;
  margin: 0 0 8px;
  color: var(--tvs-text);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}
.tvs-app *, .tvs-app *::before, .tvs-app *::after { box-sizing: border-box; }
.tvs-app p { margin: 0; }
/* Kadence adds `.single-content p, table, form, ul { margin-bottom }`; the doubled class outranks it. */
.tvr-app.tvs-app p, .tvr-app.tvs-app h3, .tvr-app.tvs-app h4, .tvr-app.tvs-app ul, .tvr-app.tvs-app dl,
.tvr-app.tvs-app table, .tvr-app.tvs-app fieldset, .tvr-app.tvs-app details, .tvr-app.tvs-app figure { margin: 0; }
.tvr-app.tvs-app .tvs-h4 { margin-top: 4px; }
.tvs-app h3, .tvs-app h4 { margin: 0; color: var(--tvs-ink); font-size: 13.5px; line-height: 1.3; font-weight: 700; letter-spacing: 0; text-transform: none; }
.tvs-app button {
  -webkit-appearance: none; appearance: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: inherit; font: inherit; line-height: 1.3; letter-spacing: normal; text-transform: none; text-decoration: none; min-height: 0; cursor: pointer;
}
.tvs-app button:disabled { cursor: not-allowed; }
.tvs-app :focus-visible { outline: 2px solid var(--tvs-brand); outline-offset: 2px; }
.tvs-app [hidden] { display: none !important; }
.tvs-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* server-rendered first view */
.tvs-ssr { border: 1px solid var(--tvs-line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.tvs-ssr-hint { color: var(--tvs-muted); font-size: 13px; }

/* card */
.tvs-card { border: 1px solid var(--tvs-line); border-radius: 14px; background: var(--tvs-white); box-shadow: 0 1px 3px rgba(32,33,36,.07); overflow: clip; }
.tvs-views { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 12px 0; }
.tvs-app .tvs-views button { font-size: 13px; font-weight: 600; border: 1px solid var(--tvs-line); background: var(--tvs-soft); color: var(--tvs-muted); border-radius: 8px; padding: 6px 11px; }
.tvs-app .tvs-views button[aria-pressed="true"] { background: var(--tvs-ink); border-color: var(--tvs-ink); color: #fff; }

/* tabs */
.tvs-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 8px 8px 0; border-bottom: 1px solid var(--tvs-line); }
.tvs-tabs::-webkit-scrollbar { display: none; }
.tvs-app .tvs-tab { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--tvs-muted); border-bottom: 2.5px solid transparent; padding: 9px 4px 10px; white-space: nowrap; }
.tvs-app .tvs-tab[aria-selected="true"] { color: var(--tvs-brand); border-bottom-color: var(--tvs-brand); }
.tvs-n { display: none; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--tvs-line); color: var(--tvs-ink); font-size: 11px; }
.tvs-tab[aria-selected="true"] .tvs-n { background: var(--tvs-brand); color: #fff; }
.tvs-done .tvs-n { background: var(--tvs-green); color: #fff; }
.tvs-long { display: none; }

/* layout */
.tvs-body { display: grid; }
.tvs-main { min-width: 0; display: grid; grid-template-rows: 1fr auto; }
.tvs-panel { padding: 14px; display: grid; gap: 12px; align-content: start; min-height: 230px; }
.tvs-res { display: none; min-width: 0; background: var(--tvs-soft); padding: 14px; gap: 9px; align-content: start; }
.tvs-on-result .tvs-res { display: grid; }
.tvs-on-result .tvs-panel { display: none; }
.tvs-nav { display: flex; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--tvs-line); }
.tvs-lead { color: var(--tvs-muted); font-size: 13.5px; }
.tvs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.tvs-stack { display: grid; gap: 10px; }
.tvs-align-end { align-self: end; }
.tvs-wide-only { display: none; }

/* fields */
.tvs-field { display: grid; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.tvs-field > label, .tvs-field > legend { font-size: 12.5px; font-weight: 600; color: var(--tvs-ink); padding: 0; margin: 0 0 5px; }
.tvs-field > label { margin: 0; }
.tvs-hint { color: var(--tvs-muted); font-size: 12px; line-height: 1.4; }
.tvs-app .tvs-field select, .tvs-app .tvs-field input, .tvs-app .tvs-box select, .tvs-app .tvs-save input {
  width: 100%; min-width: 0; height: auto; margin: 0; font: inherit; font-size: 15px; line-height: 1.3; padding: 8px 9px;
  border: 1px solid var(--tvs-field); border-radius: 8px; background: var(--tvs-white); color: var(--tvs-ink); box-shadow: none;
}
.tvs-app .tvs-box select { font-size: 13px; padding: 6px 8px; }
.tvs-app .tvs-field input:invalid { border-color: var(--tvs-red); }
.tvs-seg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.tvs-seg-4 { grid-template-columns: repeat(4, 1fr); }
.tvs-app .tvs-seg button { min-width: 0; font-size: 14px; padding: 8px 0; border: 1px solid var(--tvs-field); border-radius: 8px; background: var(--tvs-white); color: var(--tvs-ink); text-align: center; font-variant-numeric: tabular-nums; }
.tvs-app .tvs-seg button[aria-pressed="true"] { background: var(--tvs-brand); border-color: var(--tvs-brand); color: #fff; font-weight: 600; }
.tvs-app .tvs-seg button:disabled { color: #b5bac3; background: var(--tvs-soft); text-decoration: line-through; }
.tvs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tvs-app .tvs-chips button { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--tvs-field); background: var(--tvs-white); color: var(--tvs-ink); }
.tvs-app .tvs-chips button[aria-pressed="true"] { background: var(--tvs-tint); border-color: var(--tvs-brand); color: var(--tvs-brand-2); }
.tvs-app .tvs-chips-sm button { font-size: 12px; padding: 2px 9px; border-color: var(--tvs-tint-line); color: var(--tvs-brand-2); }
.tvs-app .tvs-chips-sm button[aria-pressed="true"] { background: var(--tvs-brand); border-color: var(--tvs-brand); color: #fff; }
.tvs-check-field { display: grid; gap: 3px; }
.tvs-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--tvs-ink); cursor: pointer; margin: 0; }
.tvs-app .tvs-check input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--tvs-brand); }
.tvs-forecast { background: var(--tvs-amber-bg); border: 1px solid var(--tvs-amber-line); border-radius: 10px; padding: 9px 11px; display: grid; gap: 7px; font-size: 13px; color: var(--tvs-amber); }
.tvs-group { border: 1px solid var(--tvs-line); border-radius: 10px; padding: 0 11px; background: var(--tvs-white); }
.tvs-group > summary { cursor: pointer; padding: 9px 0; list-style: none; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tvs-group > summary::-webkit-details-marker { display: none; }
.tvs-group > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--tvs-muted); border-bottom: 2px solid var(--tvs-muted); transform: rotate(45deg); margin-right: 3px; flex: none; }
.tvs-group[open] > summary::after { transform: rotate(-135deg); }
.tvs-group > summary strong { display: block; font-size: 13.5px; color: var(--tvs-ink); }
.tvs-group > summary small { display: block; font-size: 12px; color: var(--tvs-muted); font-weight: 400; }
.tvs-group-body { display: grid; gap: 10px; padding-bottom: 12px; }
.tvs-scen { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--tvs-brand); color: #fff; font-size: 11.5px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.tvs-scen-b { background: #7147a1; }

/* buttons */
.tvs-app .tvs-btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; border-radius: 8px; padding: 8px 14px; border: 1px solid var(--tvs-brand); text-decoration: none; }
.tvs-app .tvs-btn-primary { background: var(--tvs-brand); color: #fff; margin-left: auto; }
.tvs-app .tvs-btn-primary:hover { background: var(--tvs-brand-2); color: #fff; }
.tvs-app .tvs-btn-ghost { background: var(--tvs-white); color: var(--tvs-brand); }
.tvs-app .tvs-res .tvs-btn-primary { margin-left: 0; width: 100%; }
.tvs-app .tvs-link { color: var(--tvs-brand); font-size: 13px; font-weight: 600; text-align: left; }

/* result */
.tvs-res-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--tvs-ink); font-size: 14px; }
.tvs-live, .tvs-pill { color: var(--tvs-green); background: var(--tvs-green-bg); border-radius: 999px; padding: 0 9px; font-weight: 600; font-size: 11.5px; }
.tvs-pill { color: var(--tvs-amber); background: var(--tvs-amber-bg); }
.tvs-meta { color: var(--tvs-muted); font-size: 12.5px; }
.tvs-net-label { color: var(--tvs-muted); font-size: 12.5px; }
.tvs-net { font-size: 30px; font-weight: 700; color: var(--tvs-brand); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tvs-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tvs-kv b { color: var(--tvs-ink); }
.tvs-sub { color: var(--tvs-muted); font-size: 13px; }
.tvs-diff { font-weight: 700; color: var(--tvs-green); }
.tvs-neg { color: var(--tvs-red); }
.tvs-bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--tvs-line); }
.tvs-bar i { display: block; }
.tvs-bar i:nth-child(1) { background: var(--tvs-brand); }
.tvs-bar i:nth-child(2) { background: var(--tvs-tax); }
.tvs-bar i:nth-child(3) { background: var(--tvs-social); }
.tvs-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--tvs-muted); }
.tvs-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.tvs-l-net::before { background: var(--tvs-brand); } .tvs-l-tax::before { background: var(--tvs-tax); } .tvs-l-soc::before { background: var(--tvs-social); }
.tvs-box { background: var(--tvs-white); border: 1px solid var(--tvs-line); border-radius: 10px; padding: 9px 11px; display: grid; gap: 6px; }
.tvs-next { background: var(--tvs-tint); border-color: var(--tvs-tint-line); }
.tvs-dl { margin: 0; display: grid; gap: 3px; }
.tvs-dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--tvs-muted); font-variant-numeric: tabular-nums; }
.tvs-dl dt, .tvs-dl dd { margin: 0; }
.tvs-dl dd { text-align: right; }
.tvs-dl .tvs-total { color: var(--tvs-ink); font-weight: 700; border-top: 1px solid var(--tvs-line); padding-top: 4px; }
.tvs-h4 { margin-top: 4px !important; }
.tvs-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tvs-actions-wrap { display: grid; gap: 7px; border-top: 1px solid var(--tvs-line); padding-top: 9px; }
.tvs-quick { display: grid; gap: 5px; }
.tvs-year > summary strong { font-variant-numeric: tabular-nums; }
.tvs-app .tvs-select-sm { width: 100%; font-size: 13px; padding: 6px 8px; border: 1px solid var(--tvs-field); border-radius: 8px; background: var(--tvs-white); color: var(--tvs-ink); }
.tvs-app .tvs-actions button { color: var(--tvs-brand); font-size: 12.5px; font-weight: 600; padding: 2px 0; }
.tvs-save { display: grid; gap: 7px; border-top: 1px solid var(--tvs-line); padding-top: 8px; }
.tvs-save-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.tvs-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.tvs-saved li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; border: 1px solid var(--tvs-line); border-radius: 8px; padding: 5px 8px; margin: 0; }
.tvs-saved li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvs-saved li > span:last-child { display: flex; gap: 10px; flex: none; }
.tvs-notes p { font-size: 12.5px; color: var(--tvs-muted); }
.tvs-error { border: 1px solid #f5c2c0; background: #fce8e6; color: var(--tvs-red); border-radius: 10px; padding: 9px 11px; font-size: 13.5px; }
.tvs-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tvs-cmp-card { gap: 3px; }
.tvs-big { font-size: 19px; font-weight: 700; color: var(--tvs-ink); font-variant-numeric: tabular-nums; }
.tvs-copy-fallback { width: 100%; min-height: 120px; margin-top: 8px; }

/* table */
.tvs-table-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.tvs-table-tools .tvs-field { flex: 1 1 200px; }
.tvs-table-scroll { overflow: auto; max-height: 380px; border: 1px solid var(--tvs-line); border-radius: 10px; }
.tvs-app .tvs-table { border-collapse: collapse; width: 100%; margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; border: 0; }
.tvs-app .tvs-table caption { caption-side: bottom; text-align: left; padding: 6px 9px; font-size: 11.5px; color: var(--tvs-muted); }
.tvs-app .tvs-table th, .tvs-app .tvs-table td { padding: 0; text-align: right; border: 0; border-bottom: 1px solid var(--tvs-line); white-space: nowrap; background: var(--tvs-white); }
.tvs-app .tvs-table th { padding: 6px 9px; }
.tvs-app .tvs-table td > span { display: block; padding: 6px 9px; }
.tvs-app .tvs-table tbody th { text-align: left; position: sticky; left: 0; font-weight: 600; color: var(--tvs-ink); z-index: 1; }
.tvs-app .tvs-table thead th { position: sticky; top: 0; background: var(--tvs-soft); color: var(--tvs-muted); font-weight: 600; font-size: 12px; z-index: 2; }
.tvs-app .tvs-table thead th:first-child { left: 0; z-index: 3; text-align: left; }
.tvs-app .tvs-table td button { display: block; width: 100%; padding: 6px 9px; text-align: right; font-variant-numeric: tabular-nums; }
.tvs-app .tvs-table td button:hover { background: var(--tvs-tint); }
.tvs-app .tvs-table td button[aria-current="true"] { background: var(--tvs-brand); color: #fff; font-weight: 600; }
.tvs-app .tvs-table .tvs-row-hl td, .tvs-app .tvs-table .tvs-row-hl th { background: #f1f6fe; }
.tvs-ssr .tvs-table td { padding: 6px 9px; }
.tvs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tvs-app .tvs-cards button { text-align: left; border: 1px solid var(--tvs-line); border-radius: 9px; background: var(--tvs-white); padding: 6px 8px; display: grid; color: var(--tvs-ink); min-width: 0; }
.tvs-cards button span { font-size: 11.5px; color: var(--tvs-muted); }
.tvs-cards button b { font-variant-numeric: tabular-nums; font-size: 13px; }
.tvs-app .tvs-cards button[aria-pressed="true"] { border-color: var(--tvs-brand); background: var(--tvs-tint); }
.tvs-app .tvs-cards button:disabled { opacity: .45; }

/* sticky summary (phones) */
.tvs-sticky { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; background: var(--tvs-ink); color: #fff; padding: 9px 14px; padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px)); }
.tvs-sticky:empty { display: none; }
.tvs-st { display: grid; line-height: 1.2; min-width: 0; }
.tvs-st span { font-size: 11px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-st b { font-size: 16px; font-variant-numeric: tabular-nums; color: #fff; }
.tvs-app .tvs-sticky button { margin-left: auto; font-size: 13px; font-weight: 600; background: var(--tvs-brand); color: #fff; border-radius: 8px; padding: 7px 12px; white-space: nowrap; }
.tvs-on-result .tvs-sticky { display: none; }

@container (min-width: 520px) {
  .tvs-short { display: none; }
  .tvs-long { display: inline; }
  .tvs-app .tvs-tab { flex: 1 0 auto; padding-inline: 8px; }
  .tvs-n { display: inline-grid; }
  .tvs-cards { grid-template-columns: repeat(6, 1fr); }
}
@container (min-width: 780px) {
  .tvs-views { padding: 14px 18px 0; }
  .tvs-tabs { padding: 8px 14px 0; }
  .tvs-app .tvs-tab { flex: 0 0 auto; padding-inline: 12px; }
  .tvs-app .tvs-tab-result, .tvs-app .tvs-nav .tvs-narrow-only { display: none; }
  .tvs-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .tvs-panel { padding: 16px 20px; min-height: 280px; }
  .tvs-nav { padding: 12px 20px 16px; }
  .tvs-res { display: grid; border-left: 1px solid var(--tvs-line); padding: 16px 18px; }
  .tvs-on-result .tvs-panel { display: grid; }
  .tvs-app .tvs-panel[hidden] { display: none !important; }
  .tvs-narrow-only { display: none; }
  .tvs-wide-only { display: block; }
  .tvs-sticky { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tvs-app * { scroll-behavior: auto !important; } }

@media print {
  body.tvs-print-mode > *:not(.tvs-print-host) { display: none !important; }
  .tvs-print-host { display: grid !important; gap: 10px; padding: 0; }
  .tvs-print-host .tvs-res { display: grid !important; background: #fff; }
  .tvs-print-host .tvs-table-scroll { max-height: none; overflow: visible; }
}
