/* Generated by tools/build-v3-css.mjs. Edit assets/v3-src/*.css. */

/* tokens */
/* AkiBusiness V3 shared design system. Domain controllers retain all commands. */
:root:has(.app-main), :root:has(body.v3-product) {
  --bg: #12141d;
  --surface: #1b1d28;
  --surface-2: #222530;
  --surface-3: #2c3040;
  --sidebar: #151720;
  --topbar: #181a24;
  --text: #f7f7ff;
  --muted: #b9bfd0;
  --subtle: #a0a8bd;
  --border: #9aa5cd2c;
  --border-strong: #a8b7d34b;
  --accent: #754cdb;
  --accent-2: #c3b4ff;
  --success: #42c993;
  --warning: #f5bd60;
  --danger: #f27888;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 3px 14px #06081415;
  --v3-space: 18px;
}
:root[data-theme="light"]:has(.app-main), :root[data-theme="light"]:has(body.v3-product) {
  --bg: #f6f6fb;
  --surface: #fff;
  --surface-2: #f8f7fc;
  --surface-3: #edebfc;
  --sidebar: #faf9fe;
  --topbar: #fcfbff;
  --text: #171930;
  --muted: #57617e;
  --subtle: #68728d;
  --border: #7f82b92d;
  --border-strong: #787db44b;
  --accent: #7545df;
  --accent-2: #5d35bf;
  --success: #147751;
  --warning: #8c590e;
  --danger: #b7354e;
  --info: #315eae;
  --shadow-soft: 0 3px 14px #1b205b0b;
}

/* surfaces */
html[data-density="compact"]:has(.app-main) { --v3-space: 11px; }
.app-shell:has(.app-main) .sidebar { border-right: 1px solid var(--border); }
.app-shell .nav-item { min-height: 42px; border-radius: 10px; font-size: 12px; }
.app-shell .nav-item.active { color: var(--accent-2); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border-color: color-mix(in srgb,var(--accent) 28%,transparent); }
.app-shell .nav-item.active .nav-icon { color: var(--accent-2); }
.app-shell .sidebar-workspace-switcher { border-radius: 10px; }
.app-main .topbar { border-bottom: 1px solid var(--border); }
.app-main .contextbar { padding: 23px 24px 16px; gap: 12px; }
.app-main .context-title h1 { font-size: clamp(22px,2.15vw,29px); line-height: 1.2; font-weight: 700; letter-spacing: -.04em; }
.app-main .context-title p { font-size: 12px; line-height: 1.55; color: var(--muted); }
.app-main .content { padding: 0 24px 26px; }
.app-main .view, .app-main .page-grid { min-width: 0; gap: var(--v3-space); }
.app-main .panel { min-width: 0; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-soft); background: var(--surface); }
.app-main .panel-header { padding: 17px 20px; min-height: auto; gap: 10px; }
.app-main .panel-header :is(h2,h3) { font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--text); }
.app-main .panel-header p { color: var(--muted); font-size: 12px; }
.app-main .panel-body { padding: 18px 20px; }
.app-main .metric-card { border-radius: 14px; min-width: 0; min-height: 112px; }
.app-main .metric-value { line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.app-main .metric-label { color: var(--muted); }
.app-main .action-btn, #portal .action-btn {
  min-height: 40px; gap: 7px; border-radius: 10px;
  transition: background-color .14s ease,border-color .14s ease,box-shadow .14s ease;
}
.app-main :is(.action-btn.primary,.top-btn.create-btn), #portal .action-btn.primary {
  color: #fff; background: var(--accent); border-color: var(--accent);
}
.app-main :is(.action-btn.primary,.top-btn.create-btn):hover,
#portal .action-btn.primary:hover { background: color-mix(in srgb,var(--accent) 85%,#171930); }
.app-main .segmented { min-width: 0; gap: 2px; border: 1px solid var(--border); background: var(--surface-2); }
.app-main .segmented button { min-height: 38px; white-space: nowrap; }
.app-main .segmented button.active { color: var(--accent-2); background: var(--surface); box-shadow: 0 1px 5px #0000000d; }
.app-main .context-actions { min-width: 0; row-gap: 8px; }
.app-main .workflow-toolbar { gap: 10px; }
.app-main .workflow-search { min-width: min(100%,220px); min-height: 44px; max-width: 460px; }
.app-main .workflow-toolbar > .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.app-main .table-panel, .app-main .table-scroll { min-width: 0; }
.app-main .table-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-inline: contain; }
.app-main .data-table { border-collapse: separate; border-spacing: 0; }
.app-main .data-table th { text-align: left; font-size: 11px; line-height: 1.3; }
.app-main .data-table td { font-size: 12px; line-height: 1.5; vertical-align: middle; }
.app-main .data-table :is(th,td) { max-width: 380px; }
.app-main .data-table .table-primary-copy { min-width: 120px; }
.app-main :is(.task-card,.deal-card,.kanban-card,.project-card,.entity-card) {
  border: 1px solid var(--border); border-radius: 12px; box-shadow: none;
}
.app-main :is(.task-card,.deal-card,.kanban-card,.project-card,.entity-card):hover {
  border-color: var(--border-strong);
}
.app-main .kanban-column, .app-main .task-column { background: var(--surface-2); border-color: var(--border); }
.app-main .settings-layout, .app-main .knowledge-layout, .app-main .business-mail { min-width: 0; }
.app-main :is(.settings-nav,.knowledge-nav) { max-width: 100%; }
.app-main .settings-section { border-radius: 14px; }
.app-main .day-focus .day-task { min-height: 58px; }
.app-main .calendar-event { overflow: hidden; text-overflow: ellipsis; }

/* CRM Overview and My work are genuine source-backed UI views, not prototype embeds. */
.v3-overview { display: grid; gap: var(--v3-space); min-width: 0; }
.v3-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--v3-space); }
.v3-stat {
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
  gap: 8px; min-width: 0; min-height: 126px; padding: 20px;
  text-align: left; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft);
}
button.v3-stat:hover { border-color: var(--accent); }
.v3-stat > span { color: var(--muted); font-size: 12px; line-height: 1.3; }
.v3-stat > strong { font-size: clamp(24px,2.6vw,32px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v3-stat > small { font-size: 11px; color: var(--subtle); }
.v3-two-pane { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: var(--v3-space); }
.v3-stage-list, .v3-activity-list { display: grid; gap: 0; min-width: 0; }
.v3-stage {
  display: grid; grid-template-columns: minmax(90px,1fr) minmax(60px,2fr) 30px;
  align-items: center; gap: 14px; width: 100%; padding: 13px 0;
  border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left;
}
.v3-stage:last-child, .v3-activity:last-child { border-bottom: 0; }
.v3-stage-name { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.v3-stage-bar { height: 7px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.v3-stage-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.v3-stage strong { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.v3-activity {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; min-width: 0; min-height: 58px; padding: 12px 0;
  border: 0; border-bottom: 1px solid var(--border); background: transparent;
  color: var(--text); text-align: left; font: inherit;
}
button.v3-activity:hover, button.v3-stage:hover { background: var(--surface-2); }
.v3-activity > span:first-child { min-width: 0; }
.v3-activity strong, .v3-activity small { display: block; overflow-wrap: anywhere; }
.v3-activity strong { font-size: 12px; font-weight: 600; }
.v3-activity small { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Shared edit, information and confirmation surfaces. Avoid changing dialog
   focus/restoration logic or the specialised PoS transactional dialogs. */
#portal .modal, #portal .drawer { border-radius: 16px; border-color: var(--border-strong); }
#portal .modal-head, #portal .drawer-head { border-bottom: 1px solid var(--border); }
#portal .modal-head h2, #portal .drawer-head h2 { line-height: 1.3; }
#portal .modal-body, #portal .drawer-body { min-width: 0; overflow-wrap: anywhere; }
#portal .modal-foot, #portal .drawer-foot {
  border-top: 1px solid var(--border); background: var(--surface);
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
}
#portal :is(.form-field input,.form-field select,.form-field textarea) {
  max-width: 100%; font-size: max(14px,1rem); border-radius: 10px;
}
#portal .form-more { border-color: var(--border); }
#portal :is(.form-field,.form-more,.entity-form-error) { min-width: 0; }
#portal .entity-form-error { overflow-wrap: anywhere; }
.app-main :is(button,a,input,select,textarea,[role="button"]):focus-visible,
#portal :is(button,a,input,select,textarea,[role="button"]):focus-visible {
  outline: 3px solid var(--accent-2); outline-offset: 3px;
}
.app-main :is(button,a,[role="button"])[aria-disabled="true"],
#portal :is(button,a,[role="button"])[aria-disabled="true"] { cursor: not-allowed; }

/* Standalone Toolbox shares the visual system without affecting entitlements. */
body:has(#configuration) main { max-width: 1120px; }
body:has(#configuration) :is(.summary,.tools,.tool) { border-radius: 12px; }

html[data-density="compact"] .app-main .panel-header { padding: 12px 16px; }
html[data-density="compact"] .app-main .panel-body { padding: 13px 16px; }
html[data-density="compact"] .app-main .metric-card { min-height: 91px; padding: 14px; }
html[data-density="compact"] .v3-stat { min-height: 100px; padding: 14px; }
html[data-density="compact"] .app-main .data-table :is(th,td) { padding: 9px 12px; }

@media (max-width: 1080px) {
  .app-main .contextbar { padding: 18px 20px 14px; }
  .app-main .content { padding-inline: 20px; }
  .v3-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .v3-two-pane { grid-template-columns: 1fr; }
  .app-main .settings-layout { grid-template-columns: 1fr; }
  .app-main .context-actions { max-width: 100%; }
}
@media (max-width: 700px) {
  .app-main .topbar { gap: 6px; padding-inline: 12px; }
  .app-main .contextbar { padding: 16px 14px 12px; }
  .app-main .content { padding: 0 14px calc(104px + env(safe-area-inset-bottom,0px)); }
  .app-main .context-title h1 { font-size: 23px; }
  .app-main .context-title p { display: block; font-size: 11px; }
  .app-main .context-actions { display: flex; flex-wrap: wrap; align-items: center; }
  .app-main .context-actions .context-spacer { display: none; }

  .app-main .panel-header, .app-main .panel-body { padding: 15px; }
  .app-main .metric-card { min-height: 106px; padding: 15px; }
  .app-main .workflow-search { flex-basis: 100%; max-width: none; }
  .app-main .workflow-toolbar > .segmented { width: 100%; }
  .app-main :is(.action-btn,.mini-btn,.top-btn,.icon-btn) { min-height: 44px; }
  .app-shell .mobile-tabbar { padding-bottom: env(safe-area-inset-bottom,0px); }
  .app-shell .mobile-tab { min-width: 0; min-height: 54px; padding: 7px 3px; }
  .app-shell .mobile-tab-icon { min-height: 23px; }
  .v3-stat-grid { gap: 10px; }
  .v3-stat { min-height: 111px; padding: 14px; gap: 7px; }
  .v3-stat > strong { font-size: 25px; }
  .v3-stat > span { font-size: 11px; }
  .v3-stage { gap: 8px; grid-template-columns: minmax(76px,1fr) minmax(40px,1fr) 25px; }
  .v3-activity { min-height: 64px; }
  .v3-activity .status-pill { max-width: 110px; text-align: center; white-space: normal; }
  #portal .entity-modal, #portal .entity-modal.wide {
    top: auto; right: 0; left: 0; bottom: 0; inset: auto 0 0;
    width: 100%; max-width: none; max-height: calc(100dvh - env(safe-area-inset-top,0px) - 12px);
    border-radius: 20px 20px 0 0; margin: 0; transform: none;
  }
  #portal .modal-body { overflow-y: auto; overscroll-behavior: contain; }
  #portal .modal-foot { position: sticky; bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom,0px)); }
  #portal .modal-foot .action-btn { flex: 1 1 110px; min-height: 48px; }
  #portal :is(input,select,textarea) { font-size: 16px; }
  html[data-density="compact"] .app-main :is(.action-btn,.mini-btn,.segmented button),
  html[data-density="compact"] #portal .action-btn { min-height: 44px; }
}
@media (max-width: 380px) {
  .app-main .contextbar { padding-inline: 10px; }
  .app-main .content { padding-inline: 10px; }
  .app-main .grid-4, .v3-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-shell .mobile-tab { font-size: 10px; }
}
@media (max-width: 920px) and (orientation: landscape) and (max-height: 500px) {
  .app-main .content { padding-bottom: calc(75px + env(safe-area-inset-bottom,0px)); }
  .app-shell .mobile-tab { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-main *, #portal *, .app-main *::before, #portal *::before { transition: none !important; animation: none !important; }
}

/* Component contracts: density is independent of viewport; service controls
   retain a minimum 44px target in both density modes. */
:root { --v3-control: 48px; --v3-gap: 18px; --v3-card-pad: 20px; }
html[data-density="compact"] { --v3-control: 44px; --v3-gap: 10px; --v3-card-pad: 14px; }
.app-main { font-size: 14px; line-height: 1.5; }
.app-shell .brand-name, .app-shell .mobile-wordmark > span { color: var(--text); background: none; }
.app-shell .brand img, .app-shell .mobile-wordmark img { box-shadow: none; }
.app-main :is(.action-btn,.filter-select,.workflow-search,.search-box,input:not([type="checkbox"]):not([type="radio"]),select),
#portal :is(.action-btn,input:not([type="checkbox"]):not([type="radio"]),select) { min-height: var(--v3-control); }
.app-main :is(.panel-header,.workflow-toolbar,.toolbar-actions,.inventory-toolbar) { flex-wrap: wrap; }
.app-main :is(.panel-header,.workflow-toolbar,.toolbar-actions) > * { min-width: 0; max-width: 100%; }
.app-main :is(.split-layout,.business-mail,.knowledge-layout,.settings-layout,.chat-layout) { gap: var(--v3-gap); }
.app-main :is(.integration-card,.employee-card,.knowledge-article,.campaign-card,.automation-card,.project-card,.hp-panel,.rp-panel,.oa-card,.wp-card) {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: none;
}
.app-main :is(.empty-state,.panel-empty,.table-empty) { padding: var(--v3-card-pad); line-height: 1.6; }
.app-main :is(.status-pill,.badge) { font-size: 12px; line-height: 1.4; white-space: normal; }
.app-main :is(.task-title,.deal-title,.table-primary-copy strong,.project-card h3) { font-size: 14px; line-height: 1.5; }
.app-main :is(.task-project,.task-foot,.deal-foot,.table-primary-copy span,.detail-label) { font-size: 12px; }
.app-main :is(.detail-value,.article-content,.chat-message-text) { overflow-wrap: anywhere; }
.app-main :is(.table-primary-copy,.project-meta,.row-actions) { min-width: 0; }
.app-main .row-actions { opacity: 1; }
.app-main .mini-btn, #portal .mini-btn { min-width: 44px; min-height: 44px; }
.app-main .data-table :is(th,td) { padding: 12px 14px; }
.app-main .data-table th { color: var(--muted); }
.app-main [data-inventory-filter] { min-width: 0; min-height: var(--v3-control); padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; }
.v3-cell-label { display: none; }
.app-main :is(.hp-shell,.hp-v4-shell,.rp,.oa,.wp) { --hp-accent: var(--accent); --hp-text: var(--text); }
.app-main :is(.hp-v4-button,.hp-btn,.hp-service-btn,.hp-kds-action,.rp-btn) { min-height: 44px; }
#portal :is(.modal,.drawer) { background: var(--surface); backdrop-filter: none; }
#portal :is(.form-grid,.detail-grid) { min-width: 0; gap: var(--v3-gap); }
#portal :is(.form-grid,.detail-grid) > * { min-width: 0; }
#portal :is(.modal-head,.drawer-head) { flex-shrink: 0; }
#portal :is(.modal-body,.drawer-body) { overscroll-behavior: contain; }
#portal :is(.modal-foot,.drawer-foot) { flex-shrink: 0; padding: 14px 18px; }
#portal :is(.modal-head,.drawer-head) .close-btn { min-width: 44px; min-height: 44px; }
#toast-container { max-width: min(420px,calc(100vw - 24px)); }
#toast-container .toast { width: 100%; overflow-wrap: anywhere; }
.v3-section-tabs { display: flex; gap: 4px; max-width: 100%; overflow-x: auto; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.v3-section-tabs button { flex: 0 0 auto; min-height: 44px; border: 0; border-radius: 8px; padding: 8px 14px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.v3-section-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--accent-2); }
.v3-stock-sections > [hidden] { display: none !important; }
@media (max-width: 1100px) and (min-width: 768px) {
  .app-shell:has(.app-main) { --sidebar-width: 76px; }
  .app-main .context-actions { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  .app-main .panel-header { align-items: flex-start; }
  .app-main .panel-header .toolbar-actions { width: 100%; display: flex; flex-direction: row; flex-wrap: wrap; }
  .app-main .panel-header .toolbar-actions > :is(label,select) { flex: 1 1 130px; }
  .app-main .inventory-toolbar .toolbar-actions > .search-box { flex: 1 0 100%; }
  .app-main .inventory-toolbar .toolbar-actions > :is(select,button) { width: auto; flex: 1 1 130px; }
  .app-main .data-table[data-v3-table="records"] { display: block; min-width: 0; width: 100%; }
  .app-main .data-table[data-v3-table="records"] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .app-main .data-table[data-v3-table="records"] tbody { display: grid; gap: var(--v3-gap); padding: 12px; }
  .app-main .data-table[data-v3-table="records"] tbody tr { display: grid; grid-template-columns: minmax(0,1fr); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
  .app-main .data-table[data-v3-table="records"] tbody td { display: block; position: static; width: auto; max-width: none; height: auto; padding: 6px 0; border: 0; background: none; overflow-wrap: anywhere; white-space: normal; }
  .app-main .data-table[data-v3-table="records"] .v3-cell-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
  .app-main .data-table[data-v3-table="records"] td:first-child .v3-cell-label { display: none; }
  .app-main .data-table[data-v3-table="records"] .table-primary-copy { min-width: 0; }
  .app-main .data-table[data-v3-table="records"] .table-primary-copy :is(strong,span) { white-space: normal; overflow-wrap: anywhere; }
  .app-main .data-table[data-v3-table="records"] .row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .app-main :is(.kanban-column,.task-column)[hidden] { display: none !important; }
  #portal .modal { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  #portal .drawer { width: 100%; max-width: 100%; border-radius: 0; }
  #portal .drawer-foot { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: max(14px,env(safe-area-inset-bottom)); }
  #portal :is(.form-grid,.detail-grid) { grid-template-columns: minmax(0,1fr); }
  #portal :is(.form-grid,.detail-grid) > * { grid-column: auto; }
  #toast-container { bottom: calc(86px + env(safe-area-inset-bottom)) !important; right: 12px !important; }
  .app-main .context-actions { max-width: 100%; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #portal .modal { max-height: calc(100dvh - 12px); }
  #portal :is(.modal-head,.drawer-head) { padding-block: 8px; }
  #portal :is(.modal-foot,.drawer-foot) { padding-block: 8px; }
}
@media (min-width: 360px) and (max-width: 767px) {
  .app-main .data-table[data-v3-table="records"] tbody tr { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; }
  .app-main .data-table[data-v3-table="records"] tbody td:first-child,
  .app-main .data-table[data-v3-table="records"] tbody td:has(.row-actions),
  .app-main .data-table[data-v3-table="records"] tbody td[colspan] { grid-column: 1 / -1; }
}
@media print {
  .v3-cell-label,.v3-board-picker,.v3-section-tabs { display: none !important; }
}


/* home */
/* V3 workspace shell and operating home. These layouts replace the legacy
   dashboard composition; the underlying records and controllers remain owned
   by their existing modules. */
.app-shell:has(.app-main) { --sidebar-width: 224px; --topbar-height: 64px; }
.app-shell .sidebar { background: var(--sidebar); box-shadow: none; }
.app-shell .sidebar .brand { min-height: 78px; padding: 18px; gap: 12px; }
.app-shell .sidebar .brand img { width: 36px; height: 36px; }
.app-shell .brand-name::after { content: "v3"; display: inline-block; margin-left: 7px; padding: 2px 5px; border-radius: 5px; background: var(--accent); color: #fff; -webkit-text-fill-color: #fff; vertical-align: middle; font-size: 10px; line-height: 1.2; letter-spacing: 0; }
.app-shell .brand-name { font-size: 18px; line-height: 1.3; letter-spacing: -.03em; }
.app-shell .brand-tag { margin-top: 3px; font-size: 11px; letter-spacing: .02em; color: var(--muted); }
.app-shell .sidebar-workspace-switcher { width: calc(100% - 24px); margin: 0 12px 10px; padding: 13px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.app-shell .sidebar-workspace-copy small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.app-shell .sidebar-workspace-copy strong { font-size: 13px; margin-top: 3px; }
.app-shell .nav-scroll { padding: 4px 12px 20px; }
.app-shell .nav-section { margin-bottom: 18px; }
.app-shell .nav-label { padding: 12px 12px 7px; font-size: 10px; letter-spacing: .1em; font-weight: 600; color: var(--subtle); }
.app-shell .nav-item { min-height: 46px; gap: 12px; padding: 10px 12px; margin-bottom: 3px; font-size: 13px; font-weight: 500; border-radius: 10px; color: var(--muted); }
.app-shell .nav-icon { width: 20px; height: 20px; }
.app-shell .nav-icon svg { width: 20px; height: 20px; }
.app-shell .nav-item.active { color: var(--text); background: color-mix(in srgb,var(--accent) 17%,var(--surface)); border: 1px solid color-mix(in srgb,var(--accent) 30%,transparent); box-shadow: none; }
.app-shell .sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.app-shell .collapse-btn { min-height: 44px; border-radius: 10px; font-size: 12px; }
.app-shell.sidebar-collapsed:has(.app-main) { --sidebar-width: 76px; }
.app-shell.sidebar-collapsed .sidebar .brand { padding-inline: 20px; }
.app-shell.sidebar-collapsed .nav-item { padding: 10px; justify-content: center; }
.app-main .topbar { padding-inline: 26px; gap: 18px; background: var(--topbar); backdrop-filter: none; }
.app-main .global-search { max-width: 560px; min-height: 42px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.app-main .global-search input { font-size: 13px; }
.app-main .workspace-switcher { font-size: 13px; border-radius: 10px; max-width: 240px; }
.app-main .top-actions { gap: 8px; }
.app-main .top-btn.create-btn { border-radius: 10px; padding-inline: 16px; }
.app-main[data-route="dashboard"] .contextbar { display: none; }
.app-main[data-route="dashboard"] .content { padding-top: 28px; }
.v3-home { display: grid; gap: 24px; min-width: 0; max-width: 1560px; margin-inline: auto; }
/* AkiPasa HQ: calm, purposeful platform overview rather than a second till. */
.v3-home-admin .v3-home-hero {
  position: relative; overflow: hidden; align-items: center;
  border: 1px solid color-mix(in srgb,var(--accent) 23%,var(--border));
  background: radial-gradient(ellipse at 100% 5%,color-mix(in srgb,var(--accent) 15%,transparent),transparent 50%),var(--surface);
  border-radius: 18px; padding: clamp(18px,2.5vw,29px);
}
.v3-home-admin .v3-home-heading { position: relative; z-index: 1; }
.v3-home-admin .v3-home-heading h1 { font-size: clamp(26px,2.5vw,35px); max-width: 23ch; }
.v3-home-admin .v3-home-stats { align-items: stretch; }
.v3-home-admin .v3-home-stat {
  border-radius: 16px; padding: clamp(16px,2vw,22px);
  background: linear-gradient(160deg,var(--surface),color-mix(in srgb,var(--accent) 4%,var(--surface)));
  gap: 10px; min-height: 126px;
}
.v3-home-admin .v3-home-stat > strong { font-size: clamp(28px,2.7vw,38px); font-weight: 720; }
.v3-home-admin .v3-home-stat > small { line-height: 1.45; }
.v3-home-admin .v3-home-stats-status { margin-bottom: -9px; border-color: transparent; background: transparent; padding-inline: 2px; }
.v3-home-admin .v3-home-platform > .panel { border-radius: 16px; }
@media (max-width: 767px) {
  .v3-home-admin .v3-home-hero { padding: 18px 16px; border-radius: 16px; }
  .v3-home-admin .v3-home-heading h1 { font-size: 25px; }
  .v3-home-admin .v3-home-stat { min-height: 108px; padding: 15px 14px; }
  .v3-home-admin .v3-home-stat > strong { font-size: 28px; }
  .v3-home-admin .v3-home-stat > small { font-size: 10px; }
  .v3-home-admin .v3-home-stats-status { margin-bottom: -8px; padding-inline: 0; }
}

.v3-home :is(h1,h2,h3,p) { margin: 0; }
.v3-home :is(button,article,header,section,aside,footer,div,span) { min-width: 0; }
.v3-overline { display: block; font-size: 10px; line-height: 1.5; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.v3-home-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-block: 4px 5px; }
.v3-home-heading h1 { margin-top: 8px; color: var(--text); font-size: clamp(24px,2.3vw,30px); line-height: 1.15; letter-spacing: -.045em; font-weight: 700; overflow-wrap: anywhere; }
.v3-home-heading p { margin-top: 11px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.v3-home-date { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; color: var(--subtle); font-size: 12px; }
.v3-home-date svg { width: 15px; height: 15px; }
.v3-home-hero-actions { display: grid; gap: 10px; flex-shrink: 0; padding-top: 8px; }
.v3-home-hero-actions > .action-btn { padding-inline: 20px; min-height: 48px; font-size: 13px; }
.v3-home-secondary { display: flex; justify-content: flex-end; gap: 8px; }
.v3-home-secondary .action-btn { font-size: 12px; min-height: 40px; }
.v3-home-stats-status { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.5; }
.v3-home-data-light { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--subtle); }
.v3-home-stats-status.is-ready .v3-home-data-light { background: var(--success); }
.v3-home-stats-status.is-error .v3-home-data-light { background: var(--warning); }
.v3-home-stats-status time { font-variant-numeric: tabular-nums; color: var(--subtle); margin-left: auto; }
.v3-home-stats-status button { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 8px; background: transparent; color: var(--accent-2); cursor: pointer; font: inherit; font-weight: 650; padding: 5px 8px; min-height: 32px; }
.v3-home-stats-status button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v3-home-stats-status button:disabled { opacity: .5; cursor: wait; }
.v3-home-stats-status button svg { width: 13px; height: 13px; }
.v3-home-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; }
.v3-home-stat { display: grid; gap: 12px; padding: 18px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); font: inherit; }
button.v3-home-stat { cursor: pointer; }
button.v3-home-stat:hover { border-color: var(--accent); }
.v3-home-stat-top { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; font-size: 12px; line-height: 1.5; color: var(--muted); }
.v3-home-stat-top > svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--accent-2); }
.v3-home-stat > strong { font-size: clamp(24px,2.5vw,33px); line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v3-home-stat > small { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; line-height: 1.5; color: var(--subtle); }
.v3-home-stat > small svg { width: 14px; height: 14px; flex-shrink: 0; }
.v3-home-stat.attention { border-top: 2px solid var(--warning); }
.v3-home-stat.attention > small { color: var(--warning); }
.v3-home-tools { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.v3-home-tool { display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 90px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.v3-home-tool:hover { background: var(--surface); border-color: var(--border-strong); }
.v3-home-tool-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; color: var(--accent-2); background: color-mix(in srgb,var(--accent) 12%,var(--surface)); }
.v3-home-tool-icon svg { width: 21px; height: 21px; }
.v3-home-tool > span:nth-child(2) { flex: 1; }
.v3-home-tool > svg { width: 15px; height: 15px; color: var(--subtle); flex-shrink: 0; }
.v3-home-tool strong { display: block; font-size: 13px; font-weight: 650; }
.v3-home-tool small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.v3-home-columns { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(270px,1fr); align-items: start; gap: 20px; }
.v3-home-main,.v3-home-side { display: grid; align-content: start; gap: 20px; }
.v3-home .panel { overflow: hidden; background: var(--surface); box-shadow: none; }
.v3-home .panel-header { padding: 20px 22px; align-items: center; border-bottom: 1px solid var(--border); }
.v3-home .panel-header h2 { margin-top: 5px; font-size: 16px; letter-spacing: -.025em; }
.v3-home .panel-header .action-btn { font-size: 11px; min-height: 40px; }
.v3-home-records { padding: 6px 20px; }
.v3-home-task { display: grid; grid-template-columns: 34px minmax(0,1fr) auto 15px; gap: 12px; align-items: center; padding: 17px 0; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.v3-home-task:last-child { border-bottom: 0; }
.v3-home-task:hover .v3-home-record-copy strong { color: var(--accent-2); }
.v3-home-task > svg { width: 15px; height: 15px; color: var(--subtle); }
.v3-home-task-mark,.v3-home-calendar-mark,.v3-home-event-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: var(--surface-2); }
.v3-home-task-mark.high { color: var(--warning); }
.v3-home-task-mark svg,.v3-home-calendar-mark svg,.v3-home-event-icon svg { width: 17px; height: 17px; }
.v3-home-record-copy strong { display: block; font-size: 13px; line-height: 1.5; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.v3-home-record-copy small { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.v3-home-task .status-pill { font-size: 10px; max-width: 120px; text-align: center; }
.v3-home-progress { display: grid; grid-template-columns: 1fr auto; gap: 9px 14px; border-top: 1px solid var(--border); background: var(--surface-2); padding: 15px 22px; font-size: 11px; color: var(--muted); }
.v3-home-progress > strong { color: var(--text); font-variant-numeric: tabular-nums; }
.v3-home-progress > div { grid-column: 1 / -1; height: 5px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.v3-home-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.v3-home-stages { padding: 8px 22px 14px; }
.v3-home-stage { display: grid; grid-template-columns: minmax(80px,1.1fr) minmax(30px,1fr) minmax(50px,.7fr); gap: 14px; align-items: center; padding: 13px 0; }
.v3-home-stage > span { font-size: 12px; overflow-wrap: anywhere; }
.v3-home-stage small { display: block; margin-top: 3px; font-size: 10px; color: var(--subtle); }
.v3-home-stage > div { height: 7px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.v3-home-stage i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.v3-home-stage > strong { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v3-home-appointment { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.v3-home-appointment:last-child { border: 0; }
.v3-home-calendar-mark { color: var(--accent-2); }
.v3-home-stock-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.v3-home-stock-item:last-child { border: 0; }
.v3-home-stock-item > span:last-child { flex-shrink: 0; text-align: right; }
.v3-home-stock-item > span:last-child strong { display: block; color: var(--warning); font-size: 16px; }
.v3-home-stock-item > span:last-child small { color: var(--subtle); font-size: 10px; }
.v3-home-panel-foot { padding: 10px 20px 18px; }
.v3-home-panel-foot .action-btn { width: 100%; }
.v3-home-activity-list { padding: 6px 22px; }
.v3-home-event { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: flex-start; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.v3-home-event:last-child { border: 0; }
.v3-home-event-icon { width: 30px; height: 30px; border-radius: 50%; }
.v3-home-event .v3-home-record-copy > span { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.v3-home-event time { max-width: 86px; font-size: 10px; color: var(--subtle); text-align: right; }
.v3-home-empty { display: flex; align-items: flex-start; gap: 14px; padding: 25px 0; color: var(--muted); }
.v3-home-empty > svg { flex-shrink: 0; width: 25px; height: 25px; color: var(--accent-2); }
.v3-home-empty strong { display: block; color: var(--text); font-size: 13px; line-height: 1.5; }
.v3-home-empty p { margin-top: 4px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.v3-home-empty > .action-btn { margin-left: auto; flex-shrink: 0; font-size: 11px; }
.v3-home-service { display: grid; justify-items: start; gap: 13px; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.v3-home-service h2 { font-size: 19px; letter-spacing: -.03em; }
.v3-home-service p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.v3-home-service .action-btn { width: 100%; margin-top: 3px; }
.v3-home-platform > .panel { margin: 0; }
.v3-home-project { width: 100%; display: grid; gap: 10px; padding: 17px 0; background: transparent; border: 0; border-bottom: 1px solid var(--border); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.v3-home-project:last-child { border-bottom: 0; }
.v3-home-project > span:first-child { display: flex; align-items: center; gap: 10px; }
.v3-home-project svg { width: 18px; height: 18px; color: var(--accent-2); flex-shrink: 0; }
.v3-home-project strong { flex: 1; font-size: 13px; overflow-wrap: anywhere; }
.v3-home-project small { color: var(--muted); font-size: 12px; }
.v3-home-project-track { display: block; height: 6px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.v3-home-project-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.v3-home-service > small { color: var(--muted); line-height: 1.6; font-size: 12px; }
.app-shell .brand-name,.app-main .mobile-wordmark > span { background: none; color: var(--text); -webkit-text-fill-color: currentColor; }
.app-shell .brand img,.app-main .mobile-wordmark img { box-shadow: none; }
html[data-density="compact"] .v3-home { gap: 16px; }
html[data-density="compact"] .v3-home-stat { padding: 14px 16px; gap: 9px; }
html[data-density="compact"] .v3-home-tool { min-height: 76px; padding: 12px; }
html[data-density="compact"] .v3-home-task { padding-block: 12px; }
html[data-density="compact"] .v3-home .panel-header { padding: 16px 20px; }
@media (min-width: 768px) and (max-width: 1100px) {
  .app-shell:has(.app-main) { --sidebar-width: 76px; }
  .v3-home-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v3-home-columns { grid-template-columns: minmax(0,1.4fr) minmax(250px,1fr); }
}
@media (max-width: 900px) {
  .v3-home-hero { flex-wrap: wrap; }
  .v3-home-hero-actions { display: flex; align-items: center; flex-wrap: wrap; }
  .v3-home-secondary { justify-content: flex-start; }
  .v3-home-columns { grid-template-columns: minmax(0,1fr); }
  .v3-home-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .app-shell:has(.app-main) { --topbar-height: 62px; }
  .app-main .topbar { padding-inline: 12px; gap: 8px; }
  .app-main[data-route="dashboard"] .content { padding-top: 20px; }
  .v3-home { gap: 18px; }
  .v3-home-hero { gap: 15px; }
  .v3-home-heading h1 { font-size: 24px; }
  .v3-home-heading p { font-size: 12px; }
  .v3-home-date { font-size: 11px; margin-top: 12px; }
  .v3-home-hero-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; padding-top: 0; width: 100%; }
  .v3-home-hero-actions > .action-btn { width: 100%; min-height: 48px; }
  .v3-home-secondary { display: contents; }
  .v3-home-secondary > .action-btn { display: none; } /* The same create action remains in the phone topbar. */
  .v3-home-secondary > .icon-btn { flex: 0 0 48px; min-height: 48px; }
  .v3-home-stats-status { padding: 7px 10px; gap: 5px 8px; }
  .v3-home-stats-status time { margin-left: 0; }
  .v3-home-stats-status button { margin-left: auto; }
  .v3-home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .v3-home-stat { padding: 14px; min-height: 104px; gap: 10px; }
  .v3-home-stat-top { font-size: 11px; }
  .v3-home-stat > strong { font-size: 24px; }
  .v3-home-stat > small { font-size: 10px; }
  .v3-home-tools { order: 4; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .v3-home-tool { align-items: center; gap: 10px; min-height: 76px; padding: 12px; }
  .v3-home-tool > span:nth-child(2) { flex: 1; }
  .v3-home-tool > svg { display: none; }
  .v3-home-tool strong { font-size: 13px; }
  .v3-home-tool small { display: none; }
  .v3-home .panel-header { padding: 17px; }
  .v3-home .panel-header h2 { font-size: 16px; }
  .v3-home .panel-header .action-btn { min-height: 44px; }
  .v3-home-records,.v3-home-activity-list,.v3-home-stages { padding-inline: 17px; }
  .v3-home-side { grid-template-columns: minmax(0,1fr); }
  .v3-home-task { grid-template-columns: 30px minmax(0,1fr); gap: 4px 10px; padding-block: 15px; }
  .v3-home-task-mark { grid-row: span 2; width: 30px; height: 30px; }
  .v3-home-task > .status-pill { grid-column: 2; justify-self: start; margin-top: 4px; }
  .v3-home-task > svg { display: none; }
  .v3-home-progress { padding-inline: 17px; }
  .v3-home-event { grid-template-columns: 30px minmax(0,1fr); }
  .v3-home-event time { grid-column: 2; text-align: left; max-width: none; }
  .v3-home-empty { flex-wrap: wrap; padding-block: 22px; }
  .v3-home-empty > div { flex: 1; }
  .v3-home-empty > .action-btn { margin-left: 0; flex-basis: 100%; }
  .v3-home-stage { gap: 9px; grid-template-columns: minmax(70px,1fr) minmax(20px,.6fr) minmax(50px,.8fr); }
}


/* tools */
/* Complete tool layout: one header, one view navigation and one filter row. */
.app-main .view > .tool-guide:last-child { margin-top: 10px; }
.v3-record-disclosure { display: none; }
.app-main :is(.metric-card,.v3-stat) { box-shadow: none; border-color: var(--border); }
.app-main :is(.entity-card,.project-card) { background: var(--surface); box-shadow: none; }
.app-main :is(.entity-logo,.project-mark,.table-avatar) { color: var(--accent-2); background: color-mix(in srgb,var(--accent) 10%,var(--surface)); box-shadow: none; }
.app-main :is(.entity-card-copy h3,.project-card h3) { font-size: 16px; line-height: 1.4; letter-spacing: -.02em; }
.app-main :is(.entity-card-copy p,.project-meta,.project-foot,.entity-stat span) { font-size: 12px; line-height: 1.6; }
.app-main .status-pill { font-size: 11px; line-height: 1.4; }

/* One record detail component serves CRM, tasks, catalogue, events and documents. */
#portal .v3-record-drawer { width: min(640px,100vw); border-radius: 18px 0 0 18px; box-shadow: -8px 0 40px #0002; }
#portal .v3-record-drawer .drawer-head { align-items: flex-start; padding: 24px; }
#portal .v3-record-drawer .drawer-head h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.03em; overflow-wrap: anywhere; }
#portal .v3-record-drawer .drawer-head p { font-size: 12px; line-height: 1.6; margin-top: 5px; }
#portal .v3-record-drawer .drawer-body { padding: 0 24px 24px; }
.v3-detail-tabs { display: flex; gap: 6px; position: sticky; top: 0; z-index: 1; margin-bottom: 22px; padding-top: 8px; border-bottom: 1px solid var(--border); background: var(--surface); }
.v3-detail-tabs button { flex: 1; min-height: 48px; padding: 10px 8px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; }
.v3-detail-tabs button[aria-selected="true"] { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 650; }
.v3-detail-tabs button span { padding: 1px 6px; border-radius: 6px; background: var(--surface-3); font-size: 11px; }
#portal .v3-record-drawer .detail-grid { gap: 20px; }
#portal .v3-record-drawer .detail-block { min-width: 0; background: transparent; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
#portal .v3-record-drawer .detail-label { font-size: 12px; line-height: 1.4; margin-bottom: 6px; color: var(--muted); }
#portal .v3-record-drawer .detail-value { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#portal .v3-record-drawer .detail-section h3 { font-size: 15px; }
#portal .v3-record-drawer .timeline :is(strong,p,time) { font-size: 12px; line-height: 1.6; }
#portal .v3-record-drawer .drawer-foot { padding: 16px 24px; gap: 8px; }
#portal .v3-record-drawer .drawer-foot .action-btn { flex: 1 1 auto; min-height: 44px; font-size: 12px; }
#portal .entity-modal { width: min(720px,calc(100vw - 40px)); }
#portal .entity-modal.wide { width: min(960px,calc(100vw - 40px)); }
#portal .entity-modal .modal-head { padding: 22px 24px; }
#portal .entity-modal .modal-head h2 { font-size: 21px; letter-spacing: -.025em; }
#portal .entity-modal .modal-head p { font-size: 12px; line-height: 1.6; }
#portal .entity-modal .modal-body { padding: 24px; }
#portal .entity-modal .form-grid { gap: 20px; }
#portal .entity-modal .form-field > label { font-size: 12px; line-height: 1.5; font-weight: 550; }
#portal .entity-modal :is(input,select) { min-height: 46px; }
#portal .entity-modal .form-more { margin-top: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
#portal .entity-modal .form-more > summary { padding: 16px; font-size: 13px; }
#portal .entity-modal .form-more > .form-grid { padding: 4px 16px 20px; }
#portal .entity-modal .modal-foot { padding: 16px 24px; }
#portal .entity-modal .modal-foot .action-btn { min-height: 46px; min-width: 100px; }
@media (max-width: 900px) {
}
@media (max-width: 767px) {
 .app-main table[data-v3-layout="summary"] tbody tr[data-v3-record] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); position: relative; gap: 0 12px; padding: 14px; margin-bottom: 10px; }
 .app-main table[data-v3-layout="summary"] tbody tr[data-v3-record] > td[data-v3-priority="title"] { display: block; grid-column: 1/-1; position: relative; padding: 0 42px 7px 0; border: 0; }
 .app-main table[data-v3-layout="summary"] tbody tr[data-v3-record] > td[data-v3-priority="summary"] { display: block; grid-column: auto; min-width: 0; padding: 4px 0; border: 0; }
 .app-main table[data-v3-layout="summary"] tbody tr[data-v3-record] > td[data-v3-priority="detail"] { display: none; }
 .app-main table[data-v3-layout="summary"] tbody tr[data-v3-expanded="true"] > td { display: block; padding-block: 8px; }
 .app-main table[data-v3-layout="summary"] tbody td[data-v3-priority="title"] .v3-cell-label { display: none; }
 .app-main table[data-v3-layout="summary"] tbody td .v3-cell-label { font-size: 10px; margin-bottom: 3px; }
 .app-main table[data-v3-layout="summary"] tbody .table-primary-copy strong { font-size: 14px; }
 .app-main table[data-v3-layout="summary"] tbody .table-primary-copy > span { font-size: 12px; line-height: 1.5; }
 .v3-record-disclosure { position: absolute; right: -4px; top: -5px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
 .v3-record-disclosure svg { width: 19px; height: 19px; }
 [data-v3-expanded="true"] .v3-record-disclosure svg { transform: rotate(180deg); }
 #portal .v3-record-drawer { width: 100vw; border: 0; border-radius: 0; }
 #portal .v3-record-drawer :is(.drawer-head,.drawer-foot) { padding: 16px; }
 #portal .v3-record-drawer .drawer-head h2 { font-size: 20px; }
 #portal .v3-record-drawer .drawer-body { padding: 0 16px 24px; }
 #portal .v3-record-drawer .drawer-head .entity-logo { display: none; }
 #portal .v3-record-drawer .detail-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
 #portal .v3-record-drawer .drawer-foot { padding-bottom: max(16px,env(safe-area-inset-bottom)); }
 #portal .entity-modal,#portal .entity-modal.wide { width: 100vw; max-width: none; border: 0; border-radius: 0; max-height: 100dvh; }
 #portal .entity-modal :is(.modal-head,.modal-body,.modal-foot) { padding: 16px; }
 #portal .entity-modal .form-grid { gap: 16px; }
 #portal .entity-modal .modal-foot { padding-bottom: max(16px,env(safe-area-inset-bottom)); }
 #portal .entity-modal .form-foot-note { flex-basis: 100%; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .v3-record-disclosure svg { transition: none; } }
.v3-toolbar-more { position: relative; flex: 0 0 auto; }
.v3-toolbar-more > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; list-style: none; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12px; cursor: pointer; }
.v3-toolbar-more > summary::-webkit-details-marker { display: none; }
.v3-toolbar-more > summary svg { width: 18px; height: 18px; }
.v3-toolbar-more > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; display: grid; gap: 6px; min-width: 210px; max-width: calc(100vw - 28px); padding: 8px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px #0002; }
.v3-toolbar-more > div .action-btn { justify-content: flex-start; min-height: 44px; width: 100%; background: transparent; border: 0; }
.v3-toolbar-more > div .action-btn:hover { background: var(--surface-2); }
.v3-catalogue-filters { grid-template-columns: minmax(0,1fr) auto; }
.v3-catalogue-filters .search-box { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; max-width: 460px; min-height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); overflow: hidden; }
.v3-catalogue-filters .search-box svg { width: 18px; height: 18px; flex: 0 0 18px; }
.v3-catalogue-filters .search-box input { min-width: 0; width: 100%; padding: 0; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 14px; }
.v3-catalogue-filters select { min-height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.v3-stock-warning { display: block; width: fit-content; margin-top: 4px; color: var(--warning); font-size: 11px; font-weight: 600; }
.v3-my-work { display: grid; gap: 20px; max-width: 1100px; }
.v3-work-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.v3-work-summary > div { display: grid; gap: 9px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.v3-work-summary span { color: var(--muted); font-size: 12px; }
.v3-work-summary strong { font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.v3-work-group { padding: 8px 22px 14px; }
.v3-work-group h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 12px 0 5px; }
.v3-work-group h3 > span { font-size: 11px; color: var(--muted); padding: 2px 7px; border-radius: 6px; background: var(--surface-2); }
.v3-work-row { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px 0; width: 100%; color: var(--text); text-align: left; font: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.v3-work-row:last-child { border-bottom: 0; }
.v3-work-check { display: grid; place-items: center; width: 22px; height: 22px; color: var(--accent-2); }
.v3-work-check svg { width: 19px; height: 19px; }
.v3-work-row strong { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.v3-work-row small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.v3-work-due { text-align: right; font-size: 12px; }
.v3-work-list > .v3-home-empty { padding: 24px; }
html[data-density="compact"] .v3-work-summary > div { padding: 14px 16px; }
html[data-density="compact"] .v3-work-row { padding-block: 11px; }
@media (max-width: 767px) {
 .v3-work-summary { gap: 8px; }
 .v3-work-summary > div { padding: 14px 12px; }
 .v3-work-summary span { font-size: 11px; }
 .v3-work-summary strong { font-size: 24px; }
 .v3-work-group { padding: 6px 16px 12px; }
 .v3-work-row { grid-template-columns: 18px minmax(0,1fr); gap: 4px 10px; padding-block: 14px; }
 .v3-work-row > .v3-work-check { grid-row: span 2; }
 .v3-work-due { grid-column: 2; text-align: left; }
 .v3-work-due small { display: inline; margin-left: 8px; }
 .v3-catalogue-filters .search-box { max-width: none; flex-basis: 100%; }
 .v3-catalogue-filters select { width: 100%; }
}
.v3-connection-panel { overflow: hidden; }
.v3-connection-panel > summary { display: flex; align-items: center; gap: 10px; padding: 16px 20px; color: var(--muted); cursor: pointer; font-size: 13px; }
.v3-connection-panel > summary svg { width: 18px; height: 18px; color: var(--accent-2); }
.v3-connection-panel > .business-mail { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.v3-campaign-card { display: flex; flex-direction: column; gap: 14px; }
.v3-campaign-card .entity-card-top { align-items: flex-start; }
.v3-campaign-excerpt { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.v3-campaign-card .entity-card-stats { margin-top: auto; grid-template-columns: repeat(2,minmax(0,1fr)); }
.v3-campaign-card > .action-btn { width: 100%; }
.v3-knowledge { display: grid; grid-template-columns: 280px minmax(0,1fr); min-height: 560px; overflow: hidden; }
.v3-knowledge .knowledge-nav { padding: 16px; background: var(--surface-2); border-right: 1px solid var(--border); }
.v3-library-heading { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 16px; }
.v3-library-heading h2 { font-size: 16px; margin: 0; }
.v3-library-heading > span { font-size: 12px; color: var(--muted); }
.v3-knowledge .knowledge-item { min-height: 48px; border-radius: 10px; font-size: 13px; padding: 12px; line-height: 1.5; }
.v3-knowledge .knowledge-item.active { color: var(--accent-2); background: var(--surface-3); }
.v3-knowledge .knowledge-article { padding: 28px; min-width: 0; }
.v3-knowledge .article-wrap { max-width: 760px; }
.v3-knowledge .article-content { font-size: 15px; line-height: 1.85; }
.v3-knowledge .article-meta { font-size: 12px; line-height: 1.7; }
.v3-library-back { display: none; }
.v3-calendar-count { display: none; }
.v3-settings-workspace { gap: 20px; }
.v3-settings-workspace .settings-nav { align-self: start; padding: 10px; background: var(--surface); }
.v3-settings-workspace .settings-nav button { min-height: 46px; padding: 12px; font-size: 13px; border-radius: 9px; }
.v3-settings-workspace .settings-nav button.active { background: var(--surface-3); color: var(--accent-2); }
.v3-settings-workspace .settings-section { padding: 24px; }
.v3-settings-workspace .settings-section > h2 { font-size: 20px; letter-spacing: -.03em; }
.v3-settings-workspace .settings-section > p { font-size: 13px; line-height: 1.7; }
@media (max-width: 900px) {
 .v3-knowledge { grid-template-columns: 230px minmax(0,1fr); }
 .v3-knowledge .knowledge-article { padding: 22px; }
}
@media (max-width: 767px) {
 .v3-knowledge { display: block; min-height: 0; }
 .v3-knowledge:not([data-article-open="true"]) .knowledge-article { display: none; }
 .v3-knowledge[data-article-open="true"] .knowledge-nav { display: none; }
 .v3-knowledge .knowledge-nav { border: 0; background: var(--surface); }
 .v3-knowledge .knowledge-article { padding: 16px; }
 .v3-knowledge .article-wrap h1 { font-size: 25px; line-height: 1.3; }
 .v3-knowledge .article-content { font-size: 15px; line-height: 1.8; }
 .v3-library-back { display: inline-flex; margin-bottom: 20px; min-height: 44px; }
 .v3-knowledge .article-wrap > .flex { flex-wrap: wrap; gap: 12px; }
 .app-main .calendar { overflow: hidden; }
 .app-main .calendar-day { min-height: 65px; padding: 8px 5px; }
 .app-main .calendar-day .calendar-event { display: none; }
 .v3-calendar-count { display: block; color: var(--accent-2); font-size: 10px; margin-top: 6px; line-height: 1.3; }
 .v3-settings-workspace .settings-nav { display: flex; overflow-x: auto; padding: 6px; scrollbar-width: thin; }
 .v3-settings-workspace .settings-nav button { flex: 0 0 auto; width: auto; padding-inline: 14px; white-space: nowrap; }
 .v3-settings-workspace .settings-section { padding: 20px 16px; }
}
.v3-operation-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 20px; }
.v3-operation { display: flex; align-items: flex-start; gap: 12px; padding: 18px; min-height: 104px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.v3-operation > span:first-child { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; background: var(--surface-3); color: var(--accent-2); font-size: 21px; }
.v3-operation strong { display: block; font-size: 14px; line-height: 1.4; }
.v3-operation small { display: block; font-size: 12px; line-height: 1.6; color: var(--muted); margin-top: 5px; }
.v3-operation:hover { border-color: var(--accent); background: var(--surface); }
.v3-stock-operation-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 20px; }
.v3-stock-operation-foot p { flex-basis: 100%; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 80ch; }
.v3-stock-form-heading h2 { font-size: 23px; margin: 0; }
.v3-stock-form-heading p { font-size: 13px; line-height: 1.7; color: var(--muted); margin-bottom: 20px; }
.v3-stock-balances { margin: 16px 0 22px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface-2); }
.v3-stock-balances > summary { font-size: 13px; cursor: pointer; min-height: 30px; }
.v3-stock-editor .form-grid label { display: grid; gap: 8px; font-size: 12px; line-height: 1.5; }
.v3-stock-editor :is(input,select,textarea) { border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; }
.v3-stock-editor .form-grid { gap: 18px; }
.v3-preview-cta { display: inline-flex; padding: 12px 18px; border-radius: 10px; background: var(--surface-3); color: var(--accent-2); font-size: 13px; }
@media (max-width: 1100px) { .v3-operation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 767px) {
 .v3-operation-grid { gap: 10px; padding: 16px; }
 .v3-operation { flex-direction: column; padding: 14px; gap: 10px; }
 .v3-operation strong { font-size: 13px; }
 .v3-stock-operation-foot { padding: 0 16px 18px; }
 .v3-stock-operation-foot .action-btn { flex: 1; min-height: 44px; }
}
.v3-people-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.v3-people-workspace { display: grid; gap: 20px; }
.v3-people-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.v3-people-summary > div { display: grid; gap: 9px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.v3-people-summary span { color: var(--muted); font-size: 12px; }
.v3-people-summary strong { font-size: 28px; letter-spacing: -.03em; }
.v3-directory-list { padding: 0 20px; }
.v3-person { display: grid; grid-template-columns: 44px minmax(0,1fr) 70px auto; align-items: center; gap: 16px; padding: 18px 0; width: 100%; background: transparent; color: var(--text); border: 0; border-bottom: 1px solid var(--border); font: inherit; text-align: left; cursor: pointer; }
.v3-person:last-child { border: 0; }
.v3-person-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--accent-2); background: var(--surface-3); font-size: 13px; font-weight: 700; }
.v3-person-copy strong { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.v3-person-copy small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.v3-person-work { text-align: center; }
.v3-person-work strong { display: block; font-size: 17px; }
.v3-person-work small { color: var(--muted); font-size: 11px; }
.v3-department-list { padding: 4px 20px 12px; }
.v3-department-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.v3-department-list > div:last-child { border: 0; }
.v3-department-list span { color: var(--muted); font-size: 12px; }
.v3-mode-note { padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.v3-mode-note h3 { margin: 0 0 6px; font-size: 15px; }
.v3-mode-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 90ch; }
.v3-rule-details { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; }
.v3-rule-details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 13px; color: var(--muted); }
.v3-rule-details .automation-flow { padding: 12px 0 0; gap: 12px; }
.v3-rule-details .flow-node { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; min-width: 0; }
.v3-rule-details .flow-node-type { font-size: 11px; color: var(--accent-2); }
.v3-rule-details .flow-node strong { font-size: 13px; line-height: 1.5; }
.v3-rule-details .flow-node p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.v3-sites-workspace .v3-site-record { padding: 20px; }
.v3-connections-workspace { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(270px,1fr); gap: 20px; align-items: start; }
.v3-connection-main { min-width: 0; }
.v3-connection-link { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; padding: 17px 0; font: inherit; cursor: pointer; }
.v3-connection-link:last-child { border: 0; }
.v3-connection-link > span:first-child { display: grid; place-items: center; width: 36px; height: 36px; color: var(--accent-2); background: var(--surface-3); border-radius: 10px; flex-shrink: 0; }
.v3-connection-link > span:first-child svg { width: 19px; height: 19px; }
.v3-connection-link > span:nth-child(2) { flex: 1; min-width: 0; }
.v3-connection-link > svg { width: 17px; height: 17px; color: var(--muted); }
.v3-connection-link strong { display: block; font-size: 13px; }
.v3-connection-link small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 4px; }
@media (max-width: 900px) { .v3-connections-workspace { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 767px) {
 .v3-people-summary { gap: 8px; }
 .v3-people-summary > div { padding: 14px 12px; }
 .v3-people-summary span { font-size: 11px; line-height: 1.5; }
 .v3-people-summary strong { font-size: 24px; }
 .v3-directory-list { padding-inline: 16px; }
 .v3-person { grid-template-columns: 38px minmax(0,1fr) auto; gap: 8px 12px; }
 .v3-person-avatar { width: 36px; height: 36px; }
 .v3-person .status-pill { grid-column: 2/-1; justify-self: start; }
 .v3-person-work { grid-column: 3; grid-row: 1; }
 .v3-rule-details .automation-flow { flex-direction: column; }
}

/* The account, plans, access and Toolbox surfaces use the same component tokens. */
:root:has(body.v3-standalone) { --page: var(--bg); --ink: var(--text); --line: var(--border); --surface-soft: var(--surface-2); --button: var(--accent); --button-ink: #fff; --accent-soft: color-mix(in srgb,var(--accent) 9%,transparent); background: var(--bg); color: var(--text); }
body.v3-standalone { background: var(--bg); color: var(--text); font-family: Inter,ui-sans-serif,system-ui,sans-serif; }
.v3-standalone :is(.account-shell,.plans-shell) { max-width: 1280px; padding: 28px clamp(16px,3vw,40px) 40px; }
.v3-standalone :is(.plans-header,header) { color: var(--text); }
.v3-standalone .brand { color: var(--text); }
.v3-standalone :is(.header-actions a,.header-actions button) { background: var(--surface); border-color: var(--border); color: var(--text); border-radius: 10px; min-height: 44px; font-size: 12px; }
.v3-standalone :is(.hero h1,.account-heading h1) { font-size: clamp(27px,3vw,38px); line-height: 1.2; letter-spacing: -.04em; }
.v3-standalone .hero { padding: 36px 0 24px; }
.v3-standalone .account-heading { padding-block: 24px; }
.v3-standalone :is(.panel,.plan,.catalogue,.subscription-handoff) { border-color: var(--border); background: var(--surface); border-radius: 14px; box-shadow: none; }
.v3-standalone .plan.featured { background: var(--surface); border-color: var(--accent); }
.v3-standalone :is(.plan h2,.panel h3) { font-size: 20px; letter-spacing: -.025em; }
.v3-standalone .account-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: none; }
.v3-standalone .member-summary { border-color: var(--border); }
.v3-standalone .member-avatar { background: var(--surface-3); color: var(--accent-2); box-shadow: none; }
.v3-standalone .account-nav button { border-radius: 9px; font-size: 13px; min-height: 48px; }
.v3-standalone .account-nav button[aria-selected="true"] { background: var(--surface-3); color: var(--accent-2); box-shadow: none; }
.v3-standalone :is(.account-content,.workspace-grid,.account-layout) { min-width: 0; }
.v3-standalone :is(input,select,textarea) { min-height: 46px; border-radius: 10px; border-color: var(--border-strong); background: var(--surface); color: var(--text); font-size: 16px; }
.v3-standalone :is(button[type="submit"],.button.primary,.plan .button) { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; border-radius: 10px; min-height: 46px; }
.v3-standalone :is(.fine-print,.shared-note,.form-footer,.account-footer) { color: var(--muted); font-size: 12px; line-height: 1.7; }
.v3-standalone .icon-tile { background: var(--surface-3); color: var(--accent-2); box-shadow: none; }
.v3-toolbox-page main { max-width: 1160px; padding-top: 28px; }
.v3-toolbox-page header { margin-bottom: 24px; flex-wrap: wrap; }
.v3-toolbox-page header a { flex: 1; color: var(--text); font-size: 21px; }
.v3-toolbox-page h1 { font-size: clamp(26px,3vw,36px); letter-spacing: -.035em; margin-top: 0; }
.v3-toolbox-page p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.v3-toolbox-page :is(.summary > div,.tool) { background: var(--surface); border-color: var(--border); border-radius: 12px; padding: 20px; }
.v3-toolbox-page .summary strong { font-size: 20px; }
.v3-toolbox-page :is(.summary span,.tool small) { color: var(--muted); font-size: 12px; line-height: 1.7; }
.v3-toolbox-page .tool { align-items: flex-start; gap: 12px; }
.v3-toolbox-page .tool:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 5%,var(--surface)); }
.v3-toolbox-page .tool input { min-height: 22px; width: 22px; height: 22px; accent-color: var(--accent); }
.v3-toolbox-page :is(button,select) { min-height: 46px; border-color: var(--border-strong); color: var(--text); background: var(--surface); font-size: 13px; }
.v3-toolbox-page button[type="submit"] { color: #fff; background: var(--accent); }
.v3-toolbox-page #delegation { border-color: var(--border); }
.v3-auth-page :is(.suite-login-card,.suite-login-panel) { background: var(--surface); border-color: var(--border); box-shadow: none; }
.v3-auth-page :is(.suite-login-card,.suite-login-panel) :is(h1,h2) { color: var(--text); letter-spacing: -.035em; }
@media (max-width:767px) {
 .v3-standalone :is(.account-shell,.plans-shell) { padding: 16px 14px 28px; }
 .v3-standalone :is(.account-heading,.hero) { padding-block: 24px 18px; }
 .v3-standalone .account-heading h1 { font-size: 27px; }
 .v3-standalone :is(.panel,.plan) { border-radius: 12px; }
 .v3-standalone .account-nav { display: flex; overflow-x: auto; padding: 6px; }
 .v3-standalone .account-nav button { flex: 0 0 auto; width: auto; padding-inline: 12px; }
 .v3-toolbox-page main { padding: 20px 14px 40px; }
 .v3-toolbox-page .summary { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
 .v3-toolbox-page .summary > div { padding: 14px 10px; }
 .v3-toolbox-page .summary strong { font-size: 16px; overflow-wrap: anywhere; }
 .v3-toolbox-page .summary span { font-size: 11px; }
 .v3-toolbox-page .tool { padding: 16px; }
 .v3-toolbox-page footer { background: var(--surface); border-top: 1px solid var(--border); padding: 12px; }
}
.v3-confirm-dialog { width: min(460px,calc(100vw - 28px)); padding: 26px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 16px 60px #0003; }
.v3-confirm-dialog::backdrop { background: #080c22a6; }
.v3-confirm-dialog h2 { margin: 0 0 12px; font-size: 21px; line-height: 1.4; letter-spacing: -.025em; }
.v3-confirm-dialog p { font-size: 14px; line-height: 1.75; color: var(--muted); margin: 0 0 24px; }
.v3-confirm-dialog footer { display: flex; gap: 10px; justify-content: flex-end; }
.v3-confirm-dialog .action-btn { min-height: 46px; border-radius: 10px; padding-inline: 18px; font-size: 13px; }
.v3-mail-workspace .panel-header { padding: 20px; }
.v3-mail-workspace .inbox-layout { grid-template-columns: minmax(250px,.85fr) minmax(0,1.5fr); min-height: 480px; }
.v3-mail-workspace .conversation-list { background: var(--surface-2); border-right: 1px solid var(--border); }
.v3-mail-search { display: grid; gap: 8px; padding: 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.v3-mail-search input { min-height: 44px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.v3-mail-workspace .conversation-item { padding: 17px 18px; border-left: 3px solid transparent; }
.v3-mail-workspace .conversation-item.active { background: var(--surface); border-left-color: var(--accent); }
.v3-mail-workspace .conversation-item strong { font-size: 13px; line-height: 1.6; }
.v3-mail-workspace .conv-subject { margin-top: 4px; font-size: 13px; color: var(--text); }
.v3-mail-workspace .conv-preview { font-size: 12px; line-height: 1.6; color: var(--muted); }
.v3-mail-workspace .chat-head { padding: 18px 20px; background: var(--surface); }
.v3-mail-workspace .chat-head strong { font-size: 16px; line-height: 1.5; }
.v3-mail-workspace .chat-head p { font-size: 12px; color: var(--muted); }
.v3-mail-workspace .business-mail-body { padding: 24px; font-size: 14px; line-height: 1.85; }
.v3-mail-workspace .composer { display: grid; gap: 12px; padding: 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.v3-mail-workspace .composer textarea { min-height: 110px; padding: 14px; font-size: 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); }
.v3-mail-workspace .composer > .action-btn { justify-self: end; min-height: 46px; }
.v3-mail-connect { display: grid; gap: 18px; max-width: 760px; }
.v3-mail-connect p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.v3-mail-connect .panel-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.v3-mail-connect .panel-actions .action-btn { min-height: 50px; min-width: 190px; padding-inline: 20px; }
.v3-team-chat { border-radius: 14px; box-shadow: none; background: var(--surface); }
.v3-team-chat .team-chat-sidebar-left { background: var(--surface-2); border-color: var(--border); }
.v3-team-chat .team-chat-main-pane { background: var(--surface); }
.v3-team-chat .team-chat-sidebar-right { background: var(--surface-2); border-color: var(--border); }
.v3-team-chat :is(button,input,textarea,select) { font-size: 14px; }
.v3-team-chat .nav-item { min-height: 46px; border-radius: 9px; font-size: 13px; }
.v3-team-chat #team-chat-messages { gap: 18px !important; padding: 22px !important; }
.v3-team-chat .chat-bubble { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 14px; }
.v3-team-chat .chat-bubble p { font-size: 14px; line-height: 1.7; }
.v3-team-chat .chat-bubble.own { background: color-mix(in srgb,var(--accent) 9%,var(--surface)); border-color: color-mix(in srgb,var(--accent) 20%,var(--border)); }
@media (max-width:767px) {
 .v3-mail-workspace .inbox-layout { display: block; min-height: 460px; }
 .v3-mail-workspace .inbox-layout.chat-open .conversation-list { display: none; }
 .v3-mail-workspace .inbox-layout:not(.chat-open) .chat-pane { display: none; }
 .v3-mail-workspace .business-mail-back { display: inline-flex; min-width: 44px; min-height: 44px; }
 .v3-mail-workspace .business-mail-body { padding: 18px; }
 .v3-mail-workspace .composer { padding: 16px; }
 .v3-mail-workspace .composer > .action-btn { width: 100%; justify-self: stretch; }
 .v3-team-chat #team-chat-messages { padding: 16px !important; }
}

/* Hospitality components keep their command and device contracts; the register,
   designer and operational overlays share the workspace's visual language. */
.app-main .hp-shell { color: var(--text); background: var(--surface); border-color: var(--border); border-radius: 14px; box-shadow: none; }
.app-main .hp-mode-switch { border-color: var(--border); background: var(--surface-2); border-radius: 10px; }
.app-main .hp-mode-switch .action-btn { min-height: 44px; font-size: 13px; border-radius: 8px; box-shadow: none; }
.app-main .hp-mode-switch .action-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.app-main .hp-day-shortcut { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.app-main .hp-day-shortcut > span { color: var(--muted); }
.app-main .hp-day-shortcut strong { color: var(--text); }
.app-main .hp-register-table { font-size: 16px; line-height: 1.4; }
.app-main .hp-terminal-catalogue { background: var(--surface-2); border-color: var(--border); border-radius: 12px; }
.app-main .hp-category-grid { gap: 7px; padding: 10px; background: transparent; }
.app-main .hp-category-grid .action-btn { min-height: 44px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 10px; box-shadow: none; }
.app-main .hp-category-grid .action-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--accent-2); border-color: color-mix(in srgb,var(--accent) 35%,var(--border)); box-shadow: none; }
.app-main .hp-product-buttons { gap: 10px; padding: 10px; }
.app-main .hp-terminal .hp-v4-product { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 7px; position: relative; min-height: 120px; padding: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: none; text-align: left; }
.app-main .hp-v4-product .hp-product-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--text); background: color-mix(in srgb,var(--pos-color) 15%,var(--surface)); font-size: 11px; font-weight: 700; }
.app-main .hp-v4-product .hp-product-name { display: block; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.app-main .hp-v4-product > small { margin-top: auto; color: var(--text); font-size: 13px; font-weight: 650; }
.app-main .hp-v4-product .hp-stock-warning { color: var(--warning); font-size: 11px; font-weight: 550; }
.app-main .hp-v4-product:hover { background: var(--surface-3); }
.app-main .hp-register-ticket { border-color: var(--border); border-radius: 12px; background: var(--surface); }
.app-main .hp-quick-heading { padding: 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.app-main .hp-quick-line { border-color: var(--border); padding-block: 12px; }
.app-main .hp-quick-line .hp-v4-edit-item { font-size: 13px; line-height: 1.5; }
.app-main .hp-qty-stepper button { border-radius: 8px; background: var(--surface-2); color: var(--text); border-color: var(--border); }
.app-main .hp-quick-total { font-size: 15px; padding-block: 14px; }
.app-main .hp-quick-total strong { font-size: 26px; letter-spacing: -.035em; }
.app-main .hp-quick-actions .action-btn { border-radius: 10px; font-size: 13px; min-height: 48px; }
.app-main .hp-tile-table { background: var(--surface); border-color: var(--border); box-shadow: none; border-radius: 14px; }
.app-main .hp-tile-table strong { font-size: 22px; }
.app-main .hp-v4-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.app-main .v3-menu-designer { display: grid; gap: 20px; }
.app-main .v3-menu-designer > header { padding: 4px; }
.app-main .v3-menu-designer > header h2 { font-size: 23px; letter-spacing: -.03em; }
.app-main .v3-menu-designer > header p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.app-main .hp-v4-category { background: var(--surface-2); color: var(--text); border-color: var(--border); border-radius: 10px; }
.app-main .hp-v4-category[aria-pressed="true"] { background: var(--surface-3); border-color: var(--accent); }
.app-main .hp-v4-product-row { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--surface); }
.app-main .hp-v4-swatch { background: color-mix(in srgb,var(--pos-color) 12%,var(--surface)); color: var(--text); border-radius: 10px; }
.app-main .hp-v4-product-row :is(label,small) { font-size: 12px; }
.app-main .hp-v4-designer :is(input,select) { min-height: 44px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px; font-size: 14px; }
.app-main .hp-v4-designer input[type="checkbox"] { min-height: 18px; }
.app-main .hp-v4-dialog { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: -12px 0 45px #0003; }
.app-main .hp-v4-dialog :is(header,footer) { background: var(--surface); border-color: var(--border); }
.app-main .hp-v4-dialog h2 { font-size: 22px; letter-spacing: -.025em; }
.app-main .hp-v4-dialog :is(label,small,p) { font-size: 13px; line-height: 1.6; }
.app-main .hp-v4-dialog :is(input,select,textarea) { background: var(--surface); color: var(--text); border-color: var(--border-strong); border-radius: 10px; font-size: 16px; min-height: 46px; }
.app-main .hp-v4-dialog .action-btn { min-height: 46px; border-radius: 10px; }
.app-main .hp-ps-header { background: var(--surface-2); }
.app-main .hp-ps-tabs { background: var(--surface-2); border-color: var(--border); }
.app-main .hp-ps-tabs button { min-height: 44px; font-size: 13px; }
.app-main .hp-ps-tabs button[aria-selected="true"] { color: var(--accent-2); background: var(--surface-3); }
.app-main .hp-kds-card { background: var(--surface); border-radius: 12px; box-shadow: none; }
.app-main .hp-kds-heading { background: var(--surface-2); border-color: var(--border); }
.app-main .hp-kds-heading strong { font-size: 22px; letter-spacing: -.03em; }
.app-main .hp-kds-lines { font-size: 15px; line-height: 1.7; }
.app-main .hp-kds-toolbar { background: var(--surface-2); border-color: var(--border); border-radius: 12px; }
.app-main .hp-kds-toolbar :is(button,select,input) { min-height: 44px; font-size: 13px; }
.app-main .hp-kds-overlay > [role="dialog"] { border-radius: 14px; box-shadow: 0 15px 55px #0003; }
.app-main .hp-kds-dialog-body { padding: 22px; }
.app-main .hp-kds-form footer .action-btn { min-height: 46px; }
@media (max-width:767px) {
 .app-main .hp-terminal .hp-v4-product { min-height: 98px; padding: 12px; gap: 5px; }
 .app-main .hp-v4-product .hp-product-icon { width: 25px; height: 25px; font-size: 10px; }
 .app-main .hp-product-buttons { gap: 8px; padding: 8px; }
 .app-main .hp-v4-section { padding: 16px; }
 .app-main .hp-v4-designer :is(input,select) { font-size: 16px; }
 .app-main .hp-kds-dialog-body { padding: 16px; }
}

/* Scheduling, reporting and administrator controllers retain their complete
   view models and use the same navigation, controls and surface rhythm. */
.v3-rota-workspace { border-radius: 14px; background: var(--surface); border-color: var(--border); box-shadow: none; }
.v3-rota-workspace .rp-header { background: var(--surface); border-color: var(--border); padding: 20px; }
.v3-rota-workspace .rp-title h2 { font-size: 21px; letter-spacing: -.025em; }
.v3-rota-workspace .rp-toolbar { background: var(--surface-2); border-color: var(--border); padding: 12px 16px; }
.v3-rota-workspace .rp-summary { background: var(--surface); border-color: var(--border); color: var(--muted); font-size: 12px; }
.v3-rota-workspace .rp-calendar-icon { background: var(--surface-3); color: var(--accent-2); box-shadow: none; }
.v3-rota-workspace :is(button,select,input) { font-size: 13px; }
.v3-rota-workspace .rp-shift { box-shadow: none; border-radius: 8px; }
.v3-rota-workspace .rp-day { border-radius: 12px; border-color: var(--border); background: var(--surface); }
.v3-rota-workspace .rp-day header { background: var(--surface-2); }
.v3-people-access .people-panel { padding: 22px; }
.v3-people-access .people-heading { background: var(--surface); border-color: var(--border); }
.v3-people-access .people-heading h2 { font-size: 24px; letter-spacing: -.03em; }
.v3-people-access .people-panel p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.v3-people-access .people-tool { background: var(--surface-2); border-color: var(--border); border-radius: 9px; min-height: 48px; }
.v3-people-access .people-member { padding: 16px 0; border-color: var(--border); }
.v3-people-access :is(input,select) { min-height: 46px; background: var(--surface); color: var(--text); border-color: var(--border-strong); border-radius: 10px; font-size: 16px; }
.v3-reports-workspace { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); height: auto; min-height: 520px; }
.v3-reports-workspace .oa-header h2 { font-size: 24px; letter-spacing: -.03em; }
.v3-reports-workspace .oa-header p { font-size: 13px; line-height: 1.7; }
.v3-reports-workspace .oa-controls { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.v3-reports-workspace .oa-tabs { border-bottom: 1px solid var(--border); gap: 6px; }
.v3-reports-workspace .oa-tabs button { min-height: 46px; border-radius: 8px 8px 0 0; font-size: 13px; background: transparent; color: var(--muted); border: 0; }
.v3-reports-workspace .oa-tabs button[aria-selected="true"] { color: var(--accent-2); box-shadow: inset 0 -3px var(--accent); }
.v3-reports-workspace .oa-detail { padding: 18px 0 0; }
.v3-support-workspace .support-toolbar { padding: 16px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.v3-support-workspace .support-filters { padding: 14px 0; gap: 8px; }
.v3-support-workspace .support-filters button { min-height: 44px; border-radius: 9px; font-size: 12px; }
.v3-support-workspace .support-filters button.active { background: var(--surface-3); color: var(--accent-2); border-color: var(--border); }
.v3-support-workspace .support-list { background: var(--surface-2); border-color: var(--border); }
.v3-support-workspace .support-ticket { padding: 18px; border-color: var(--border); background: transparent; }
.v3-support-workspace .support-ticket.active { background: var(--surface); border-left-color: var(--accent); }
.v3-support-workspace .support-thread-head { padding: 20px; background: var(--surface); border-color: var(--border); }
.v3-support-workspace .support-message { border-radius: 12px; background: var(--surface-2); box-shadow: none; }
.v3-support-workspace .support-message.note { background: color-mix(in srgb,var(--warning) 8%,var(--surface)); border-color: color-mix(in srgb,var(--warning) 25%,var(--border)); }
.v3-support-workspace .support-message-text { font-size: 14px; line-height: 1.8; }
.v3-support-workspace .support-reply-area { padding: 18px; background: var(--surface); border-color: var(--border); }
.v3-support-workspace textarea { font-size: 16px; border-radius: 10px; min-height: 100px; }
.app-main .hq-activity { border-radius: 14px; }
.app-main .hq-activity-filters { background: var(--surface-2); padding: 16px 20px; }
.app-main .hq-activity-list > article { padding: 18px 20px; }
.app-main .hq-activity-list :is(strong,p) { font-size: 13px; line-height: 1.7; }
.app-main .hq-activity-list :is(time,small) { font-size: 12px; }
@media (max-width:767px) {
 .v3-rota-workspace .rp-header { padding: 16px; }
 .v3-rota-workspace .rp-toolbar { padding: 10px; }
 .v3-people-access .people-panel { padding: 18px 16px; }
 .v3-people-access .people-heading h2 { font-size: 22px; }
 .v3-reports-workspace { padding: 16px; min-height: 420px; }
 .v3-reports-workspace .oa-controls label { flex: 1 1 120px; min-width: 0; }
 .v3-reports-workspace .oa-controls :is(input,select) { width: 100%; font-size: 16px; }
 .v3-support-workspace .support-toolbar { padding: 14px; }
 .v3-support-workspace .support-filters { flex-wrap: nowrap; overflow-x: auto; padding-block: 12px; }
 .v3-support-workspace .support-filters button { flex-shrink: 0; }
}

.v3-team-chat .chat-bubble { white-space: normal !important; padding: 14px 16px; max-width: 640px; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.v3-team-chat .chat-bubble p { margin: 0; }
.v3-team-chat .v3-chat-message > .table-avatar { background: var(--accent) !important; }
.v3-team-chat .v3-chat-message :is(.mini-btn,.chip) { min-height: 36px; min-width: 36px; font-size: 12px !important; }
.v3-team-chat .composer textarea { min-height: 80px !important; font-size: 16px !important; padding: 12px; }
.v3-team-chat .composer button { min-height: 46px; }
.v3-team-chat [data-team-chat-search] { min-height: 44px; font-size: 14px; }
.v3-team-chat [data-action="create-team-channel"] { min-height: 36px; min-width: 36px !important; }
.v3-team-chat .team-chat-sidebar-left [data-action="delete-team-channel"] { min-height: 44px; min-width: 40px; }
.v3-team-chat [data-action="toggle-mobile-chat-channels"] { min-height: 44px; min-width: 44px; }
.v3-network-notice { padding: 12px 20px; background: color-mix(in srgb,var(--warning) 10%,var(--surface)); color: var(--text); border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.7; }
.v3-network-notice strong { margin-right: 8px; }
@media (max-width:767px) { .v3-team-chat .v3-chat-message :is(.mini-btn,.chip) { min-height: 44px; min-width: 44px; } .v3-network-notice { padding: 12px 16px; } }

/* Operational summaries leave the working list within reach on phones. */
.app-main :is(.v3-stock-sections,.v3-sales-workspace,.v3-campaign-workspace) > .page-grid:is(.grid-3,.grid-4) { gap: 10px; }
.app-main :is(.v3-stock-sections,.v3-sales-workspace,.v3-campaign-workspace) .metric-card { padding: 16px; box-shadow: none; }
.v3-team-chat { height: calc(100dvh - 225px); min-height: 380px; max-height: 850px; }
@media (max-width:767px) {
 .app-main :is(.v3-stock-sections,.v3-sales-workspace) > .page-grid.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
 .app-main .v3-campaign-workspace > .page-grid.grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
 .app-main :is(.v3-stock-sections,.v3-sales-workspace,.v3-campaign-workspace) .metric-card { min-height: 104px; padding: 13px 11px; }
 .app-main :is(.v3-stock-sections,.v3-sales-workspace,.v3-campaign-workspace) .metric-card :is(.metric-icon,.metric-change) { display: none; }
 .app-main :is(.v3-stock-sections,.v3-sales-workspace,.v3-campaign-workspace) .metric-card :is(.metric-label,.metric-foot) { font-size: 11px; line-height: 1.5; }
 .app-main :is(.v3-stock-sections,.v3-sales-workspace,.v3-campaign-workspace) .metric-card .metric-value { font-size: 23px; line-height: 1.4; overflow-wrap: anywhere; }
 .v3-team-chat { height: calc(100dvh - 260px); min-height: 320px; margin: 0; border: 1px solid var(--border); border-radius: 12px; }
 .v3-team-chat .team-chat-main-pane { grid-template-rows: auto minmax(0,1fr) auto; }
 .v3-team-chat .composer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; }
 .v3-team-chat .composer textarea { min-height: 62px !important; }
 .v3-team-chat .composer .action-btn { padding-inline: 12px; }
 .v3-catalogue-filters .search-box input { font-size: 16px; }
}

.app-shell .mobile-tabbar { box-shadow: 0 -1px 0 var(--border); }
.app-main .panel { --shadow-soft: 0 1px 3px #00000005; }

.v3-team-chat { height: var(--v3-chat-height,calc(100dvh - 280px)); min-height: min(320px,var(--v3-chat-height,320px)); }
.v3-stock-balances :is(summary,p) { font-size: 13px; line-height: 1.7; }

/* Header popups stay scrollable above system controls and mobile navigation. */
#portal .dropdown { max-height: min(640px,calc(100dvh - 160px)); overflow-y: auto; overscroll-behavior: contain; border-radius: 12px; background: var(--surface); border-color: var(--border-strong); }
#portal a.dropdown-item { color: var(--text); text-decoration: none; min-height: 48px; }
#portal .dropdown-copy { min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.65; }
#portal .dropdown-head { position: sticky; top: 0; z-index: 1; background: var(--surface); }
@media(max-width:767px) { #portal .workspace-dropdown { left: 12px !important; right: 12px !important; width: auto; } }

#portal .v3-popup-backdrop { position: fixed; inset: 0; z-index: 109; background: transparent; }

.app-main button.metric-card { width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.app-main button.metric-card:hover { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 3%,var(--surface)); }

/* Selected room labels must keep their foreground and background together. */
.app-main .hp-floor-tabs .action-btn[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: none; }

/* navigation */
/* Tool composition. Only tabs and board lanes own horizontal scroll. */
.app-main .v3-tool-header {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
  overflow: visible; gap: 14px 16px; padding: 22px 24px 16px;
}
.v3-tool-header .context-title { min-width: 0; }
.v3-tool-header .context-title h1 { font-size: 25px; }
.v3-tool-header .context-title p { display: none; }
.app-main .v3-tool-header .context-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  width: auto; max-width: 100%; margin: 0; padding: 0; overflow: visible;
}
.v3-tool-header .context-actions > .context-spacer { display: none; }
.v3-tool-header .context-actions > .action-btn { flex: 0 1 auto; }
.v3-tool-tabs { grid-column: 1/-1; width: 100%; min-width: 0; border-bottom: 1px solid var(--border); }
.v3-tool-tabs > :is(.segmented,.v3-section-tabs) {
  display: flex; gap: 4px; width: 100%; max-width: 100%; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; overflow-x: auto;
  overscroll-behavior-inline: contain; scrollbar-width: thin;
}
.v3-tool-tabs button {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; min-height: 44px; padding: 10px 13px; border: 0;
  border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0;
  color: var(--muted); background: transparent; font: inherit; font-size: 13px; white-space: nowrap;
}
.v3-tool-tabs button:is(.active,[aria-pressed="true"]) {
  color: var(--accent-2); border-bottom-color: var(--accent);
  background: color-mix(in srgb,var(--accent) 6%,transparent); box-shadow: none;
}
.v3-tool-tabs button svg { width: 17px; height: 17px; }
.v3-workbar {
  grid-column: 1/-1; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; width: 100%; min-width: 0;
}
.v3-workbar > .filter-select { flex: 0 1 180px; width: auto; max-width: 100%; min-width: 100px; min-height: 44px; }
.v3-workbar .v3-tool-filters { display: flex; flex: 1 1 260px; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; min-width: 0; }
.v3-workbar .workflow-search { flex: 1 1 180px; width: auto; max-width: none; min-width: 0; min-height: 44px; }
.v3-workbar .v3-tool-filters > .segmented { flex: 0 1 auto; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.app-main .v3-view-switch {
  display: flex; flex: 0 0 auto; align-self: center; margin-left: auto;
  padding: 3px; width: auto; max-width: none; min-width: 100px;
  overflow: visible; border-radius: 10px;
}
.app-main .v3-view-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-width: 44px; min-height: 40px; padding: 8px 10px; }
.v3-view-switch svg { width: 18px; height: 18px; }
.app-main .v3-board-scroll {
  width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden;
  padding-bottom: 12px; overscroll-behavior-inline: contain; scrollbar-width: thin;
  scroll-padding-inline: 2px; touch-action: pan-x pan-y; border-radius: 12px;
}
.app-main .v3-board-scroll > :is(.kanban,.task-board) {
  display: flex; align-items: stretch; gap: 16px; width: max-content; min-width: 100%;
  height: auto; min-height: min(460px,60dvh); padding: 0; overflow: visible;
}
.app-main .v3-board-scroll :is(.kanban-column,.task-column) {
  flex: 0 0 272px; width: 272px; min-width: 272px; max-height: none;
  padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2);
}
.app-main .v3-board-scroll :is(.kanban-cards,.task-column-cards) { min-height: 180px; }
.app-main .v3-board-scroll :is(.deal-card,.task-card) { padding: 15px; margin-bottom: 10px; border-radius: 10px; background: var(--surface); }
.v3-toolbar-more > div { max-height: min(560px,70dvh); overflow-y: auto; }
.v3-toolbar-more .tool-guide { margin: 0; min-width: 0; }
.v3-toolbar-more .tool-guide summary { white-space: normal; }
.v3-toolbar-more .tool-guide p { font-size: 12px; line-height: 1.5; }
.v3-mobile-utilities { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--border); }
.v3-mobile-utilities > :is(button,details) { width: 100%; min-height: 44px; }
.v3-mobile-utilities .top-btn { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px; height: auto; padding: 12px; border-radius: 10px; color: var(--text); background: var(--surface-2); box-shadow: none; }
.v3-mobile-utilities .top-btn svg { width: 20px; height: 20px; flex: 0 0 20px; }
.v3-mobile-utilities .top-btn span { display: inline; }
.v3-mobile-utilities .create-btn { color: white; background: var(--accent); }
.v3-mobile-utilities #timer-label { margin-left: auto; font-variant-numeric: tabular-nums; }
.v3-mobile-utilities .suite-app-panel { position: static; width: 100%; max-height: none; box-shadow: none; }
.app-shell .avatar { background: var(--accent); color: white; border-radius: 50%; box-shadow: none; }
.app-main :is(.card-avatar,.conv-avatar) { background: color-mix(in srgb,var(--accent) 12%,var(--surface)); color: var(--accent-2); box-shadow: none; }
.v3-stock-form-heading p:empty { display: none; }
.v3-stock-editor > .v3-stock-balances { margin-block: 20px 12px; }
.v3-stock-editor > p { padding: 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12px; line-height: 1.5; }
.v3-people-access .people-heading { align-items: center; padding: 20px; }
.v3-people-access .people-heading h2 { font-size: 24px; }
.v3-people-access .people-heading p { margin-block: 8px 0; }
.v3-people-access .people-heading .status-pill { display: none; }
.v3-mail-connect { display: grid; gap: 18px; max-width: 640px; margin-inline: auto; padding: 28px; }
.v3-mail-connect p { margin: 0; font-size: 13px; line-height: 1.6; }
.v3-mail-connect .panel-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.v3-mail-connect .action-btn { min-height: 48px; white-space: normal; }
.v3-mail-connect [role="status"] { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.app-main .v3-catalogue-filters { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.v3-catalogue-filters .search-box { flex: 1; min-width: 0; max-width: 460px; min-height: 44px; }
.v3-catalogue-filters select { flex: 0 1 180px; min-width: 0; min-height: 44px; }
.v3-calendar-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.v3-calendar-navigation strong { margin-inline: 8px; }
.v3-people-tabs.v3-tool-tabs { display: flex; gap: 4px; margin: 0; }
.v3-people-tabs.v3-tool-tabs button { background: transparent; color: var(--muted); }
.v3-people-tabs.v3-tool-tabs button.primary { color: var(--accent-2); border-bottom-color: var(--accent); }
/* All record editors share the same field grammar, including controller forms. */
.app-main :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
#portal :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  border-radius: 9px; border-color: var(--border-strong); color: var(--text);
  background-color: var(--surface); font-family: inherit;
}
.app-main :is(input,select,textarea):focus-visible,
#portal :is(input,select,textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.app-main :is(input,select,textarea):disabled,
#portal :is(input,select,textarea):disabled { opacity: .65; cursor: not-allowed; }
#portal .form-field :is(input,select,textarea) { padding: 11px 12px; font-size: 14px; }
#portal .form-field textarea { min-height: 112px; line-height: 1.6; resize: vertical; }
.app-main .data-table td { font-size: 13px; }
.app-main .data-table th { font-size: 11px; text-transform: none; letter-spacing: .01em; }
.app-main :is(.v3-stat-grid,.metrics-grid) { gap: 12px; }
.app-main .v3-stat { min-height: 112px; padding: 18px; gap: 10px; }
.app-main .v3-overview { gap: 18px; }
.v3-work-item { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.v3-work-item:last-child { border: 0; }
.v3-work-item .v3-work-row { grid-template-columns: minmax(0,1fr) auto; border: 0; }
.v3-task-complete { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
button.v3-task-complete svg { width: 22px; height: 22px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 3px; color: transparent; }
button.v3-task-complete:hover { background: var(--surface-2); }
button.v3-task-complete:hover svg { color: var(--accent-2); border-color: var(--accent); }
html[data-density="compact"] .app-main .v3-tool-header { padding-block: 14px 12px; gap: 10px 14px; }
html[data-density="compact"] .v3-board-scroll :is(.deal-card,.task-card) { padding: 11px; }
@media (max-width: 767px) {
  .app-main .v3-tool-header { padding: 14px 14px 12px; gap: 10px; }
  .v3-tool-header .context-title h1 { font-size: 21px; }
  .v3-tool-header .context-actions > .action-btn { min-height: 44px; padding-inline: 10px; font-size: 12px; }
  .v3-toolbar-more > summary { width: 44px; min-height: 44px; justify-content: center; padding: 8px; }
  .v3-toolbar-more > summary:has(svg) > span { display: none; }
  .v3-tool-tabs button { font-size: 12px; padding-inline: 11px; }
  .v3-workbar { gap: 8px; }
  .v3-workbar > .filter-select { flex: 1 1 100px; max-width: calc(100% - 112px); }
  .v3-workbar .v3-tool-filters { flex: 1 1 100%; order: 2; }
  .v3-workbar .workflow-search { flex-basis: 100%; }
  .v3-workbar .v3-tool-filters > .segmented { display: flex; max-width: 100%; }
  .v3-workbar .v3-tool-filters > .segmented button { min-height: 44px; }
  .v3-workbar .v3-view-switch { order: 1; }
  .v3-view-switch button { font-size: 0; }
  .app-main .v3-board-scroll > :is(.kanban,.task-board) { gap: 12px; min-height: 380px; }
  .app-main .v3-board-scroll :is(.kanban-column,.task-column) { flex-basis: calc(100vw - 54px); width: calc(100vw - 54px); min-width: 240px; padding: 10px; }
  .app-main .topbar { gap: 8px; padding-inline: 12px; }
  .app-main .topbar .workspace-switcher { flex: 1; min-width: 0; max-width: none; }
  .app-main .topbar .workspace-switcher > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
  .app-main .topbar .avatar { display: flex; width: 38px; height: 38px; flex: 0 0 38px; }
  .app-main .v3-catalogue-filters { gap: 8px; }
  .v3-catalogue-filters select { flex-basis: 125px; width: 125px; }
  #portal .form-field :is(input,select,textarea) { font-size: 16px; }
  .v3-mail-connect { padding: 20px 16px; }
  .v3-mail-connect .panel-actions { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { .v3-board-scroll { scroll-behavior: auto; } }

/* chat */
/* Team Chat V3. Use content width, keep the composer in normal flex layout. */
.chat-v3{container-type:inline-size;display:grid;grid-template-columns:280px minmax(0,1fr);height:calc(var(--chat-viewport,100dvh) - 180px);min-height:440px;max-height:1100px;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text);font-size:14px;isolation:isolate}
.chat-v3 *{box-sizing:border-box}.chat-v3 button,.chat-v3-menu button{font:inherit;color:inherit;cursor:pointer;min-height:44px;border:1px solid transparent;border-radius:10px;background:transparent;padding:9px 12px}.chat-v3 button:hover,.chat-v3-menu button:hover{background:var(--surface-3)}.chat-v3 button:focus-visible,.chat-v3 textarea:focus-visible,.chat-v3 input:focus-visible,.chat-v3 select:focus-visible,.chat-v3-menu :focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-v3 button:disabled{cursor:wait;opacity:.55}.chat-v3 h2{margin:0;font-size:17px;line-height:1.4}.chat-v3 h3{margin:0 0 10px;font-size:16px}.chat-v3 small{color:var(--muted);font-size:12px;line-height:1.4}.chat-v3-inbox{min-width:0;background:var(--surface-2);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.chat-v3-inbox>header,.chat-v3-conversation>header,.chat-v3-drawer>header{min-height:76px;padding:14px 16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border)}.chat-v3-inbox>header>div,.chat-v3-conversation>header>div,.chat-v3-drawer>header>h3{flex:1;min-width:0}.chat-v3-inbox>header small{display:block;letter-spacing:.06em;font-size:11px;margin-bottom:3px}.chat-v3-inbox nav{display:flex;padding:8px;gap:2px;flex-wrap:wrap}.chat-v3-inbox nav button{font-size:12px;flex:1;padding:6px}.chat-v3 [aria-current=page]{background:var(--surface-3);color:var(--accent-2);font-weight:650}.chat-v3-inbox-actions{display:flex;flex-wrap:wrap;padding:0 8px 8px;border-bottom:1px solid var(--border)}.chat-v3-inbox-actions button{font-size:12px}.chat-v3 [data-chat-inbox]{overflow:auto;padding:8px;flex:1}.chat-v3 .chat-v3-room{display:flex;align-items:center;text-align:left;width:100%;gap:10px;padding:12px 8px;min-height:70px;margin-bottom:3px}.chat-v3-room>span:nth-child(2){flex:1;min-width:0}.chat-v3-room strong,.chat-v3-room small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-v3-room strong{font-size:14px;font-weight:650;margin-bottom:4px}.chat-v3 .chat-v3-room.is-selected{background:var(--surface-3);border-color:var(--border-strong)}.chat-v3-avatar{width:35px;height:35px;flex:0 0 35px;display:grid;place-items:center;border:1px solid var(--border);border-radius:11px;color:var(--accent-2);background:var(--surface-3);font-size:13px;font-weight:700}.chat-v3-badge{border-radius:12px;padding:3px 7px;font-size:12px;color:#fff;background:var(--accent)}.chat-v3-conversation{min-width:0;display:flex;flex-direction:column;overflow:hidden;background:var(--surface)}.chat-v3-conversation>header{flex:0 0 auto}.chat-v3-conversation>header small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}.chat-v3-conversation>header>[data-chat-action=back]{display:none}.chat-v3-status{padding:10px 16px;color:var(--warning);background:var(--surface-2);border-bottom:1px solid var(--border);line-height:1.5;flex:0 0 auto}.chat-v3-status[hidden]{display:none}.chat-v3-stream{overflow:auto;overscroll-behavior:contain;overflow-anchor:none;padding:8px 24px 20px;flex:1;min-height:0;scrollbar-width:thin}.chat-v3-stream>[data-chat-action=older]{font-size:12px;color:var(--accent-2);display:block;margin:4px auto 8px}.chat-v3-day{text-align:center;color:var(--muted);font-size:11px;margin:20px auto;display:flex;align-items:center;gap:15px}.chat-v3-day:before,.chat-v3-day:after{content:'';height:1px;flex:1;background:var(--border)}.chat-v3-message{display:flex;gap:11px;margin:16px 0 0;padding:6px;border-radius:12px;position:relative}.chat-v3-message-copy{flex:1;min-width:0}.chat-v3-message header{display:flex;align-items:center;gap:9px;min-height:28px}.chat-v3-message header strong{font-size:13px}.chat-v3-message header time{font-size:11px;color:var(--muted)}.chat-v3-message header>[data-chat-action=more]{margin-left:auto;min-height:32px;min-width:44px;padding:0}.chat-v3-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:2px 0 4px;padding:10px 13px;border-radius:3px 13px 13px;background:var(--surface-2);max-width:680px}.chat-v3-message.is-own .chat-v3-body{background:var(--surface-3);border:1px solid var(--border)}.chat-v3-message-foot{display:flex;align-items:center;flex-wrap:wrap;gap:3px;min-height:30px}.chat-v3 .chat-v3-message-foot button{font-size:11px;min-height:30px;padding:5px 8px}.chat-v3-message-foot small{font-size:10px;margin-left:auto}.chat-v3-message-foot [aria-pressed=true]{border-color:var(--accent);background:var(--surface-3)}.chat-v3-seen{display:block;width:1px;height:1px}.chat-v3 .chat-v3-quote{border-left:3px solid var(--accent);border-radius:0;background:var(--surface-2);font-size:12px;text-align:left;max-width:100%;overflow:hidden;text-overflow:ellipsis;display:block;white-space:nowrap;min-height:35px}.chat-v3-pending{margin:15px 0 0 46px;border:1px dashed var(--border-strong);padding:12px;border-radius:12px;opacity:.85}.chat-v3-pending p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 6px}.chat-v3-pending small{display:block}.chat-v3-pending button{font-size:12px}.chat-v3-composer{flex:0 0 auto;background:var(--surface);border-top:1px solid var(--border);padding:12px 18px max(12px,env(safe-area-inset-bottom));margin:0}.chat-v3-composer>label.chat-v3-sr{position:static!important;width:auto!important;height:auto!important;clip-path:none!important;overflow:visible!important;display:block;font-size:0}.chat-v3-composer textarea{font:inherit;font-size:14px;line-height:1.5;color:var(--text);background:var(--surface-2);border:1px solid var(--border-strong);border-radius:12px;resize:none;width:100%;min-height:58px;max-height:180px;padding:12px;margin:0}.chat-v3-compose-tools{display:flex;align-items:center;gap:5px;margin-top:5px}.chat-v3-compose-tools>button:first-child{font-size:18px;font-weight:700}.chat-v3-enter{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:5px;margin-left:auto}.chat-v3-enter input{accent-color:var(--accent);width:15px;height:15px}.chat-v3-attach{font-size:12px;min-height:44px;display:flex;align-items:center;padding:8px;cursor:pointer;border-radius:8px}.chat-v3 .chat-v3-send{margin-left:auto;background:var(--accent);color:#fff;min-width:80px;font-weight:650}.chat-v3 [data-chat-reply]:not(:empty){display:flex;align-items:center;gap:10px;font-size:12px;padding:0 4px 7px;color:var(--accent-2)}.chat-v3 [data-chat-reply]>span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-v3-new{text-align:center;padding:2px}.chat-v3-new[hidden]{display:none}.chat-v3-new button{color:var(--accent-2);font-size:12px}.chat-v3-welcome{margin:auto;text-align:center;padding:30px;max-width:400px}.chat-v3-welcome>span{font-size:50px;color:var(--accent-2)}.chat-v3-welcome h3{margin:20px 0 10px;font-size:22px}.chat-v3-welcome p,.chat-v3-empty{color:var(--muted);line-height:1.6}.chat-v3-empty{padding:20px;font-size:13px}.chat-v3-drawer{display:flex;flex-direction:column;overflow:hidden;border-left:1px solid var(--border);background:var(--surface-2);position:absolute;right:0;top:0;bottom:0;width:340px;z-index:5;box-shadow:-10px 0 30px #0002}.chat-v3{position:relative}.chat-v3-drawer[hidden]{display:none}.chat-v3-details{padding:18px;overflow:auto;font-size:13px;line-height:1.6}.chat-v3-details label{display:block;margin:0 0 12px}.chat-v3-details input:not([type=checkbox]),.chat-v3-details textarea,.chat-v3-details select{display:block;width:100%;padding:10px;min-height:44px;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);border-radius:9px;margin-top:4px}.chat-v3-details fieldset{border:1px solid var(--border-strong);border-radius:10px;padding:12px;margin-bottom:15px}.chat-v3-details fieldset label{display:flex;gap:8px;align-items:center;min-height:34px}.chat-v3-details>button,.chat-v3-details form>button{width:100%;text-align:left;background:var(--surface);border:1px solid var(--border);margin:4px 0}.chat-v3-menu{position:fixed;z-index:10000;width:320px;max-height:min(620px,85dvh);overflow:auto;border:1px solid var(--border-strong);border-radius:14px;padding:7px;background:var(--surface);color:var(--text);box-shadow:0 14px 50px #0005;font-size:14px}.chat-v3-menu button{display:block;width:100%;text-align:left}.chat-v3-menu button[hidden]{display:none}.chat-v3-menu button small{display:block;color:var(--muted);font-size:11px}.chat-v3-menu label{display:block;margin:7px 0;padding:9px 7px;border-top:1px solid var(--border);font-size:12px;color:var(--muted)}.chat-v3-menu input{width:100%;padding:10px;min-height:44px;margin-top:8px;border:1px solid var(--border-strong);border-radius:9px;background:var(--surface-2);color:var(--text)}.chat-v3-menu p{padding:10px;color:var(--muted)}.chat-v3-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.chat-v3-message.is-highlighted{outline:2px solid var(--accent);background:var(--surface-3)}
@container(min-width:1120px){.chat-v3-drawer:not([hidden]){position:static;width:340px;box-shadow:none}.chat-v3:has(.chat-v3-drawer:not([hidden])){grid-template-columns:280px minmax(0,1fr) 340px}}
@media(max-width:850px){.chat-v3{height:calc(var(--chat-viewport,100dvh) - 150px);min-height:380px;grid-template-columns:245px minmax(0,1fr)}.chat-v3-stream{padding:8px 12px 16px}.chat-v3-composer{padding:10px}.chat-v3-enter{max-width:90px;line-height:1.25}.chat-v3-drawer{width:min(340px,90%)}}
@media(max-width:650px){.chat-v3{height:calc(var(--chat-viewport,100dvh) - 180px);min-height:320px;display:block;border-radius:12px}.chat-v3-inbox,.chat-v3-conversation{height:100%;width:100%}.chat-v3-inbox{border:0}.chat-v3-show-inbox>.chat-v3-conversation,.chat-v3-show-conversation>.chat-v3-inbox,.chat-v3-show-thread>.chat-v3-inbox{display:none}.chat-v3-conversation>header>[data-chat-action=back]{display:block}.chat-v3-drawer{position:absolute;width:100%;border:0;box-shadow:none}.chat-v3-inbox>header,.chat-v3-conversation>header,.chat-v3-drawer>header{min-height:64px;padding:10px 12px}.chat-v3-message{gap:7px;padding:0}.chat-v3-avatar{width:29px;height:29px;flex-basis:29px;font-size:11px}.chat-v3-message header{gap:6px;flex-wrap:wrap}.chat-v3-message header strong{font-size:12px}.chat-v3 .chat-v3-send{min-width:74px}.chat-v3-enter{font-size:10px}.chat-v3-pending{margin-left:36px}}
@media(prefers-reduced-motion:no-preference){.chat-v3-drawer{animation:chat-v3-in .15s ease-out}@keyframes chat-v3-in{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}}

.chat-v3[data-width="wide"]:has(.chat-v3-drawer:not([hidden])){grid-template-columns:280px minmax(0,1fr) 340px}.chat-v3[data-width="wide"] .chat-v3-drawer:not([hidden]){position:static;box-shadow:none}.chat-v3-image{display:block;max-width:100%;max-height:260px;object-fit:contain;border-radius:10px;margin-top:8px}.chat-v3-upload{display:flex;align-items:center;gap:6px;font-size:12px;flex-wrap:wrap}.chat-v3-upload strong{flex:1;overflow:hidden;text-overflow:ellipsis}.chat-v3-upload progress{width:100%;height:5px;accent-color:var(--accent)}.chat-v3-references{display:flex;flex-wrap:wrap;gap:5px;font-size:12px}.chat-v3-references:empty{display:none}
.chat-v3-unread-boundary{border-top:1px solid var(--accent);margin:20px 0 6px;padding-top:6px;font-size:11px;color:var(--accent-2)}.chat-v3-message.is-grouped{margin-top:3px}.chat-v3-message.is-grouped>.chat-v3-avatar{visibility:hidden}.chat-v3-message.is-grouped header strong{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.notification-dot:not(:empty){width:auto;min-width:17px;height:17px;line-height:17px;padding:0 4px;font-size:10px;color:white;text-align:center;border-radius:10px}

.chat-v3[data-width="phone"]{display:block;height:calc(var(--chat-viewport,100dvh) - 145px);min-height:200px}.chat-v3[data-width="phone"] .chat-v3-inbox,.chat-v3[data-width="phone"] .chat-v3-conversation{width:100%;height:100%}.chat-v3[data-width="phone"].chat-v3-show-inbox>.chat-v3-conversation,.chat-v3[data-width="phone"].chat-v3-show-conversation>.chat-v3-inbox,.chat-v3[data-width="phone"].chat-v3-show-thread>.chat-v3-inbox{display:none}.chat-v3[data-width="phone"] .chat-v3-conversation>header>[data-chat-action="back"]{display:block}.chat-v3[data-width="phone"] .chat-v3-drawer{position:absolute;width:100%;box-shadow:none;border:0}.chat-v3-menu [data-chat-workspace][hidden]{display:none}

.chat-v3-panel{position:fixed;z-index:520;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 40px);overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:16px;box-shadow:0 20px 80px #0007}.chat-v3-panel>header{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:var(--panel);border-bottom:1px solid var(--border)}.chat-v3-panel button{min-height:44px}.chat-v3-room time{font-size:10px;float:right;color:var(--muted)}

.chat-v3,.chat-v3[data-width="phone"]{height:var(--chat-height,calc(100dvh - 180px));min-height:160px}.chat-v3-panel{background:var(--surface)}.chat-v3-panel>header{background:var(--surface)}
