/* dc90-chat-layout */
﻿/* AI Smart Notes — responsive layer (mobile field + desktop)
 * Loaded after the Tailwind build. Does not replace it.
 */

:root {
  --asn-touch: 44px;
  --asn-gutter: 12px;
  --asn-safe-bottom: env(safe-area-inset-bottom, 0px);
  --asn-safe-top: env(safe-area-inset-top, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-top: var(--asn-safe-top);
  padding-bottom: var(--asn-safe-bottom);
  overflow-x: hidden;
}

#root {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ---------- Mobile / narrow (phones, small tablets) ---------- */
@media (max-width: 767px) {
  /* App shell: use full width, tighter gutters */
  #root > div.mx-auto.flex.min-h-screen,
  #root > div[class*="min-h-screen"] {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: max(var(--asn-gutter), env(safe-area-inset-left, 0px)) !important;
    padding-right: max(var(--asn-gutter), env(safe-area-inset-right, 0px)) !important;
    padding-bottom: calc(1rem + var(--asn-safe-bottom)) !important;
    padding-top: 0.75rem !important;
  }

  /* Header */
  header.rounded-2xl,
  header[class*="rounded-2xl"] {
    padding: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }

  header h1 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }

  header .mt-1.text-sm {
    font-size: 0.75rem !important;
  }

  /* Nav: wrap to 2 rows so all tabs stay visible */
  header nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    overflow-x: visible !important;
    padding-bottom: 0.15rem !important;
    margin-top: 0.55rem !important;
  }

  header nav a,
  header nav button {
    flex: 0 0 auto !important;
    min-height: var(--asn-touch) !important;
    padding: 0.55rem 0.9rem !important;
    font-size: 0.875rem !important;
    white-space: nowrap !important;
  }

  /* Logout + primary actions */
  header button,
  main button,
  main a.rounded-lg,
  main a[class*="rounded-lg"] {
    min-height: var(--asn-touch);
  }

  /* Forms: 16px prevents iOS focus-zoom */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
    min-height: var(--asn-touch);
    max-width: 100%;
  }

  textarea {
    min-height: 6.5rem;
  }

  /* Login / narrow cards */
  section.mx-auto,
  section[class*="max-w-md"],
  section[class*="max-w-2xl"],
  .max-w-md,
  .max-w-2xl {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Home action row */
  [data-testid="notes-count"],
  section.space-y-4 > div.flex {
    gap: 0.5rem !important;
  }

  section.space-y-4 > div.flex.flex-wrap a,
  section.space-y-4 > div.flex.flex-wrap button {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  /* Note cards — field readable */
  [data-testid="note-list-item"] {
    padding: 0.85rem !important;
  }

  [data-testid="note-list-item"] .font-medium {
    font-size: 1.05rem !important;
    line-height: 1.35 !important;
    word-break: break-word;
  }

  [data-testid="note-body-text"] > div,
  [data-testid="note-transcript-text"] > div {
    max-height: none !important;
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
  }

  /* Action buttons: full-width stack for thumbs */
  [data-testid="note-actions"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.45rem !important;
  }

  [data-testid="note-actions"] > *,
  [data-testid="note-actions"] button {
    width: 100% !important;
    min-height: var(--asn-touch) !important;
    justify-content: center;
    text-align: center;
  }

  /* Fragments / nested button groups still stretch */
  [data-testid="note-actions"] button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* Chat: PC-like split (sessions | conversation) — refined below in dc101g */
  [data-testid="chat-page"] {
    flex-direction: row !important;
  }

  /* Filters / grids → single column */
  .sm\:grid-cols-2,
  .sm\:grid-cols-3,
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }

  /* Tables: horizontal scroll instead of overflowing page */
  .overflow-x-auto,
  table {
    max-width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* WS banner: don't dominate */
  [data-testid="ws-capability-banner"] {
    font-size: 0.7rem !important;
    line-height: 1.35 !important;
  }

  /* Sticky-ish bottom space for thumb reach when scrolling notes */
  main {
    padding-bottom: 1.25rem;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 380px) {
  header h1 {
    font-size: 1.1rem !important;
  }

  header nav a,
  header nav button {
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
    font-size: 0.8rem !important;
  }
}

/* ---------- Desktop / tablet landscape ---------- */
@media (min-width: 768px) {
  #root > div[class*="min-h-screen"] {
    /* Wider shell so notes master-detail can breathe */
    max-width: 72rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  [data-testid="note-actions"] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  [data-testid="note-actions"] button {
    width: auto !important;
  }

  /* aside (history) | main (messages) — do NOT place hint as a flex sibling */
  [data-testid="chat-page"] {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
  }

  [data-testid="chat-ask-hint"] {
    display: none !important;
  }

  [data-testid="chat-history"] {
    width: 14rem !important;
    max-width: 14rem !important;
    flex: 0 0 14rem !important;
    max-height: none !important;
  }

  [data-testid="chat-page"] > div.flex.min-w-0.flex-1,
  [data-testid="chat-page"] > div[class*="flex-1"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  /* Notes: left rail (titles) + right detail (chat-like) */
  [data-testid="notes-split"] {
    display: grid !important;
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    min-height: 28rem;
  }

  [data-testid="notes-rail"] {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    background: rgba(248, 250, 252, 0.9);
    overflow-y: auto;
    max-height: min(70vh, 40rem);
  }

  html.dark [data-testid="notes-rail"] {
    border-color: rgb(51 65 85);
    background: rgba(15, 23, 42, 0.7);
  }

  .asn-notes-rail-item {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 0.55rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    margin-bottom: 0.25rem;
  }

  .asn-notes-rail-item:hover {
    background: rgba(15, 118, 110, 0.08);
  }

  .asn-notes-rail-item--sel,
  .asn-notes-rail-item[data-selected="1"] {
    background: rgba(15, 118, 110, 0.14);
    border-color: rgba(15, 118, 110, 0.35);
  }

  .asn-notes-rail-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: rgb(15 23 42);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.dark .asn-notes-rail-title {
    color: rgb(241 245 249);
  }

  .asn-notes-rail-meta {
    margin: 0.2rem 0 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(100 116 139);
  }

  [data-testid="notes-detail"] {
    min-width: 0;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.75rem;
    overflow: auto;
    max-height: min(70vh, 40rem);
  }

  html.dark [data-testid="notes-detail"] {
    border-color: rgb(51 65 85);
    background: rgba(15, 23, 42, 0.85);
  }

  .asn-notes-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    color: rgb(100 116 139);
    font-size: 0.9rem;
  }

  /* Full note text in detail pane — no tiny scroll box */
  [data-testid="notes-detail"] [data-testid="note-list-item"] {
    border: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0.35rem !important;
    background: transparent !important;
  }

  [data-testid="notes-detail"] [data-testid="note-body-text"] > div,
  [data-testid="notes-detail"] [data-testid="note-transcript-text"] > div {
    max-height: none !important;
    overflow: visible !important;
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: 0.95rem;
  }
}

/* Mobile notes: PC-like split (rail | detail); landscape gets more room */
@media (max-width: 767px) {
  [data-testid="notes-split"],
  .asn-notes-split {
    display: grid !important;
    grid-template-columns: minmax(5.5rem, var(--asn-notes-rail-pct, 34%)) minmax(0, 1fr);
    gap: 0.45rem;
    align-items: stretch;
    min-height: calc(100dvh - 11.5rem);
  }

  [data-testid="notes-split"].asn-notes-has-splitter,
  .asn-notes-split.asn-notes-has-splitter {
    grid-template-columns:
      minmax(5.5rem, var(--asn-notes-rail-pct, 34%))
      14px
      minmax(0, 1fr);
    gap: 0;
  }

  .asn-notes-splitter {
    display: none;
    touch-action: none;
    cursor: col-resize;
    position: relative;
    z-index: 5;
    width: 14px;
    margin: 0 -1px;
    align-self: stretch;
    background: transparent;
  }

  [data-testid="notes-split"].asn-notes-has-splitter .asn-notes-splitter {
    display: block;
  }

  .asn-notes-splitter::before {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgb(148 163 184);
  }

  .asn-notes-splitter::after {
    content: "⋮";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    line-height: 1;
    color: rgb(100 116 139);
    pointer-events: none;
  }

  html.dark .asn-notes-splitter::before {
    background: rgb(100 116 139);
  }

  [data-testid="notes-split"].asn-notes-splitting,
  [data-testid="notes-split"].asn-notes-splitting * {
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  [data-testid="notes-rail"] {
    list-style: none;
    margin: 0;
    padding: 0.2rem;
    max-height: calc(100dvh - 11.5rem) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.65rem;
    background: rgba(248, 250, 252, 0.95);
  }

  html.dark [data-testid="notes-rail"] {
    border-color: rgb(51 65 85);
    background: rgba(15, 23, 42, 0.75);
  }

  .asn-notes-rail-item {
    padding: 0.5rem 0.55rem;
    border-bottom: 1px solid rgb(226 232 240);
    border-radius: 0.4rem;
  }

  html.dark .asn-notes-rail-item {
    border-bottom-color: rgb(51 65 85);
  }

  .asn-notes-rail-item--sel,
  .asn-notes-rail-item[data-selected="1"] {
    background: rgba(15, 118, 110, 0.14);
  }

  .asn-notes-rail-title {
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.25;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .asn-notes-rail-meta {
    margin: 0.1rem 0 0;
    font-size: 0.62rem;
    color: rgb(100 116 139);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  [data-testid="notes-detail"] {
    min-width: 0;
    max-height: calc(100dvh - 11.5rem) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.55rem !important;
  }

  html.dark [data-testid="notes-detail"] {
    border-color: rgb(51 65 85);
    background: rgba(15, 23, 42, 0.85);
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  [data-testid="notes-split"],
  .asn-notes-split {
    grid-template-columns: minmax(7rem, var(--asn-notes-rail-pct, 38%)) minmax(0, 1fr);
    min-height: calc(100dvh - 8rem);
    gap: 0.55rem;
  }

  [data-testid="notes-split"].asn-notes-has-splitter,
  .asn-notes-split.asn-notes-has-splitter {
    grid-template-columns:
      minmax(7rem, var(--asn-notes-rail-pct, 38%))
      14px
      minmax(0, 1fr);
    gap: 0;
  }

  [data-testid="notes-rail"],
  [data-testid="notes-detail"] {
    max-height: calc(100dvh - 8rem) !important;
  }

  .asn-notes-rail-title {
    font-size: 0.85rem;
  }
}




@media (max-width: 767px) and (orientation: landscape) {
  [data-testid="chat-page"] {
    min-height: calc(100dvh - 7.5rem) !important;
    max-height: calc(100dvh - 7.5rem) !important;
  }
}

/* Filter modal — true viewport overlay (do not depend on purged Tailwind utilities) */
.asn-filter-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  background: rgba(0, 0, 0, 0.55) !important;
  box-sizing: border-box !important;
}

.asn-filter-dialog {
  width: min(28rem, 100%) !important;
  max-height: min(85vh, 40rem) !important;
  overflow: auto !important;
  border-radius: 0.75rem !important;
  border: 1px solid rgb(226 232 240) !important;
  background: #fff !important;
  padding: 1rem !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
}

html.dark .asn-filter-dialog {
  border-color: rgb(51 65 85) !important;
  background: rgb(15 23 42) !important;
}

/* ---------- Notes toolbar: search left + filters right (desktop) ---------- */
.asn-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.asn-notes-search {
  flex: 1 1 14rem;
  min-width: 12rem;
  max-width: 28rem;
}

.asn-notes-search-input {
  width: 100%;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgb(15 23 42);
}

.asn-notes-search-input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: rgb(15 118 110);
}

html.dark .asn-notes-search-input {
  border-color: rgb(71 85 105);
  background: rgb(2 6 23);
  color: rgb(241 245 249);
}

.asn-filter-btn {
  flex: 0 0 auto;
  position: relative;
}

.asn-filter-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.15rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.asn-filter-x:hover {
  background: #b91c1c;
}

.asn-notes-rail-item--hit {
  box-shadow: inset 3px 0 0 rgb(15 118 110);
  background: rgba(15, 118, 110, 0.1);
}

.asn-notes-rail-item--miss {
  opacity: 0.38;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Shared polish ---------- */
button,
a[role="button"],
[data-testid^="note-"] button {
  touch-action: manipulation;
}

img,
video,
canvas {
  max-width: 100%;
  height: auto;
}

/* asn_help_dc81 */
.asn-help-page{max-width:48rem;margin:0 auto;padding:0.5rem 0 2rem}
.asn-help-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}
.asn-help-h1{font-size:1.5rem;font-weight:700;color:#134e4a}
.dark .asn-help-h1{color:#99f6e4}
.asn-help-back{display:inline-flex;align-items:center;border-radius:.5rem;border:1px solid #cbd5e1;padding:.4rem .75rem;font-size:.875rem;font-weight:600;color:#334155;text-decoration:none}
.dark .asn-help-back{border-color:#475569;color:#e2e8f0}
.asn-help-back:hover{border-color:#0f766e;color:#0f766e}
.asn-help-lead{font-size:.95rem;line-height:1.55;color:#475569;margin:.5rem 0 1rem}
.dark .asn-help-lead{color:#94a3b8}
.asn-help-note{font-size:.8rem;color:#0f766e;margin-bottom:1.25rem}
.dark .asn-help-note{color:#5eead4}
.asn-help-sec{margin:0 0 1.1rem;padding:0 0 1rem;border-bottom:1px solid #e2e8f0}
.dark .asn-help-sec{border-color:#334155}
.asn-help-h2{font-size:1.05rem;font-weight:700;color:#0f172a;margin:0 0 .35rem}
.dark .asn-help-h2{color:#f1f5f9}
.asn-help-group{margin-top:1.5rem;padding-top:.5rem;border-top:2px solid #99f6e4}
.asn-help-admin{border-top-color:#f59e0b}
.asn-help-p{font-size:.9rem;line-height:1.55;color:#334155;margin:0}
.dark .asn-help-p{color:#cbd5e1}
/* asn_pw_modal_dc83 — reuse filter modal shell */
.asn-pw-modal .asn-filter-dialog{max-width:28rem}


/* ========== asn_newnote_title_machine_dc101e — mobile Text note ========== */
@media (max-width: 767px) {
  [data-testid="text-note-section"] > div.mt-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 0.45rem !important;
    row-gap: 0.55rem !important;
    align-items: start;
  }

  /* kill space-y margins that fight the grid */
  [data-testid="text-note-section"] > div.mt-3 > * {
    margin-top: 0 !important;
  }

  [data-testid="text-note-section"] > div.mt-3 > p {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  [data-testid="text-note-section"] label:has([data-testid="note-problem"]) {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  [data-testid="text-note-section"] label:has([data-testid="ctx-machine"]) {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }

  [data-testid="text-note-section"] label:has([data-testid="note-tags"]) {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  [data-testid="text-note-section"] label:has([data-testid="note-body"]) {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  [data-testid="text-note-section"] [data-testid="note-save-text"] {
    grid-column: 1 / -1;
    grid-row: 5;
  }

  /* Title: one-line field, equal share with Machine; scroll long text */
  [data-testid="text-note-section"] [data-testid="note-problem"] {
    display: block;
    width: 100% !important;
    min-height: 2.5rem !important;
    height: 2.5rem !important;
    max-height: 2.5rem !important;
    padding: 0.45rem 0.65rem !important;
    line-height: 1.35 !important;
    resize: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    field-sizing: fixed;
  }

  [data-testid="text-note-section"] [data-testid="ctx-machine"] {
    width: 100% !important;
    min-height: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0.45rem 0.65rem !important;
    overflow-x: auto !important;
    text-overflow: clip;
  }

  [data-testid="text-note-section"] label:has([data-testid="note-problem"]) > span,
  [data-testid="text-note-section"] label:has([data-testid="ctx-machine"]) > span {
    font-size: 0.75rem !important;
    margin-bottom: 0.2rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ========== asn_mobile_ui_dc101 — Agiva mobile simplify ========== */
.asn-nav-more-btn,
.asn-chat-hist-toggle,
.asn-notes-back {
  display: none;
}

@media (max-width: 767px) {
  /* Compact header */
  header.asn-app-header,
  header.rounded-2xl {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 0.55rem 0.7rem !important;
    margin-bottom: 0.55rem !important;
    border-radius: 0.9rem !important;
  }

  header.asn-app-header h1,
  header h1 {
    font-size: 1.1rem !important;
    letter-spacing: -0.02em;
  }

  /* Tagline / admin suffix — hide on phone */
  header.asn-app-header > div > div > p.mt-1,
  header > div.flex > div > p.mt-1.text-sm {
    display: none !important;
  }

  header [data-testid="nav-logout"] {
    min-height: 2.25rem !important;
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8rem !important;
  }

  /* Nav: all tabs visible (wrap to 2nd row); no More/Less */
  header nav.asn-mob-nav,
  header nav {
    margin-top: 0.5rem !important;
    gap: 0.4rem !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
  }

  header nav .asn-nav-primary,
  header nav .asn-nav-secondary,
  header nav a {
    display: inline-flex !important;
  }

  .asn-nav-more-btn {
    display: none !important;
  }

  /* WS banner quieter */
  [data-testid="ws-capability-banner"] {
    display: none !important;
  }

  /* Chat: sessions left | conversation right + splitter (like Notes) */
  .asn-chat-mob-bar,
  .asn-chat-hist-toggle {
    display: none !important;
  }

  [data-testid="chat-page"] {
    display: grid !important;
    grid-template-columns: minmax(5.5rem, var(--asn-chat-hist-pct, 34%)) minmax(0, 1fr) !important;
    gap: 0.45rem !important;
    align-items: stretch !important;
    flex-direction: unset !important;
    min-height: calc(100dvh - 9.5rem) !important;
    max-height: calc(100dvh - 9.5rem) !important;
    overflow: hidden !important;
  }

  [data-testid="chat-page"].asn-chat-has-splitter {
    grid-template-columns:
      minmax(5.5rem, var(--asn-chat-hist-pct, 34%))
      14px
      minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  [data-testid="chat-page"] [data-testid="chat-history"] {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: none !important;
    height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    opacity: 1 !important;
    pointer-events: auto !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 0.65rem;
    flex: unset !important;
  }

  .asn-chat-splitter {
    display: none;
    touch-action: none;
    cursor: col-resize;
    position: relative;
    z-index: 5;
    width: 14px;
    align-self: stretch;
    background: transparent;
  }

  [data-testid="chat-page"].asn-chat-has-splitter .asn-chat-splitter {
    display: block;
  }

  .asn-chat-splitter::before {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgb(148 163 184);
  }

  .asn-chat-splitter::after {
    content: "⋮";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    line-height: 1;
    color: rgb(100 116 139);
    pointer-events: none;
  }

  html.dark .asn-chat-splitter::before {
    background: rgb(100 116 139);
  }

  [data-testid="chat-page"].asn-chat-splitting,
  [data-testid="chat-page"].asn-chat-splitting * {
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  [data-testid="chat-page"] > div.flex.min-w-0.flex-1,
  [data-testid="chat-page"] > div[class*="flex-1"] {
    min-width: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    max-height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    flex: unset !important;
  }

  /* Notes: always split like PC — ignore JS list/detail toggles */
  .asn-notes-back {
    display: none !important;
  }

  body.asn-notes-focus [data-testid="notes-rail"],
  body.asn-notes-list-mode [data-testid="notes-rail"] {
    display: block !important;
  }

  body.asn-notes-focus [data-testid="notes-detail"],
  body.asn-notes-list-mode [data-testid="notes-detail"] {
    display: block !important;
  }

  /* Meetings detail */
  .asn-meeting-detail {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .asn-meeting-detail [data-testid="meeting-actions"] {
    position: sticky;
    top: 3.6rem;
    z-index: 30;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    padding: 0.45rem 0.35rem;
    margin: 0 -0.15rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgb(226 232 240);
  }

  html.dark .asn-meeting-detail [data-testid="meeting-actions"] {
    background: rgba(15, 23, 42, 0.92);
    border-bottom-color: rgb(51 65 85);
  }

  .asn-meeting-detail [data-testid="meeting-actions"] button {
    flex: 1 1 auto;
    min-width: calc(50% - 0.4rem);
    justify-content: center;
  }

  .asn-meeting-detail [data-testid="meeting-delete"] {
    flex: 1 1 100%;
  }

  /* Transcript card scrolls in remaining viewport */
  .asn-meeting-detail > div.rounded-2xl.border {
    max-height: min(48vh, 22rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ask form: keep usable, not huge */
  .asn-meeting-detail form textarea {
    min-height: 4.5rem !important;
  }

  /* Home / meetings list: less chrome */
  main > section.space-y-4 > div.flex > div > p.text-sm {
    display: none;
  }

  /* Toolbar: search + Filters tight on one row (no huge space-between gap) */
  .asn-notes-toolbar,
  [data-testid="notes-toolbar"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
  }

  .asn-notes-search {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .asn-notes-search-input {
    width: 100% !important;
  }

  .asn-filter-btn,
  [data-testid="notes-toolbar"] > button,
  [data-testid="notes-toolbar"] > div:last-child {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
  }
}
