/* Testimonials page (testimonials-ui.js). Uses only theme variables, so every colour palette and dark mode work. Loaded after real-pages.css. */
.tm-page { padding-bottom: 12px; }
.tm-tiles { margin-bottom: 16px; }
.tm-tile .tm-num { font-size: 36px; }
.tm-stars { display: inline-flex; gap: 2px; vertical-align: middle; line-height: 0; }
.tm-star { width: 17px; height: 17px; fill: none; stroke: var(--muted-2); stroke-width: 1.6; stroke-linejoin: round; }
.tm-star.on { fill: var(--gold-ink); stroke: var(--gold-ink); }
.tm-avgs { margin-bottom: 18px; }
.tm-avg-row { display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) 36px; gap: 12px; align-items: center; padding: 6px 0; }
.tm-avg-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.tm-bar { display: block; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.tm-bar i { display: block; height: 100%; border-radius: 999px; background: var(--gold-ink); }
.tm-avg-val { text-align: right; color: var(--ink); font-size: 14px; }
.tm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tm-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tm-tab { appearance: none; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--field-line, var(--line)); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.tm-tab:hover { background: var(--surface-2); }
.tm-tab.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tm-tab-n { font-size: 12px; font-weight: 800; opacity: .9; }
.tm-actions-top .btn { min-height: 40px; }
.tm-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; align-items: end; }
.tm-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tm-f label { font-size: 12px; font-weight: 700; color: var(--muted); }
.tm-f select, .tm-f input[type="date"], .tm-f input[type="text"], .tm-f input[type="number"] { width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--field-line, var(--line)); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; height: 42px; }
.tm-f select:focus, .tm-f input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,161,91,.22); outline: none; }
.tm-f-btn .btn { min-height: 42px; }
.tm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-1); margin-bottom: 12px; }
.tm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; flex-wrap: wrap; }
.tm-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tm-name { font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.tm-proj { font-size: 13px; color: var(--muted); }
.tm-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-meta { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.tm-meta b { color: var(--ink); font-weight: 700; }
.tm-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; margin-top: 12px; align-items: center; }
.tm-rates { display: flex; flex-direction: column; gap: 5px; }
.tm-rate { display: grid; grid-template-columns: minmax(110px, 150px) auto 20px; gap: 10px; align-items: center; font-size: 13px; color: var(--text); }
.tm-rate b { color: var(--ink); text-align: right; }
.tm-avgbox { text-align: center; padding: 10px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.tm-avgnum { font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--ink); }
.tm-avgcap { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-top: 3px; }
.tm-remarks { margin: 12px 0 0; padding: 8px 0 8px 14px; border-left: 3px solid var(--gold); color: var(--ink); font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.tm-noremarks { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.tm-decided { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.tm-decided b { color: var(--ink); }
.tm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tm-actions .btn { min-height: 38px; }
.btn.btn-primary.is-off { background: var(--surface-2); color: var(--muted); border-color: var(--line); box-shadow: none; cursor: not-allowed; }
.tm-empty { padding: 28px 12px; }
.tm-more { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 0 8px; }
.tm-prow { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line-2); }
.tm-prow:first-of-type { border-top: 0; }
.tm-pmain { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tm-pmain b { color: var(--ink); overflow-wrap: anywhere; }
.tm-pwhen { flex: 0 1 190px; display: flex; flex-direction: column; gap: 1px; align-items: flex-start; }
.tm-settings summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--ink); list-style: none; }
.tm-settings summary::-webkit-details-marker { display: none; }
.tm-settings summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
.tm-sform { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.tm-sform .wide { max-width: 520px; }
.tm-sform input[type="number"] { max-width: 140px; }
@media (max-width: 640px) {
  .tm-main { grid-template-columns: minmax(0, 1fr); }
  .tm-avgbox { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
  .tm-avgcap { margin-top: 0; }
  .tm-avg-row { grid-template-columns: minmax(96px, 120px) minmax(0, 1fr) 32px; gap: 8px; }
  .tm-rate { grid-template-columns: minmax(104px, 130px) auto 18px; }
  .tm-toolbar { align-items: stretch; }
  .tm-tabs { width: 100%; } .tm-tab { flex: 1 1 auto; justify-content: center; }
  .tm-actions-top, .tm-actions-top .btn { width: 100%; }
  .tm-actions .btn { flex: 1 1 calc(50% - 8px); }
  .tm-card { padding: 14px; }
}
