/* Application styles */

/* NOTE: Fix for a slightly higher form when produced by button_to */
form.button_to {
  line-height: 1;
}

/* ── Collapsible Sidebar ── */

:root {
  --sidebar-width: 18rem;
  --sidebar-collapsed-width: 4.5rem;
}

html[data-sidebar-collapsed] {
  --sidebar-width: 4.5rem;
}

/* Active nav-item accent bar (DS Sidebar anatomy). Real CSS rather than the
   Tailwind before:* chain (arbitrary `content-['']` compiled unreliably).
   Floats in the gutter to the LEFT of the active pill (left:-8px); the
   foldable sections' overflow-hidden <ul> would clip it, so that <ul> carries
   extra negative margin + matching padding (see _sidebar_section) to move its
   clip boundary left of the bar. The item is `relative` (NavItemComponent link
   classes), so this anchors to it. */
.sidebar-nav-active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 4px;
  background: var(--accent-bright);
}

/* Sidebar utility classes (only apply on lg+ screens) */
@media (min-width: 1024px) {
  .lg\:pl-sidebar {
    padding-left: var(--sidebar-width);
    transition: padding-left 200ms ease;
  }

  .lg\:left-sidebar {
    left: var(--sidebar-width);
    transition: left 200ms ease;
  }

  .lg\:w-sidebar {
    width: var(--sidebar-width);
    transition: width 200ms ease;
  }

  /* Sidebar content padding */
  .sidebar-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    transition: padding 200ms ease;
  }

  html[data-sidebar-collapsed] .sidebar-content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* App platform immersive mode (§7): the app fills the viewport — hide the
     platform rail and drop the shell's sidebar gutter. A MODE, not a fork:
     Esc / close remove the attribute and the rail returns. */
  html[data-app-immersive] [data-controller="nav-sidebar"] {
    display: none;
  }
  html[data-app-immersive] .app-shell {
    padding-left: 0;
  }

  /* Hide text labels when collapsed */
  .sidebar-label {
    opacity: 1;
    width: auto;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 200ms ease, width 200ms ease;
  }

  html[data-sidebar-collapsed] .sidebar-label {
    display: none;
  }

  /* Hide fold-section headers (e.g. "Work", "Admin") when collapsed —
     the header becomes non-interactive too, since folding is disabled
     in the icon rail (sections always show full content there). */
  .sidebar-section-title {
    opacity: 1;
    height: auto;
    overflow: hidden;
    transition: opacity 200ms ease, height 200ms ease;
  }

  html[data-sidebar-collapsed] .sidebar-section-title {
    opacity: 0;
    height: 0;
    pointer-events: none;
  }

  /* A thin divider replaces the header in the collapsed rail, so groups
     stay legible once their micro-labels disappear (DS SidebarSection). */
  .sidebar-section-divider {
    display: none;
  }

  html[data-sidebar-collapsed] .sidebar-section-divider {
    display: block;
    height: 1px;
    margin: 14px 10px 10px;
    background: var(--side-line);
  }

  /* Foldable nav sections — CSS grid accordion (1fr <-> 0fr) animates
     smoothly regardless of content height. Requires the child (see
     _sidebar_section.html.erb) to carry min-h-0 + overflow-hidden. */
  .sidebar-fold-content {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 200ms ease;
  }

  .sidebar-section-chevron {
    transition: transform 200ms ease;
    transform: rotate(90deg);
  }

  /* Fold state is driven by data-nav-folded on <html> (space-separated
     section keys), set synchronously in _head.html.erb before first
     paint so the page already matches the saved preference — no
     expand-then-collapse flash. The controller only flips this
     attribute (+ localStorage) on click. */
  html[data-nav-folded~="work"] [data-sidebar-sections-key-value="work"] .sidebar-fold-content,
  html[data-nav-folded~="communication"] [data-sidebar-sections-key-value="communication"] .sidebar-fold-content,
  html[data-nav-folded~="organisation"] [data-sidebar-sections-key-value="organisation"] .sidebar-fold-content,
  html[data-nav-folded~="admin"] [data-sidebar-sections-key-value="admin"] .sidebar-fold-content {
    grid-template-rows: 0fr;
  }

  html[data-nav-folded~="work"] [data-sidebar-sections-key-value="work"] .sidebar-section-chevron,
  html[data-nav-folded~="communication"] [data-sidebar-sections-key-value="communication"] .sidebar-section-chevron,
  html[data-nav-folded~="organisation"] [data-sidebar-sections-key-value="organisation"] .sidebar-section-chevron,
  html[data-nav-folded~="admin"] [data-sidebar-sections-key-value="admin"] .sidebar-section-chevron {
    transform: rotate(0deg);
  }

  /* Folding is disabled in the collapsed icon rail — always show full
     content there, regardless of the saved fold preference. */
  html[data-sidebar-collapsed] .sidebar-fold-content {
    grid-template-rows: 1fr !important;
  }

  /* The superadmin tools (Avo, Analytics, Mission Control, …) are not worth
     the rail's height — hide the whole section in the collapsed rail. */
  html[data-sidebar-collapsed] [data-sidebar-sections-key-value="admin"] {
    display: none;
  }

  /* Hide user profile name when collapsed */
  html[data-sidebar-collapsed] .sidebar-user-profile .flex.flex-col {
    display: none;
  }

  html[data-sidebar-collapsed] .sidebar-user-profile {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 0 !important;
  }

  html[data-sidebar-collapsed] .sidebar-user-profile .space-x-2 > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Footer avatar — DS Sidebar anatomy: 36px (was md/40px) and no ring-2
     ring-card halo, which reads as a stray white ring on the dark rail. Scoped
     to the avatar disc (.size-10) so the status dot's own ring is untouched. */
  .sidebar-user-profile .size-10 {
    width: 2.25rem;
    height: 2.25rem;
    box-shadow: none;
  }


  /* Center nav item links when collapsed */
  html[data-sidebar-collapsed] .sidebar-tooltip-parent a,
  html[data-sidebar-collapsed] .sidebar-tooltip-parent button {
    justify-content: center;
    gap: 0;
  }

  /* Collapsed nav item box: a centered, roomy square instead of a full-width
     pill — gives the icon breathing room and keeps the active fill clear of the
     accent bar in the gutter to its left. The active/hover bg + inset ring
     follow this box. */
  html[data-sidebar-collapsed] .sidebar-tooltip-parent a {
    width: 2.75rem;
    height: 2.75rem;
    margin-inline: auto;
  }

  /* Neutralize all negative margins inside sidebar when collapsed */
  html[data-sidebar-collapsed] .sidebar-content [class*="-mx-"] {
    margin-left: 0;
    margin-right: 0;
  }

  /* Reduce spacing between nav items when collapsed, keep group gaps */
  html[data-sidebar-collapsed] .sidebar-content nav .space-y-1 > * {
    margin-top: 0;
  }

  html[data-sidebar-collapsed] .sidebar-content .gap-y-5 {
    gap: 0.25rem;
  }

  /* Tooltip on hover when collapsed */
  .sidebar-tooltip {
    display: none;
  }

  html[data-sidebar-collapsed] .sidebar-tooltip-parent {
    position: relative;
  }

  html[data-sidebar-collapsed] .sidebar-tooltip-parent:hover .sidebar-tooltip {
    display: flex;
    position: fixed;
    left: calc(var(--sidebar-width) + 0.5rem);
    padding: 0.375rem 0.75rem;
    background-color: var(--side);
    color: var(--side-ink);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: var(--shadow-pop);
  }

  /* Badge: show full in expanded, small overlay in collapsed */
  .sidebar-badge-collapsed {
    display: none;
  }

  html[data-sidebar-collapsed] .sidebar-badge-full {
    display: none;
  }

  html[data-sidebar-collapsed] .sidebar-badge-collapsed {
    display: block;
    position: absolute;
    top: -0.125rem;
    right: 0.25rem;
    z-index: 1;
  }

  /* Toggle button rotation */
  .sidebar-toggle-icon {
    transition: transform 200ms ease;
  }

  html[data-sidebar-collapsed] .sidebar-toggle-icon {
    transform: rotate(180deg);
  }

  /* Device chip (shared device mode, DeviceChipComponent): the full row in
     the expanded sidebar, a 40px square in the collapsed icon rail. */
  html[data-sidebar-collapsed] .sidebar-chip-full {
    display: none !important;
  }

  html[data-sidebar-collapsed] .sidebar-chip-rail {
    display: flex !important;
  }

  /* Logo area collapsed state */
  html[data-sidebar-collapsed] .sidebar-logo-full {
    display: none !important;
  }

  .sidebar-logo-collapsed {
    display: none !important;
  }

  html[data-sidebar-collapsed] .sidebar-logo-collapsed {
    display: flex !important;
  }
}

/* Device chip rail square is only shown in the collapsed desktop rail (above). */
.sidebar-chip-rail {
  display: none;
}

/* ── User profile cards (sidebar footer + mobile menu) ──
   A long display name must clamp instead of widening the card past its rail.
   AppAvatarComponent's wrapper is flex-none (it must not shrink in other
   contexts like chat headers), so allow shrinking here and give the name
   column a min-width so its line-clamp-1 can bite. Outside the lg media
   query: the mobile menu needs it too. */
.sidebar-user-profile > [data-app-avatar-component-user],
.mobile-user-profile > [data-app-avatar-component-user] {
  flex: 0 1 auto;
  min-width: 0;
}

.sidebar-user-profile .flex.flex-col,
.mobile-user-profile .flex.flex-col {
  min-width: 0;
}

/* ── Uniform prose color (all typography elements inherit parent text color) ── */

.prose-uniform {
  --tw-prose-body: currentColor;
  --tw-prose-headings: currentColor;
  --tw-prose-bold: currentColor;
  --tw-prose-counters: currentColor;
  --tw-prose-bullets: currentColor;
  --tw-prose-quotes: currentColor;
  --tw-prose-code: currentColor;
  --tw-prose-th-borders: currentColor;
}

/* ── Chat Message Actions (copy/feedback buttons) ── */
/* Always visible on the last message; hover-revealed on earlier messages */
#chat_messages > :last-child .message-actions {
  opacity: 1;
}

/* ── Bouncing Dots (chat loading ellipsis) ── */

@keyframes bounce-dot {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
}

.dot-bounce span:nth-child(1) { animation: bounce-dot 1.4s ease-in-out infinite; }
.dot-bounce span:nth-child(2) { animation: bounce-dot 1.4s ease-in-out 0.2s infinite; }
.dot-bounce span:nth-child(3) { animation: bounce-dot 1.4s ease-in-out 0.4s infinite; }

/* ── Code Block Styling ── */

/* Override highlight.js theme background so it doesn't create a nested box */
.prose pre code.hljs {
  background: transparent;
  padding: 0;
}

/* Code block container */
.prose pre {
  background: #1e293b; /* slate-800 */
  color: #e2e8f0; /* slate-200 */
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  line-height: 1.625;
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent; /* slate-600 thumb, transparent track */
}

/* Webkit scrollbar for code blocks */
.prose pre::-webkit-scrollbar {
  height: 6px;
}

.prose pre::-webkit-scrollbar-track {
  background: transparent;
}

.prose pre::-webkit-scrollbar-thumb {
  background: #475569; /* slate-600 */
  border-radius: 3px;
}

.prose pre::-webkit-scrollbar-thumb:hover {
  background: #64748b; /* slate-500 */
}

/* Code inside pre blocks — reset to inherit from pre */
.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* The first section sits directly under the logo block — a divider there
   reads as redundant chrome, so only show dividers between sections. */
html[data-sidebar-collapsed] .sidebar-nav > li:first-of-type .sidebar-section-divider {
  display: none;
}

/* ── App platform runtime shell — host chrome (design: App Platform v1) ── */
.app-hostbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}
.app-hostbar__divider { width: 1px; height: 26px; background: var(--line); flex: none; }
.app-hostbar__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-btn);
  background: var(--tint); color: var(--accent-deep); flex: none;
}
.app-hostbar__name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.app-hostbar__eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
/* square icon buttons (immersive toggle, close) */
.app-hostbar__btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.app-hostbar__btn:hover { border-color: var(--tint-line); color: var(--accent-deep); }
.app-hostbar__btn--close:hover { border-color: var(--danger); color: var(--danger); }

/* immersive exit pill — only shown in immersive mode */
.app-exit-pill {
  display: none; align-items: center; gap: 9px; background: var(--side); color: #fff;
  border: none; border-radius: var(--r-pill); padding: 8px 14px 8px 11px; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-pop);
}
.app-shell--immersive .app-exit-pill { display: inline-flex; }
.app-exit-pill:hover { background: var(--side-2); }
.app-exit-pill kbd {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.35); border-radius: 5px; padding: 1px 5px; opacity: .85;
}

/* case-binding chip + picker */
.app-casechip {
  display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r-pill);
  padding: 7px 13px; cursor: pointer; font-family: var(--font-body); font-size: 13px; font-weight: 700;
}
.app-casechip--bound { background: var(--tint); color: var(--on-tint); border: none; }
.app-casechip--bound:hover { box-shadow: var(--ring); }
.app-casechip--empty { background: none; color: var(--muted); border: 1.5px dashed var(--line-strong); }
.app-casechip--empty:hover { border-color: var(--tint-line); color: var(--on-tint); }
.app-casechip summary { list-style: none; }
.app-casechip summary::-webkit-details-marker { display: none; }
.app-picker {
  position: absolute; top: calc(100% + 8px); left: 0; width: 300px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-pop);
  z-index: 50; overflow: hidden; animation: appPickerIn .16s var(--ease);
}
@keyframes appPickerIn { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.app-picker__head {
  padding: 12px 16px 8px; font-size: 11px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.app-picker__row {
  display: flex; align-items: center; gap: 11px; width: 100%; box-sizing: border-box; text-align: left;
  padding: 11px 16px; background: none; border: none; border-top: 1px solid var(--line); cursor: pointer;
  font-family: var(--font-body);
}
.app-picker__row:hover { background: var(--card-warm); }
.app-picker__row-name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.app-picker__row-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.app-picker__disconnect {
  display: block; width: 100%; text-align: center; padding: 10px; background: var(--card-warm);
  border: none; border-top: 1px solid var(--line); cursor: pointer; font-family: var(--font-body);
  font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.app-picker__disconnect:hover { color: var(--danger); }

/* create-a-new-case fold-out inside the picker */
.app-picker__create-toggle {
  display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box; text-align: left;
  padding: 11px 16px; background: none; border: none; border-top: 1px solid var(--line); cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--on-tint);
}
.app-picker__create-toggle:hover { background: var(--card-warm); }
.app-picker__create {
  padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--card-warm);
  display: flex; flex-direction: column; gap: 12px;
}
.app-picker__create form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.app-picker__create[hidden] { display: none; }
.app-picker__input {
  width: 100%; box-sizing: border-box; font-family: var(--font-body); font-size: 13.5px;
  color: var(--ink); background: var(--card); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-field); padding: 9px 12px; outline: none;
}
.app-picker__input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.app-picker__create-submit {
  width: 100%; box-sizing: border-box; padding: 10px; border: none; border-radius: var(--r-btn);
  background: var(--accent); color: #fff; font-family: var(--font-body); font-size: 13.5px;
  font-weight: 700; cursor: pointer; box-shadow: var(--shadow-btn);
}
.app-picker__create-submit:hover { background: var(--accent-deep); }
.app-picker__error { margin: 0; font-size: 12.5px; color: var(--danger-strong); }

/* mic state pill (JS toggles the state class) */
.app-mic-pill {
  display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r-pill);
  padding: 6px 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.app-mic-pill__dot, .app-mic-pill__eq, .app-mic-pill__dots, .app-mic-pill__ico-busy { display: none; }
.app-mic-pill__ico { display: inline-flex; }
.app-mic-pill--recording {
  color: var(--ink); background: color-mix(in oklab, var(--live) 13%, var(--card));
  border-color: color-mix(in oklab, var(--live) 40%, transparent);
}
.app-mic-pill--recording .app-mic-pill__ico { display: none; }
.app-mic-pill--recording .app-mic-pill__dot { display: inline-block; width: 8px; height: 8px;
  border-radius: 9999px; background: var(--live); animation: dcPulse 1.2s var(--ease) infinite; }
.app-mic-pill--recording .app-mic-pill__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.app-mic-pill__eq i { width: 2.5px; height: 100%; background: currentColor; border-radius: 2px;
  transform-origin: bottom; animation: dcEq .9s var(--ease) infinite; }
.app-mic-pill__eq i:nth-child(2) { animation-delay: .15s; }
.app-mic-pill__eq i:nth-child(3) { animation-delay: .3s; }
.app-mic-pill--transcribing { color: var(--muted); background: var(--card-warm); border-color: var(--line); }
.app-mic-pill--transcribing .app-mic-pill__ico { display: none; }
.app-mic-pill--transcribing .app-mic-pill__dots { display: inline-flex; gap: 3px; }
.app-mic-pill__dots i { width: 4px; height: 4px; border-radius: 9999px; background: currentColor;
  animation: dcPulse 1.1s var(--ease) infinite; }
.app-mic-pill__dots i:nth-child(2) { animation-delay: .2s; }
.app-mic-pill__dots i:nth-child(3) { animation-delay: .4s; }
.app-mic-pill--busy {
  color: var(--warn-deep); background: var(--warn-bg);
  border-color: color-mix(in oklab, var(--warn-deep) 35%, transparent);
}
.app-mic-pill--busy .app-mic-pill__ico { display: none; }
.app-mic-pill--busy .app-mic-pill__ico-busy { display: inline-flex; }

/* Save-to-case review ceremony (§2 principle 6) — a HOST-owned dialog over
   the untrusted app frame. Native <dialog> keeps the focus trap, inert
   backdrop and Esc; the geometry is pinned explicitly (not left to the UA
   :modal centering, which the utility soup was defeating) so the sheet is
   always a centered card. Design: App Platform v1 "Review before saving". */
.app-review-dialog {
  width: 560px; max-width: 94vw; max-height: 92vh; overflow-y: auto;
  padding: 26px 28px 22px; box-sizing: border-box;
  border: none; background: var(--card); color: var(--ink);
  border-radius: var(--r-card-lg); box-shadow: var(--shadow-pop);
  font-family: var(--font-body);
}
.app-review-dialog[open] {
  position: fixed; inset: 0; margin: auto; height: fit-content;
  animation: appReviewIn .18s var(--ease);
}
.app-review-dialog:focus, .app-review-dialog:focus-visible { outline: none; }
.app-review-dialog::backdrop { background: oklch(0.25 0.04 245 / .45); }
@keyframes appReviewIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }

.app-review__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.app-review__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.app-review__draft {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--warn-deep); background: var(--warn-bg); padding: 4px 11px; border-radius: var(--r-pill);
}
.app-review__title { font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.2; margin: 0 0 14px; color: var(--ink); }
.app-review__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.app-review__chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: var(--r-pill); white-space: nowrap;
}
.app-review__chip--ai { background: var(--ai-bg); color: var(--ai); }
.app-review__chip--case { background: var(--tint); color: var(--on-tint); }
.app-review__chip--type { background: var(--chip-bg); color: var(--ink-2); }
.app-review__reading {
  background: var(--card-warm); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 15px 17px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2);
  white-space: pre-line; margin-bottom: 12px;
}
/* Sanitized, read-only chart snapshot (dental_chart etc.) in the review sheet. */
.app-review__chart {
  background: var(--card-warm); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 8px; margin-bottom: 12px; max-height: 44vh; overflow: auto;
}
.app-review__chart svg { width: 100%; height: auto; display: block; }
.app-review__fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.app-review__fieldrow { display: flex; gap: 8px; }
.app-review__label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.app-review__field {
  width: 100%; box-sizing: border-box; background: var(--card); border: 1px solid var(--line-strong);
  border-radius: var(--r-field); padding: 9px 11px; font-size: 13.5px; color: var(--ink); font-family: inherit;
}
.app-review__field--code { width: 5.5rem; flex: none; font-family: var(--font-mono); }
.app-review__field:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.app-review__note { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 18px; }
.app-review__note-ico { color: var(--accent); margin-top: 1px; flex: none; }
.app-review__note-text { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.app-review__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.app-review__actions--center { justify-content: center; }
.app-review__spacer { flex: 1; }
.app-review__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px;
  padding: 0 18px; border-radius: var(--r-btn); font-family: var(--font-body); font-size: 14px;
  font-weight: 700; cursor: pointer; border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
}
.app-review__btn--outline { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.app-review__btn--outline:hover { border-color: var(--accent); color: var(--accent-deep); }
.app-review__btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-btn); }
.app-review__btn--primary:hover { background: var(--accent-deep); box-shadow: var(--shadow-btn-hover); }

/* Terminal confirmation states rendered into the same sheet frame. */
.app-review__result { text-align: center; padding: 6px 0 4px; }
.app-review__result-ico { display: inline-flex; margin-bottom: 10px; }
.app-review__result-ico--ok { color: var(--ok); }
.app-review__result-ico--warn { color: var(--warn-deep); }
.app-review__result-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.app-review__result-body { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 auto 16px; max-width: 34ch; }
