/* ============================================================
   SYMPHO · ZAMNÁ — view styles (field ops + IA + expediente)
   Accent-driven; --accent is set to --zamna while the app is open.
   ============================================================ */

/* ---- generic role switcher (Eb + Zamná) ---- */
.role-switch { display: grid; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.role-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; position: relative;
  background: transparent; border: none; border-radius: 7px; cursor: pointer;
  color: var(--text-3); font-family: var(--ui); font-size: 11px; font-weight: 500; transition: color 0.14s;
}
.role-btn:hover { color: var(--text); background-color: var(--surface-2); }
.role-fill { position: absolute; inset: 0; border-radius: 7px; background: var(--accent); z-index: 0; }
.role-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* active color tied to the structural .role-fill node (repaint-safe) */
.role-btn:has(.role-fill) .role-in { color: oklch(0.16 0.02 264); font-weight: 600; }

/* ---- progress bar tinted to accent ---- */
.zbar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.zbar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

/* ---- evidence / photo tiles ---- */
.evi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.evi { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.evi-ph {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; color: var(--text-4);
  background:
    repeating-linear-gradient(135deg, var(--surface-2) 0 11px, var(--bg-2) 11px 22px);
}
.evi-ph .evi-ic { opacity: 0.5; }
.evi-meta { padding: 9px 11px; }
.evi-tag {
  position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px; font-family: var(--mono); font-size: 10px;
  background: color-mix(in oklch, var(--accent) 22%, var(--bg)); color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
}
.evi-add {
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg-2);
  color: var(--text-3); cursor: pointer; font-family: var(--ui); font-size: 12px; transition: all 0.15s;
}
.evi-add:hover { border-color: var(--accent); color: var(--text); }

/* ---- AI chips / panels ---- */
.ai-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 11.5px; font-family: var(--mono);
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent); border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
}
.ai-card { border: 1px solid color-mix(in oklch, var(--accent) 26%, var(--line)); border-radius: 14px; padding: 18px;
  background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 7%, var(--surface)), var(--surface)); }
.ai-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ai-row:last-child { border-bottom: none; }
.conf { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.conf > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* severity dots for missing/recommendations */
.sev { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sev.warn { background: var(--warn); } .sev.bad { background: var(--bad); } .sev.ok { background: var(--ok); }

/* ---- visit wizard ---- */
.zw { display: grid; grid-template-columns: 232px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .zw { grid-template-columns: 1fr; } }
.zw-rail { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 10px; }
.zw-step { display: grid; grid-template-columns: 26px 1fr; align-items: center; column-gap: 11px;
  padding: 9px 9px; border-radius: 10px; cursor: pointer; border: none; background: transparent;
  text-align: left; width: 100%; font-family: var(--ui); transition: background 0.13s; position: relative; }
.zw-step:hover { background: var(--surface-2); }
.zw-step[data-on="true"] { background: color-mix(in oklch, var(--accent) 13%, transparent); }
.zw-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-3);
  background: var(--surface-3); border: 1px solid var(--line-2); }
.zw-step[data-on="true"] .zw-dot { background: var(--accent); color: oklch(0.16 0.02 264); border-color: transparent; }
.zw-step[data-state="done"] .zw-dot { background: color-mix(in oklch, var(--accent) 22%, transparent); color: var(--accent); border-color: color-mix(in oklch, var(--accent) 40%, transparent); }
.zw-step b { font-size: 12.5px; font-weight: 500; color: var(--text-2); display: block; line-height: 1.25; }
.zw-step[data-on="true"] b { color: var(--text); font-weight: 600; }
.zw-step small { font-size: 10px; color: var(--text-4); font-family: var(--mono); }

/* ---- checklist chips ---- */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.chk {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); transition: all 0.14s;
}
.chk[data-on="true"] { border-color: color-mix(in oklch, var(--accent) 45%, transparent); background: color-mix(in oklch, var(--accent) 10%, var(--bg-2)); color: var(--text); }
.chk-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; color: transparent; }
.chk[data-on="true"] .chk-box { background: var(--accent); border-color: transparent; color: oklch(0.16 0.02 264); }

/* ---- topology editor ---- */
.topo { position: relative; border: 1px solid var(--line-2); border-radius: 14px; aspect-ratio: 16 / 10;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 9.09%,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 6.25% 100%,
    var(--bg-2);
  overflow: hidden; }
.topo-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 5px; z-index: 2; }
.topo-node .tn-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--line-2)); color: var(--accent);
  box-shadow: var(--shadow); }
.topo-node small { font-size: 10px; font-family: var(--mono); color: var(--text-2); background: var(--bg); padding: 1px 5px; border-radius: 5px; white-space: nowrap; }
.palette { display: flex; flex-wrap: wrap; gap: 7px; }
.pal-item { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 9px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; cursor: grab; transition: all 0.13s; }
.pal-item:hover { border-color: var(--accent); color: var(--text); }

/* ---- plano canvas ---- */
.plano { border: 1px solid var(--line-2); border-radius: 14px; aspect-ratio: 16 / 9; position: relative;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 100%,
    var(--bg-2);
  display: grid; place-items: center; color: var(--text-4); }

/* ---- expediente timeline ---- */
.ztl { display: flex; flex-direction: column; }
.ztl-row { display: grid; grid-template-columns: 16px 1fr; column-gap: 16px; position: relative; }
.ztl-node { width: 13px; height: 13px; border-radius: 50%; margin-top: 5px; z-index: 2;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 16%, transparent); }
.ztl-row:not(:last-child) .ztl-line { position: absolute; left: 6px; top: 16px; bottom: -10px; width: 2px; background: var(--line-2); }
.ztl-body { padding-bottom: 22px; }
.delta { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 7px; font-family: var(--mono);
  font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-3); }

/* ---- tabs ---- */
.ztabs { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.ztab { padding: 7px 14px; border-radius: 7px; border: none; background: transparent; cursor: pointer;
  font-family: var(--ui); font-size: 12.5px; color: var(--text-3); font-weight: 500; transition: all 0.13s; }
.ztab:hover { color: var(--text); }
.ztab[data-on="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---- signature pad ---- */
.sign-pad { aspect-ratio: 3 / 1; border: 1px dashed var(--line-strong); border-radius: 12px; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--bg-2) 0 9px, var(--surface) 9px 18px); position: relative; }
.sign-pad .sign-line { position: absolute; left: 16px; right: 16px; bottom: 26px; height: 1px; background: var(--line-2); }
.sign-pad[data-signed="true"] { border-style: solid; border-color: color-mix(in oklch, var(--ok) 45%, transparent); background: color-mix(in oklch, var(--ok) 7%, var(--surface)); }
.sign-cursive { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 30px; color: var(--text); }

/* ---- report sheet (client) ---- */
.sheet { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 30px 34px; box-shadow: var(--shadow-lg); }
.sheet-band { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent) 40%, transparent)); margin-bottom: 22px; }
.sheet h4 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); margin: 22px 0 10px; font-weight: 600; }
.kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.kv span:first-child { color: var(--text-4); } .kv span:last-child { color: var(--text); font-family: var(--mono); font-size: 12px; }
