/* Timero · Polish bridge — soft-alias legacy CRM classes to polish tokens.
   Loaded after timero-polish.css. Does not rewrite markup. */

body.tp { background: var(--bg-app); color: var(--ink-1); }

/* Columns → polish .col */
body.tp .timero-col {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
body.tp .timero-col > header,
body.tp .timero-col > .timero-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
body.tp .timero-col-title h2 {
  margin: 0; font-size: 13px; font-weight: 650; color: var(--ink-1);
}
body.tp .timero-col-count {
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  padding: 0 7px; height: 18px;
  display: inline-flex; align-items: center;
  border-radius: 9px; background: var(--bg-surface-2);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

/* Filter bar (Клієнти): full-width segment, no gap under header line */
body.tp .timero-col > .timero-col-header {
  border-bottom: 0;
}
body.tp .timero-filter-bar {
  display: flex; flex-wrap: nowrap; gap: 2px; width: auto;
  padding: 3px; margin: 0 10px 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border); border-radius: 8px;
  box-sizing: border-box;
}
body.tp .timero-filter-btn {
  flex: 1 1 0; min-width: 0; height: 26px; padding: 0 6px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-3);
  font: 500 12px/1 var(--font); white-space: nowrap; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
body.tp .timero-filter-btn:hover { color: var(--ink-1); }
body.tp .timero-filter-btn.active {
  background: var(--bg-surface); color: var(--ink-1); box-shadow: var(--shadow-1);
}

/* Tabs: keep patch.css pill look; bridge only densifies spacing slightly via patch */
body.tp .timero-details-tools .tabs-container {
  gap: 0;
}

/* Icon buttons → polish .ibtn */
body.tp .timero-icon-btn {
  width: 28px; height: 28px; padding: 0;
  border: 1px solid var(--border-2); border-radius: 7px;
  background: var(--bg-surface); color: var(--ink-2);
  display: inline-grid; place-items: center; flex-shrink: 0; cursor: pointer;
}
body.tp .timero-icon-btn:hover {
  border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft);
}

/* Buttons → polish .btn */
body.tp .timero-btn-primary,
body.tp .btn-add {
  height: 30px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent); color: #fff;
  font: 500 12.5px/1 var(--font);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); cursor: pointer;
}
body.tp .timero-btn-primary:hover,
body.tp .btn-add:hover { background: var(--accent-2); border-color: var(--accent-2); }
body.tp .timero-btn-secondary {
  height: 30px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-2); border-radius: 8px;
  background: var(--bg-surface); color: var(--ink-1);
  font: 500 12.5px/1 var(--font); cursor: pointer;
}
body.tp .timero-btn-secondary:hover { background: var(--bg-hover); }

/* Empty + active rows */
body.tp .timero-empty {
  border: 1px dashed var(--border-2); border-radius: 10px;
  padding: 18px 14px; text-align: center; color: var(--ink-3); font-size: 12px;
}
body.tp .client-item.item-active,
body.tp .contract-item.item-active,
body.tp .document-item.item-active {
  background: var(--bg-active); border-color: var(--accent-soft-2);
}

/* Funnel board: legacy .kcol ≈ polish .kc (when both classes present, .kc wins) */
body.tp .kcol:not(.kc) {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
body.tp .kcol.drop-target,
body.tp .kc.drop-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
body.tp .proj-open-btn { color: inherit; font: inherit; }
body.tp .pc .proj-open-btn:hover { color: var(--accent-2); }

/* Project card budget: always show spent / budget pair */
body.tp .pc .bud-l {
  font-size: 9.5px;
  white-space: nowrap;
}
body.tp .pc .bud-val {
  flex-shrink: 0;
  overflow: visible;
  text-overflow: unset;
}
body.tp .proj-cards { align-items: stretch; }
body.tp .proj-card.pc {
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
}
body.tp .pc.bk-expanded { z-index: 4; }
