:root { --bg:#f6f7f9; --card:#fff; --text:#1f2328; --muted:#5f6670; --line:#e3e6ea; --accent:#1f6f5c; --accent-bg:#e2efe9;
        --warn:#8a5a00; --warn-bg:#fbefdc; --danger:#a32d2d; --danger-bg:#fcebeb; --ok:#2e7d32; --radius:8px;
        --shadow:0 1px 2px rgba(16,24,40,.05); --top-h:61px; }
* { box-sizing: border-box; }
body { margin:0; font-family: "Segoe UI", system-ui, sans-serif; background:var(--bg); color:var(--text); font-size:15px; }
.top { display:flex; align-items:center; gap:12px; padding:10px 20px; height:var(--top-h); background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.brand { display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; font-size:16px; }
.brand .logo { width:32px; height:32px; border-radius:8px; background:var(--accent); color:#fff; display:grid; place-items:center; font-weight:700; font-size:16px; }
.brand .brand-text .lbl { color:var(--muted); font-weight:400; }
.ic { flex:none; vertical-align:middle; }
.top .btn { display:inline-flex; align-items:center; gap:8px; }
.icon-btn { display:inline-grid; place-items:center; color:var(--text); }
.top .grow { flex:1; }
.icon-btn { width:40px; height:40px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); position:relative; cursor:pointer; font-size:18px; }
.badge { position:absolute; top:-6px; right:-6px; background:var(--danger); color:#fff; border-radius:10px; font-size:11px; padding:0 6px; }
.btn { height:40px; padding:0 16px; border-radius:var(--radius); border:1px solid var(--line); background:var(--card); cursor:pointer; font-size:14px; font-family:inherit; color:var(--text); }
.btn:hover:not(:disabled) { border-color:#c9ced4; }
.btn.primary:hover:not(:disabled) { background:#195c4c; }
.btn.danger { background:var(--danger); }
.danger-text { color:var(--danger) !important; }
.btn.primary { background:var(--accent); color:#fff; border:none; }
.btn:disabled { opacity:.6; cursor:default; }
.page { max-width:620px; margin:0 auto; padding:18px 16px 40px; }
.label { font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); margin:22px 0 8px; }
.box { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.box.pad { padding:12px 14px; }
.muted { color:var(--muted); } .small { font-size:12px; }
.row.stack { flex-direction:column; align-items:flex-start; gap:2px; }
.row { display:flex; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid var(--line); }
.row:last-child { border-bottom:none; }
.next { background:var(--accent-bg); border-radius:var(--radius); padding:12px 14px; display:flex; gap:12px; align-items:center; margin-top:18px; }
.next .text { flex:1; color:var(--accent); font-size:14px; }
.error { background:var(--danger-bg); color:var(--danger); border-radius:var(--radius); padding:10px 12px; margin-top:12px; font-size:14px; }
.links { display:flex; gap:16px; font-size:13px; color:var(--muted); margin-top:10px; flex-wrap:wrap; }
.links a { color:inherit; cursor:pointer; }
.sidebar-back { position:fixed; inset:0; background:rgba(0,0,0,.3); z-index:10; }
.sidebar { position:fixed; top:0; left:0; bottom:0; width:300px; max-width:100%; background:var(--card); z-index:11; overflow:auto; }
.group { font-size:12px; color:var(--muted); padding:12px 14px 4px; }
.item { padding:12px 16px; border-bottom:1px solid var(--line); cursor:pointer; border-left:3px solid transparent; }
.item:hover { background:#f9fafb; }
.item.active { border-left-color:var(--accent); background:var(--accent-bg); }
.item-top { display:flex; justify-content:space-between; gap:8px; align-items:baseline; }
.item-top strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.item-top .small { white-space:nowrap; flex:none; }
.item-foot { font-size:12px; margin-top:6px; display:flex; justify-content:space-between; gap:8px; }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; background:var(--line); }
.dot.mine { background:var(--accent); }
.side-head { display:flex; align-items:center; gap:8px; padding:14px 16px 4px; }
.side-head .count { background:var(--danger); color:#fff; border-radius:10px; font-size:11px; padding:1px 7px; }
.side-head .grow { flex:1; }
.side-pad { padding:10px 16px 0; }
.search { position:relative; }
.search .ic { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.search input { padding-left:34px; }
.side-pad:has(.search) { padding-bottom:6px; }
input, textarea, select { font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:var(--radius); width:100%; }
#blazor-error-ui { display:none; position:fixed; bottom:0; left:0; right:0; padding:10px 16px; background:var(--warn-bg); color:var(--warn); z-index:20; }
@media (max-width:640px) { .sidebar { width:100%; } }
.tabs { display:flex; gap:6px; }
.tabs button { flex:1; height:34px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); cursor:pointer; font:inherit; font-size:13px; }
.tabs button.on { border-color:var(--accent); color:var(--accent); background:var(--accent-bg); }
.seg { display:inline-flex; } .seg .btn { height:30px; padding:0 10px; font-size:13px; border-radius:0; } .seg .btn:first-child { border-radius:var(--radius) 0 0 var(--radius); } .seg .btn:last-child { border-radius:0 var(--radius) var(--radius) 0; margin-left:-1px; }
.seg .btn.on { border-color:var(--accent); color:var(--accent); background:var(--accent-bg); position:relative; }
.top .brand { white-space:nowrap; }

/* items: table columns */
.items .hdr { font-size:12px; color:var(--muted); }
.items .c-name { flex:1; min-width:0; }
.items .c-qty { width:40px; text-align:center; }
.items.editable .c-qty { width:112px; display:flex; justify-content:center; }
.items .qctl { display:flex; align-items:center; gap:6px; }
.items .c-qty .btn { height:28px; padding:0 9px; }
.items .c-price { width:80px; text-align:right; }
.items .c-disc { width:64px; text-align:right; }
.items .c-disc input { width:60px; padding:4px; text-align:right; }
.items .c-total { width:90px; text-align:right; }
.items .c-del { width:34px; }
.items .btn.c-del { height:28px; padding:0; }

/* phone: header buttons show only their icon, each item becomes a card */
@media (max-width: 560px) {
  .top { gap:8px; padding:8px 12px; }
  .top .lbl { display:none; }
  .top .btn { min-width:40px; padding:0 12px; font-size:18px; }
  .items .hdr { display:none; }
  .items .irow { flex-wrap:wrap; row-gap:8px; }
  .items .irow .c-name { flex:1 1 calc(100% - 44px); font-weight:500; }
  .items.editable .irow .c-del { order:-1; margin-left:auto; }
  .items.editable .irow .c-name { order:-2; }
  .items .irow .c-qty, .items .irow .c-price, .items .irow .c-disc, .items .irow .c-total {
    width:auto; flex:1 1 0; display:flex; flex-direction:column; align-items:flex-start; text-align:left; font-size:14px; }
  .items .irow [data-label]::before { content:attr(data-label); font-size:11px; color:var(--muted); margin-bottom:2px; }
  .items.editable .irow .c-qty { flex:1.4 1 0; }
}
.field-label { display:block; font-size:13px; color:var(--muted); margin-bottom:4px; }

/* desktop shell: the requests stay docked on the left, the page uses the rest of the width */
.side { display:none; }
@media (min-width:1024px) {
  .menu-btn { display:none; }
  .shell { display:grid; grid-template-columns:320px minmax(0,1fr); }
  .side { display:block; position:sticky; top:var(--top-h); height:calc(100vh - var(--top-h)); overflow:auto;
          background:var(--card); border-right:1px solid var(--line); }
}

/* request page */
.page.wide { max-width:1240px; padding:24px 28px 48px; }
.req-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.req-head h1 { font-size:22px; font-weight:600; margin:0; }
.req-head .sub { color:var(--muted); font-size:14px; margin-top:2px; }
.req-head .meta { display:flex; flex-direction:column; align-items:flex-end; gap:4px; font-size:12px; color:var(--muted); text-align:right; }
.chip { background:var(--card); border:1px solid var(--line); border-radius:999px; padding:2px 10px; font-size:12px; color:var(--text); font-weight:600; }
.actions { display:flex; gap:8px; margin-top:8px; flex-wrap:wrap; }
.actions input { flex:1; min-width:160px; }
.facts .row { justify-content:space-between; font-size:14px; }
.facts .row > span:first-child { color:var(--muted); }
/* two columns only when the items table still has room beside the docked list (320px) and the side column */
@media (min-width:1280px) {
  .req-grid { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:28px; align-items:start; }
  .req-side { padding-bottom:8px; }   /* scrolls with the page, no scroll of its own */
  .req-side .next { margin-top:22px; flex-direction:column; align-items:stretch; }
  .req-side .next .btn { width:100%; }
}

/* stepper */
.stepper { list-style:none; display:flex; padding:0; margin:20px 0 4px; }
.stepper li { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; position:relative; font-size:12px; color:var(--muted); }
.stepper li:not(:first-child)::before { content:""; position:absolute; top:13px; right:calc(50% + 16px); width:calc(100% - 32px); height:2px; background:var(--line); }
.stepper .dot { width:28px; height:28px; margin:0; border-radius:50%; display:grid; place-items:center; background:var(--card); border:2px solid var(--line); font-size:12px; font-weight:600; color:var(--muted); }
.stepper li.done .dot { background:var(--ok); border-color:var(--ok); color:#fff; }
.stepper li.done::before, .stepper li.on::before { background:var(--ok); }
.stepper li.on .dot { border-color:var(--accent); color:var(--accent); background:var(--accent-bg); }
.stepper li.on { color:var(--accent); font-weight:600; }
.chip { white-space:nowrap; }
@media (max-width:560px) {
  .page.wide { padding:18px 16px 40px; }
  .req-head { flex-direction:column; gap:8px; }
  .req-head h1 { font-size:20px; }
  .req-head .meta { flex-direction:row; align-items:center; gap:8px; text-align:left; }
}

/* page header (dashboard, new request) */
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:8px; }
.page-head h1 { font-size:22px; font-weight:600; margin:0; }
.page-head .sub, .req-head .sub { color:var(--muted); font-size:14px; margin-top:2px; }
.center { text-align:center; }
.btn.big { width:100%; height:46px; font-size:15px; font-weight:600; }

/* dashboard */
.kpis { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-top:18px; }
.kpi { padding:16px 18px; border-top:3px solid var(--accent); }
.kpi .n { font-size:28px; font-weight:600; line-height:1.1; }
.kpi .k { font-size:13px; color:var(--muted); margin-top:4px; }
.kpi.alert { border-top-color:var(--danger); } .kpi.alert .n { color:var(--danger); }
.section-head { display:flex; align-items:center; gap:10px; margin:28px 0 10px; flex-wrap:wrap; }
.section-head h2 { font-size:16px; font-weight:600; margin:0; }
.count-pill { background:var(--accent-bg); color:var(--accent); border-radius:999px; font-size:12px; font-weight:600; padding:1px 9px; }
.count-pill.alert { background:var(--danger-bg); color:var(--danger); }
.table .tr { display:grid; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line); cursor:pointer; font-size:14px; }
.table .tr:last-child { border-bottom:none; }
.table .tr:not(.th):hover { background:#f9fafb; }
.table .th { cursor:default; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); background:#fafbfc; border-radius:var(--radius) var(--radius) 0 0; }
.table .tr > span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.table .num { text-align:right; }
.table .act { text-align:right; }
.table .approve { grid-template-columns:150px 1.4fr 1fr 1.4fr 1fr 130px 104px; }
.table .late { grid-template-columns:150px 1.4fr 1fr 1fr 1fr 90px; }
.table .pause { grid-template-columns:150px 1.2fr 1fr 2fr 120px; }
.table .empty { padding:16px; color:var(--muted); font-size:14px; }
@media (max-width:1100px) { .kpis { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:720px) {
  .table .th { display:none; }
  .table .tr { grid-template-columns:1fr 1fr !important; row-gap:8px; }
  .table .tr [data-label]::before { content:attr(data-label); display:block; font-size:11px; color:var(--muted); margin-bottom:2px; }
  .table .tr .act { grid-column:1 / -1; } .table .tr .act .btn { width:100%; }
  .table .num { text-align:left; }
}

/* new request */
.form-grid section { display:flex; flex-direction:column; gap:14px; margin-top:18px; }
.step { padding:16px 18px; }
.step.off { opacity:.55; }
.step-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.step-head h2 { font-size:16px; font-weight:600; margin:0; }
.step-head .num { width:26px; height:26px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:600;
                  border:2px solid var(--accent); color:var(--accent); background:var(--accent-bg); }
.step-head .num.done { background:var(--ok); border-color:var(--ok); color:#fff; }
.pick-list { margin-top:6px; box-shadow:none; }
.picked { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:#fafbfc; }
.picked a { color:var(--accent); cursor:pointer; font-size:14px; }
.choices { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:8px; }
.choice { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); cursor:pointer; }
.choice:hover { border-color:#c9ced4; }
.choice.on { border:2px solid var(--accent); padding:9px 11px; background:var(--accent-bg); }
.dept-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px; }
.dept { height:52px; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); font:inherit; font-size:14px; cursor:pointer; color:var(--text); padding:0 8px; }
.dept:hover { border-color:#c9ced4; }
.dept.on { border:2px solid var(--accent); color:var(--accent); background:var(--accent-bg); font-weight:600; }
.pills { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.pill { border:1px solid var(--line); border-radius:999px; background:var(--card); padding:7px 14px; font:inherit; font-size:13px; cursor:pointer; color:var(--text); }
.pill.on { border-color:var(--accent); background:var(--accent); color:#fff; }
.summary { padding:16px 18px; margin-top:18px; }
.summary h2 { font-size:16px; font-weight:600; margin:0 0 6px; }
.summary .row { padding:9px 0; justify-content:space-between; font-size:14px; }
.summary .row > span { color:var(--muted); }
.summary .row strong { text-align:right; }
.summary .btn.big { margin-top:14px; }
.summary .small { margin-top:8px; }
@media (min-width:1280px) {
  .form-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:28px; align-items:start; }
  .form-side { position:sticky; top:calc(var(--top-h) + 16px); }
}
@media (max-width:560px) { .page-head h1 { font-size:20px; } .step { padding:14px; } }

/* invoice card (payment section) */
.invoice { padding:14px 16px; }
.invoice .inv { display:flex; gap:12px; align-items:center; }
.invoice .inv-icon { width:36px; height:36px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--accent-bg); color:var(--accent); }
.invoice .inv-icon.done { background:var(--ok); color:#fff; }
.invoice .inv-icon.wait { background:#f1f3f5; color:var(--muted); }
.invoice .inv-no { font-size:20px; font-weight:600; }
.invoice .inv-confirm { border:1px solid var(--warn); background:var(--warn-bg); border-radius:var(--radius); padding:12px 14px; }

/* waiting for the customer (after the quotation is sent) */
.waiting { display:flex; gap:12px; align-items:center; margin-top:14px; padding:12px 14px; border-radius:var(--radius);
  background:#eaf2fb; border:1px solid #c7dbf2; }
.waiting-icon { width:36px; height:36px; border-radius:50%; display:grid; place-items:center; flex:none; background:#1d5fa8; color:#fff; }
.waiting-title { font-weight:600; font-size:15px; color:#16467c; }
.waiting-sub { font-size:13px; color:var(--muted); margin-top:2px; }
.waiting-sub .ic { vertical-align:-2px; }

/* SLA card (side) */
.sla-card { overflow:hidden; }
.sla-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 12px 10px; }
.sla-pill { font-size:12px; font-weight:600; padding:3px 10px; border-radius:20px; background:var(--accent-bg); color:var(--accent); }
.sla-big { font-size:20px; font-weight:700; }
.sla-bar { height:6px; margin:0 12px 10px; background:#eceef1; border-radius:4px; overflow:hidden; }
.sla-bar > div { height:100%; background:var(--accent); border-radius:4px; }
.sla-card .facts .row:last-child { border-bottom:none; }
.sla-card .facts .row > span:last-child, .sla-card .facts .row > strong { text-align:right; }
.sla-actions { padding:10px 12px 12px; border-top:1px solid var(--line); }
.sla-actions > .btn { width:100%; }
.sla-actions input { width:100%; }
.sla-near .sla-pill { background:var(--warn-bg); color:var(--warn); } .sla-near .sla-bar > div { background:#e0a030; } .sla-near .sla-big { color:var(--warn); }
.sla-late .sla-pill { background:var(--danger-bg); color:var(--danger); } .sla-late .sla-bar > div { background:var(--danger); } .sla-late .sla-big { color:var(--danger); }
.sla-paused .sla-pill { background:#eceef1; color:var(--muted); } .sla-paused .sla-bar > div { background:#a9b0b8; } .sla-paused .sla-big { color:var(--muted); }
.sla-met .sla-pill { background:var(--ok); color:#fff; } .sla-met .sla-big { color:var(--ok); }
/* SLA pause with approval: the request waiting for the supervisor, and the reason / rejection notes */
.sla-pause { margin:0 12px 12px; padding:10px 12px; border-radius:8px; background:#fff7e0; border:1px solid #f0d58a; }
.sla-pause-title { font-weight:600; color:#7a5300; }
.sla-pause-sub { font-size:12.5px; color:var(--muted); margin-top:2px; }
.sla-pause-why { margin:6px 0 2px; white-space:pre-wrap; }
.sla-pause .actions, .sla-pause input { margin-top:8px; } .sla-pause input { width:100%; }
.sla-note { margin:0 12px 10px; padding:8px 10px; border-radius:8px; background:#f3f5f8; font-size:13px; white-space:pre-wrap; }
.sla-note > span { display:block; font-size:12px; color:var(--muted); font-weight:600; }
.sla-note.rejected { background:#fdecec; } .sla-note.rejected > span { color:#b3261e; }
.sla-actions .hint { font-size:12px; color:var(--muted); margin-top:6px; }
.waiting-btn { display:inline-flex; align-items:center; gap:6px; flex:none; background:#fff; color:#1d5fa8; border:1px solid #9fc0e6; font-weight:600; }
.waiting-btn:hover { background:#1d5fa8; color:#fff; border-color:#1d5fa8; }

/* ---------- side bar (site map) ---------- */
.nav { flex-direction:column; gap:2px; padding:8px 10px 16px; }
.sidebar.nav { display:flex; }
.side.nav { display:none; }
@media (min-width:1024px) { .side.nav { display:flex; } }
.nav-head { display:flex; align-items:center; gap:8px; padding:4px 2px 8px; }
.nav-head .grow { flex:1; }
.nav-toggle { width:36px; height:36px; display:grid; place-items:center; border:none; background:transparent; border-radius:var(--radius); cursor:pointer; color:var(--muted); }
.nav-toggle:hover { background:#f1f3f5; color:var(--text); }
.nav-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--radius); color:var(--text); cursor:pointer; font-size:14.5px; font-weight:500; text-decoration:none; white-space:nowrap; position:relative; }
.nav-item:hover { background:#f1f3f5; }
.nav-item.on { background:var(--accent-bg); color:var(--accent); }
.nav-item.on::before { content:""; position:absolute; left:-10px; top:8px; bottom:8px; width:3px; border-radius:0 3px 3px 0; background:var(--accent); }
.nav-text { flex:1; }
.nav-chev { color:var(--muted); display:grid; }
.nav-badge { background:var(--danger); color:#fff; border-radius:10px; font-size:11px; font-weight:600; padding:1px 7px; }
.nav-group { position:relative; }
.nav-views { margin:4px 0 6px 10px; padding:6px; border:1px solid var(--line); border-radius:var(--radius); background:#fafbfc; }
.nav-views-title { font-size:11px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); padding:4px 8px 6px; }
.nav-view { display:flex; flex-direction:column; gap:1px; padding:8px 10px; border-radius:6px; cursor:pointer; color:var(--text); text-decoration:none; }
.nav-view:hover { background:#eef0f2; }
.nav-view.on { background:var(--card); box-shadow:0 0 0 1px var(--line); }
.nav-view.on .nav-view-name { color:var(--accent); }
.nav-view-name { font-size:14px; font-weight:500; display:flex; align-items:center; gap:8px; justify-content:space-between; }
.nav-view-hint { font-size:12px; color:var(--muted); }
@media (min-width:1024px) {
  .shell { grid-template-columns:248px minmax(0,1fr); transition:grid-template-columns .15s; }
  .shell.nav-collapsed { grid-template-columns:64px minmax(0,1fr); }
  .side.nav { overflow:visible; }
  .nav.collapsed { padding:8px 8px 16px; }
  .nav.collapsed .nav-head { justify-content:center; }
  .nav.collapsed .nav-item { justify-content:center; padding:10px 0; }
  .nav.collapsed .nav-text, .nav.collapsed .nav-chev { display:none; }
  .nav.collapsed .nav-item .nav-badge { position:absolute; top:2px; right:2px; padding:0 5px; }
  /* collapsed: the views open as a box beside the bar */
  .nav.collapsed .nav-views { position:absolute; left:calc(100% + 8px); top:0; width:250px; margin:0; background:var(--card); box-shadow:0 8px 24px rgba(16,24,40,.12); z-index:6; }
}

/* ---------- cases page (views) ---------- */
.view-pick { position:relative; }
.view-title { display:flex; align-items:center; gap:6px; border:none; background:transparent; padding:2px 6px 2px 0; cursor:pointer; color:var(--text); border-radius:var(--radius); }
.view-title:hover { background:#eef0f2; }
.view-menu-back { position:fixed; inset:0; z-index:6; }
.view-menu { position:absolute; top:calc(100% + 6px); left:0; width:300px; z-index:7; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 8px 24px rgba(16,24,40,.12); padding:6px; }
.view-opt { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:6px; cursor:pointer; color:var(--text); text-decoration:none; }
.view-opt > span { display:flex; flex-direction:column; }
.view-opt:hover { background:#f1f3f5; }
.view-opt.on { color:var(--accent); }
.view-search { width:300px; max-width:100%; }
.table .cases { grid-template-columns:150px 1.3fr 1fr 1.3fr 1fr 110px 1fr 100px; }
.sla-tag { display:inline-block; font-size:12px; font-weight:600; padding:2px 9px; border-radius:999px; background:var(--accent-bg); color:var(--accent); white-space:nowrap; }
.sla-tag.sla-near { background:var(--warn-bg); color:var(--warn); }
.sla-tag.sla-late { background:var(--danger-bg); color:var(--danger); }
.sla-tag.sla-paused { background:#eceef1; color:var(--muted); }
.sla-tag.sla-met { background:#e6f2e7; color:var(--ok); }
@media (max-width:720px) { .page-head:has(.view-pick) { flex-direction:column; align-items:stretch; } .view-search { width:100%; } }

/* ---------- dashboard charts ---------- */
.seg { display:inline-flex; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:var(--card); }
.seg button { border:none; background:transparent; padding:7px 12px; font-size:13px; cursor:pointer; color:var(--muted); }
.seg button.on { background:var(--accent-bg); color:var(--accent); font-weight:600; }
.kpi.link { cursor:pointer; } .kpi.link:hover { box-shadow:0 0 0 1px var(--accent); }
.charts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }
.chart { padding:16px 18px; min-width:0; }
.chart.wide-chart { grid-column:1 / -1; }
.chart-title { font-size:14px; font-weight:600; margin-bottom:12px; }
.chart-empty { color:var(--muted); font-size:13px; padding:20px 0; }
.hbars { display:flex; flex-direction:column; gap:9px; }
.hbar { display:grid; grid-template-columns:130px minmax(0,1fr) 36px; align-items:center; gap:10px; font-size:13px; }
.hbar-label { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hbar-track { height:12px; background:#f1f3f5; border-radius:4px; overflow:hidden; }
.hbar-fill { display:block; height:100%; background:#2a78d6; border-radius:0 4px 4px 0; }
.hbar:hover .hbar-fill { background:#1f63b5; }
.hbar-n { text-align:right; font-weight:600; font-variant-numeric:tabular-nums; }
.donut-wrap { display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.donut { width:150px; height:150px; flex:none; }
.donut circle[stroke-dasharray]:hover { stroke-width:22; }
.donut-n { font-size:26px; font-weight:700; fill:var(--text); }
.donut-k { font-size:11px; fill:var(--muted); }
.legend { display:flex; flex-direction:column; gap:7px; flex:1; min-width:150px; }
.legend-row { display:grid; grid-template-columns:12px 1fr auto; align-items:center; gap:8px; font-size:13px; }
.legend-dot { width:10px; height:10px; border-radius:3px; }
.cols { width:100%; height:180px; display:block; }
.cols rect:hover + rect, .cols g:hover rect[rx] { fill:#1f63b5; }
.cols .axis { font-size:10px; fill:var(--muted); }
@media (max-width:820px) { .charts { grid-template-columns:minmax(0,1fr); } .hbar { grid-template-columns:110px minmax(0,1fr) 32px; } }
.cols { height:150px; }
.cols-axis { position:relative; height:18px; margin-top:4px; font-size:11px; color:var(--muted); }
.cols-axis span { position:absolute; transform:translateX(-50%); white-space:nowrap; }
.cols-axis span.end { transform:translateX(-100%); } .cols-axis span.start { transform:none; }
h1:focus, h1:focus-visible { outline:none; }
.seg button { white-space:nowrap; }
@media (max-width:560px) { .page-head:has(.seg) { flex-direction:column; align-items:flex-start; } }

/* new request: anonymous / public area */
.anon-toggle { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; margin-bottom:14px; cursor:pointer; }
.anon-toggle input { width:18px; height:18px; margin-top:2px; accent-color:var(--accent); flex:none; }
.anon-toggle > span { display:flex; flex-direction:column; gap:2px; }
.anon-toggle.on { border-color:var(--accent); background:var(--accent-bg); }
.anon-tag { display:inline-block; font-size:12px; font-weight:600; padding:2px 9px; border-radius:999px; background:#eef0f2; color:var(--muted); margin-left:8px; vertical-align:middle; }
.nav-item { font-size:15px; }
.nav-item .ic, .nav-toggle .ic { flex:none; }
.nav-toggle { width:40px; height:40px; }

/* App gate: choose the app / no access (one web app for the Makadi teams) */
.gate { max-width: 520px; margin: 48px auto; text-align: center; }
.gate h1 { margin-bottom: 8px; }
.gate-apps { display: grid; gap: 10px; margin-top: 18px; }
.gate-app { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }

/* Send panel: which WhatsApp account to send from (App Configuration: WhatsApp Business Number) */
.wa-sender { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #e8f7ee; border: 1px solid #b6e2c6; font-size: 13px; }

/* app gate: choose the app / no access / loading, a centred card */
.gate-wrap { min-height:calc(100vh - var(--top-h) - 40px); display:grid; place-items:center; padding:24px 16px; }
.gate-card { width:100%; max-width:440px; background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:0 8px 24px rgba(16,24,40,.08); padding:28px 26px; text-align:center; }
.gate-card h1 { font-size:22px; margin:12px 0 6px; }
.gate-card p { margin:0 0 18px; line-height:1.5; }
.gate-logo { width:44px; height:44px; border-radius:12px; background:var(--accent); color:#fff; display:inline-grid; place-items:center; font-weight:700; font-size:20px; }
.gate-apps { display:grid; gap:10px; text-align:left; }
.gate-app { display:flex; align-items:center; gap:14px; width:100%; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--card); cursor:pointer; font:inherit; color:var(--text); transition:border-color .15s, background .15s; }
.gate-app:hover { border-color:var(--accent); background:var(--accent-bg); }
.gate-app-mark { width:40px; height:40px; border-radius:10px; background:var(--accent-bg); color:var(--accent); display:grid; place-items:center; font-weight:700; flex:none; }
.gate-app-name { flex:1; font-weight:600; text-align:left; }
/* no side bar (choosing the app, no access): the page takes the whole width */
.shell > main.content:only-child { grid-column:1 / -1; }

/* Community Management profiles (unit, customer): main column + side column; one column on a phone */
.profile-grid { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:24px; margin-top:4px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns:1fr; } }
.link-row { cursor:pointer; color:inherit; text-decoration:none; }
a.link-row, .row.link-row { display:flex; }
.link-row:hover { background:var(--accent-bg); }
.row a { color:var(--accent); text-decoration:none; }
.row a:hover { text-decoration:underline; }
.empty { padding:14px; color:var(--muted); font-size:14px; }

/* Community Management list screens */
.pager { display:flex; align-items:center; gap:8px; padding:10px 0; }
.table .units { grid-template-columns:1.3fr 1fr 1fr .8fr .8fr 1.3fr 1.3fr; }
.table .customers { grid-template-columns:1.5fr 1fr 1.5fr 1.4fr 110px 100px; }
.table .blocked { grid-template-columns:1.4fr 1fr 2fr 110px 1fr; }
.table .tenancies { grid-template-columns:1.3fr 1.3fr 1.2fr 110px 110px 100px 100px; }
.table .kycs { grid-template-columns:1.5fr 1.2fr 1fr 1.2fr 110px; }
.form-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-top:12px; }
.form-section h3 { font-size:14px; margin:18px 0 8px; }
.facts .row > span:first-child { color:var(--muted); min-width:180px; }
.grid-scroll { overflow-x:auto; }
.mini-table { width:100%; border-collapse:collapse; font-size:13px; }
.mini-table th, .mini-table td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
.mini-table th { color:var(--muted); font-weight:600; font-size:12px; }
.form-grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media (max-width:700px) { .form-grid-2 { grid-template-columns:1fr; } }

/* buttons and tabs used by the Community Management screens */
a.btn { display:inline-flex; align-items:center; gap:6px; text-decoration:none; white-space:nowrap; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.btn.danger { color:#fff; border:none; }
.page-head { flex-wrap:wrap; gap:12px; }
.page-head .btn { flex:none; }
.seg { gap:0; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:3px; }
.seg > button { height:32px; padding:0 14px; border:none; background:none; border-radius:calc(var(--radius) - 2px); cursor:pointer; font:inherit; font-size:13px; color:var(--muted); }
.seg > button.on { background:var(--accent-bg); color:var(--accent); font-weight:600; }
.seg > button:hover:not(.on) { color:var(--text); }
.back { display:inline-flex; align-items:center; gap:4px; font-size:13px; color:var(--muted); text-decoration:none; margin-bottom:4px; }
.back:hover { color:var(--accent); }
label > input, label > select { margin-top:4px; }
.form-grid-2 label { font-size:13px; color:var(--muted); }

/* a CRM form shown in the app */
.crm-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-top:16px; overflow-x:auto; }
.crm-tabs button { border:none; background:none; padding:10px 14px; font:inherit; font-size:14px; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; }
.crm-tabs button.on { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.crm-section { margin-top:16px; }
.crm-section h3 { font-size:13px; font-weight:600; color:var(--text); margin:0 0 8px; }
.crm-fields { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.crm-field { background:var(--card); padding:10px 12px; min-width:0; }
.crm-field .k { font-size:12px; color:var(--muted); margin-bottom:3px; }
.crm-field .v { font-size:14px; word-break:break-word; }
.crm-field .v.empty { color:#b5bac1; }
.crm-toolbar { display:flex; align-items:center; gap:8px; margin-top:12px; font-size:13px; color:var(--muted); }
.crm-toolbar input { width:auto; }
.sample-banner { background:#fff7e0; color:#7a5300; border-radius:var(--radius); padding:10px 14px; margin-top:12px; font-size:13px; }
.crm-fields { background:var(--card); }
.crm-field { box-shadow:0 0 0 1px var(--line); }

/* larger text and icons across the app (2026-11-11: the team found them too small) */
html { font-size:16px; }
body { font-size:15px; }
.shell { zoom:1.08; }
.small { font-size:13px; }
.label { font-size:13px; }
.nav-item svg { width:22px; height:22px; }

/* case page: side card, actions as real buttons, action forms, journey */
.status-pill { display:inline-flex; align-items:center; height:26px; padding:0 10px; border-radius:13px; font-size:13px; font-weight:600; background:#e8f0fe; color:#1a56c4; }
.status-pill.done { background:#e3f4e8; color:#1e7b3c; }
.status-pill.cancelled { background:#f1f2f4; color:#5f6670; }
.req-side { display:flex; flex-direction:column; gap:12px; }
.side-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.side-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 14px; border-bottom:1px solid var(--line); font-size:14px; }
.side-row:last-child { border-bottom:none; }
.side-row > span:first-child { color:var(--muted); }
.side-title { font-size:13px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); margin-top:8px; }
.action-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.btn.action { height:46px; justify-content:flex-start; padding:0 14px; font-size:14px; font-weight:500; width:100%; }
.btn.action svg { flex:none; }
.btn.action.on { border-color:var(--accent); background:var(--accent-bg); color:var(--accent); }
.btn.action.primary.on { background:#195c4c; color:#fff; }
.btn.danger-outline { color:var(--danger); border-color:#f0c4c4; }
.btn.danger-outline:hover:not(:disabled) { border-color:var(--danger); }
.action-panel { background:var(--card); border:1px solid var(--accent); border-radius:var(--radius); padding:14px; display:flex; flex-direction:column; gap:10px; box-shadow:var(--shadow); }
.action-panel .panel-title { font-weight:600; font-size:15px; }
.action-panel .actions { display:flex; gap:8px; margin-top:4px; }
.picked { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--accent-bg); }
.picked .muted { flex:1; }
.link-btn { border:none; background:none; color:var(--accent); cursor:pointer; font:inherit; font-size:13px; padding:0; }
.journey { margin-top:16px; position:relative; }
.journey-stats { display:flex; gap:18px; flex-wrap:wrap; font-size:14px; color:var(--muted); background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:12px 14px; margin-bottom:12px; }
.journey-stats strong { color:var(--text); }
.jv { display:flex; gap:12px; position:relative; padding-bottom:18px; }
.jv:not(:last-child)::before { content:""; position:absolute; left:17px; top:36px; bottom:0; width:2px; background:var(--line); }
.jdot { flex:none; width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:#eef0f3; color:var(--muted); }
.jv-assign .jdot { background:var(--accent-bg); color:var(--accent); }
.jv-status .jdot { background:#e8f0fe; color:#1a56c4; }
.jbody { flex:1; min-width:0; padding-top:6px; }
.jt { font-size:14px; }
.jm { font-size:13px; color:var(--muted); margin-top:3px; }
.jf { margin-top:8px; background:var(--card); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:6px; padding:8px 10px; font-size:14px; white-space:pre-wrap; }
.pill { display:inline-block; padding:1px 8px; border-radius:10px; background:#eef0f3; font-size:13px; }
.count-pill { display:inline-block; min-width:20px; padding:0 6px; border-radius:10px; background:#eef0f3; font-size:12px; margin-left:4px; text-align:center; }
@media (max-width:700px) { .action-grid { grid-template-columns:1fr; } }
.table .igouna { grid-template-columns:1fr 110px; }
/* tables become cards when the content is too narrow for their columns (window under ~1200px with the side bar) */
@media (max-width:1200px) {
  .table .th { display:none; }
  .table .tr { grid-template-columns:repeat(auto-fill,minmax(160px,1fr)) !important; row-gap:8px; }
  .table .tr [data-label]::before { content:attr(data-label); display:block; font-size:12px; color:var(--muted); margin-bottom:2px; }
  .table .tr .act { grid-column:1 / -1; } .table .tr .act .btn { width:100%; }
  .table .num { text-align:left; }
}
.view-only { display:flex; gap:10px; align-items:flex-start; background:#eef4ff; color:#1a3f7a; border:1px solid #cfe0ff; border-radius:var(--radius); padding:12px 14px; font-size:14px; }
.view-only svg { flex:none; margin-top:2px; }

/* ---------- 2026-11-12 layout pass (testing notes): standard top bar, full-width pages, every screen size ---------- */
:root { --top-h:64px; --panel:#eef4f1; --panel-line:#d3e4dc; --gutter:clamp(16px, 2.6vw, 40px); }
.shell { zoom:normal; }                                  /* sizes are set directly now, zoom broke sticky bars and 100vh */
html { font-size:16px; -webkit-text-size-adjust:100%; }
body { font-size:16px; line-height:1.5; }
.small { font-size:14px; } .muted.small { font-size:14px; }
.top { height:var(--top-h); padding:0 var(--gutter); gap:14px; box-shadow:0 1px 0 var(--line); }
.brand { font-size:18px; }
.brand .logo { width:38px; height:38px; font-size:18px; border-radius:10px; }
.btn { height:44px; padding:0 18px; font-size:15px; font-weight:500; }
.btn.primary { font-weight:600; }
.icon-btn { width:44px; height:44px; }
input, textarea, select { font-size:16px; padding:10px 12px; min-height:44px; }
textarea { min-height:96px; }

/* pages use the whole width beside the side bar, with comfortable gutters */
.page, .page.wide { max-width:1680px; padding:24px var(--gutter) 56px; }
.page-head h1, .req-head h1 { font-size:26px; }
.page-head .sub, .req-head .sub { font-size:15px; }
.label { font-size:13px; margin-top:26px; }
.row { padding:12px 16px; }
.table .tr { padding:14px 18px; font-size:15px; }
.table .th { font-size:13px; }

/* Back: a real button on every detail page */
.back-btn { display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 14px 0 10px; margin:0 0 12px; border:1px solid var(--line);
            border-radius:999px; background:var(--card); color:var(--text); font:inherit; font-size:15px; font-weight:500; cursor:pointer; }
.back-btn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-bg); }
.back-btn:focus-visible, .btn:focus-visible, .nav-item:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* the right column of a record (case, unit, customer): its own tinted panel so it reads as a separate area */
.req-side, .profile-grid > aside { background:var(--panel); border:1px solid var(--panel-line); border-radius:12px; padding:16px; align-self:start; }
.profile-grid > aside > .label:first-child, .req-side > :first-child { margin-top:0; }
@media (min-width:1280px) { .req-grid { grid-template-columns:minmax(0,1fr) 400px; gap:28px; } .req-side { position:sticky; top:calc(var(--top-h) + 16px); max-height:calc(100vh - var(--top-h) - 32px); overflow:auto; } }
.profile-grid { grid-template-columns:minmax(0,1fr) 400px; }
@media (max-width:1100px) { .profile-grid { grid-template-columns:1fr; } }

/* content fills its box: choice boxes grow with their text instead of a fixed height */
.dept { height:auto; min-height:56px; padding:10px 12px; white-space:normal; line-height:1.3; overflow-wrap:anywhere; text-align:center; }
.dept-grid { grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); }
.choice, .pill, .chip, .status-pill, .sla-tag { overflow-wrap:anywhere; }
.pill { white-space:normal; }
.status-pill { height:auto; min-height:28px; padding:2px 12px; }

/* CRM form fields */
.crm-fields { grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); }
.crm-field .k { font-size:13px; } .crm-field .v { font-size:15px; }
.crm-tabs button { font-size:15px; padding:12px 16px; }
.mini-table { font-size:14px; }
.mini-table tr.link-tr { cursor:pointer; } .mini-table tr.link-tr:hover td { background:var(--accent-bg); }

/* tablet and phone */
@media (max-width:1023px) {
  :root { --top-h:56px; }
  .req-side { position:static; max-height:none; }
}
@media (max-width:560px) {
  .page, .page.wide { padding:16px 16px 40px; }
  .page-head { flex-direction:column; align-items:stretch; }
  .page-head .btn, .page-head .search, .page-head .view-search { width:100%; }
  .page-head h1, .req-head h1 { font-size:22px; }
  .top .btn { min-width:44px; padding:0 12px; }
  .crm-fields { grid-template-columns:1fr; }
  .form-grid-2 { grid-template-columns:1fr; }
  .action-grid { grid-template-columns:1fr 1fr; }
  .pager { flex-wrap:wrap; } .pager .btn { flex:1; }
  .back-btn { margin-bottom:8px; }
  .kpis { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (prefers-reduced-motion:reduce) { * { transition:none !important; animation:none !important; } }
.field-note { margin-top:6px; font-size:13px; line-height:1.4; color:#7a5300; background:#fff7e0; border-radius:6px; padding:6px 8px; }
.block-title { font-size:17px; font-weight:600; margin:28px 0 0; }
/* lookup picker (type to search, as a CRM lookup) and the new contact form */
.lookup { position:relative; margin-top:4px; }
.lookup-menu { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:8; max-height:300px; overflow:auto; background:var(--card);
               border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 8px 24px rgba(16,24,40,.12); padding:4px; }
.lookup-opt { padding:10px 12px; border-radius:6px; cursor:pointer; font-size:15px; color:var(--text); }
.lookup-opt:hover, .lookup-opt.hi { background:var(--accent-bg); }
.lookup-picked { display:flex; align-items:center; gap:10px; min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--accent-bg); }
.req { color:var(--danger); font-weight:600; }
.new-contact .form-grid-2 { margin-top:10px; }
.form-grid-2 label { display:block; font-size:14px; color:var(--muted); }
.form-grid-2 label > input, .form-grid-2 label > select, .form-grid-2 label > textarea, .form-grid-2 label > .lookup { display:block; width:100%; margin-top:4px; }
.form-grid-2 .span-2 { grid-column:1 / -1; }
/* "New …" buttons inside a record page (no need to go back to the list) */
.head-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.head-bar { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.page-head > .head-actions { align-self:flex-end; }
@media (max-width:560px) { .head-actions { width:100%; } .head-actions .btn { flex:1 1 auto; } }
/* dashboard: sections after the case charts */
.dash-section { font-size:19px; font-weight:600; margin:36px 0 4px; padding-top:20px; border-top:1px solid var(--line); }
.kpis.kpis-3 { grid-template-columns:repeat(3,minmax(0,1fr)); } .kpis.kpis-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.kpi.warn { border-top-color:#eda100; } .kpi.warn .n { color:var(--warn); }
.kpi-inline { display:flex; gap:40px; align-items:center; height:100%; padding:8px 4px; }
.kpi-inline .n { font-size:36px; font-weight:700; line-height:1.1; } .kpi-inline .n.alert { color:var(--danger); }
.kpi-inline .k { color:var(--muted); font-size:14px; } .kpi-inline.link { cursor:pointer; }
@media (max-width:820px) { .kpis.kpis-3, .kpis.kpis-4 { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* survey response: answers and the rating */
.answer { padding:14px 16px; border-bottom:1px solid var(--line); } .answer:last-child { border-bottom:none; }
.answer .q { font-size:14px; color:var(--muted); margin-bottom:4px; } .answer .a { font-size:16px; white-space:pre-wrap; }
.stars { display:flex; align-items:center; gap:2px; font-size:24px; color:#d5d9de; line-height:1; } .stars .on { color:#eda100; } .stars .muted { margin-left:8px; }
.survey-score { display:inline-block; font-weight:700; font-size:13px; padding:2px 10px; border-radius:999px; background:#eef0f3; }
.survey-score.good { background:#e3f4e8; color:#1e7b3c; } .survey-score.mid { background:var(--warn-bg); color:var(--warn); }
.survey-score.bad { background:var(--danger-bg); color:var(--danger); }

/* side bar: scrolls on its own when the menu (with the case views open) is taller than the window */
@media (min-width:1024px) {
  .side.nav:not(.collapsed) { overflow-y:auto; overscroll-behavior:contain; }
  .side.nav { scrollbar-width:thin; }
}
.sidebar.nav { overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* ---------- surveys: board (ring, figures, filters, rows) and the survey response page ---------- */
.ring { position:relative; flex:none; }
.ring svg { width:100%; height:100%; display:block; }
.ring-track { fill:none; stroke:#e9ecef; stroke-width:11; }
.ring-fill { fill:none; stroke-width:11; stroke-linecap:round; transition:stroke-dasharray .5s ease; }
.ring-good .ring-fill { stroke:#2e7d32; } .ring-mid .ring-fill { stroke:#e0a030; } .ring-bad .ring-fill { stroke:#d1403f; }
.ring-text { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1.1; }
.ring-n { font-weight:700; font-variant-numeric:tabular-nums; }
.ring-good .ring-n { color:#1e7b3c; } .ring-mid .ring-n { color:var(--warn); } .ring-bad .ring-n { color:var(--danger); } .ring-none .ring-n { color:var(--muted); }
.ring-l { font-size:12px; color:var(--muted); margin-top:2px; }

.sv-top { display:grid; grid-template-columns:minmax(320px,440px) minmax(0,1fr); gap:14px; margin-top:16px; }
.sv-score { display:flex; align-items:center; gap:20px; padding:18px 20px; }
.sv-score-title { font-size:17px; font-weight:600; }
.sv-rate { margin-top:14px; }
.sv-rate-bar { height:8px; border-radius:4px; background:#e9ecef; overflow:hidden; margin-bottom:6px; min-width:180px; }
.sv-rate-bar span { display:block; height:100%; background:var(--accent); border-radius:4px; }
.sv-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.sv-kpi { display:flex; flex-direction:column; justify-content:center; gap:6px; padding:16px 18px; text-align:left; font:inherit; color:var(--text); cursor:pointer; border-left:4px solid var(--line); }
.sv-kpi .n { font-size:32px; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.sv-kpi .k { font-size:14px; color:var(--muted); }
.sv-kpi.ok { border-left-color:#2e7d32; } .sv-kpi.wait { border-left-color:#e0a030; } .sv-kpi.bad { border-left-color:#d1403f; } .sv-kpi.all { border-left-color:var(--accent); }
.sv-kpi:hover { border-color:#c9ced4; } .sv-kpi.on { background:var(--accent-bg); box-shadow:0 0 0 2px var(--accent); }
.sv-kpi:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.sv-filters { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:16px; }
.sv-filters select { width:auto; min-width:220px; max-width:100%; }
.sv-filters .search { flex:1; min-width:220px; }
.table .surveys { grid-template-columns:1.5fr 1.5fr 1.3fr 130px 110px 190px; }
.sv-sub { display:block; }
.sv-bar { display:flex; align-items:center; gap:10px; }
.sv-bar-track { flex:1; height:8px; border-radius:4px; background:#e9ecef; overflow:hidden; min-width:60px; }
.sv-bar-track span { display:block; height:100%; border-radius:4px; }
.sv-bar strong { min-width:44px; text-align:right; font-variant-numeric:tabular-nums; }
.sv-good .sv-bar-track span { background:#2e7d32; } .sv-mid .sv-bar-track span { background:#e0a030; } .sv-bad .sv-bar-track span { background:#d1403f; }
.sv-good strong { color:#1e7b3c; } .sv-mid strong { color:var(--warn); } .sv-bad strong { color:var(--danger); }

.sv-hero { display:flex; align-items:center; gap:28px; padding:24px 28px; border-top:4px solid var(--line); }
.sv-hero.sv-good { border-top-color:#2e7d32; } .sv-hero.sv-mid { border-top-color:#e0a030; } .sv-hero.sv-bad { border-top-color:#d1403f; }
.sv-hero-main { flex:1; min-width:0; }
.sv-hero-survey { font-size:14px; color:var(--muted); }
.sv-hero h1 { font-size:28px; font-weight:600; margin:2px 0 8px; overflow-wrap:anywhere; }
.sv-hero-verdict { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:17px; }
.sv-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px 24px; margin:18px 0 0; padding-top:16px; border-top:1px solid var(--line); }
.sv-facts dt { font-size:13px; color:var(--muted); } .sv-facts dd { margin:2px 0 0; font-size:15px; overflow-wrap:anywhere; }
.sv-facts a { color:var(--accent); text-decoration:none; } .sv-facts a:hover { text-decoration:underline; }
.sv-answers { display:grid; grid-template-columns:repeat(auto-fill,minmax(420px,1fr)); gap:12px; margin-top:12px; }
.sv-qa { padding:16px 18px; }
.sv-q { display:flex; gap:10px; font-size:15px; color:var(--muted); margin-bottom:10px; line-height:1.4; }
.sv-num { flex:none; width:26px; height:26px; border-radius:50%; background:var(--accent-bg); color:var(--accent); display:grid; place-items:center; font-size:13px; font-weight:700; }
.sv-a { font-size:16px; } .sv-text { white-space:pre-wrap; border-left:3px solid var(--accent); padding:4px 0 4px 12px; overflow-wrap:anywhere; }
.sv-qa .stars { font-size:28px; gap:3px; } .sv-qa .stars .sv-a { margin-left:12px; font-size:15px; }
.sv-scale { display:grid; grid-template-columns:repeat(11,minmax(0,1fr)); gap:4px; margin-bottom:8px; max-width:440px; }
.sv-scale span { height:34px; border-radius:6px; background:#f1f3f5; color:var(--muted); display:grid; place-items:center; font-size:14px; font-variant-numeric:tabular-nums; }
.sv-scale span.on { color:#fff; font-weight:700; } .sv-scale .good { background:#2e7d32; } .sv-scale .mid { background:#e0a030; } .sv-scale .bad { background:#d1403f; }
.sv-chips { display:flex; flex-wrap:wrap; gap:8px; }
.sv-chips span { padding:6px 12px; border-radius:999px; background:var(--accent-bg); color:var(--accent); font-size:15px; font-weight:500; }
.sv-form { margin-top:28px; border-top:1px solid var(--line); padding-top:14px; }
.sv-form summary { cursor:pointer; font-size:15px; font-weight:600; color:var(--muted); padding:6px 0; }
.sv-form summary:hover { color:var(--text); }
@media (max-width:1200px) { .sv-top { grid-template-columns:1fr; } }
@media (max-width:700px) {
  .sv-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sv-hero { flex-direction:column; align-items:flex-start; padding:20px 16px; gap:16px; }
  .sv-hero h1 { font-size:22px; }
  .sv-answers { grid-template-columns:1fr; }
  .sv-filters > * { width:100%; } .sv-filters select { min-width:0; }
  .sv-score { flex-direction:column; align-items:flex-start; }
  .sv-scale span { height:30px; font-size:12px; }
}

/* Send reminder (surveys) */
.rem { display:inline-flex; flex-direction:column; gap:6px; align-items:flex-start; }
.btn.small-btn { height:34px; padding:0 12px; font-size:14px; }
.rem-ask { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:14px; }
.rem-ok { display:inline-flex; gap:6px; align-items:center; color:#1e7b3c; font-size:14px; }
.rem-err { color:var(--danger); font-size:13px; max-width:320px; }
.table .tr.surveys { align-items:start; }
.table .surveys { grid-template-columns:1.4fr 1.4fr 1.2fr 190px 110px 170px; }

/* New tenancy: the type the CRM will set, easy to read */
.term-note { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:12px; font-size:16px; }
.term-note strong { font-weight:700; }
.term-note .term-type { font-size:18px; padding:5px 14px; border-radius:999px; background:var(--accent-bg); color:var(--accent); }
.term-note .muted { font-size:14px; }

/* Block / release, marketing lists and campaigns */
.viol-head { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.block-form { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.block-form label { display:block; font-size:14px; color:var(--muted); }
.block-form label > input, .block-form label > select, .block-form label > textarea, .block-form label > .lookup { display:block; width:100%; margin-top:4px; }
.block-panel { margin-top:16px; border-left:4px solid var(--danger); }
.block-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }
.warn-note { background:var(--warn-bg); color:var(--warn); border-radius:var(--radius); padding:10px 12px; font-size:14px; display:flex; flex-direction:column; gap:6px; }
.check-row { display:flex; gap:10px; align-items:center; font-size:15px; cursor:pointer; }
.check-row > input[type=checkbox] { width:18px; height:18px; min-height:0; padding:0; margin:0; flex:none; accent-color:var(--accent); }
.camp-form { display:flex; flex-direction:column; gap:12px; margin-top:16px; border-left:4px solid var(--accent); }
.camp-form label { display:block; font-size:14px; color:var(--muted); }
.camp-form label > input, .camp-form label > textarea, .camp-form label > .lookup { display:block; width:100%; margin-top:4px; }
.camp-form .seg { align-self:flex-start; }
.camp-kpis { margin-top:16px; } .camp-kpis .sv-kpi { cursor:default; }
.table .mlists { grid-template-columns:2fr 130px 190px 130px; }
.table .members { grid-template-columns:1.4fr 1.6fr 1fr 100px; }
.table .campaigns { grid-template-columns:1.8fr 1.4fr 130px 100px 80px 80px 150px; }
.table .campaigns.no-list { grid-template-columns:2fr 130px 100px 80px 80px 150px; }
.table .cmails { grid-template-columns:1.6fr 1.8fr 130px 150px; cursor:default; }
.table .tr.mlists, .table .tr.members, .table .tr.campaigns { align-items:start; }
