/* Slice S2 — patient self-service (/a manage, /o offer, /r request status, exception sheet) and the staff
   Requests inbox (/app/requests). Prefixes: .sv- shared patient, .of- offer, .rq- request status,
   .xs- exception sheet, .rqs- staff requests. Tokens only (web/css/tokens.css). */

/* ================================================================ shared patient layout */
.sv-page { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.sv-hero { display: grid; gap: 6px; min-width: 0; }
.sv-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.sv-title { font-size: clamp(26px, 7vw, 34px); line-height: 1.1; }
.sv-sub { color: var(--ink-2); font-size: var(--fs-md); line-height: 1.45; }
.sv-skeleton { display: grid; gap: 14px; }
.sv-stack { display: grid; gap: var(--s-3); min-width: 0; }
.sv-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sv-actions > .btn { min-width: 0; }
.sv-actions-1 { grid-template-columns: minmax(0, 1fr); }
.sv-note { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.45; }
.sv-note svg { flex: none; margin-top: 1px; color: var(--purple); }
.sv-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--touch);
  padding: 0 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  text-align: center;
}
.sv-link-btn:hover { color: var(--purple); text-decoration-color: currentColor; }
.sv-center { display: flex; justify-content: center; }
.sv-subhead { font-size: var(--fs-md); font-weight: 600; letter-spacing: var(--track-tight); }

/* ---------------------------------------------------------------- ticket (appointment / offer summary) */
.sv-ticket {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  min-width: 0;
}
.sv-ticket.is-muted { box-shadow: var(--shadow-1); }
.sv-ticket.is-muted .sv-ticket-top { background: var(--surface-2); }
.sv-ticket.is-muted .sv-when-time, .sv-ticket.is-muted .sv-date-num { color: var(--ink-2); }
.sv-ticket-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 18px;
  background: linear-gradient(135deg, var(--purple-light) 0%, #FDF3EC 100%);
  min-width: 0;
}
.sv-date {
  display: grid;
  justify-items: center;
  flex: none;
  width: 68px;
  padding: 8px 0 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  line-height: 1;
}
.sv-date-wd { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); }
.sv-date-num { margin-top: 6px; font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); }
.sv-date-mon { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.sv-when { display: grid; gap: 4px; flex: 1; min-width: 0; }
.sv-when-time {
  font-family: var(--font-display);
  font-size: clamp(30px, 9vw, 38px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sv-when-time .ampm { font-size: .5em; margin-left: .15em; color: var(--ink-2); letter-spacing: 0; }
.sv-when-day { font-size: 14px; font-weight: 500; color: var(--ink-2); line-height: 1.35; }
.sv-ticket-badge { align-self: flex-start; flex: none; }
@media (max-width: 520px) {
  /* Phones: the status badge gets its own row so "Viernes · 10:30 – 11:00 am" never wraps under it. */
  .sv-ticket-top { flex-wrap: wrap; row-gap: 12px; }
  .sv-ticket-badge { order: -1; flex-basis: 100%; display: flex; }
}
.sv-ticket-cut {
  position: relative;
  height: 1px;
  margin: 0 18px;
  border-top: 1.5px dashed var(--line-strong);
}
.sv-ticket-cut::before, .sv-ticket-cut::after {
  content: '';
  position: absolute;
  top: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.sv-ticket-cut::before { left: -28px; }
.sv-ticket-cut::after { right: -28px; }
.sv-ticket-body { display: grid; gap: 14px; padding: 18px 20px 20px; min-width: 0; }
.sv-doc { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sv-doc-text { min-width: 0; }
.sv-doc-name { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-doc-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-rows { display: grid; gap: 10px; }
.sv-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; font-size: 14px; color: var(--ink); }
.sv-row > svg { flex: none; margin-top: 2px; color: var(--purple); }
.sv-row-text { min-width: 0; overflow-wrap: anywhere; }
.sv-row-text .muted { font-size: 13px; }
.sv-row a { color: inherit; text-decoration-color: var(--line-strong); }
.sv-row a:hover { color: var(--purple); }

/* ---------------------------------------------------------------- tiles (calendar, directions, WhatsApp, call) */
.sv-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sv-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  min-width: 0;
}
.sv-tile:hover { color: var(--ink); border-color: var(--lavender); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.sv-tile-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--purple-tint);
  color: var(--purple);
}
.sv-tile-wa .sv-tile-icon { background: #E3F9EC; color: #128C4B; }
.sv-tile span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- status blocks */
.sv-confirmed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--success-tint);
  color: var(--success-ink);
  font-weight: 600;
}
.sv-success { display: grid; justify-items: center; gap: 10px; padding: 12px 4px 4px; text-align: center; }
.sv-bubble {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--grad-mark);
  color: var(--purple);
  box-shadow: 0 16px 36px -16px rgba(37, 0, 142, .45);
  animation: sv-pop var(--dur-3) var(--ease-out);
}
.sv-bubble.is-green { background: var(--success-tint); color: var(--success-ink); box-shadow: 0 16px 36px -18px rgba(0, 189, 129, .7); }
.sv-bubble.is-muted { background: var(--sand); color: var(--ink-2); box-shadow: none; }
@keyframes sv-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.sv-success-title { font-size: var(--fs-xl); }
.sv-success-text { max-width: 40ch; color: var(--ink-2); }
.sv-success .btn { margin-top: 6px; }
.sv-quote {
  position: relative;
  padding: 12px 16px 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border-left: 3px solid var(--lavender);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.sv-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.sv-policy { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sv-policy svg { flex: none; margin-top: 1px; color: var(--purple); }
.sv-intake { display: flex; align-items: center; gap: 14px; }
.sv-intake-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--purple);
}
.sv-intake-text { flex: 1; min-width: 0; }
.sv-intake-text p:first-child { font-weight: 600; }
.sv-intake-text p + p { font-size: 13px; color: var(--ink-2); }
.sv-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------------------------------------------------------------- reschedule sheet */
.sv-sheet-intro { color: var(--ink-2); }
.sv-prefs { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-prefs .chip { min-height: 36px; padding: 0 14px; font-size: 14px; }
.sv-more { display: grid; gap: 14px; padding-top: 4px; }
.sv-more .doctor-row + .doctor-row { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.sv-compare { display: grid; gap: 10px; }
.sv-compare-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  min-width: 0;
}
.sv-compare-row.is-new { background: var(--purple-light); border-color: rgba(37, 0, 142, .18); }
.sv-compare-label { flex: none; width: 72px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.sv-compare-row.is-new .sv-compare-label { color: var(--purple); }
.sv-compare-when { min-width: 0; }
.sv-compare-when strong { display: block; font-size: 16px; }
.sv-compare-when span { font-size: 13px; color: var(--ink-2); }
.sv-compare-row.is-old .sv-compare-when strong { text-decoration: line-through; text-decoration-color: var(--ink-muted); color: var(--ink-2); font-weight: 500; }
.sv-compare-arrow { display: grid; place-items: center; color: var(--purple); margin: -4px 0; }
.sv-hold { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.sv-hold .countdown { color: var(--purple); }
.sv-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-reasons .chip { min-height: 38px; font-size: 14px; }

/* ================================================================ offer page */
.of-top { display: grid; justify-items: center; gap: 14px; text-align: center; padding-top: 4px; }
.of-ring { position: relative; width: 132px; height: 132px; }
.of-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.of-ring-track { fill: none; stroke: rgba(37, 0, 142, .10); stroke-width: 8; }
.of-ring-bar { fill: none; stroke: var(--purple); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke var(--dur-2); }
.of-ring.is-warn .of-ring-bar { stroke: var(--danger); }
.of-ring-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
}
.of-ring-text .countdown { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.of-ring-text .countdown.is-warn { color: var(--danger-ink); }
.of-ring-label { font-size: 11.5px; color: var(--ink-2); }
.of-top .sv-hero { justify-items: center; text-align: center; }
.of-top .sv-title { max-width: 18ch; }
.of-top .sv-sub { max-width: 36ch; }
.of-fee { display: grid; gap: 8px; }
.of-fee-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.of-fee-line span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.of-fee-total { padding-top: 8px; border-top: 1px solid rgba(37, 0, 142, .12); font-weight: 700; }
.of-fee-total span { font-size: 16px; }
.of-cta { display: grid; gap: 8px; }
.of-alts { display: grid; gap: 8px; }
.of-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
  min-width: 0;
}
.of-alt:hover { border-color: var(--lavender); }
.of-alt[aria-pressed="true"] { border-color: var(--purple); background: #FCFAFF; box-shadow: 0 0 0 3px rgba(37, 0, 142, .10); }
.of-alt.is-gone { opacity: .55; cursor: not-allowed; text-decoration: line-through; text-decoration-color: var(--ink-3); }
.of-alt.is-gone:hover { border-color: var(--line); }
.of-gone-note {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--warning-tint); color: var(--warning-ink); font-weight: 500; font-size: 15px; line-height: 1.4;
}
.of-gone-note svg { flex: none; margin-top: 2px; }
.of-alt-radio {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  transition: border var(--dur-2) var(--ease);
}
.of-alt[aria-pressed="true"] .of-alt-radio { border: 6px solid var(--purple); }
.of-alt-text { flex: 1; min-width: 0; }
.of-alt-text strong { display: block; font-size: 15px; }
.of-alt-text span { display: block; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ request status */
.rq-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.rq-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 20px; }
.rq-step:last-child { padding-bottom: 0; }
.rq-step::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.rq-step:last-child::before { display: none; }
.rq-step.is-done::before { background: var(--purple); }
.rq-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  color: var(--ink-muted);
}
.rq-step.is-done .rq-dot { background: var(--purple); border-color: var(--purple); color: var(--cream-light); }
.rq-step.is-current .rq-dot { border-color: var(--purple); color: var(--purple); box-shadow: 0 0 0 5px rgba(37, 0, 142, .10); }
.rq-step.is-current .rq-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  animation: rq-pulse 1.6s ease-in-out infinite;
}
.rq-step.is-bad .rq-dot { background: var(--danger-tint); border-color: var(--danger-tint); color: var(--danger-ink); }
.rq-step.is-good .rq-dot { background: var(--green); border-color: var(--green); color: #fff; }
@keyframes rq-pulse { 50% { transform: scale(.55); opacity: .5; } }
.rq-step-body { padding-top: 3px; min-width: 0; }
.rq-step-title { font-weight: 600; line-height: 1.3; }
.rq-step.is-todo .rq-step-title { color: var(--ink-muted); font-weight: 500; }
.rq-step-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.rq-step-body .btn { margin-top: 10px; }
.rq-summary { display: grid; gap: 12px; }
.rq-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rq-summary-head h2 { font-size: var(--fs-md); font-weight: 600; letter-spacing: var(--track-tight); }

/* ================================================================ exception sheet */
.xs { display: grid; gap: 22px; min-width: 0; }
.xs-intro { color: var(--ink-2); line-height: 1.5; }
.xs-group { display: grid; gap: 10px; min-width: 0; border: 0; margin: 0; padding: 0; }
.xs-label { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; }
.xs-label .muted { font-weight: 400; font-size: 13px; }
.xs-docs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: -2px -2px -6px; scrollbar-width: none; }
.xs-docs::-webkit-scrollbar { display: none; }
.xs-docs .chip { flex: none; padding-left: 6px; }
.xs-docs .chip .avatar { margin-right: -2px; }
.xs-docs .chip.is-any { padding-left: 16px; }
.xs-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 400px; }
.xs-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.xs-day:hover { border-color: var(--purple); background: var(--purple-light); }
.xs-day:active { transform: scale(.94); }
.xs-day[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: var(--cream-light); }
.xs-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.xs-part {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-align: left;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  min-width: 0;
}
.xs-part svg { flex: none; color: var(--purple); }
.xs-part:hover { border-color: var(--purple); background: var(--purple-light); }
.xs-part[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: var(--cream-light); }
.xs-part[aria-pressed="true"] svg { color: var(--lavender); }
.xs-part-text { display: grid; min-width: 0; line-height: 1.2; }
.xs-part-text strong { font-size: 14px; }
.xs-part-text span { font-size: 12px; opacity: .72; }
.xs-hint { font-size: 13px; color: var(--ink-2); }
.xs .segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 440px; }
.xs .segmented-item { padding: 0 8px; white-space: nowrap; min-width: 0; }
.xs-urgent { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-soft); }
.xs-step { display: grid; gap: 16px; min-width: 0; }
.xs-step-head { display: grid; gap: 4px; }
.xs-step-head h3 { font-size: var(--fs-lg); }
.xs-step-head p { color: var(--ink-2); }
.xs-demo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--purple-light);
  color: var(--purple-dark);
  font-size: 14px;
}
.xs-demo strong { letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.xs-demo .xs-demo-use { margin-left: auto; flex-shrink: 0; }
.xs-slots { display: grid; gap: 10px; }
.xs-slot {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  background: var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--line-soft);
  text-align: left;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  min-width: 0;
}
.xs-slot:hover { border-color: var(--lavender); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.xs-slot-time { flex: none; min-width: 88px; font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.xs-slot-time .ampm { font-size: .55em; margin-left: .15em; color: var(--ink-2); }
.xs-slot-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.xs-slot-day { font-weight: 600; font-size: 14px; }
.xs-slot-doc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.xs-slot-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-slot > svg { flex: none; color: var(--purple); }
.xs-who { display: flex; flex-wrap: wrap; gap: 8px; }

/* ================================================================ staff: Requests inbox */
.rqs { display: grid; gap: var(--s-5); min-width: 0; }
.rqs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.rqs-head-text { display: grid; gap: 4px; min-width: 0; max-width: 60ch; }
.rqs-head-text p { color: var(--ink-2); }
.rqs-money {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--purple-dark);
  color: var(--on-dark);
  box-shadow: var(--shadow-2);
  min-width: 0;
}
.rqs-money-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--lavender); }
.rqs-money-value { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; color: #7EF2C8; }
.rqs-money-label { font-size: 12.5px; color: var(--on-dark-2); }
.rqs-layout { display: grid; gap: var(--s-5); align-items: start; min-width: 0; }
.rqs-list { display: grid; gap: 10px; min-width: 0; }
.rqs-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-1), 0 0 0 1px var(--line-soft);
  text-align: left;
  transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  min-width: 0;
}
.rqs-item:hover { box-shadow: var(--shadow-2), 0 0 0 1px var(--line); transform: translateY(-1px); }
.rqs-item[aria-current="true"] { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(37, 0, 142, .10), var(--shadow-1); }
.rqs-item.is-fresh { animation: rqs-flash 1.6s var(--ease-out); }
@keyframes rqs-flash { 0% { background: var(--purple-light); } 100% { background: var(--surface); } }
.rqs-item-main { display: grid; gap: 4px; min-width: 0; }
.rqs-item-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rqs-item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rqs-item-age { margin-left: auto; flex: none; font-size: 12.5px; color: var(--ink-muted); }
.rqs-item-line { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.rqs-item-line > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rqs-item-line svg { flex: none; color: var(--ink-muted); }
.rqs-item-note { font-size: 13.5px; color: var(--ink); font-style: italic; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rqs-item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rqs-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--violet)); }
.rqs-group-title { margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.rqs-detail {
  display: grid;
  gap: 20px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line-soft);
  min-width: 0;
}
.rqs-sheet .rqs-detail { padding: 0; box-shadow: none; border: 0; border-radius: 0; }
.rqs-detail-head { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.rqs-detail-head h2 { font-size: var(--fs-xl); overflow-wrap: anywhere; }
.rqs-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.rqs-detail-meta a { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.rqs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.rqs-fact { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-soft); min-width: 0; }
.rqs-fact-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.rqs-fact-value { margin-top: 4px; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.rqs-section { display: grid; gap: 10px; min-width: 0; }
.rqs-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rqs-section-head h3 { font-size: var(--fs-md); font-weight: 600; }
.rqs-section-head p { font-size: 13px; color: var(--ink-2); }
.rqs-suggs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.rqs-sugg {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  min-width: 0;
}
.rqs-sugg:hover:not(:disabled) { border-color: var(--lavender); }
.rqs-sugg[aria-pressed="true"] { border-color: var(--purple); background: #FCFAFF; box-shadow: 0 0 0 3px rgba(37, 0, 142, .10); }
.rqs-sugg:disabled { opacity: .5; cursor: not-allowed; }
.rqs-sugg-time { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.rqs-sugg-day { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rqs-sugg-doc { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.rqs-sugg-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rqs-sugg-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rqs-sugg-tags .badge { height: 22px; font-size: 11.5px; padding: 0 8px; }
.rqs-sugg-custom { place-content: center; justify-items: center; text-align: center; color: var(--purple); font-weight: 600; font-size: 14px; border-style: dashed; min-height: 96px; }
.rqs-custom { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; align-items: end; }
.rqs-approve {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--purple-light);
  min-width: 0;
}
.rqs-approve-grid { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 12px; align-items: start; }
.rqs-fee { position: relative; }
.rqs-fee .input { padding-left: 28px; font-variant-numeric: tabular-nums; }
.rqs-fee::before { content: '$'; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 600; pointer-events: none; }
.rqs-revenue { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--success-ink); font-weight: 600; min-width: 0; }
.rqs-revenue svg { flex: none; }
.rqs-revenue span { min-width: 0; }
.rqs-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.rqs-buttons .btn-primary { flex: 1 1 220px; }
.rqs-outcome { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-soft); }
.rqs-outcome-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--purple-tint); color: var(--purple); }
.rqs-outcome.is-good .rqs-outcome-icon { background: var(--success-tint); color: var(--success-ink); }
.rqs-outcome.is-bad .rqs-outcome-icon { background: var(--danger-tint); color: var(--danger-ink); }
.rqs-outcome-text { min-width: 0; }
.rqs-outcome-text p:first-child { font-weight: 600; }
.rqs-outcome-text p + p { font-size: 13px; color: var(--ink-2); }
.rqs-empty-detail { display: grid; place-items: center; min-height: 360px; padding: 24px; border-radius: var(--radius-lg); border: 1.5px dashed var(--line-strong); color: var(--ink-2); text-align: center; }

@media (max-width: 479px) {
  .rqs-approve-grid { grid-template-columns: minmax(0, 1fr); }
  .sv-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1024px) {
  .rqs-layout { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
  .rqs-detail-col { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; border-radius: var(--radius-lg); }
}
