/* =============================================================================
   Turtle Warehouse — Tide theme
   Design tokens + atomic component styles.
   All visual styling reads from CSS custom properties so the palette can be
   swapped or themed in a single place. Selectors use scoped class names
   (.tw-*) so they won't collide with existing Bootstrap styles when this
   theme is grafted onto the current site.
   ============================================================================= */

:root, [data-theme="tide"] {
  /* ----- Palette ----- */
  --bg:           #f5f6f7;
  --bg-tint:      #eaecee;
  --surface:      #ffffff;
  --surface-2:    #f4f6f7;
  --surface-hover:#ecf0f1;
  --border:       #e3e6e8;
  --border-strong:#c6cbcf;
  --text:         #0f1416;
  --text-soft:    #4b5358;
  --text-muted:   #828a8e;

  /* Brand */
  --primary:        #0891b2;   /* cyan-teal 600 */
  --primary-fg:     #ffffff;
  --primary-soft:   #d1edf2;
  --primary-soft-fg:#0e6a82;

  /* Semantic */
  --positive:     #0d9b6a;
  --positive-soft:#d1ecde;
  --negative:     #dc2626;
  --negative-soft:#fde0de;
  --warning:      #b45309;
  --warning-soft: #fceacd;
  --info:         #2563eb;
  --info-soft:    #dde7fb;
  --link:         #0e6a82;

  /* Effects */
  --shadow-sm:  0 1px 2px rgba(15,30,40,.05);
  --shadow-md:  0 4px 14px rgba(15,30,40,.06);

  /* Radii */
  --radius-xs:   5px;
  --radius-sm:   7px;
  --radius-md:   9px;
  --radius-lg:  12px;
  --radius-pill: 999px;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Type */
  --font-display: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-sans:    'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, monospace;
  --font-weight-heading: 600;

  /* Chrome */
  --topnav-bg:    #ffffff;
  --topnav-border:#e3e6e8;
  --row-divider:  #ebedee;
}

/* ----- Base ----- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; color: var(--text); }
::selection { background: var(--primary-soft); color: var(--primary-soft-fg); }

/* ----- Card ----- */
.tw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ----- Buttons ----- */
.tw-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 500; font-size: 13px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .04s;
}
.tw-btn:hover { background: var(--surface-hover); }
.tw-btn:active { transform: translateY(1px); }
.tw-btn-primary {
  background: var(--primary); color: var(--primary-fg);
  border-color: var(--primary);
}
.tw-btn-primary:hover { filter: brightness(.94); background: var(--primary); }
.tw-btn-solid {
  background: var(--text); color: var(--surface);
  border-color: var(--text); font-weight: 600;
}
.tw-btn-solid:hover { background: var(--text); opacity: .88; }
.tw-btn-ghost {
  border-color: transparent; background: transparent;
  color: var(--text-soft);
}
.tw-btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.tw-btn-icon { width: 34px; padding: 0; justify-content: center; }

/* ----- Form controls ----- */
.tw-input, .tw-select {
  height: 34px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.tw-input:focus, .tw-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 22%, transparent);
}
.tw-input::placeholder { color: var(--text-muted); }

/* ----- Chips ----- */
.tw-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-soft);
  white-space: nowrap;
}
.tw-chip-positive { background: var(--positive-soft); color: var(--positive); }
.tw-chip-negative { background: var(--negative-soft); color: var(--negative); }
.tw-chip-warning  { background: var(--warning-soft);  color: var(--warning);  }
.tw-chip-info     { background: var(--info-soft);     color: var(--info);     }
.tw-chip-neutral  { background: var(--surface-2);     color: var(--text-soft);}
.tw-chip-primary  { background: var(--primary-soft);  color: var(--primary-soft-fg); }
.tw-chip-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .9;
}

/* ----- Mono / numeric ----- */
.tw-mono { font-family: var(--font-mono); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.tw-num  { font-variant-numeric: tabular-nums; }

/* ----- Tables ----- */
.tw-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.tw-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 1;
}
.tw-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--row-divider);
  vertical-align: middle;
}
.tw-table tbody tr:hover { background: var(--surface-hover); }
.tw-table tbody tr:last-child td { border-bottom: none; }
.tw-num-cell { text-align: right; font-variant-numeric: tabular-nums; }

/* ----- Thumbnail ----- */
.tw-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

/* ----- Top nav ----- */
.tw-topnav {
  position: sticky; top: 0; z-index: 30;
  background: var(--topnav-bg);
  border-bottom: 1px solid var(--topnav-border);
  backdrop-filter: blur(8px);
}
.tw-topnav-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 24px;
}
.tw-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
  padding: 6px 10px;
  border-radius: var(--radius-md);
}
.tw-brand-mark {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--primary);
  display: inline-block;
  position: relative;
}
.tw-brand-mark::after {
  content: '';
  position: absolute; inset: 4px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--primary) 60%, white 40%);
}
.tw-nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
}
.tw-nav-link:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.tw-nav-link.active {
  background: var(--primary-soft);
  color: var(--primary-soft-fg);
}
.tw-nav-link svg { width: 15px; height: 15px; opacity: .85; }
.tw-topnav-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
}
.tw-user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  font-size: 12.5px; color: var(--text-soft);
}
.tw-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: var(--primary-fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}

/* ----- Page layout ----- */
.tw-page {
  max-width: 1440px; margin: 0 auto;
  padding: 24px;
}
.tw-page-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.tw-page-title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-heading);
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
.tw-page-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

/* ----- Pagination ----- */
.tw-pager {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; background: var(--surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.tw-pager button {
  min-width: 28px; height: 26px; padding: 0 8px;
  border: none; background: transparent;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.tw-pager button:hover { background: var(--surface-hover); color: var(--text); }
.tw-pager button.active {
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ----- Stock state colors ----- */
.tw-stock-pos  { color: var(--positive); font-weight: 600; }
.tw-stock-neg  { color: var(--negative); font-weight: 600; }
.tw-stock-zero { color: var(--negative); font-weight: 600; }
.tw-stock-low  { color: var(--warning);  font-weight: 600; }

/* ----- Misc ----- */
.tw-divider { height: 1px; background: var(--border); margin: 16px 0; }
.tw-check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
}
.tw-check[data-on="true"] {
  background: var(--primary); border-color: var(--primary);
  color: var(--primary-fg);
}
.tw-check[data-on="true"]::after {
  content: ''; width: 8px; height: 4px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(1px,-1px);
}
.ico { width: 16px; height: 16px; flex-shrink: 0; }

/* ----- Detail page kit ----- */
.tw-grid { display: grid; gap: 16px; }
.tw-section-title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-heading);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 10px 0;
}
.tw-kv { display: grid; grid-template-columns: 130px 1fr; row-gap: 8px; font-size: 13px; }
.tw-kv dt { color: var(--text-muted); }
.tw-kv dd { margin: 0; color: var(--text); font-weight: 500; }

.tw-stat        { display: flex; flex-direction: column; gap: 2px; }
.tw-stat-label  {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 500;
}
.tw-stat-value  {
  font-family: var(--font-display);
  font-weight: var(--font-weight-heading);
  font-size: 24px;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* "Linked to eshop" check badge used in Product list (next to store-product cell) */
.tw-linked-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary); color: var(--primary-fg);
  flex-shrink: 0;
}

/* =============================================================================
   Invoicing — document UI kit
   Type-accented head band, status workflow pill, paid banner, parties grid.
   The band exposes --accent / --accent-soft so children (type chip, active
   workflow step) can inherit the document-type color from one modifier class.
   ============================================================================= */

/* ----- Type-accented head band ----- */
.tw-doc-band {
  --accent:      var(--primary);
  --accent-soft: var(--primary-soft);
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 18px;
}
.tw-doc-band-main  { flex: 1; min-width: 260px; }
.tw-doc-band-side  { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tw-doc-band .tw-page-title { margin: 0; }

/* per-type accent map (mirrors the design handoff) */
.tw-accent-teal  { --accent:#0891b2; --accent-soft:#e2f3f7; }  /* Faktúra / Invoice  */
.tw-accent-blue  { --accent:#2563eb; --accent-soft:#dde7fb; }  /* Zálohová / Proforma */
.tw-accent-amber { --accent:#b45309; --accent-soft:#fceacd; }  /* Cenová ponuka / Offer */
.tw-accent-green { --accent:#0d9b6a; --accent-soft:#d1ecde; }  /* Vyúčtovacia / Settlement */
.tw-accent-red   { --accent:#dc2626; --accent-soft:#fde0de; }  /* Storno / Dobropis */

/* solid type chip (uses the band accent) */
.tw-doc-type {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}

/* ----- Status workflow — segmented "slider" track ----- */
.tw-workflow {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 8px;
}
.tw-workflow-step {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 16px;
  border-radius: var(--radius-pill);
  background: transparent; border: none;
  color: var(--text-muted);
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
}
.tw-workflow-step.is-active::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.tw-workflow-step.is-active { background: var(--accent, var(--primary)); color: #fff; }
.tw-workflow-step.is-done   { background: var(--accent-soft, var(--primary-soft)); color: var(--accent, var(--primary)); }
.tw-workflow-step.is-paid   { background: var(--positive); color: #fff; }
.tw-workflow-sep { color: var(--text-muted); display: inline-flex; opacity: .5; }
.tw-workflow-sep svg { width: 14px; height: 14px; }

/* ----- Paid banner ----- */
.tw-paid-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--positive-soft); color: var(--positive);
  border: 1px solid color-mix(in oklab, var(--positive) 30%, transparent);
  border-radius: var(--radius-lg);
  padding: 12px 18px; margin-bottom: 16px;
  font-size: 13.5px; font-weight: 600;
}

/* ----- Parties grid (Dodávateľ / Odberateľ) ----- */
.tw-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.tw-party { padding: 20px; }
.tw-party + .tw-party { border-left: 1px solid var(--border); }
.tw-party-role {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 600; margin-bottom: 8px;
}
.tw-party-name { font-weight: 600; font-size: 14px; }
.tw-party-line { color: var(--text-soft); font-size: 13px; }
.tw-party-meta { color: var(--text-muted); font-size: 12px; }
@media (max-width: 720px) {
  .tw-parties { grid-template-columns: 1fr; }
  .tw-party + .tw-party { border-left: none; border-top: 1px solid var(--border); }
}

/* ----- Modal kit (customer / address / product pickers) ----- */
.tw-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,20,22,.45);
  overflow: auto; display: none;
}
.tw-modal-backdrop.is-open { display: block; }
.tw-modal {
  max-width: 560px; margin: 64px auto 20px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15,30,40,.28);
  overflow: hidden;
  animation: tw-popin .18s ease;
}
@keyframes tw-popin {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.tw-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.tw-modal-title { font-size: 15px; font-weight: 600; margin: 0; }
.tw-modal-close {
  width: 30px; height: 30px; border: none; background: none; cursor: pointer;
  border-radius: 7px; color: var(--text-muted); font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.tw-modal-close:hover { background: var(--surface-hover); color: var(--text); }
.tw-modal-body { padding: 18px 20px; max-height: 60vh; overflow: auto; }
.tw-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}

/* picker rows (search results) */
.tw-pick-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 9px; margin-bottom: 8px;
}
.tw-pick-row:hover { border-color: var(--primary); }
.tw-pick-row.is-selected { border-color: var(--primary); background: #f3fbfc; }
.tw-pick-main { flex: 1; min-width: 0; }
.tw-pick-name { font-weight: 600; font-size: 13.5px; }
.tw-pick-meta { color: var(--text-muted); font-size: 12px; }
.tw-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 24px; }
.tw-search {
  width: 100%; height: 38px; padding: 0 12px; margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 13px; outline: none;
}
.tw-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 22%, transparent); background: var(--surface); }

/* clickable picker box (customer field — opens the customer modal) */
.tw-picker-box {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 13px; cursor: pointer;
}
.tw-picker-box:hover { border-color: var(--primary); }
.tw-picker-change {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--link); font-size: 12.5px; font-weight: 500; flex-shrink: 0;
}

/* ----- Nový doklad — creation wizard ----- */
dialog.wiz {
  width: min(760px, calc(100vw - 32px)); max-width: 760px;
  border: none; border-radius: 18px; padding: 24px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 32px 80px rgba(15,30,40,.34);
}
dialog.wiz::backdrop { background: rgba(15,20,22,.5); backdrop-filter: blur(3px); }
.wiz-head { display: flex; align-items: center; gap: 12px; }
.wiz-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.wiz-icon svg { width: 20px; height: 20px; }
.wiz-title { font-size: 16px; font-weight: 600; }
.wiz-sub { font-size: 12.5px; color: var(--text-muted); }
.wiz-x {
  width: 30px; height: 30px; border: none; background: none; cursor: pointer;
  color: var(--text-muted); border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
}
.wiz-x:hover { background: var(--surface-hover); color: var(--text); }
.wiz-x svg { width: 18px; height: 18px; }
.wiz-progress { display: flex; gap: 6px; margin: 14px 0 20px; }
.wiz-progress > span { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background .2s ease; }
.wiz-progress > span.on { background: var(--primary); }
.wiz-h { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.wiz-p { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.wiz-typegrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.wiz-typecard {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  border: 1.5px solid var(--border); border-radius: 14px; padding: 20px 18px;
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.wiz-typecard:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: 0 10px 24px rgba(15,30,40,.14); }
.wiz-tile {
  width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accsoft); color: var(--acc);
}
.wiz-tile svg { width: 22px; height: 22px; }
.wiz-tt { font-size: 14px; font-weight: 600; }
.wiz-td { font-size: 12.5px; color: var(--text-muted); }
.wiz-sel { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--acc); }
.wiz-srclist { display: flex; flex-direction: column; gap: 10px; }
.wiz-src { border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color .12s ease, background .12s ease; }
.wiz-src.selected { border-color: var(--primary); background: var(--primary-soft); }
.wiz-src-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.wiz-stile {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-soft);
}
.wiz-src.selected .wiz-stile { background: var(--surface); color: var(--primary); }
.wiz-stile svg { width: 20px; height: 20px; }
.wiz-stxt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wiz-stxt strong { font-size: 14px; font-weight: 600; }
.wiz-stxt span { font-size: 12.5px; color: var(--text-muted); }
.wiz-check { width: 20px; height: 20px; color: var(--primary); opacity: 0; flex-shrink: 0; }
.wiz-src.selected .wiz-check { opacity: 1; }
.wiz-idbox { padding: 0 18px 16px; }
.wiz-idbox .tw-input { width: 100%; }
.wiz-foot { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.tw-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ----- Appendix (note / payment-terms) blocks ----- */
.tw-appendix-defaults { display: flex; flex-direction: column; gap: 8px; }
.tw-appendix-default {
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong); border-radius: var(--radius-md);
  padding: 10px 12px; font-size: 13px; color: var(--text-soft); white-space: pre-wrap;
}
.tw-appendix-row { display: flex; gap: 8px; align-items: flex-start; }
.tw-appendix-row textarea { flex: 1; }

/* ----- Segmented tabs (mode switch) ----- */
.tw-tabs { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; }
.tw-tab {
  padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  color: var(--text-soft); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.tw-tab:hover { color: var(--text); }
.tw-tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ----- Toggle switch (Platca DPH) ----- */
.tw-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-soft); user-select: none; }
.tw-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tw-switch-track { width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex-shrink: 0; }
.tw-switch-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.tw-switch input:checked ~ .tw-switch-track { background: var(--primary); }
.tw-switch input:checked ~ .tw-switch-track .tw-switch-thumb { left: 20px; }

/* ----- Company verify banner (register + VAT rows, one consistent look) ----- */
.tw-reg-banner { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.tw-reg-banner .tw-reg-ico { width: 20px; height: 20px; flex-shrink: 0; }
.tw-reg-row { display: flex; align-items: center; gap: 9px; }
.tw-reg-row.reg-ok  { color: var(--positive); }
.tw-reg-row.reg-ok strong { color: var(--positive); }
.tw-reg-row.vat-ok  { color: var(--positive); font-weight: 600; }
.tw-reg-row.vat-bad { color: var(--negative); font-weight: 600; }
.tw-reg-row.vat-warn { color: var(--text-muted); }

/* soft secondary button (verify actions) */
.tw-btn-soft { background: var(--primary-soft); color: var(--primary-soft-fg); border-color: var(--primary-soft); white-space: nowrap; }
.tw-btn-soft:hover { filter: brightness(0.97); }

/* small hint under a field */
.tw-field-hint { margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }

/* dropdown menu (kebab / auxiliary actions) */
.tw-menu { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); min-width: 210px; z-index: 50; padding: 5px; }
.tw-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text); background: none; border: none; cursor: pointer; text-align: left; text-decoration: none; white-space: nowrap; }
.tw-menu-item:hover { background: var(--surface-2); }
.tw-menu-item .ico { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.tw-menu-item.danger { color: var(--negative); }
.tw-menu-item.danger .ico { color: var(--negative); }
.tw-menu-item.danger:hover { background: var(--negative-soft, #fde0de); }
.tw-menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* ----- Live VAT validation status ----- */
.vat-status { font-size: 12px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.vat-status.vat-ok { color: var(--positive); font-weight: 600; }
.vat-status.vat-bad { color: var(--negative); font-weight: 600; }
.vat-status.vat-warn { color: var(--warning); }
.vat-status.vat-checking { color: var(--text-muted); }
