/* LUBENO Diagnostics — shared styles. Brand colours live in the two theme blocks. */
:root, .theme-lubeno {
  --brand: #12233F;        /* LUBENO navy (placeholder: swap for brand hex) */
  --brand-ink: #F7F5EF;
  --accent: #B8862B;       /* LUBENO gold (placeholder) */
  --accent-soft: #F3EAD7;
  --bg: #F7F6F2;
  --card: #FFFFFF;
  --ink: #17202E;
  --muted: #55606F;
  --line: #DAD7CE;
  --good: #2E7D4F;
  --warn: #B7791F;
  --bad: #B83A3A;
  --head-font: Georgia, 'Times New Roman', serif;
  --body-font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.theme-vista {
  --brand: #042433;        /* Vista navy */
  --brand-ink: #F5F9F8;
  --accent: #FF751F;       /* Vista orange */
  --accent-soft: #E4F3F0;
  --mint: #21CCB9;
  --bg: #F5F9F8;
  --line: #C9DDD9;
  --head-font: 'Fraunces', Georgia, serif;
  --body-font: 'Inter', system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body-font); font-size: 17px; line-height: 1.5; }
header.bar { background: var(--brand); color: var(--brand-ink); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header.bar .brand { font-family: var(--head-font); font-size: 20px; font-weight: 600; letter-spacing: .01em; }
header.bar .tag { font-size: 13px; opacity: .85; }
.theme-vista header.bar { border-bottom: 4px solid var(--mint); }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
main.wide { max-width: 1120px; }
h1, h2, h3 { font-family: var(--head-font); color: var(--brand); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.btn { display: inline-block; font: inherit; font-weight: 600; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px; padding: 12px 20px; cursor: pointer; margin-top: 16px; }
.btn.accent { background: var(--accent); color: #1A1209; }
.theme-vista .btn.accent { color: #042433; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn:disabled { opacity: .55; cursor: wait; }
.linkish { background: none; border: 0; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; padding: 8px 0; margin-top: 8px; }
.msg { min-height: 1.5em; color: var(--muted); margin-top: 10px; }
.msg.error { color: var(--bad); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

fieldset.q { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
fieldset.q legend { padding: 0; width: 100%; }
fieldset.q legend label { margin: 6px 0 10px; }

/* Choice buttons (radio / checkbox styled as tiles) */
.choices { display: grid; gap: 8px; }
.choices.cols-2 { grid-template-columns: 1fr 1fr; }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; cursor: pointer; font-weight: 400; margin: 0; }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); }

/* Likert scale */
.statement { padding: 16px 0; border-bottom: 1px solid var(--line); }
.statement:last-child { border-bottom: 0; }
.statement .text { font-weight: 600; margin-bottom: 10px; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert label { margin: 0; font-weight: 400; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 2px; cursor: pointer; background: #fff; font-size: 13px; line-height: 1.25; }
.likert label b { display: block; font-size: 18px; }
.likert input { position: absolute; opacity: 0; pointer-events: none; }
.likert label:has(input:checked) { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.likert label:has(input:focus-visible) { outline: 3px solid var(--accent); }
.scale-key { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* NPS 0–10 */
.nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.nps label { margin: 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 0; cursor: pointer; background: #fff; font-weight: 600; }
.nps input { position: absolute; opacity: 0; pointer-events: none; }
.nps label:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
.nps label:has(input:focus-visible) { outline: 3px solid var(--accent); }

/* Progress */
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 4px 0 20px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.step-label { font-size: 14px; color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { font: inherit; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 16px; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* Tables and dashboard */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card > .grid-3 + h3 { margin-top: 24px; }
.stat { font-family: var(--head-font); font-size: 34px; color: var(--brand); line-height: 1.1; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 56px; gap: 10px; align-items: center; font-size: 15px; margin: 6px 0; }
.bar-track { background: var(--accent-soft); border-radius: 6px; height: 14px; overflow: hidden; }
.bar-fill { background: var(--brand); height: 100%; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.pill.red { background: #F6DCDC; color: var(--bad); }
.pill.amber { background: #F7EBD3; color: var(--warn); }
.pill.green { background: #DCEFE3; color: var(--good); }
.quote { border-left: 3px solid var(--accent); padding: 6px 12px; margin: 8px 0; background: #fff; }
.heat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.heat .cell { border-radius: 12px; padding: 14px; border: 2px solid var(--line); background: #fff; }
.heat .cell.red { border-color: var(--bad); background: #FBEFEF; }
.heat .cell.amber { border-color: var(--warn); background: #FBF4E6; }
.heat .cell.green { border-color: var(--good); background: #EEF7F1; }
.hidden { display: none !important; }
footer.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 24px 16px 40px; }

@media (max-width: 720px) {
  .grid-2, .grid-3, .heat { grid-template-columns: 1fr; }
  .choices.cols-2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 44px; }
  .likert label { font-size: 11px; }
  h1 { font-size: 24px; }
}
@media print {
  header.bar, .tabs, .btn, .linkish { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}
