/* Vila Audit – jednoduchý dizajn bez externých knižníc. Mobile-first. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --border: #e3e6eb;
  --text: #1c2430; --muted: #667085; --brand: #0f6b5c; --brand-ink: #ffffff; --brand-soft: #e3f2ef;
  --ok: #157f3b; --ok-bg: #e5f5ea; --info: #2459b3; --info-bg: #e8effc; --warn: #a35a00; --warn-bg: #fdf1df;
  --bad: #b42318; --bad-bg: #fde8e7; --crit: #ffffff; --crit-bg: #7a1010; --mute-bg: #eef0f3;
  --reported: #9a4d00; --reported-bg: #fff1e0; --calculated: #2459b3; --calculated-bg: #e8effc;
  --expected: #6a3fb5; --expected-bg: #f0e9fb; --estimated: #5b6474; --estimated-bg: #eceff3;
  --fact: #157f3b; --fact-bg: #e5f5ea;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1419; --surface: #171d24; --surface-2: #1d242c; --border: #2b343e;
    --text: #e6eaef; --muted: #98a2b3; --brand: #3fb59f; --brand-ink: #062b24; --brand-soft: #173a34;
    --ok: #4cc27a; --ok-bg: #163322; --info: #7aa7f5; --info-bg: #182a47; --warn: #f0a94a; --warn-bg: #3b2a12;
    --bad: #f47b70; --bad-bg: #44191a; --crit-bg: #b01c1c; --mute-bg: #232b34;
    --reported: #f3a65a; --reported-bg: #3c2814; --calculated: #7aa7f5; --calculated-bg: #182a47;
    --expected: #b393ef; --expected-bg: #2c2242; --estimated: #a5afbd; --estimated-bg: #262e38;
    --fact: #4cc27a; --fact-bg: #163322;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1419; --surface: #171d24; --surface-2: #1d242c; --border: #2b343e;
  --text: #e6eaef; --muted: #98a2b3; --brand: #3fb59f; --brand-ink: #062b24; --brand-soft: #173a34;
  --ok: #4cc27a; --ok-bg: #163322; --info: #7aa7f5; --info-bg: #182a47; --warn: #f0a94a; --warn-bg: #3b2a12;
  --bad: #f47b70; --bad-bg: #44191a; --crit-bg: #b01c1c; --mute-bg: #232b34;
  --reported: #f3a65a; --reported-bg: #3c2814; --calculated: #7aa7f5; --calculated-bg: #182a47;
  --expected: #b393ef; --expected-bg: #2c2242; --estimated: #a5afbd; --estimated-bg: #262e38;
  --fact: #4cc27a; --fact-bg: #163322;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.4rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- rozloženie ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .6rem 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: .8rem; }
.topbar .spacer { flex: 1; }
.menu-btn { display: inline-flex; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: .35rem .6rem; font-size: 1rem; cursor: pointer; }
.side { display: none; }
.side.open { display: block; position: fixed; inset: 49px 0 0 0; z-index: 30; background: var(--surface); overflow-y: auto; padding: .5rem 16px 2rem; }
.side nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 8px; color: var(--text); }
.side nav a:hover { background: var(--surface-2); text-decoration: none; }
.side nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem .6rem .25rem; }
.main { flex: 1; padding: 16px; max-width: 1400px; width: 100%; margin: 0 auto; min-width: 0; }
.card, .kpi { min-width: 0; }
.topbar .brand { white-space: nowrap; }
@media (max-width: 420px) { .topbar .btn.sm { padding: .25rem .45rem; } .page-head p { font-size: .88rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head p { margin: 0; color: var(--muted); }
.user-chip { font-size: .85rem; color: var(--muted); display: none; }

@media (min-width: 1000px) {
  .menu-btn { display: none; }
  .user-chip { display: inline; }
  .app { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  /* bočné menu sa posúva spolu so stránkou – jeden posuvník pre celú obrazovku */
  .side, .side.open { display: block; position: static; inset: auto; height: auto; overflow: visible;
    border-right: 1px solid var(--border); background: var(--surface); padding: .75rem .6rem 2rem; }
  .main { padding: 24px; }
}

/* ---------- karty, mriežky ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { font-size: .8rem; color: var(--muted); }
.kpi .value { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.kpi.alert { border-color: var(--warn); }
.kpi.bad { border-color: var(--bad); }

/* ---------- tabuľky ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card > .table-wrap { margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .5rem .55rem; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
tr:hover td { background: var(--surface-2); }
tr.total td { font-weight: 700; background: var(--surface-2); }
td.pos { color: var(--ok); } td.neg { color: var(--bad); }

/* ---------- štítky ---------- */
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; white-space: nowrap; background: var(--mute-bg); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.crit { background: var(--crit-bg); color: var(--crit); }
.badge.reported { background: var(--reported-bg); color: var(--reported); } .badge.calculated { background: var(--calculated-bg); color: var(--calculated); }
.badge.expected { background: var(--expected-bg); color: var(--expected); } .badge.estimated, .badge.inferred, .badge.unknown { background: var(--estimated-bg); color: var(--estimated); }
.badge.fact, .badge.observed { background: var(--fact-bg); color: var(--fact); }

/* ---------- formuláre, tlačidlá ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: .5rem .9rem; border-radius: 8px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; min-height: 40px; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.sm { padding: .25rem .55rem; min-height: 30px; font-size: .8rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .2rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; min-height: 40px; }
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } .form-grid .full { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .form-grid.c3 { grid-template-columns: repeat(3, 1fr); } .form-grid.c4 { grid-template-columns: repeat(4, 1fr); } }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 12px; }
.filters > div { min-width: 140px; flex: 1 1 140px; }
.filters .btn { flex: 0 0 auto; }
details.edit > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .85rem; list-style: none; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit[open] { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: .5rem 0; }
.checkbox { display: flex; gap: .45rem; align-items: center; font-weight: 500; }

/* ---------- správy ---------- */
.flash { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.flash.err { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.note { background: var(--info-bg); color: var(--text); border-left: 4px solid var(--info); padding: .7rem .9rem; border-radius: 6px; margin-bottom: 12px; font-size: .9rem; }
.note.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.note.bad { background: var(--bad-bg); border-left-color: var(--bad); }

/* ---------- cesta peňazí ---------- */
.journey { list-style: none; margin: 0; padding: 0; }
.journey li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .5rem; padding: .7rem 0; border-bottom: 1px dashed var(--border); }
.journey .sign { font-weight: 700; color: var(--muted); text-align: center; font-size: 1.1rem; }
.journey .row1 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: baseline; }
.journey .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.journey .eur { color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.journey .meta { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.journey .why { font-size: .84rem; color: var(--muted); margin-top: .2rem; }
.journey li.final { background: var(--surface-2); border-radius: 8px; padding: .7rem .5rem; border: 0; }

/* ---------- vodopád ---------- */
.waterfall { display: grid; gap: 6px; }
.wf-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: .6rem; align-items: center; font-size: .88rem; }
.wf-track { position: relative; height: 22px; background: var(--surface-2); border-radius: 4px; }
.wf-bar { position: absolute; top: 3px; height: 16px; border-radius: 3px; }
.wf-bar.pos { background: var(--brand); } .wf-bar.neg { background: var(--bad); } .wf-bar.total { background: var(--info); } .wf-bar.unk { background: var(--warn); }
.wf-row .num { min-width: 90px; }
.wf-row.total-row { font-weight: 700; }

.chart-box { position: relative; height: 300px; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }
.cell { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; }
.diff-add td { background: var(--ok-bg) !important; } .diff-del td { background: var(--bad-bg) !important; } .diff-chg td { background: var(--warn-bg) !important; }
.pagination { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 12px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; }
.hide-sm { display: none; }
:root[data-theme="light"] { color-scheme: light; }
.theme-select { width: auto; min-height: 30px; padding: .2rem .4rem; font-size: .8rem; border-radius: 8px; }
.bell { position: relative; }
.bell-count { position: absolute; top: -6px; right: -6px; background: var(--bad); color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 .35rem; line-height: 1.4; }
/* kalendár */
.cal-months { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cal-months { grid-template-columns: repeat(2, 1fr); } }
.cal { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.cal th { background: none; text-align: center; padding: .2rem; position: static; }
.cal td { height: 58px; vertical-align: top; padding: 3px 4px; border-radius: 6px; border: 1px solid var(--border); font-size: .72rem; background: var(--surface-2); }
.cal td.out { visibility: hidden; }
.cal .dnum { font-weight: 700; font-size: .8rem; }
.cal .dprice { color: var(--muted); }
.cal td.green { background: var(--ok-bg); border-color: var(--ok); }
.cal td.blue { background: var(--info-bg); border-color: var(--info); }
.cal td.orange { background: var(--warn-bg); border-color: var(--warn); }
.cal td.yellow { background: #fff3a6; border-color: #c9a800; color: #3a3000; }
.cal td.black { background: #1d1d1f; border-color: #000; color: #fff; }
.cal td.gray { background: var(--surface-2); color: var(--muted); }
.cal td.today { outline: 2px solid var(--brand); }
.leg i.yellow { background: #fff3a6; } .leg i.black { background: #1d1d1f; }
@media (min-width: 760px) { .hide-sm { display: table-cell; } }
.property-switch select { width: auto; max-width: 220px; min-height: 30px; padding: .2rem .4rem; font-size: .85rem; border-radius: 8px; margin-left: .5rem; }
.cal td.purple { background: rgba(140, 90, 210, .28); border-color: rgba(140, 90, 210, .6); }
/* menu účtu v hornej lište (aby sa lišta zmestila aj na mobil) */
html, body { overflow-x: hidden; }
.topbar { min-width: 0; }
.topbar > * { flex-shrink: 0; }
.topbar .property-switch { flex-shrink: 1; min-width: 0; }
.topbar .property-switch select { max-width: 40vw; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu .user-chip { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: .7rem; display: grid; gap: .25rem; }
.account-pop a { padding: .35rem .2rem; }
.account-pop .theme-select { width: 100%; }
.side .version { font-size: .72rem; margin: 1.5rem .6rem 0; }
@media (max-width: 420px) { .topbar { gap: .4rem; } .topbar .brand { font-size: .95rem; } }
/* vysvetlivky pri pojmoch (podržanie myši / ťuknutie) */
.tip { border-bottom: 1px dotted var(--muted); cursor: help; position: relative; }
.tip-i { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--info-bg); color: var(--info); font-size: .7rem; font-weight: 700; margin-left: .25rem; cursor: help; vertical-align: middle; border: 0; padding: 0; }
.tip-pop { position: absolute; z-index: 50; max-width: 320px; background: var(--text); color: var(--bg); padding: .55rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 400; line-height: 1.4; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
/* AI správa */
.ai-report h1 { font-size: 1.25rem; } .ai-report h2 { font-size: 1.1rem; margin-top: 1.2rem; } .ai-report h3 { margin-top: 1rem; }
.ai-report table { display: block; overflow-x: auto; } .ai-report li { margin-bottom: .25rem; }
.ai-report blockquote { border-left: 3px solid var(--border); margin: .5rem 0; padding: .2rem .8rem; color: var(--muted); }
/* hromadné úpravy */
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin: 8px 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; position: sticky; top: 0; z-index: 5; }
.bulk-bar .check { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; }
/* Inzeráty a SEO */
.listing-form { max-width: 900px; }
.listing-form textarea, .listing-form input[type=text] { width: 100%; box-sizing: border-box; }
.paste-box { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; }
.paste-box p { font-size: .82rem; margin: .2rem 0 .5rem; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; font-size: .78rem; background: var(--surface); }
.manual-fields { margin-top: 10px; }
tr.edit-row > td { background: var(--surface-2); padding: 10px 12px; }
.audit-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.audit-list li { padding: .3rem 0 .3rem 1.6rem; position: relative; border-top: 1px dashed var(--border); font-size: .9rem; }
.audit-list li::before { position: absolute; left: 0; top: .3rem; }
.audit-list li.ok::before { content: "✅"; } .audit-list li.warn::before { content: "⚠️"; } .audit-list li.bad::before { content: "❌"; }
.score-pill { display: inline-block; min-width: 3.2rem; text-align: center; border-radius: 999px; padding: .1rem .5rem; font-weight: 700; color: #fff; }
tr.edit-row { display: none; } tr.edit-row.open { display: table-row; }
/* skener dokladov */
.scan-overlay { position: fixed; inset: 0; z-index: 1000; background: #111; color: #fff; display: flex; flex-direction: column; }
.scan-head { padding: 10px 16px; font-size: .9rem; }
.scan-hint { color: #b9c2ca; }
.scan-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.scan-stage canvas { touch-action: none; max-width: 100%; max-height: 100%; }
.scan-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #1b1f24; }
.scan-bar select { max-width: 230px; }
.scan-status { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: .85rem; }
.scan-preview { width: 72px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
/* široké tabuľky: najprv sa zhustia, ak sa ani tak nezmestia, je vidieť posuvník a tieň na okraji (nič sa neskrýva „pod“ kartou) */
.table-wrap.dense table { font-size: .8rem; }
.table-wrap.dense th, .table-wrap.dense td { padding: .4rem .35rem; }
.table-wrap.dense th { letter-spacing: 0; }
.table-wrap.scrollable { background: linear-gradient(to right, var(--surface) 30%, transparent), linear-gradient(to left, var(--surface) 30%, transparent) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.18), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.18), transparent) 100% 0;
    background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
.table-wrap.scrollable th { background: transparent; }
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
.table-wrap::-webkit-scrollbar-track { background: var(--surface-2); }
.table-hint { font-size: .75rem; color: var(--muted); margin: 0 0 4px; }
/* stĺpce mriežky sa nesmú roztiahnuť dlhým slovom / odkazom (inak prekryjú susedný stĺpec) */
.grid > * { min-width: 0; }
.card p, .card li, .note { overflow-wrap: anywhere; }
.has-tip { border-bottom: 1px dotted currentColor; cursor: help; }
/* skener: polia vyplnené z účtenky */
.prefilled { background: #fff6cc !important; border-color: #e0b400 !important; color: #222 !important; }
.scan-items { margin-top: 8px; font-size: .85rem; }
.scan-items table { margin: 4px 0; }
.scan-items p { margin: .3rem 0; }

/* Filter a triedenie tabuliek (public/js/tables.js) */
.table-tools { display: flex; flex-wrap: wrap; gap: .5rem .6rem; align-items: flex-end; margin: 0 0 10px; padding: .55rem .65rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.table-tools.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-soft); }
.table-tools .tt-field { display: flex; flex-direction: column; gap: 2px; flex: 0 1 150px; min-width: 120px; }
.table-tools .tt-field.tt-q { flex: 1 1 220px; }
.table-tools .tt-field.tt-n { flex-basis: 110px; min-width: 95px; }
.table-tools label { font-size: .72rem; color: var(--muted); margin: 0; }
.table-tools input, .table-tools select { padding: .3rem .45rem; font-size: .85rem; width: 100%; min-width: 0; box-sizing: border-box; }
.table-tools .tt-actions { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; font-size: .8rem; }
th.tt-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.tt-sortable::after { content: ' ⇅'; color: var(--muted); opacity: .45; font-size: .8em; }
th.tt-sortable[data-dir=asc]::after { content: ' ▲'; opacity: 1; color: var(--brand); }
th.tt-sortable[data-dir=desc]::after { content: ' ▼'; opacity: 1; color: var(--brand); }
th.tt-sortable:hover { color: var(--brand); }
@media (max-width: 560px) { .table-tools { max-width: 100%; box-sizing: border-box; } .table-tools .tt-field { flex: 1 1 calc(50% - .3rem); min-width: 0; max-width: calc(50% - .3rem); } .table-tools .tt-field.tt-q { flex-basis: 100%; max-width: 100%; } }
