/* site-response-demo.css — R24 Response Operator Platform featured demo.
   All selectors scoped under .rop- to avoid collisions. Navy chassis,
   coral signal, gold trim — per the R24i design system. */

.rop-section {
  background: var(--white);
  padding: var(--sp-section) 0;
  border-top: 1px solid var(--gray-200);
}

/* ---- View switcher ---- */
.rop-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 16px;
  align-items: center;
}
.rop-switcher__tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 11px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms ease;
}
.rop-switcher__tab:hover { border-color: var(--red-400); color: var(--navy-800); }
.rop-switcher__tab--active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}
.rop-switcher__n {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--gray-100);
  color: var(--gray-500);
}
.rop-switcher__tab--active .rop-switcher__n { background: var(--red-500); color: #fff; }
.rop-switcher__play {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
}
.rop-switcher__play:hover { border-color: var(--navy-400); color: var(--navy-800); }

/* ---- Console frame ---- */
.rop-frame {
  display: grid;
  grid-template-columns: 232px 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: 660px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: 0 30px 70px rgba(17,24,39,0.16);
  background: var(--gray-50);
}
@media (max-width: 1080px) {
  .rop-frame { grid-template-columns: 64px 1fr; }
  .rop-sidebar__nav span, .rop-sidebar__brand .rop-brandmark__sub,
  .rop-sidebar__who { display: none; }
  .rop-brandmark { font-size: 13px; }
}

/* ---- Sidebar ---- */
.rop-sidebar {
  background: var(--navy-800);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 0 14px;
}
.rop-sidebar__brand {
  padding: 0 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 10px;
}
.rop-brandmark {
  font-family: var(--font);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #fff;
}
.rop-brandmark b { color: var(--red-400); }
.rop-brandmark__sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.45);
}
.rop-sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 1px; padding: 0 8px; }
.rop-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 8px;
  color: rgba(255,255,255,0.62);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  border-left: 2px solid transparent;
}
.rop-nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.rop-nav-item--active {
  background: linear-gradient(90deg, rgba(200,35,51,0.18), rgba(200,35,51,0));
  color: #fff;
  border-left-color: var(--red-500);
}
.rop-sidebar__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 0;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.rop-sidebar__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  color: #fff; font-weight: 800; font-size: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.rop-sidebar__who { display: flex; flex-direction: column; min-width: 0; }
.rop-sidebar__name { font-size: 12.5px; font-weight: 700; color: #fff; }
.rop-sidebar__role { font-family: var(--mono); font-size: 9px; color: var(--teal-400); letter-spacing: 0.04em; }

/* ---- Main + topbar ---- */
.rop-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--gray-50); }
.rop-topbar {
  height: 56px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  color: var(--navy-800);
}
.rop-topbar__left { display: flex; align-items: center; gap: 14px; }
.rop-topbar__left > svg { color: var(--gray-500); }
.rop-topbar__titles { display: flex; flex-direction: column; }
.rop-topbar__crumb { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--gray-500); text-transform: uppercase; }
.rop-topbar__title { margin: 0; font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--navy-800); }
.rop-topbar__right { display: flex; align-items: center; gap: 14px; }
.rop-topbar__clock {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--red-600); display: inline-flex; align-items: center; gap: 7px;
}
.rop-topbar__bell { position: relative; color: var(--gray-500); }
.rop-topbar__bell-badge {
  position: absolute; top: -5px; right: -6px;
  background: var(--red-500); color: #fff;
  font-family: var(--mono); font-size: 8px; font-weight: 800;
  padding: 1px 4px; border-radius: 999px;
}
.rop-topbar__user {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy-700); color: #fff;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}

/* ---- Canvas + view fade ---- */
.rop-canvas { flex: 1; overflow: hidden; padding: 18px; min-height: 0; }
@keyframes rop-view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.rop-canvas { animation: rop-view-in 0.4s cubic-bezier(.22,1,.36,1); }
.rop-view { display: flex; flex-direction: column; gap: 14px; height: 100%; }

.rop-livedot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red-500);
  box-shadow: 0 0 0 3px rgba(200,35,51,0.18);
  display: inline-block;
  animation: rop-blink 1.4s ease-in-out infinite;
}
@keyframes rop-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- Generic helpers ---- */
.rop-mono { font-family: var(--mono); font-size: 11.5px; }
.rop-strong { font-weight: 700; color: var(--navy-800); }
.rop-muted { color: var(--gray-500); }

.rop-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.rop-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
}
.rop-card__title { margin: 0; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--navy-800); }
.rop-card__meta { font-family: var(--mono); font-size: 10px; color: var(--gray-500); display: inline-flex; align-items: center; gap: 7px; }
.rop-card__body { padding: 16px; }
.rop-subhead {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-500);
  margin: 16px 0 8px;
}

/* ---- Status chips ---- */
.rop-stat {
  font-family: var(--mono); font-size: 9px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; font-style: normal;
  display: inline-block; white-space: nowrap;
}
.rop-stat--new   { background: rgba(26,138,154,0.12); color: var(--teal-600); }
.rop-stat--plan  { background: rgba(212,163,34,0.16); color: #8B6E14; }
.rop-stat--esc   { background: rgba(200,35,51,0.10); color: var(--red-600); }
.rop-stat--live  { background: rgba(200,35,51,0.10); color: var(--red-600); }
.rop-stat--off   { background: var(--gray-100); color: var(--gray-500); }

/* ---- Buttons ---- */
.rop-btn {
  font-family: var(--font); font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; padding: 7px 13px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: all 140ms ease;
}
.rop-btn--pickup { background: var(--red-500); color: #fff; }
.rop-btn--pickup:hover { background: var(--red-600); }
.rop-btn--ghost { background: var(--white); color: var(--navy-800); border-color: var(--gray-200); }
.rop-btn--ghost:hover { background: var(--gray-50); border-color: var(--gray-400); }
.rop-btn--escalate { background: rgba(200,35,51,0.08); color: var(--red-600); border-color: rgba(200,35,51,0.25); }
.rop-btn--escalate:hover { background: rgba(200,35,51,0.14); }
.rop-btn--full { width: 100%; text-align: center; justify-content: center; }
.rop-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---- KPI tiles ---- */
.rop-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rop-kpi {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.rop-kpi__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0; color: #fff;
}
.rop-kpi--green .rop-kpi__icon { background: var(--teal-500); }
.rop-kpi--navy  .rop-kpi__icon { background: var(--navy-700); }
.rop-kpi--gray  .rop-kpi__icon { background: var(--gray-400); }
.rop-kpi--amber .rop-kpi__icon { background: var(--gold-500); }
.rop-kpi__num { font-family: var(--font); font-size: 26px; font-weight: 800; color: var(--navy-800); line-height: 1; }
.rop-kpi__lab { font-size: 11px; color: var(--gray-600); margin-top: 3px; line-height: 1.2; }

/* ---- Tables ---- */
.rop-table { display: flex; flex-direction: column; }
.rop-table__row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.1fr 1.1fr 1fr 0.9fr 0.7fr;
  align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 12px; color: var(--navy-800);
}
.rop-table__row--planner { grid-template-columns: 1.4fr 1fr 0.9fr 1.1fr 0.8fr; }
.rop-table__head {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500);
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  padding-top: 9px; padding-bottom: 9px;
}
.rop-table__body-row { border-bottom: 1px solid var(--gray-100); }
.rop-table__body-row:hover { background: var(--gray-50); }
.rop-row--off { opacity: 0.5; }

/* ---- Active strip ---- */
.rop-active-strip { display: flex; gap: 10px; padding: 14px 16px; flex-wrap: wrap; }
.rop-active-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: 999px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  font-size: 11px; color: var(--navy-800);
}

/* ---- Detail view ---- */
.rop-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 14px; height: 100%; min-height: 0; }
.rop-detail-main { display: flex; flex-direction: column; min-height: 0; }
.rop-detail-side { display: flex; flex-direction: column; gap: 14px; overflow: auto; min-height: 0; }
.rop-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--gray-200); background: var(--gray-50); }
.rop-tab {
  padding: 12px 14px; font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--gray-500); position: relative; cursor: pointer; white-space: nowrap;
}
.rop-tab--active { color: var(--navy-800); }
.rop-tab--active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--red-500); border-radius: 2px; }

.rop-kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.rop-kv-grid--tight { gap: 10px 16px; }
.rop-kv { display: flex; flex-direction: column; gap: 3px; }
.rop-kv span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500); }
.rop-kv b { font-size: 13px; color: var(--navy-800); font-weight: 700; }

.rop-paxrow, .rop-resp-row, .rop-service-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--gray-50);
}
.rop-service-row { justify-content: space-between; }
.rop-pax-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-700); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.rop-pax-avatar--live { background: linear-gradient(135deg, var(--red-500), var(--red-600)); }
.rop-pax-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rop-pax-meta b { font-size: 13px; color: var(--navy-800); display: flex; align-items: center; gap: 8px; }
.rop-pax-meta span { font-size: 11px; }
.rop-service-meta { display: flex; flex-direction: column; gap: 3px; }
.rop-service-meta b { font-size: 13px; color: var(--navy-800); }
.rop-service-meta span { font-size: 11px; }
.rop-service-actions { display: flex; gap: 8px; }
.rop-batt { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--gold-500); }

/* ---- Actions card ---- */
.rop-actions-card { flex-shrink: 0; }
.rop-actions-head { padding: 12px 16px; border-bottom: 1px solid var(--gray-200); }
.rop-locked { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--gold-500); text-transform: uppercase; }
.rop-actions-btns { padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }

/* ---- State Changes workflow ---- */
.rop-states { padding: 8px 16px 14px; display: flex; flex-direction: column; }
.rop-state {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; position: relative;
}
.rop-state:not(:last-child)::before {
  content: ""; position: absolute; left: 12px; top: 30px; bottom: -9px;
  width: 2px; background: var(--gray-200);
}
.rop-state--done:not(:last-child)::before { background: var(--teal-500); }
.rop-state__node {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: var(--white); border: 2px solid var(--gray-200); color: var(--gray-500);
}
.rop-state--done .rop-state__node { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }
.rop-state--cur .rop-state__node { border-color: var(--red-500); }
.rop-state__pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red-500); animation: rop-blink 1.2s ease-in-out infinite; }
.rop-state__label { font-size: 12.5px; font-weight: 600; color: var(--navy-800); flex: 1; }
.rop-state--cur .rop-state__label { color: var(--navy-800); }
.rop-state:not(.rop-state--done):not(.rop-state--cur) .rop-state__label { color: var(--gray-400); }

/* ---- Mini routes map ---- */
.rop-mini-map { position: relative; height: 150px; overflow: hidden; }
.rop-route-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.rop-route-pin {
  position: absolute; z-index: 2; transform: translate(-50%, -50%);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-size: 11px; font-weight: 800; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.rop-route-pin--a { background: var(--navy-700); }
.rop-route-pin--b { background: var(--red-500); }

/* ---- Service Planner ---- */
.rop-stepper { display: flex; align-items: center; padding: 4px 0 6px; }
.rop-step { display: flex; align-items: center; gap: 9px; }
.rop-step__n {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: var(--white); border: 2px solid var(--gray-200); color: var(--gray-500);
}
.rop-step--active .rop-step__n { background: var(--red-500); border-color: var(--red-500); color: #fff; }
.rop-step--done .rop-step__n { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }
.rop-step__lab { font-size: 12.5px; font-weight: 600; color: var(--gray-500); white-space: nowrap; }
.rop-step--active .rop-step__lab { color: var(--navy-800); }
.rop-step__line { flex: 1; height: 2px; background: var(--gray-200); margin: 0 12px; }
.rop-step__line--done { background: var(--teal-500); }

.rop-select {
  display: inline-flex; align-items: center; gap: 8px; justify-content: space-between;
  min-width: 130px; padding: 6px 10px; border-radius: 7px;
  border: 1px solid var(--gray-200); background: var(--white);
  font-size: 12px; font-weight: 600; color: var(--navy-800);
}
.rop-select svg { color: var(--gray-400); }
.rop-planner-foot { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 6px; }
.rop-planner-foot__spacer { flex: 1; }

/* ---- Active service view ---- */
.rop-active-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; height: 100%; min-height: 0; }
.rop-active-main { display: flex; flex-direction: column; min-height: 0; }
.rop-active-actions { display: flex; gap: 9px; margin-top: 16px; }
.rop-resp-row { margin-bottom: 8px; }

/* state history */
.rop-history-card, .rop-chat-card { display: flex; flex-direction: column; min-height: 0; }
.rop-history { padding: 12px 16px; overflow: auto; flex: 1; }
.rop-hist { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding-bottom: 14px; }
.rop-hist__rail { display: flex; justify-content: center; position: relative; }
.rop-hist__rail::before { content: ""; position: absolute; top: 12px; bottom: -14px; width: 2px; background: var(--gray-200); }
.rop-hist:last-child .rop-hist__rail::before { display: none; }
.rop-hist__node { width: 11px; height: 11px; border-radius: 50%; background: var(--teal-500); margin-top: 3px; z-index: 1; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--teal-500); }
.rop-hist--cur .rop-hist__node { background: var(--red-500); box-shadow: 0 0 0 1px var(--red-500); animation: rop-blink 1.2s ease-in-out infinite; }
.rop-hist__body { display: flex; flex-direction: column; gap: 4px; }
.rop-hist__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rop-hist__top b { font-size: 12px; color: var(--navy-800); }
.rop-hist__seal { font-family: var(--mono); font-size: 9px; color: var(--teal-600); display: inline-flex; align-items: center; gap: 4px; }

/* chat */
.rop-chat { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow: auto; }
.rop-msg { max-width: 82%; padding: 8px 11px; border-radius: 12px; font-size: 11.5px; line-height: 1.4; }
.rop-msg--op { align-self: flex-end; background: var(--navy-700); color: #fff; border-bottom-right-radius: 4px; }
.rop-msg--res { align-self: flex-start; background: var(--gray-100); color: var(--navy-800); border-bottom-left-radius: 4px; }
.rop-msg__sent { align-self: flex-end; font-family: var(--mono); font-size: 9px; color: var(--teal-600); }
.rop-chat-input {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-top: 1px solid var(--gray-200); font-size: 12px;
}
.rop-chat-send { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--red-500); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* ---- Responder phone overlay ---- */
.rop-respphone {
  position: absolute; right: 30px; bottom: 26px; z-index: 8;
  width: 178px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  pointer-events: none;
}
.rop-view--active { position: relative; }
.rop-respphone__tag {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  padding: 4px 9px; border-radius: 999px;
  background: var(--navy-800); color: #fff; white-space: nowrap;
}
.rop-respphone__device {
  width: 100%; aspect-ratio: 9/19; background: #0a0e1e; border-radius: 22px; padding: 5px;
  position: relative; box-shadow: 0 20px 36px rgba(0,0,0,0.5);
}
.rop-respphone__notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 56px; height: 14px; background: #06091a; border-radius: 9px; z-index: 2; }
.rop-respphone__screen {
  height: 100%; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #14132C, #0E1432);
  display: flex; flex-direction: column; padding: 24px 6px 5px; gap: 6px;
}
.rop-respphone__map { position: relative; height: 78px; border-radius: 10px; overflow: hidden; }
.rop-respphone__route {
  position: absolute; z-index: 1; left: 14%; top: 64%; width: 64%; height: 30%;
  border-top: 2.5px dashed var(--red-400); border-right: 2.5px dashed var(--red-400);
  border-top-right-radius: 30px; opacity: 0.9;
}
.rop-respphone__me {
  position: absolute; z-index: 2; left: 16%; top: 70%; transform: translate(-50%,-50%);
  width: 22px; height: 22px; border-radius: 50%; background: var(--red-500); color: #fff;
  display: grid; place-items: center; border: 2px solid #fff;
}
.rop-respphone__job {
  display: flex; flex-direction: column; gap: 3px; padding: 4px 4px 0; color: #fff;
}
.rop-respphone__job b { font-size: 10px; line-height: 1.25; }
.rop-respphone__job span { font-size: 8.5px; }
.rop-respphone__job .rop-mono { font-size: 8.5px; }
.rop-respphone__actions { display: flex; gap: 5px; padding: 0 2px; }
.rop-rbtn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font); font-size: 8.5px; font-weight: 700;
  padding: 6px 4px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85);
}
.rop-rbtn--primary { background: var(--red-500); border-color: var(--red-500); color: #fff; }
.rop-respphone__tabbar {
  margin-top: auto; display: flex; align-items: center; justify-content: space-around;
  padding: 6px 4px 2px; border-top: 1px solid rgba(255,255,255,0.08);
}
.rop-rtab { color: rgba(255,255,255,0.5); font-family: var(--mono); font-size: 8px; font-weight: 700; display: grid; place-items: center; }
.rop-rtab--active { color: #fff; }
.rop-rtab--er { color: var(--red-400); }

/* ---- Progress segments ---- */
.rop-progress { display: flex; gap: 6px; margin: 16px 0 0; justify-content: center; }
.rop-progress__seg { width: 40px; height: 4px; border-radius: 2px; background: var(--gray-200); }
.rop-progress__seg--on { background: var(--red-500); }

@media (prefers-reduced-motion: reduce) {
  .rop-canvas, .rop-livedot, .rop-state__pulse, .rop-hist--cur .rop-hist__node { animation: none !important; }
}

@media (max-width: 900px) {
  .rop-frame { height: auto; min-height: 600px; }
  .rop-active-grid, .rop-detail-grid { grid-template-columns: 1fr; }
  .rop-kpis { grid-template-columns: repeat(2, 1fr); }
  .rop-respphone { display: none; }
}
