/* ------------------------------------------------------------------------
   Project Meridian Data Room - design system

   Hand-written rather than Tailwind on purpose. The working Optra sample ships
   a PRE-BUILT styles.min.css; the platform does not run a Tailwind build, so a
   utility framework would mean either committing a compiled bundle or pulling
   the play CDN at runtime. Plain CSS keeps the app self-contained and removes a
   class of publish-time failure.

   The palette is deliberately not DocuShare's. A data room is branded for the
   engagement, and that is the point being demonstrated: DocuShare is the ECM
   underneath, Optra is the face the deal team sees.
   ------------------------------------------------------------------------ */

:root {
  --navy:        #15243d;
  --navy-800:    #1d3153;
  --navy-600:    #2a4570;
  --gold:        #b08544;
  --gold-soft:   #d9bc86;
  --gold-wash:   #faf7f1;

  --ink:         #1a1f28;
  --ink-2:       #414b5a;
  --ink-3:       #6b7687;
  --line:        #dde2ea;
  --line-soft:   #edf0f5;
  --paper:       #ffffff;
  --canvas:      #f5f7fa;

  --ok:          #1f7a4d;
  --ok-wash:     #e8f5ee;
  --warn:        #9a6a10;
  --warn-wash:   #fdf4e0;
  --stop:        #a32b2b;
  --stop-wash:   #fbecec;

  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 2px rgba(21, 36, 61, .06), 0 6px 20px rgba(21, 36, 61, .07);
  --shadow-lg:   0 10px 40px rgba(21, 36, 61, .16);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Alpine sets this until it has initialised; without it the raw template
   markup flashes on screen before the bindings resolve. */
[x-cloak] { display: none !important; }

/* ---------------------------------------------------------------- header */

.dr-top {
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}

.dr-top-in {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  flex-wrap: wrap;
}

.dr-mark {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
}

.dr-mark-glyph {
  width: 32px; height: 32px;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .5px;
  flex: none;
}

.dr-mark-name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .2px;
  line-height: 1.15;
}

.dr-mark-sub {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--gold-soft);
  margin-top: 1px;
}

.dr-nav { display: flex; gap: 2px; margin-left: 8px; flex-wrap: wrap; }

.dr-nav a {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: rgba(255, 255, 255, .78);
  white-space: nowrap;
}

.dr-nav a:hover { background: rgba(255, 255, 255, .09); color: #fff; }

.dr-nav a.is-on {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--gold);
}

.dr-top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* persona switcher ------------------------------------------------------- */

.dr-who {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 5px 7px 5px 13px;
}

.dr-who-txt { text-align: right; line-height: 1.2; }
.dr-who-name { font-size: 12.5px; font-weight: 600; }
.dr-who-org { font-size: 10.5px; color: var(--gold-soft); }

.dr-who select {
  background: var(--navy-800);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  max-width: 190px;
}

/* room window banner ----------------------------------------------------- */

.dr-window {
  background: var(--navy-800);
  color: rgba(255, 255, 255, .9);
  font-size: 12.5px;
}

.dr-window-in {
  max-width: 1400px; margin: 0 auto; padding: 8px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}

.dr-window.is-shut { background: #5d1f1f; }

.dr-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #48c98a; flex: none;
  box-shadow: 0 0 0 3px rgba(72, 201, 138, .22);
}

.dr-window.is-shut .dr-dot {
  background: #ef8b8b; box-shadow: 0 0 0 3px rgba(239, 139, 139, .22);
}

.dr-window-spacer { margin-left: auto; }

.dr-clock {
  font-family: var(--mono); font-size: 12px;
  background: rgba(0, 0, 0, .22);
  border-radius: 4px; padding: 2px 7px;
}

/* ------------------------------------------------------------------ shell */

.dr-wrap { max-width: 1400px; margin: 0 auto; padding: 24px; }

.dr-page-head { margin-bottom: 20px; }

.dr-h1 {
  font-family: var(--serif);
  font-size: 26px; font-weight: 600; color: var(--navy);
  margin: 0 0 5px; letter-spacing: .2px;
}

.dr-lede { color: var(--ink-3); font-size: 13.5px; margin: 0; max-width: 80ch; }

.dr-eyebrow {
  text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 10.5px; font-weight: 700; color: var(--gold);
  margin-bottom: 7px;
}

/* ------------------------------------------------------------------ cards */

.dr-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dr-card-hd {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px;
}

.dr-card-ti {
  font-weight: 650; font-size: 13.5px; color: var(--navy);
  display: flex; align-items: center; gap: 8px;
}

.dr-card-bd { padding: 16px; }

/* ------------------------------------------------------------------- KPIs */

.dr-kpis {
  display: grid; gap: 14px; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.dr-kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow);
}

.dr-kpi-lbl {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px;
  color: var(--ink-3); font-weight: 650;
}

.dr-kpi-val {
  font-family: var(--serif);
  font-size: 30px; color: var(--navy); line-height: 1.12; margin-top: 5px;
}

.dr-kpi-note { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ------------------------------------------------------------ workstreams */

.dr-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.dr-ws {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: block;
  transition: border-color .13s, transform .13s, box-shadow .13s;
}

.dr-ws:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.dr-ws.is-locked { opacity: .55; }
.dr-ws.is-locked:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow); }

.dr-ws-top { display: flex; align-items: flex-start; gap: 11px; }

.dr-ws-code {
  font-family: var(--serif); font-size: 17px;
  color: var(--gold); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-wash);
}

.dr-ws-name { font-weight: 650; color: var(--navy); font-size: 14px; }
.dr-ws-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.dr-ws-foot {
  margin-top: 13px; padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-3);
}

/* progress --------------------------------------------------------------- */

.dr-bar {
  height: 5px; background: var(--line-soft);
  border-radius: 99px; overflow: hidden; margin-top: 10px;
}

.dr-bar-fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width .3s; }
.dr-bar-fill.is-done { background: var(--ok); }

/* ------------------------------------------------------------------ chips */

.dr-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 650;
  padding: 2px 8px; border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2);
  white-space: nowrap;
}

.dr-chip.is-ok   { background: var(--ok-wash);   color: var(--ok);   border-color: #bfe3d0; }
.dr-chip.is-warn { background: var(--warn-wash); color: var(--warn); border-color: #edd9a8; }
.dr-chip.is-stop { background: var(--stop-wash); color: var(--stop); border-color: #eebdbd; }
.dr-chip.is-navy { background: #eef2f8;          color: var(--navy-600); border-color: #cfdaea; }

.dr-chip-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

/* ------------------------------------------------------------------ table */

.dr-split {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dr-side { position: sticky; top: 16px; }

.dr-side-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  border: 1px solid transparent;
}

.dr-side-item:hover { background: var(--line-soft); }

.dr-side-item.is-on {
  background: var(--gold-wash);
  border-color: var(--gold-soft);
  color: var(--navy); font-weight: 650;
}

.dr-side-item.is-locked { opacity: .45; cursor: not-allowed; }
.dr-side-item.is-locked:hover { background: transparent; }

.dr-side-code {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); flex: none;
}

.dr-side-n {
  margin-left: auto; font-size: 11px; color: var(--ink-3);
  background: var(--line-soft); border-radius: 99px; padding: 1px 7px;
}

.dr-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.dr-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--ink-3); font-weight: 700;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  background: #fbfcfd; white-space: nowrap;
}

.dr-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.dr-table tbody tr { cursor: pointer; }
.dr-table tbody tr:hover { background: #fafbfd; }
.dr-table tbody tr.is-on { background: var(--gold-wash); }

.dr-doc-ti { font-weight: 600; color: var(--navy); }
.dr-doc-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.dr-handle {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}

.dr-num { text-align: right; font-variant-numeric: tabular-nums; }

/* denied row ------------------------------------------------------------- */

.dr-table tbody tr.is-denied { cursor: not-allowed; background: #fcfcfd; }
.dr-table tbody tr.is-denied .dr-doc-ti { color: var(--ink-3); font-weight: 500; }
.dr-table tbody tr.is-denied:hover { background: #fcfcfd; }

/* ---------------------------------------------------------------- viewer */

.dr-viewer { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }

.dr-pdf {
  background: #e9edf3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 460px;
  padding: 16px;
  position: relative;
  overflow: auto;
  max-height: 78vh;
}

.dr-pdf canvas {
  display: block; margin: 0 auto 14px;
  box-shadow: var(--shadow-lg);
  background: #fff; max-width: 100%; height: auto;
}

.dr-pdf-msg {
  display: flex; align-items: center; justify-content: center;
  min-height: 420px; color: var(--ink-3); font-size: 13px; text-align: center;
  padding: 24px;
}

/* the watermark is a room-level control, applied on top of whatever the ECM
   returns - it names the viewer, so a screenshot carries attribution */
/* The identity watermark was removed deliberately. It was a translucent DIV
   over the viewer, so it was not burned into the rendition (a download gave a
   clean copy), it came off in devtools, and with one shared service account
   the name it stamped was a persona picked from a dropdown rather than a
   verified identity. Real per-viewer watermarking has to be applied to the
   rendition server-side. An ornament that looks like a control is worse than
   no control. */


.dr-meta-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px;
}

.dr-meta-row:last-child { border-bottom: 0; }
.dr-meta-k { color: var(--ink-3); flex: none; }
.dr-meta-v { text-align: right; color: var(--ink); font-weight: 550; word-break: break-word; }

/* ---------------------------------------------------------------- search */

.dr-search-bar { display: flex; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; }

.dr-input {
  flex: 1 1 260px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  background: var(--paper); color: var(--ink);
}

.dr-input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 133, 68, .16);
}

.dr-btn {
  padding: 11px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--navy);
  background: var(--navy); color: #fff;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; white-space: nowrap;
}

.dr-btn:hover:not(:disabled) { background: var(--navy-600); }
.dr-btn:disabled { opacity: .5; cursor: default; }

.dr-btn.is-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.dr-btn.is-ghost:hover:not(:disabled) { background: var(--line-soft); }

.dr-hit {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 11px;
  box-shadow: var(--shadow); cursor: pointer;
}

.dr-hit:hover { border-color: var(--gold); }
.dr-hit-ti { font-weight: 650; color: var(--navy); font-size: 14px; }

.dr-hit-snip {
  font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.55;
}

.dr-hit-snip mark { background: #fdf0d2; color: inherit; padding: 0 2px; border-radius: 2px; }

.dr-hit-foot {
  margin-top: 9px; display: flex; gap: 8px; align-items: center;
  font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap;
}

/* ------------------------------------------------------------ checklist */

.dr-req { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.dr-req:last-child { border-bottom: 0; }

.dr-req-box {
  width: 19px; height: 19px; border-radius: 4px; flex: none;
  border: 1.5px solid var(--line); display: flex;
  align-items: center; justify-content: center;
  font-size: 12px; color: #fff; background: var(--paper);
}

.dr-req-box.is-done { background: var(--ok); border-color: var(--ok); }
.dr-req-box.is-part { background: var(--gold); border-color: var(--gold); }

.dr-req-ti { font-size: 13px; color: var(--ink); }
.dr-req-ti.is-done { color: var(--ink-3); }
.dr-req-meta { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

/* ------------------------------------------------------------- activity */

.dr-feed-item { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.dr-feed-item:last-child { border-bottom: 0; }

.dr-feed-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold-soft);
  margin-top: 6px; flex: none;
}

.dr-feed-tx { color: var(--ink-2); }
.dr-feed-tm { margin-left: auto; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }

/* ------------------------------------------------------------- messages */

.dr-note {
  border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
}

.dr-note.is-stop { background: var(--stop-wash); border-color: #eebdbd; color: #7d2020; }
.dr-note.is-warn { background: var(--warn-wash); border-color: #edd9a8; color: #7a5410; }
.dr-note.is-info { background: #eef2f8; border-color: #cfdaea; color: var(--navy-600); }

.dr-empty { text-align: center; color: var(--ink-3); padding: 40px 20px; font-size: 13px; }

.dr-spin {
  width: 15px; height: 15px; flex: none;
  border: 2px solid var(--line); border-top-color: var(--gold);
  border-radius: 50%; animation: dr-rot .7s linear infinite;
  display: inline-block; vertical-align: -2px;
}

@keyframes dr-rot { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- misc */

.dr-foot {
  max-width: 1400px; margin: 0 auto;
  padding: 26px 24px 40px; color: var(--ink-3); font-size: 11.5px;
  border-top: 1px solid var(--line); margin-top: 30px;
}

.dr-stack-16 > * + * { margin-top: 16px; }
.dr-row-gap { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.dr-muted { color: var(--ink-3); }
.dr-right { text-align: right; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
  .dr-split  { grid-template-columns: 1fr; }
  .dr-side   { position: static; }
  .dr-viewer { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .dr-wrap { padding: 16px; }
  .dr-top-in { padding: 0 16px; }
  .dr-window-in { padding: 8px 16px; }
  .dr-kpi-val { font-size: 25px; }
  .dr-table th:nth-child(n+4), .dr-table td:nth-child(n+4) { display: none; }
}


/* ---------------------------------------------------------- contribution

   The dropzone is the only place in the room that WRITES, so it is styled to
   read as an invitation rather than a control: dashed edge, generous target,
   and a clear state change while a drag is over it. */

.dr-drop {
  border: 2px dashed var(--line, #c9d2da);
  border-radius: 10px;
  background: var(--panel, #fff);
  margin-bottom: 18px;
  transition: border-color .15s ease, background .15s ease;
}
.dr-drop.is-over {
  border-color: var(--navy, #1f3a5f);
  background: rgba(31, 58, 95, .05);
}
.dr-drop-in { padding: 18px 20px; }
.dr-drop-in strong { font-size: 14px; }
.dr-drop-in p { font-size: 12.5px; line-height: 1.55; }

.dr-link {
  color: var(--navy, #1f3a5f);
  text-decoration: underline;
  font-weight: 600;
}

/* The resolution control sits inside a table-ish row, so it must stay compact
   and must not stretch the row when the class names are long. */
.dr-req-meta select {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 6px;
  max-width: 260px;
  border: 1px solid var(--line, #c9d2da);
  border-radius: 6px;
  background: #fff;
}
.dr-req-meta .dr-btn { padding: 4px 10px; font-size: 12px; }


/* ------------------------------------------------------------------- Q&A */

.dr-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 9px;
          background: var(--bg, #f4f6f8); border: 1px solid var(--line, #c9d2da); }
.dr-msg.is-you { background: rgba(31, 58, 95, .06); border-color: rgba(31, 58, 95, .22); }
.dr-msg-who { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
              text-transform: uppercase; opacity: .65; margin-bottom: 5px; }
.dr-msg-tx { font-size: 13px; line-height: 1.6; white-space: pre-wrap; }


/* ------------------------------------------------------------- text pane */

.dr-textpane { max-height: 640px; overflow: auto; padding: 16px 18px;
               background: var(--panel, #fff); }
.dr-textpane pre { margin: 0; white-space: pre-wrap; word-break: break-word;
                   font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
                   font-size: 12.5px; line-height: 1.65; color: var(--ink, #1c2126); }


/* ------------------------------------------------- exception review pane */

.dr-review {
  border: 1px solid var(--line, #c9d2da);
  border-left: 3px solid var(--warn, #b8860b);
  border-radius: 8px;
  background: var(--bg, #f4f6f8);
  padding: 14px 16px;
  margin: 0 0 14px 34px;
}
.dr-review .dr-pdf { background: #fff; border-radius: 6px; }


/* ------------------------------------------------------------- scorecard */

.dr-sc-legend { margin-left: auto; display: flex; gap: 14px; font-size: 11px; color: var(--ink-3); }
.dr-sc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dr-sc-key { display: inline-block; flex: none; }
.dr-sc-key.is-band   { width: 16px; height: 6px; border-radius: 3px; background: var(--line); }
.dr-sc-key.is-median { width: 2px; height: 12px; background: var(--navy-600); }
.dr-sc-key.is-target { width: 9px; height: 9px; border-radius: 50%; background: var(--navy); }

.dr-sc-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) 110px minmax(160px, 2fr) 170px;
  gap: 18px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.dr-sc-row:last-child { border-bottom: 0; }
/* Live refresh: a dimension that moved in the last update, and what it was. */
.dr-sc-row.is-changed {
  background: var(--gold-wash); box-shadow: inset 3px 0 0 var(--gold);
  margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  animation: dr-sc-flash 2.4s ease-out;
}
@keyframes dr-sc-flash { 0%, 30% { background: var(--gold-soft); } 100% { background: var(--gold-wash); } }
.dr-sc-was { font-size: 11px; color: var(--gold); font-weight: 600; }
.dr-sc-band, .dr-sc-median, .dr-sc-dot { transition: left .9s ease, right .9s ease; }
@media (prefers-reduced-motion: reduce) {
  .dr-sc-row.is-changed { animation: none; }
  .dr-sc-band, .dr-sc-median, .dr-sc-dot { transition: none; }
}
/* The administrator's peer-figure form under the scorecard. */
.dr-kpi-help { font-size: 12.5px; margin: 0 0 12px; max-width: 80ch; }
.dr-kpi-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 10px; }
.dr-kpi-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 200px; min-width: 0; }
.dr-kpi-field.is-narrow { flex: 0 1 130px; }
.dr-kpi-field .dr-input { flex: none; padding: 9px 12px; }
.dr-kpi-actions { display: flex; gap: 8px; }
.dr-kpi-sent {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 12.5px;
}
.dr-kpi-sent:first-of-type { margin-top: 10px; }

.dr-sc-name, .dr-sc-figs, .dr-sc-verdict { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dr-sc-verdict { align-items: flex-start; }
.dr-sc-target { font-family: var(--serif); font-size: 22px; color: var(--navy); line-height: 1.1; }

.dr-sc-track { position: relative; height: 22px; }
.dr-sc-track > div { position: absolute; inset: 0; }
.dr-sc-track > div::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line-soft);
}
.dr-sc-band {
  position: absolute; top: 50%; height: 8px; margin-top: -4px;
  border-radius: 4px; background: var(--line);
}
.dr-sc-median {
  position: absolute; top: 50%; width: 2px; height: 16px; margin: -8px 0 0 -1px;
  background: var(--navy-600);
}
.dr-sc-dot {
  position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  border-radius: 50%; background: var(--navy); border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--navy);
}
.dr-sc-dot.is-ok   { background: var(--ok);   box-shadow: 0 0 0 1px var(--ok); }
.dr-sc-dot.is-warn { background: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.dr-sc-dot.is-stop { background: var(--stop); box-shadow: 0 0 0 1px var(--stop); }

@media (max-width: 760px) {
  .dr-sc-row { grid-template-columns: 1fr auto; gap: 10px 14px; }
  .dr-sc-track { grid-column: 1 / -1; }
  .dr-sc-legend { display: none; }
}
