:root {
  color-scheme: light;
  --ink: #172025;
  --muted: #56636c;
  --line: #dae0e2;
  --surface: #fff;
  --paper: #f5f6f4;
  --accent: #2459bd;
  --pale: #eef4ff;
  --navy: #102843;
  --error: #9e2625;
  --radius: 12px;
  font-family:
    Geist,
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
select,
summary {
  touch-action: manipulation;
}
button,
a,
summary {
  cursor: pointer;
}
a {
  color: var(--accent);
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 3px solid #4f86e9;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.14;
  overflow-wrap: anywhere;
}
h1 {
  font-weight: 570;
  letter-spacing: -0.059em;
}
h2 {
  font-weight: 600;
  letter-spacing: -0.035em;
}
h3 {
  font-weight: 600;
  letter-spacing: -0.018em;
}
button svg,
a svg,
summary svg {
  flex: none;
}
svg {
  display: block;
}
.symbol-bank {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}
.small-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 670;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.small-brand svg {
  width: 23px;
  height: 29px;
}
.loading {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px;
}
.loading p,
.hint,
.muted {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.btn,
.ghost,
.icon-button,
.text-button,
.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 550;
  line-height: 1.25;
}
.btn,
.ghost,
.soft-button {
  border-radius: 10px;
  padding: 12px 17px;
  min-height: 45px;
  text-decoration: none;
}
.btn {
  color: white;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.btn:hover:not(:disabled) {
  background: #2d3d46;
}
.ghost {
  background: white;
  border: 1px solid var(--line);
}
.ghost:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  background: #eff2f4;
}
.text-button {
  color: var(--muted);
  padding: 8px 3px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover {
  color: var(--ink);
}
.soft-button {
  background: var(--pale);
  color: #1c4799;
}
.icon-button {
  padding: 8px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 8px;
}
.btn .icon {
  width: 17px;
  height: 17px;
}
.form-stack {
  display: grid;
  gap: 19px;
}
.field {
  display: grid;
  gap: 7px;
  font-weight: 550;
  font-size: 14px;
}
.field input,
.field select,
.field textarea,
.widget-form input {
  width: 100%;
  min-width: 0;
  background: white;
  border: 1px solid #c7cfd3;
  border-radius: 10px;
  padding: 12px 13px;
  min-height: 47px;
  font-weight: 400;
  line-height: 1.4;
  font-size: 16px;
}
.field input::placeholder,
.widget-form input::placeholder {
  color: #79868b;
}
.field-note {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.hint {
  font-size: 14px;
}
.form-error {
  margin: 12px 0;
  padding: 11px 13px;
  border-inline-start: 3px solid #ab3a37;
  background: #fff3f1;
  color: var(--error);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.action-row.end {
  justify-content: flex-end;
}
.nowrap {
  white-space: nowrap;
}
.text-back {
  text-decoration: none;
  gap: 6px;
}
.auth {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(18px, 5vw, 42px) 18px;
  background: #f6f7f8;
  color: #17191d;
  font-family: Geist, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
.auth-panel {
  width: min(100%, 390px);
  padding: 25px;
  border: 1px solid #dfe3e7;
  border-radius: 18px;
  background: #fff;
}
.auth-top { display:flex; align-items:center; gap:9px; margin:0 0 22px; font-size:14px; font-weight:600; }
.auth-center h1 { font-size:26px; line-height:1.15; font-weight:580; letter-spacing:-.035em; margin-bottom:9px; }
.auth-intro { color:var(--muted); font-size:14px; line-height:1.5; margin:0 0 18px; }
.auth-intro strong { color:var(--ink); font-weight:580; }
.auth .form-stack { gap:14px; }
.auth .field { font-size:13px; }
.auth .field input { padding:9px 11px; min-height:41px; border-color:#d8dde2; }
.auth .field-note, .auth .step-progress { font-size:12px; }
.auth .step-progress { margin-bottom:16px; }
.auth .btn, .auth .ghost { min-height:39px; padding:9px 16px; font-size:14px; border-radius:99px; }
.auth .action-row.end > .btn { width:100%; }
.auth-footer { margin-top:20px; padding-top:12px; border-top:1px solid #e3e5e8; font-size:12px; color:var(--muted); text-align:center; overflow-wrap:anywhere; }
.auth-footer button { font-size:13px; color:var(--ink); }
.step-progress {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}
.step-progress div {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}
.step-progress i {
  height: 4px;
  border-radius: 20px;
  flex: 1;
  background: var(--line);
}
.step-progress i.current {
  background: var(--ink);
}
.size-group {
  border: 0;
  padding: 0;
  margin: 0;
}
.size-group legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 550;
}
.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.size-options label {
  position: relative;
}
.size-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.size-options span {
  display: block;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}
.size-options input:checked + span {
  border-color: #80a1c8;
  color: #214d80;
  background: #eef5fc;
}
.size-options input:focus-visible + span {
  outline: 3px solid #4f86e9;
  outline-offset: 2px;
}
.notice-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--pale);
  color: var(--accent);
}
.notice-icon .icon {
  width: 23px;
  height: 23px;
}
.side-trial {
  padding: 12px;
  font-size: 13px;
}
.usage-rail {
  height: 5px;
  border-radius: 6px;
  overflow: hidden;
  background: #dce2e5;
  margin: 8px 0;
}
.usage-rail i {
  height: 100%;
  display: block;
  background: #6386a5;
}
.content {
  max-width: 1070px;
  margin: auto;
  padding: clamp(30px, 5vw, 70px) clamp(24px, 4.5vw, 70px) 70px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 31px;
}
.page-head h1 {
  font-size: clamp(34px, 4vw, 55px);
}
.page-head p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 15px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 21px;
}
.section-block + .section-block {
  margin-top: 33px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
}
.metric {
  min-width: 0;
  padding: 19px 20px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.metric h3 {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.metric strong {
  font-size: 34px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.metric-tools {
  border-top: 1px solid var(--line);
  padding-top: 9px;
  display: flex;
  gap: 2px;
}
.metric-tools .icon {
  width: 16px;
  height: 16px;
}
.widget-form {
  display: flex;
  gap: 8px;
  margin: 15px 0;
}
.widget-form input {
  flex: 1;
}
.hidden-widgets {
  margin-top: 14px;
}
.hidden-widgets summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 550;
}
.empty {
  padding: 19px 0;
  color: var(--muted);
  font-size: 15px;
}
.list {
  border-top: 1px solid var(--line);
}
.list-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.list-row h3 {
  font-size: 16px;
}
.list-row p,
.list-row small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.row-text {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.row-icon {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #365474;
}
.inline-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.switch {
  padding: 2px;
  border: 1px solid #a3aeb4;
  width: 39px;
  height: 23px;
  border-radius: 18px;
  background: #e1e6e8;
  flex: none;
}
.switch span {
  width: 17px;
  height: 17px;
  display: block;
  border-radius: 100%;
  background: #fff;
  box-shadow: 0 1px 3px #0003;
}
.switch[aria-checked='true'] {
  background: #274d75;
  border-color: #274d75;
}
.switch[aria-checked='true'] span {
  margin-left: auto;
}
.system-status {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.system-status h2 {
  font-size: 20px;
  margin-bottom: 5px;
}
.system-status p {
  color: var(--muted);
  font-size: 14px;
  margin: 7px 0;
}
.system-status .btn {
  margin-top: 12px;
}
.profile-grid {
  max-width: 620px;
}
.profile-grid dl {
  margin: 0;
}
.profile-grid dl div {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.profile-grid dt {
  color: var(--muted);
}
.profile-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.profile-grid .ghost {
  margin-top: 18px;
}
.dashboard-routines .section-head h2 {
  font-size: 18px;
}
.dashboard-routines .list-row {
  padding-block: 12px;
}
.dashboard-routines > .text-button {
  margin-top: 8px;
  font-size: 14px;
}
.inbox {
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}
.inbox li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  overflow-wrap: anywhere;
}
.inbox small {
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(580px, calc(100vw - 24px));
  padding: 11px 17px;
  color: white;
  background: var(--ink);
  border-radius: 10px;
  font-size: 14px;
  z-index: 10;
  text-align: center;
}
@media (max-width: 850px) {
  .content {
    padding-inline: 24px;
  }
}
@media (max-width: 680px) {
  .content {
    padding: 31px 18px 55px;
  }
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .page-head h1 {
    font-size: 35px;
  }
  .page-head .ghost {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 8px;
  }
  .metric {
    padding: 14px;
    gap: 12px;
  }
  .list-row {
    gap: 9px;
  }
  .account-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .inline-actions {
    margin-left: auto;
  }
  .widget-form {
    flex-wrap: wrap;
  }
  .widget-form input {
    flex-basis: 64%;
  }
  .section-head {
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .switch span {
    transition: transform 0.14s;
  }
  button:active:not(:disabled) {
    transform: translateY(1px);
  }
}

progress.usage-rail {
  display: block;
  width: 100%;
  border: 0;
  appearance: none;
  accent-color: #6386a5;
}
progress.usage-rail::-webkit-progress-bar {
  background: #dce2e5;
  border-radius: 6px;
}
progress.usage-rail::-webkit-progress-value,
progress.usage-rail::-moz-progress-bar {
  background: #6386a5;
  border-radius: 6px;
}
.imap-form {
  max-width: 540px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
}

.activity-chart {
  display: block;
  width: 100%;
  height: 33px;
  max-width: 280px;
  fill: #668dab;
}

#toast {
  pointer-events: none;
}
.screen-preview {
  margin: 18px 0 0;
}
.screen-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.screen-preview figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.nod-pairing {
  margin-top: 26px;
}
.nod-pairing .list {
  margin-top: 12px;
}

.expired-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px;
}
.expired-panel {
  width: min(100%, 550px);
  padding: clamp(22px, 5vw, 42px);
  background: white;
  border-radius: 18px;
}
.expired-panel h1 {
  font-size: clamp(32px, 4vw, 43px);
  margin: 32px 0 12px;
}
.expired-panel h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
.expired-panel footer {
  margin-top: 26px;
}
.expired-panel .hint + .ghost {
  margin-top: 12px;
}

.handoff-panel {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 18px;
}
.handoff-panel .section-head {
  align-items: center;
}
.handoff-frame {
  margin-top: 13px;
}
.frame-button {
  display: block;
  width: 100%;
  padding: 0;
  cursor: crosshair;
  line-height: 0;
}
.frame-button:disabled {
  opacity: 1;
  cursor: default;
}
.frame-button img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.frame-status {
  display: block;
  margin: 8px 0;
}
.handoff-text {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.handoff-text .field {
  flex: 1;
  min-width: min(100%, 220px);
}
.handoff-text .btn {
  margin: 0;
}

.app-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 17px 8px 15px;
  background: #f6f7f8;
  border-right: 1px solid var(--line);
}
.side-nav {
  display: grid;
  gap: 9px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 76px;
  padding: 8px 3px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #515862;
  text-align: center;
  font-size: 12px;
  font-weight: 520;
  line-height: 1.2;
}
.nav-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
}
.nav-icon .icon {
  width: 25px;
  height: 25px;
}
.nav-icon .cloud-avatar {
  width: 29px;
  height: 21px;
}
.nav-item:hover {
  background: #ebedf0;
  color: var(--ink);
}
.nav-item[aria-pressed='true'] {
  color: #15181d;
  background: #fff;
  border-color: #e1e4e8;
  font-weight: 600;
  box-shadow: 0 1px 3px #1b293009;
}
.main-content {
  min-height: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  overflow: hidden;
  background: white;
}
.main-column {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.main-column.is-chat {
  grid-template-rows: minmax(0, 1fr);
}
.main-column.is-chat > .topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 12;
  min-height: auto;
  padding: 14px 18px 8px;
  background: transparent;
  pointer-events: none;
}
.main-column.is-chat > .topbar .agent-pill {
  pointer-events: auto;
  background: #fffffff2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: #e6e9ee;
  box-shadow: 0 3px 14px #0f172a12;
}
.main-column.is-chat .chat-log {
  padding-top: 76px;
}
@media (max-width: 700px) {
  .main-column.is-chat > .topbar {
    padding: 8px 96px 6px 12px;
    justify-items: start;
  }
  .main-column.is-chat .chat-log {
    padding-top: 66px;
  }
}
.plan-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plan-card-featured {
  border-color: var(--app-accent-line, #b7d2fc);
  background: linear-gradient(180deg, #fafcff 0%, #ffffff 36%);
}
.plan-card-soon {
  background: #fbfcfd;
}
.drawer-slot {
  --drawer-w: clamp(320px, 30vw, 390px);
  flex: 0 0 auto;
  width: 0;
  height: 100%;
  overflow: hidden;
  background: #fbfcfd;
  border-left: 1px solid transparent;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-left-color 0.2s ease;
}
.drawer-slot.is-open {
  width: var(--drawer-w);
  border-left-color: #eceef1;
}
.topbar {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 73px;
  padding: 10px 18px;
  background: white;
}
.agent-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: 100%;
  margin: 0;
  padding: 7px 13px 7px 10px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 570;
  border: 1px solid #eceef0;
  border-radius: 99px;
  background: white;
  box-shadow: 0 2px 7px #18253308;
}

.cloud-avatar {
  --cloud: var(--assistant-color, #1179f9);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 21px;
  color: var(--cloud);
}
.cloud-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.cloud-avatar .cloud-wink,
.cloud-avatar .cloud-monocle,
.cloud-avatar .cloud-alert-dot {
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}
.cloud-avatar .cloud-eyes-g {
  transition: transform 240ms ease;
}
.cloud-avatar .cloud-eye {
  transform-box: fill-box;
  transform-origin: center;
}
.cloud-avatar[data-mood='idle'] .cloud-eye {
  animation: cloudSoftBlink 5.4s ease-in-out infinite;
}
.cloud-avatar[data-mood='thinking'] .cloud-eyes-g {
  animation: cloudLookAround 2s ease-in-out infinite;
}
.cloud-avatar[data-mood='inspect'] .cloud-monocle {
  opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: cloudInspectPop 260ms cubic-bezier(.22,1,.36,1) both;
}
.cloud-avatar[data-mood='inspect'] .cloud-eyes-g {
  transform: translate(1.5px, -0.5px);
}
.cloud-avatar[data-mood='happy'] .eye-r {
  opacity: 0;
}
.cloud-avatar[data-mood='happy'] .cloud-wink {
  opacity: 1;
}
.cloud-avatar[data-mood='approval'] .cloud-alert-dot {
  opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes cloudSoftBlink {
  0%, 46%, 50%, 100% { transform: scaleY(1) rotate(-8deg); }
  48% { transform: scaleY(0.14) rotate(-8deg); }
}
@keyframes cloudLookAround {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-2.2px, -1.5px); }
  70% { transform: translate(2.2px, -1.5px); }
}
@keyframes cloudInspectPop {
  from { opacity: 0; transform: scale(0.65) rotate(-14deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}
.cloud-large {
  width: 82px;
  height: 64px;
  margin-top: 6px;
  filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--cloud) 26%, transparent));
}
.chat-view {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}
.chat-log {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
  scrollbar-width: thin;
  scrollbar-color: #d2d5d9 transparent;
  padding: 14px max(22px, calc((100% - var(--chat-width)) / 2)) 24px;
}
.chat-intro {
  margin: auto;
  width: min(100%, 680px);
  padding: 20px 0 32px;
  text-align: center;
  flex: 0 0 auto;
}
.chat-intro h2 {
  margin: 15px 0 5px;
  font-weight: 530;
  font-size: clamp(35px, 3.6vw, 55px);
  line-height: 1.12;
}
.chat-intro p {
  color: var(--muted);
  font-size: clamp(15px, 1.23vw, 19px);
}
.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 28px auto 0;
}
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  min-height: 47px;
  min-width: 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.32;
  font-weight: 460;
  border: 1px solid #e0e3e8;
  border-radius: 14px;
  background: white;
  color: #333b45;
}
.chip-icon {
  display: grid;
  place-items: center;
  flex: none;
  color: #41648a;
}
.chip:hover {
  border-color: #bacce2;
  background: #f7faff;
}
.chip:disabled {
  color: var(--muted);
}
.chip-text {
  min-width: 0;
}
.chat-date {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block: 5px 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.chat-date::before,
.chat-date::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}
.msg {
  min-width: 0;
  max-width: 90%;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 19px;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#log .msg.user {
  align-self: flex-end;
  white-space: pre-wrap;
  background: #e8f1ff;
  background: color-mix(in srgb, var(--app-accent, #1179f9) 10%, white);
  color: #202a35;
  border-bottom-right-radius: 6px;
}
.msg.bot {
  align-self: flex-start;
  background: #f2f3f4;
  color: #202226;
  border-bottom-left-radius: 6px;
}
.msg p + p,
.msg p + ul,
.msg ul + p {
  margin-top: 0.55em;
}
.msg ul,
.msg ol {
  padding-left: 1.3em;
  margin: 0.4em 0;
}
.msg code {
  font-size: 0.9em;
  background: #fff9;
  padding: 1px 4px;
  border-radius: 4px;
}
.msg table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0.65em 0;
  font-size: 0.9em;
}
.msg th,
.msg td {
  padding: 5px 9px;
  text-align: left;
  vertical-align: top;
  border: 1px solid #d6dae0;
}
.msg th {
  background: #fff8;
  font-weight: 600;
}
.msg.typing {
  display: flex;
  align-items: center;
  gap: 9px;
}
.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #6387ab;
}
.thinking-dots i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: chat-attente 1.35s ease-in-out infinite;
}
.thinking-dots i:nth-child(2) {
  animation-delay: 0.16s;
}
.thinking-dots i:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes chat-attente {
  0%,
  55%,
  100% {
    transform: translateY(0);
  }
  26% {
    transform: translateY(-2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .thinking-dots i {
    animation: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
}

.composer-area {
  width: min(calc(100% - 44px), var(--chat-width));
  margin: 0 auto;
  padding: 8px 0 max(17px, env(safe-area-inset-bottom));
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  padding: 8px;
  min-height: 55px;
  border: 1px solid #dbdee3;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 2px 9px #1723310b;
}
.composer:focus-within {
  border-color: #a8b8ca;
}
.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  max-height: 125px;
  margin: 0;
  padding: 7px 2px;
  resize: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  line-height: 1.38;
}
.composer textarea:focus-visible {
  outline: none;
}
.composer textarea::placeholder {
  color: #737983;
}
.attach,
.send,
.dictate {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f1f3;
  color: #424950;
}
.send {
  background: #202124;
  color: white;
}
.attach:hover,
.dictate:hover {
  background: #e5e8ec;
}
.send:disabled {
  background: #e8eaed;
  color: #777e87;
}

@media (max-width: 960px) and (min-width: 701px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .nav-item {
    padding-inline: 2px;
  }
  .topbar {
    min-height: 65px;
  }
}
@media (max-width: 700px) {
  .app-shell {
    grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
  }
  .sidebar {
    grid-row: 2;
    grid-column: 1;
    padding: 3px 8px max(4px, env(safe-area-inset-bottom));
    background: #f8f9fa;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .main-content {
    grid-row: 1;
    grid-column: 1;
  }
  .side-nav {
    display: flex;
    margin: 0;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .side-nav .nav-item {
    flex: 1 0 56px;
    min-width: 0;
    width: auto;
  }
  .nav-item {
    min-height: 47px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 10px;
    font-size: 11px;
    text-align: center;
  }
  .nav-item[aria-pressed='true'] {
    background: #e8f0fa;
    border-color: transparent;
    color: #135691;
    box-shadow: none;
  }
  .nav-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }
  .nav-icon .icon {
    width: 19px;
    height: 19px;
  }
  .nav-icon .cloud-avatar {
    width: 20px;
    height: 15px;
  }
  .topbar {
    min-height: 53px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 14px;
  }
  .agent-pill {
    font-size: 13px;
    padding: 5px 9px;
  }
  .chat-log {
    padding: 7px 14px 14px;
    gap: 10px;
  }
  .chat-intro {
    padding: 12px 0;
  }
  .cloud-large {
    width: 59px;
    height: 43px;
    margin-top: 11px;
  }
  .chat-intro h2 {
    font-size: clamp(30px, 7.5vw, 40px);
    margin: 11px 0 5px;
  }
  .chat-intro p {
    font-size: 15px;
  }
  .chips {
    gap: 6px;
    margin-top: 18px;
  }
  .chip {
    font-size: 12px;
    min-height: 46px;
    padding: 8px;
    gap: 6px;
    border-radius: 12px;
  }
  .chip .icon {
    width: 16px;
    height: 16px;
  }
  .msg {
    max-width: 94%;
    font-size: 15px;
    padding: 10px 12px;
  }
  .composer-area {
    width: calc(100% - 24px);
    padding: 5px 0 10px;
  }
  .composer {
    min-height: 46px;
    padding: 5px;
    gap: 5px;
  }
  .send,
  .attach,
  .dictate {
    width: 35px;
    height: 35px;
  }
}
@media (max-height: 520px) {
  .chat-intro {
    padding-block: 10px;
  }
  .chat-intro .cloud-large {
    display: none;
  }
  .chips {
    margin-top: 12px;
  }
}

.dictate .icon {
  width: 19px;
  height: 19px;
}
.dictate[aria-pressed='true'] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: auto;
  padding: 0 10px;
  color: #9c332c;
  background: #f9e9e7;
  font-size: 13px;
  font-weight: 550;
}
.dictate[aria-pressed='true'] .icon {
  width: 14px;
  height: 14px;
}
.dictate:disabled {
  opacity: 0.6;
}

.rail-tools {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 14px;
}
.rail-action,
.dialog-close {
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 12px;
}
.rail-action {
  width: 48px;
  height: 48px;
}
.rail-action:hover,
.dialog-close:hover {
  background: #e9ecf0;
}
.rail-action > .icon {
  width: 24px;
  height: 24px;
}
.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: #273447;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.035em;
}
.rail-dialog {
  box-sizing: border-box;
  width: min(355px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid #dfe3e7;
  border-radius: 19px;
  box-shadow:
    0 10px 44px #17233120,
    0 2px 5px #1723310a;
  color: var(--ink);
  background: white;
  overflow-y: auto;
  max-height: calc(100dvh - 32px);
}
.rail-dialog {
  position: fixed;
  inset: auto auto 16px 108px;
  margin: 0;
}
.rail-dialog::backdrop {
  background: #19263610;
}
.dialog-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}
.dialog-header h2 {
  font-size: 18px;
  font-weight: 600;
}
.dialog-close {
  margin-left: auto;
  flex: none;
  width: 34px;
  height: 34px;
}
.dialog-close .icon {
  width: 16px;
  height: 16px;
}
.dialog-header p,
.source-row small {
  color: var(--muted);
}
.source-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  min-height: 55px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 5px;
  border-radius: 10px;
  text-decoration: none;
}
.source-row:hover {
  background: #f4f6f8;
}
.source-row strong,
.source-row small {
  display: block;
}
.source-row strong {
  font-size: 14px;
  font-weight: 580;
}
.source-row small {
  font-size: 12px;
  line-height: 1.4;
}
.source-icon {
  display: grid;
  flex: 0 0 32px;
  height: 32px;
  place-items: center;
  background: #f0f3f6;
  color: #415368;
  border-radius: 9px;
}
.source-icon.sheet {
  background: #edf5f1;
  color: #28644a;
}
@media (min-width: 701px) and (max-width: 960px) {
  .rail-dialog {
    left: 93px;
  }
}
@media (min-width: 701px) and (max-height: 550px) {
  .side-nav {
    gap: 2px;
  }
  .nav-item {
    min-height: 55px;
  }
  .rail-tools {
    gap: 1px;
    padding-top: 2px;
  }
  .rail-action {
    height: 36px;
  }
  .sidebar {
    overflow-y: auto;
  }
}
@media (max-width: 700px) {
  .rail-tools {
    position: absolute;
    z-index: 1;
    top: 7px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
  }
  .rail-action {
    width: 40px;
    height: 40px;
  }
  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
  .topbar {
    min-height: 59px;
    padding: 4px 94px 4px 12px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
  }
  .rail-dialog {
    inset: 60px 9px auto auto;
    max-height: calc(100dvh - 77px);
  }
}

.app-shell {
  --ink: #17191d;
  --muted: #585e67;
  --line: #e3e5e8;
  --app-accent: var(--assistant-color, #1179f9);
  --app-accent-ink: color-mix(in srgb, var(--app-accent) 65%, #141414);
  --app-accent-soft: color-mix(in srgb, var(--app-accent) 8%, white);
  --app-accent-line: color-mix(in srgb, var(--app-accent) 34%, white);
  --chat-width: 780px;
  font:
    400 15px/1.45 Geist,
    -apple-system,
    BlinkMacSystemFont,
    'Helvetica Neue',
    Arial,
    sans-serif;
  background: white;
  color: var(--ink);
}
.app-shell .sidebar {
  background: #f5f5f5;
}
.nav-item[aria-current='page'] {
  color: var(--app-accent-ink);
  background: var(--app-accent-soft);
  border-color: var(--app-accent-line);
}
.app-shell .agent-pill {
  letter-spacing: normal;
  overflow-wrap: normal;
}
.app-shell .chat-intro h2 {
  letter-spacing: -0.045em;
}
.app-shell .chip-icon {
  color: var(--app-accent-ink);
}
.app-shell .send:not(:disabled) {
  background: var(--app-accent);
  color: var(--assistant-on, white);
}
.app-shell #log .msg.user {
  background: var(--app-accent-soft);
  color: #202a35;
}
.app-shell .msg.bot {
  white-space: normal;
}
.app-shell .msg.bot p {
  white-space: pre-wrap;
}
.app-shell .msg.bot pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    13px/1.55 ui-monospace,
    monospace;
  padding: 8px;
  background: #ffffff94;
  border-radius: 6px;
  margin: 6px 0;
}
.app-shell .msg time {
  display: block;
  margin-top: 4px;
  text-align: right;
  font-size: 10px;
  line-height: 1.3;
  color: #68747f;
  white-space: normal;
}
.app-shell .msg .retry-message {
  display: block;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: #7b3331;
  font-size: 12px;
  padding: 6px 0;
}
.app-shell .msg-error {
  white-space: normal;
  color: #913f39;
  font-size: 12px;
}
.app-shell .typing-status {
  display: flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin: 2px 0;
  font-size: 12px;
  color: var(--muted);
}
.app-shell .composer {
  align-items: flex-end;
}
.app-shell .composer textarea {
  font-family: inherit;
  color: inherit;
  width: auto;
}
.composer-fine {
  margin: 5px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}
.composer-area .form-error {
  font-size: 13px;
  margin: 0 0 6px;
}
.rail-dialog {
  width: min(400px, calc(100vw - 24px));
}
.rail-dialog .side-trial {
  padding: 8px 5px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.rail-dialog .source-row {
  cursor: pointer;
}
.rail-dialog .dialog-header span {
  min-width: 0;
}
.rail-dialog .dialog-header p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.rail-dialog .text-button {
  margin-top: 7px;
  font-size: 13px;
}
.page-viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
}
.page-viewport .content {
  padding-top: clamp(17px, 3vw, 40px);
  padding-bottom: 48px;
}
.page-viewport .page-head h1 {
  font-size: clamp(32px, 3.15vw, 51px);
  letter-spacing: -.025em;
}
@media (max-width: 700px) {
  .topbar {
    min-height: 59px;
    padding: 4px 96px 4px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
  }
  .rail-tools {
    position: absolute;
    inset: 7px 8px auto auto;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 2px;
    z-index: 2;
  }
  .rail-action {
    width: 40px;
    height: 40px;
  }
  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
  .rail-dialog {
    inset: 60px 9px auto auto;
    max-height: calc(100dvh - 78px);
  }
  .chat-log {
    gap: 10px;
  }
  .app-shell .composer-fine {
    font-size: 9px;
  }
  .app-shell .page-head {
    margin-bottom: 22px;
  }
}
@media (max-height: 550px) and (min-width: 701px) {
  .sidebar {
    overflow-y: auto;
  }
  .nav-item {
    min-height: 50px;
  }
  .side-nav {
    gap: 2px;
  }
  .rail-tools {
    gap: 1px;
    padding-top: 3px;
  }
}

.app-shell .agent-pill {
  min-height: 40px;
}
.composer-area {
  position: relative;
}
.composer-area .composer-fine {
  position: absolute;
  inset: auto 0 1px;
  margin: 0;
  line-height: 1;
}
@media (max-width: 700px) {
  .app-shell .agent-pill {
    min-height: 36px;
  }
}

/* Settings and toolkit share the layout of the reference workspace. */
.source-row > .icon:last-child { width:13px; height:13px; margin-left:auto; color:#677483; }
.rail-dialog .profile-head { gap:10px; margin-bottom:10px; }
.profile-head h2 { font-size:16px; line-height:1.45; letter-spacing:normal; }
.profile-head > div { min-width:0; }
.profile-identity { display:flex; flex-wrap:wrap; align-items:center; gap:3px 8px; }
.profile-price, .catalogue-active { border:1px solid #d9dee4; border-radius:99px; color:#47515d; }
.profile-price { padding:4px 10px; font:500 12px/1.3 system-ui,sans-serif; background:#f8f9fb; }
.profile-price:hover, .catalogue-active:hover { background:#edf0f4; }
.profile-session { border-top:1px solid #e3e5e8; margin-top:8px; padding-top:5px; }
.profile-session .text-button { margin:0; padding:5px; font-size:12px; text-decoration:none; }
.profile-session .text-button:hover { text-decoration:underline; }
.usage-block { padding:14px 5px; }
.rail-dialog .usage-block { border-block:1px solid #e3e5e8; margin-bottom:7px; }
.usage-block strong { font-size:17px; font-weight:620; }
.usage-block p { color:#585e67; font-size:12px; line-height:1.5; }
.usage-block .usage-rail { display:block; height:7px; width:100%; margin:6px 0 8px; border:0; border-radius:9px; appearance:none; overflow:hidden; background:var(--app-accent-soft,#edf4ff); }
.usage-block .usage-rail::-webkit-progress-bar { background:var(--app-accent-soft,#edf4ff); }
.usage-block .usage-rail::-webkit-progress-value { background:var(--assistant-color,#1179f9); border-radius:9px; }
.usage-block .usage-rail::-moz-progress-bar { background:var(--assistant-color,#1179f9); border-radius:9px; }
.rail-dialog:is([data-panel=appearance],[data-panel=memory],[data-panel=pricing],[data-panel=catalogue],[data-panel=shortcuts],[data-panel=roadmap],[data-panel=about],[data-panel=vault],[data-panel=audit],[data-panel=skills],[data-panel=feedback]) { inset:0; margin:auto; padding:24px; max-height:calc(100dvh - 28px); }
.rail-dialog:is([data-panel=appearance],[data-panel=memory],[data-panel=pricing],[data-panel=catalogue],[data-panel=shortcuts],[data-panel=roadmap],[data-panel=about],[data-panel=vault],[data-panel=audit],[data-panel=skills],[data-panel=feedback])::backdrop { background:rgb(24 28 35 / 34%); }
.rail-dialog[data-panel=appearance] { width:min(458px,calc(100vw - 24px)); }
.rail-dialog[data-panel=memory] { width:min(480px,calc(100vw - 24px)); }
.memory-list { margin:16px 0; color:var(--muted); font-size:14px; }
.memory-list ul { list-style:none; margin:0; padding:0; }
.memory-list li { display:flex; align-items:baseline; gap:12px; padding:9px 0; border-bottom:1px solid var(--line); color:var(--ink); }
.memory-list li span { flex:1; overflow-wrap:anywhere; }
.memory-list .text-button { flex-shrink:0; margin:0; }
#memory-add { display:flex; align-items:flex-end; gap:8px; }
#memory-add .field { flex:1; min-width:0; }
#memory-add .ghost { align-self:flex-end; }
.appearance-preview { display:grid; min-height:142px; padding-top:12px; place-items:center; margin:6px 0 16px; border-radius:17px; background:#f4f6f8; }
.cloud-avatar[data-accessory='glasses'] .cloud-monocle,
.cloud-avatar[data-accessory='sunglasses'] .cloud-monocle { opacity:0 !important; }
.swatches { margin:0; padding:0; border:0; }
.swatches legend, .accessories legend { padding:0; font-size:14px; font-weight:580; color:var(--ink); }
.swatches > div { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); max-width:352px; margin:6px 0; }
.swatches label { display:grid; min-height:42px; place-items:center; }
.swatches input { cursor:pointer; appearance:none; width:30px; height:30px; margin:0; background:var(--swatch); border:1px solid #18253633; border-radius:50%; }
.swatches input:checked { outline:2px solid #25374a; outline-offset:3px; }
.swatches input:checked::after { content:'✓'; display:grid; place-items:center; height:100%; font-weight:650; color:var(--assistant-on,white); }
.swatches input:focus-visible { box-shadow:0 0 0 5px white,0 0 0 7px #25374a; }
.accessories { margin:12px 0 10px; padding:0; border:0; }
.acc-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin-top:8px; }
.acc-choice { position:relative; cursor:pointer; }
.acc-choice input { position:absolute; inset:0; opacity:0; margin:0; cursor:pointer; }
.acc-card { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-height:66px; padding:8px 4px 7px; border-radius:12px; border:1px solid #e1e5eb; background:#fff; color:var(--app-accent,#1179f9); transition:border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
.acc-choice:active .acc-card { transform:scale(0.96); }
.acc-obj { display:grid; place-items:center; width:36px; height:28px; }
.acc-obj svg { width:36px; height:28px; display:block; overflow:visible; }
.acc-lbl { font-size:11.5px; font-weight:560; line-height:1.1; text-align:center; color:#334155; }
.acc-choice input:checked + .acc-card .acc-lbl { color:var(--app-accent-ink,#1256a9); }
.appearance-preview .cloud-avatar.is-swapping { animation:cloudSwapBounce 420ms cubic-bezier(.22,1,.36,1); transform-origin:50% 78%; }
.appearance-preview .cloud-avatar.is-swapping[data-accessory='none'] { animation:cloudSwapShake 380ms cubic-bezier(.22,1,.36,1); transform-origin:50% 60%; }
.appearance-preview .cloud-avatar.is-swapping .cloud-acc-part { transform-box:fill-box; transform-origin:center; }
.appearance-preview .cloud-avatar.is-swapping:is([data-accessory='cap'],[data-accessory='beanie']) .cloud-acc-part { animation:accDropIn 420ms cubic-bezier(.2,1.25,.36,1); }
.appearance-preview .cloud-avatar.is-swapping:is([data-accessory='glasses'],[data-accessory='sunglasses']) .cloud-acc-part { animation:accPopFace 360ms cubic-bezier(.2,1.25,.36,1); }
.appearance-preview .cloud-avatar.is-swapping:is([data-accessory='headphones'],[data-accessory='earbuds']) .cloud-acc-part { animation:accHugSides 400ms cubic-bezier(.2,1.25,.36,1); }
@keyframes cloudSwapBounce {
  0% { transform:scale(1,1) translateY(0); }
  28% { transform:scale(1.08,0.9) translateY(2px); }
  62% { transform:scale(0.96,1.05) translateY(-3px); }
  84% { transform:scale(1.02,0.99) translateY(0); }
  100% { transform:scale(1,1) translateY(0); }
}
@keyframes cloudSwapShake {
  0% { transform:rotate(0deg) scale(1); }
  22% { transform:rotate(-6deg) scale(1.04); }
  50% { transform:rotate(5deg) scale(0.98); }
  78% { transform:rotate(-2deg) scale(1.01); }
  100% { transform:rotate(0deg) scale(1); }
}
@keyframes accDropIn {
  0% { opacity:0; transform:translateY(-16px) rotate(-10deg) scale(0.84); }
  65% { opacity:1; transform:translateY(2px) rotate(2deg) scale(1.03); }
  100% { opacity:1; transform:translateY(0) rotate(0deg) scale(1); }
}
@keyframes accPopFace {
  0% { opacity:0; transform:translateY(-6px) scale(1.26) rotate(6deg); }
  65% { opacity:1; transform:translateY(1px) scale(0.97) rotate(-1deg); }
  100% { opacity:1; transform:translateY(0) scale(1) rotate(0deg); }
}
@keyframes accHugSides {
  0% { opacity:0; transform:scaleX(1.28) translateY(-5px); }
  68% { opacity:1; transform:scaleX(0.96) translateY(1px); }
  100% { opacity:1; transform:scaleX(1) translateY(0); }
}
@media (prefers-reduced-motion:reduce) {
  .appearance-preview .cloud-avatar.is-swapping,
  .appearance-preview .cloud-avatar.is-swapping .cloud-acc-part { animation:none !important; }
}
.activity-copy { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-task { font-weight:600; color:var(--ink); }
.app-update-pill { position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:9500; display:inline-flex; align-items:center; gap:9px; padding:7px 14px; border-radius:999px; border:1px solid #cbd5e1; background:#0f172a; color:#f8fafc; font-size:12.5px; box-shadow:0 8px 24px rgba(15,23,42,0.22); cursor:pointer; }
.app-update-pill strong { padding:2px 9px; border-radius:999px; background:var(--app-accent,#1179f9); color:#fff; font-weight:600; font-size:12px; }
.app-update-pill:hover { background:#1e293b; }
.chat-video-card { margin:6px 0; max-width:520px; border-radius:16px; border:1px solid #e2e8f0; background:#0f172a; overflow:hidden; box-shadow:0 6px 20px rgba(15,23,42,0.08); }
.chat-video-el { display:block; width:100%; max-height:460px; background:#000; }
.chat-video-card figcaption { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 13px; background:#fff; border-top:1px solid #eef1f5; font-size:12.5px; color:#334155; }
.apps-opt-pill { display:inline-block; margin-left:4px; padding:1px 7px; border-radius:999px; background:#f5f3ff; border:1px solid #ddd6fe; color:#6d28d9; font-size:10.5px; font-weight:640; vertical-align:1px; }
.acc-choice:hover .acc-card { border-color:#cbd5e1; background:#f8fafc; }
.acc-choice input:checked + .acc-card { border-color:var(--app-accent,#1179f9); background:var(--app-accent-soft,#eef5ff); color:var(--app-accent-ink,#1256a9); box-shadow:0 0 0 1px var(--app-accent,#1179f9); }
.acc-choice input:focus-visible + .acc-card { outline:2px solid #25374a; outline-offset:2px; }
@media (max-width:420px) { .acc-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.apps-more-cta { display:flex; justify-content:center; margin:14px 0 4px; }
.apps-more-link { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:999px; border:1px solid #e2e8f0; background:#f8fafc; color:#334155; font-size:13px; font-weight:560; cursor:pointer; transition:border-color 140ms ease, background 140ms ease, color 140ms ease; }
.apps-more-link:hover { border-color:var(--app-accent-line,#b7d2fc); background:var(--app-accent-soft,#eef5ff); color:var(--app-accent-ink,#1256a9); }
.appearance-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; }
.appearance-actions button, .page-head .ghost, .profile-card .ghost { border-radius:99px; min-height:40px; padding:8px 15px; font-size:14px; }
.profile-card { max-width:650px; border:1px solid #dce1e6; border-radius:20px; padding:clamp(17px,3vw,30px); }
.profile-card header { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.profile-card header h2 { font-size:20px; }
.profile-card header p { margin-top:4px; color:var(--muted); font-size:14px; overflow-wrap:anywhere; }
.profile-card header > button { margin-left:auto; }
.profile-card dl { margin:20px 0 10px; font-size:14px; }
.profile-card dl div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); gap:12px; padding:12px 0; border-bottom:1px solid #e3e5e8; }
.profile-card dt { color:#586573; }
.profile-card dd { margin:0; overflow-wrap:anywhere; }
.billing-card .usage-block { border-top:1px solid #e3e5e8; padding-bottom:0; margin-top:16px; }
.rail-dialog[data-panel=pricing] { width:min(960px,calc(100vw - 24px)); }
.plan-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.plan-card { display:flex; flex-direction:column; gap:12px; padding:20px; border:1px solid #dce1e6; border-radius:16px; }
.plan-card h3 { font-size:20px; }
.plan-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:7px; }
.plan-price strong { font-size:clamp(26px,3vw,38px); letter-spacing:-.045em; line-height:1.1; }
.plan-card p, .plan-current { font-size:14px; }
.plan-price span { font-size:13px; color:#555d66; }
.plan-card .btn { margin-top:auto; }
.plan-audience { color:var(--muted); }
.plan-card ul { display:grid; gap:8px; padding:12px 0; margin:0; border-top:1px solid var(--line); list-style:none; font-size:14px; line-height:1.45; }
.plan-card li { display:flex; gap:8px; align-items:baseline; }
.plan-card li::before { content:'✓'; color:var(--app-accent-ink); font-size:12px; }
.plan-contact,.plan-current { margin-top:auto; text-align:center; }
.plan-contact { text-decoration:none; }
@media (max-width:720px) {
  .plan-grid { grid-template-columns:1fr; }
}
.plan-note { margin-top:15px; }
.rail-dialog[data-panel=catalogue] { width:min(932px,calc(100vw - 48px)); height:min(734px,calc(100dvh - 64px)); max-height:none; padding:0; overflow:hidden; }
.rail-dialog[data-panel=catalogue][open] { display:flex; flex-direction:column; }
.catalogue-page { border:1px solid #dfe2e6; border-radius:22px; overflow:hidden; max-width:932px; margin-inline:auto; }
.catalogue-header, .catalogue-filters, .catalogue-search { display:flex; align-items:center; }
.catalogue-header { gap:12px; padding:23px clamp(16px,3vw,32px) 15px; }
.catalogue-header > div { margin-right:auto; }
.catalogue-header :is(h1,h2) { font-size:clamp(21px,2.5vw,26px); font-weight:590; line-height:1.18; letter-spacing:-.035em; }
.catalogue-header p { margin-top:4px; color:#585e67; font-size:12px; }
.catalogue-active { display:inline-flex; align-items:center; min-height:36px; gap:6px; padding:4px 10px; white-space:nowrap; background:white; font-size:13px; font-weight:600; }
.catalogue-active[aria-pressed=true] { background:#f0f4f6; }
.catalogue-stack { display:flex; }
.catalogue-stack:empty { display:none; }
.catalogue-stack :is(.catalogue-logo,.imap-logo) { width:22px; height:22px; padding:3px; background:white; border-radius:50%; border:1px solid #e3e6ea; }
.catalogue-header .dialog-close { margin-left:0; }
.catalogue-search { gap:10px; margin:0 clamp(16px,3vw,32px); padding:0 13px; border:1px solid #dcdfe4; border-radius:12px; color:#666d76; }
.catalogue-search input { flex:1; min-width:0; border:none; background:none; color:#252a30; padding:10px 0; font-size:14px; }
.catalogue-search input:focus-visible { outline:none; }
.catalogue-search:focus-within { outline:2px solid var(--app-accent-ink,#1256a9); }
.catalogue-filters { gap:6px; padding:13px clamp(16px,3vw,32px) 16px; border-bottom:1px solid #e3e5e8; }
.catalogue-filter { min-height:32px; padding:4px 13px; border:1px solid #e1e3e6; border-radius:99px; font-size:13px; color:#525861; }
.catalogue-filter[aria-pressed=true] { border-color:#25272b; background:#25272b; color:white; }
.catalogue-body { padding:20px clamp(16px,3vw,32px) 28px; min-height:0; overflow:auto; }
.catalogue-body h2 { font-size:15px; line-height:1.35; font-weight:620; letter-spacing:normal; margin-bottom:10px; }
.catalogue-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; }
.catalogue-card { display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:74px; padding:10px 12px; border:1px solid #e6e8eb; border-radius:13px; }
.catalogue-logo,.imap-logo { width:32px; height:32px; justify-self:center; }
.imap-logo { display:grid; place-items:center; border-radius:8px; background:#edf2fa; color:#44678d; }
.catalogue-copy h3 { font-size:14px; letter-spacing:normal; }
.catalogue-copy p,.catalogue-copy small { font-size:12px; line-height:1.36; display:block; margin-top:3px; color:#585e67; }
.catalogue-copy small { color:#2d6245; }
.catalogue-tools { display:grid; justify-items:end; gap:3px; }
.catalogue-action,.catalogue-off { padding:5px 8px; border-radius:8px; background:#f2f3f5; color:#4b515a; font-size:12px; font-weight:550; }
.catalogue-off { font-weight:400; color:#626872; }
.catalogue-tools .text-button { padding:4px; margin:0; font-size:11px; }
.dashboard-summary { display:grid; grid-template-columns: minmax(0,.98fr) minmax(0,1.1fr); border:1px solid var(--app-accent-line); overflow:hidden; border-radius:21px; }
.dashboard-summary .metric { border:0; border-radius:0; gap:5px; padding:0; }
.summary-primary,.summary-usage { min-width:0; padding:clamp(21px,2.8vw,35px); }
.summary-primary { background:var(--app-accent-soft); }
.summary-primary h3,.summary-primary strong { color:var(--app-accent-ink); }
.summary-primary .metric h3 { font-size:16px; }
.summary-primary .metric strong { font-size:clamp(34px,3.7vw,54px); }
.summary-primary > .metric > .activity-chart { margin-top:8px; fill:var(--app-accent-ink); }
.summary-usage { align-self:center; }
.summary-usage h3 { font-size:15px; color:#475563; font-weight:540; }
.summary-usage .usage-block { padding:4px 0 0; }
.summary-usage .usage-block strong { font-size:clamp(22px,2.2vw,33px); }
.summary-metrics { display:grid; grid-column:1/-1; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr)); border-top:1px solid var(--app-accent-line); gap:12px 0; padding:14px 0; }
.summary-metrics .metric { padding:0 clamp(13px,2vw,28px); border-left:1px solid #e3e8ed; }
.summary-metrics .metric:first-child { border:0; }
.summary-metrics .metric h3 { font-size:13px; }
.summary-metrics .metric strong { font-size:18px; }
.dashboard-detail { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(18px,2.6vw,34px); align-items:start; margin-top:clamp(20px,3vh,32px); }
.dashboard-detail h2 { font-size:19px; font-weight:570; margin-bottom:10px; }
.dashboard-detail p { color:#576575; font-size:14px; }
.dashboard-detail > section { padding:clamp(16px,1.8vw,24px); border:1px solid #e1e5e9; border-radius:18px; }
.dashboard-detail .text-button { font-size:13px; padding-left:0; color:var(--app-accent-ink); }
@media(max-width:740px) {
  .catalogue-grid,.dashboard-detail { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:700px) {
  .rail-dialog[data-panel=catalogue] { width:calc(100% - 20px); height:calc(100dvh - 24px); border-radius:17px; }
  .catalogue-header { padding-top:16px; }
  .catalogue-search input { font-size:16px; }
  .dashboard-summary { grid-template-columns:minmax(0,1fr); border-radius:17px; }
  .summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .summary-primary,.summary-usage { padding:20px; }
  .catalogue-page { border:0; }
  .catalogue-page :is(.catalogue-header,.catalogue-body,.catalogue-filters) { padding-inline:0; }
  .catalogue-page .catalogue-search { margin-inline:0; }
}
@media(max-width:520px) {
  .plan-grid { grid-template-columns:1fr; }
  .plan-card { padding:16px; gap:8px; }
  .rail-dialog[data-panel=appearance],.rail-dialog[data-panel=pricing] { padding:18px; }
}

/* On desktop the drawer can float over the page, or reserve its width when pinned. */
.rail-handle, .rail-edge { display: none; }
@media screen and (min-width: 701px) and (hover: hover) and (pointer: fine) {
  .app-shell { --rail-default: 102px; }
  .app-shell[data-rail] {
    --rail-size: var(--rail-preferred, var(--rail-default));
    --rail-visible: var(--rail-size);
    --rail-space: var(--rail-size);
    grid-template-columns: var(--rail-space) minmax(0, 1fr);
    position: relative;
  }
  .app-shell[data-rail="hidden"] { --rail-space: 0px; --rail-visible: 0px; }
  .app-shell.rail-peek { --rail-visible: var(--rail-size); }
  .app-shell[data-rail] .main-content { grid-row: 1; grid-column: 2; }
  .app-shell[data-rail] .sidebar {
    position: absolute; z-index: 8; inset-block: 0;
    left: calc(var(--rail-visible) - var(--rail-size)); width: var(--rail-size);
  }
  .app-shell.rail-peek .sidebar { box-shadow: 5px 0 18px #19212910; }
  .app-shell[data-rail="hidden"] .rail-edge {
    display: block; position: absolute; z-index: 9; inset: 0 auto 0 0;
    width: 7px; border: 0; padding: 0; background: transparent;
  }
  .rail-peek .rail-edge { pointer-events: none; }
  .app-shell[data-rail] .rail-handle {
    position: absolute; z-index: 10; top: 50%; left: calc(var(--rail-visible) - 11px);
    transform: translateY(-50%); width: 22px; height: 50px; padding: 0;
    display: grid; place-items: center; border: 0; background: transparent;
    cursor: ew-resize; touch-action: none;
  }
  .app-shell[data-rail] .rail-handle:active { transform: translateY(-50%); }
  .rail-handle::before {
    content: ""; grid-area: 1/1; width: 3px; height: 25px; border-radius: 99px;
    background: #b5b6ba; opacity: 0;
  }
  .sidebar:hover ~ .rail-handle::before { opacity: .65; }
  .rail-handle .icon {
    grid-area: 1/1; opacity: 0; width: 17px; height: 30px; padding: 1px;
    background: #fff; border: 1px solid var(--line); border-radius: 99px; color: #555960;
  }
  .rail-handle:is(:hover, :focus-visible) .icon, .rail-peek .rail-handle .icon,
  .rail-dragging .rail-handle .icon { opacity: 1; }
  .rail-peek .rail-handle .icon { transform: rotate(180deg); }
  .rail-handle:is(:hover, :focus-visible)::before, .rail-peek .rail-handle::before { opacity: 0; }
  .app-shell[data-rail="hidden"]:not(.rail-peek):not(.rail-dragging) .rail-handle { visibility: hidden; }
  .rail-dragging, .rail-dragging * { cursor: ew-resize !important; user-select: none; }
  @media (max-width: 960px) { .app-shell { --rail-default: 88px; } }
  @media (prefers-reduced-motion: no-preference) {
    .app-shell.rail-ready:not(.rail-dragging) { transition: grid-template-columns .16s ease; }
    .rail-ready:not(.rail-dragging) :is(.sidebar, .rail-handle) { transition: left .16s ease; }
  }
  .app-shell[data-rail] .rail-dialog:is([data-panel="profile"],[data-panel="sources"]) {
    left: calc(var(--rail-size) + 6px);
  }
}

/* Interactive entries share the assistant's message surface and account colour. */
.msg.bot.with-cards { width:min(94%,560px); max-width:100%; }
.chat-card { margin-top:10px; padding:11px 13px; background:var(--surface); border:1px solid var(--line); border-radius:13px; font-size:14px; }
.chat-card > header { display:flex; align-items:center; gap:8px; padding:0 0 7px; }
.chat-card h3 { margin:0; font-size:14px; line-height:1.4; font-weight:620; letter-spacing:normal; }
.card-heading-icon { display:inline-flex; color:var(--app-accent-ink); }
.card-heading-icon .icon, .brief-shortcut .icon { width:16px; height:16px; }
.card-count { margin-left:auto; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.msg .chat-card ul { list-style:none; padding:0; margin:0; }
.chat-card-row { padding:7px 0; border-top:1px solid var(--line); }
.chat-card-row:last-child { padding-bottom:0; }
.card-disclosure,.task-choice { width:100%; display:flex; align-items:center; text-align:left; gap:10px; min-height:34px; }
.card-disclosure,.card-link,.brief-shortcut { color:inherit; border:0; background:transparent; font:inherit; cursor:pointer; }
.card-disclosure { justify-content:space-between; padding:2px 0; }
.card-item-text { display:grid; min-width:0; gap:2px; }
.card-item-text strong { font-weight:550; }
.card-item-text > span,.card-origin,.chat-card dt { color:var(--muted); font-size:12px; }
.card-open,.card-link,.brief-shortcut { display:inline-flex; align-items:center; gap:3px; font-size:12px; font-weight:550; color:var(--app-accent-ink); }
.card-open { flex:none; }
.card-open .icon,.card-link .icon { width:13px; height:13px; }
.card-link { padding:5px 2px; text-underline-offset:3px; }
.chat-card > .card-link { margin-top:6px; }
.card-link:hover,.card-disclosure:hover .card-open,.brief-shortcut:hover { text-decoration:underline; }
.card-link:disabled { opacity:.55; cursor:default; }
.task-choice { cursor:pointer; line-height:1.4; }
.task-choice input { flex:none; width:17px; height:17px; margin:0; accent-color:var(--app-accent); }
.task-choice input:checked + span { text-decoration:line-through; color:var(--muted); }
.chat-card-source { display:inline-flex; align-items:center; gap:5px; margin:4px 9px 0 0; font-size:12px; color:var(--muted); }
.chat-card-source .catalogue-logo,.chat-card-source img { width:16px; height:16px; object-fit:contain; }
.chat-card-detail { margin:8px 0 3px; padding:12px; background:var(--paper); border-radius:9px; }
.chat-card-detail dl { margin:0; display:grid; gap:5px; }
.chat-card-detail dl > div { display:grid; grid-template-columns:minmax(0,78px) minmax(0,1fr); gap:8px; }
.chat-card-detail dd { margin:0; font-size:13px; white-space:pre-wrap; }
.chat-card-detail .card-origin + dl,.chat-card-detail dl + .draft-copy,.draft-body-label { margin-top:8px; }
.chat-card-detail .draft-copy { font-size:14px; line-height:1.5; white-space:pre-wrap; }
.draft-body-label { display:block; font-weight:550; font-size:13px; }
.draft-body-label textarea { display:block; resize:vertical; min-height:9em; width:100%; margin-top:5px; padding:8px; border-radius:6px; border:1px solid var(--line); color:var(--ink); background:white; font-family:inherit; font-size:14px; line-height:1.45; font-weight:400; }
.card-controls { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:7px; }
.draft-conflict,.chat-card-detail .card-error { margin-top:8px; padding:8px; border-left:2px solid var(--app-accent-ink); font-size:13px; }
.chat-card-detail .card-error { color:var(--error); }
.draft-conflict .card-origin { margin-top:6px; }
.brief-shortcut { padding:3px 5px; margin:0 0 4px; gap:6px; }
.brief-shortcut[hidden] { display:none; }
@media (max-width:600px) {
  .msg.bot.with-cards { width:100%; padding:10px; }
  .chat-card { padding:9px 10px; }
  .draft-body-label textarea { font-size:16px; }
}


/* Architecture C: contextual right-hand drawer, Nod agent cards, attachments & operator trials */
.workspace-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.context-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: var(--drawer-w, 356px);
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #fbfcfd;
  border-left: 0;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.drawer-header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 24px;
}
.drawer-section {
  display: grid;
  gap: 18px;
}
.drawer-block {
  display: grid;
  gap: 10px;
}
.drawer-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drawer-block h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.drawer-list {
  display: grid;
  gap: 8px;
}
.drawer-connector,
.drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.drawer-connector-copy,
.drawer-row > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.drawer-connector-copy strong,
.drawer-row strong {
  font-size: 14px;
  font-weight: 600;
}
.drawer-connector-copy p,
.drawer-row small {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
}
.drawer-connector-actions,
.drawer-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.drawer-sm {
  min-height: 34px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}
.drawer-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #c7cfd3;
  border-radius: 10px;
}
.drawer-search input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  outline: none;
}
.drawer-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.drawer-file-bar > div {
  display: grid;
  min-width: 0;
}
.drawer-file-bar strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-file-bar small {
  font-size: 12px;
  color: var(--muted);
}
.drawer-file-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 6px;
}
.drawer-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.drawer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.drawer-table th,
.drawer-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.drawer-table th {
  background: #f5f7f9;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.drawer-table tr:last-child td {
  border-bottom: 0;
}
.drawer-code {
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  overflow: auto;
  max-height: 62vh;
  white-space: pre-wrap;
}
.drawer-pdf {
  width: 100%;
  height: 68vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.drawer-image {
  margin: 0;
}
.drawer-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.drawer-browser .page-head {
  display: none;
}

/* Chat toolbar, staged files, attachments, Trust Check approvals & activity */
.chat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.toolbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
}
.toolbar-pill:hover {
  border-color: var(--app-accent-ink);
  color: var(--ink);
}
.toolbar-pill.danger-pill {
  border-color: #e6b8b7;
  color: var(--error);
  background: #fff6f5;
}
.toolbar-pill.quiet-pill {
  margin-left: auto;
}
.intro-sources-note {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
.staged-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.staged-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--app-accent-soft, #eef4ff);
  color: var(--app-accent-ink, #1c4799);
  font-size: 12.5px;
  font-weight: 550;
}
.staged-chip button {
  display: inline-flex;
  padding: 1px;
}
.staged-chip .icon {
  width: 14px;
  height: 14px;
}
.msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}
.attachment-chip:hover {
  border-color: var(--app-accent-ink);
  background: #f8fbff;
}
.attachment-badge {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--app-accent-soft, #eef4ff);
  color: var(--app-accent-ink, #1c4799);
  font-size: 11px;
  font-weight: 700;
}
.attachment-name {
  font-weight: 550;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip small {
  color: var(--muted);
  font-size: 11.5px;
}
.nod-approval-card {
  margin-top: 10px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid #d5dbe2;
  border-left: 3px solid var(--app-accent, #2459bd);
  border-radius: 11px;
  display: grid;
  gap: 8px;
}
.nod-approval-card.state-done { border-left-color: #15803d; }
.nod-approval-card.state-declined,
.nod-approval-card.state-expired { border-left-color: #9e2625; opacity: 0.88; }
.nod-approval-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.approval-pill {
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--app-accent-ink, #1c4799);
}
.approval-app {
  font-size: 12px;
  color: var(--muted);
}
.nod-approval-card h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 620;
}
.approval-fields {
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.approval-fields > div {
  display: grid;
  grid-template-columns: minmax(0, 96px) minmax(0, 1fr);
  gap: 8px;
}
.approval-fields dt { color: var(--muted); }
.approval-fields dd { margin: 0; white-space: pre-wrap; }
.approval-body {
  margin: 0;
  padding: 10px;
  background: var(--paper);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}
.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.approval-btn {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 13.5px;
}
.nod-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.choice-chip {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--app-accent-ink, #2459bd);
  background: #fff;
  color: var(--app-accent-ink, #1c4799);
  font-size: 13px;
  font-weight: 550;
}
.choice-chip:hover {
  background: var(--app-accent-soft, #eef4ff);
}
.choice-chip.chosen {
  background: var(--app-accent, #2459bd);
  color: #fff;
  border-color: transparent;
}
.choice-chip.muted-chip {
  border-color: var(--line);
  color: var(--muted);
}
.app-shell .typing-status.nod-activity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.activity-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.activity-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--muted);
}
.handoff-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff9eb;
  border: 1px solid #f0d394;
  font-size: 14px;
}

/* Status pills & Operator trials console */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill.ok { background: #e8f7ee; color: #166534; }
.status-pill.warn { background: #fef4e2; color: #9a5b07; }
.status-pill.off { background: #f3e8e8; color: #9e2625; }

.ops-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.ops-invite-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.ops-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}
.ops-check {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.ops-submit {
  grid-column: 1 / -1;
}
.invite-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0f7ff;
  border: 1px solid #c7defa;
}
.invite-url {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  word-break: break-all;
  color: var(--ink);
}
.ops-table td.ops-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

@media (max-width: 960px) {
  .drawer-slot {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 40;
    width: min(100vw, 420px);
    transform: translateX(100%);
    border-left: 1px solid #eceef1;
    box-shadow: -12px 0 36px #0f172a1c;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .drawer-slot.is-open {
    width: min(100vw, 420px);
    transform: translateX(0);
  }
  .context-drawer {
    width: 100%;
    border-left: 0;
  }
}


/* Grok-Bot-style Assistant panel, clickable top pill with hover chevron, Stop button, connector logos & rich Markdown tables */
.agent-pill-btn {
  cursor: pointer;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, padding 0.18s ease;
}
.agent-pill-btn:hover {
  border-color: #d7dde4;
  background: #f8f9fb;
  box-shadow: 0 3px 10px #18253310;
}
.agent-pill-btn.is-open {
  border-color: #d5dce4;
  background: #f5f7fa;
}
.agent-pill-btn .pill-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  margin-left: -8px;
  opacity: 0;
  overflow: hidden;
  color: #6b7280;
  transform: translateX(-4px);
  transition: width 0.18s ease, margin-left 0.18s ease, opacity 0.16s ease, transform 0.18s ease;
}
.agent-pill-btn .pill-caret .icon {
  width: 15px;
  height: 15px;
  flex: none;
}
.agent-pill-btn:hover .pill-caret,
.agent-pill-btn:focus-visible .pill-caret {
  width: 15px;
  margin-left: -2px;
  opacity: 1;
  transform: translateX(0);
}
.chat-timestamp {
  justify-content: center;
  margin: 12px 0 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #8a929c;
  letter-spacing: 0.01em;
}
.chat-timestamp::before,
.chat-timestamp::after {
  display: none;
}

.stop-btn {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
}
.stop-btn:hover {
  background: #2d3d46;
}
.stop-btn.is-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.stop-btn.is-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.stop-btn .icon {
  width: 16px;
  height: 16px;
}

.grok-drawer-top {
  position: relative;
  padding: 20px 18px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.grok-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.grok-identity {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.grok-identity .cloud-large {
  width: 66px;
  height: 49px;
  margin-top: 2px;
}
.grok-identity h2 {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.025em;
}
.grok-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 99px;
  background: #f1f3f5;
}
.grok-tabs button {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
}
.grok-tabs button[aria-selected='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #00000012;
}
.grok-sections {
  display: grid;
  gap: 20px;
}
.grok-group {
  display: grid;
  gap: 9px;
}
.grok-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.grok-group h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.grok-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.grok-empty-card {
  padding: 14px;
  display: grid;
  gap: 6px;
  justify-items: start;
}
.grok-routine-row,
.grok-source-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-bottom: 1px solid #eef1f3;
}
.grok-routine-row:last-child,
.grok-source-row:last-child {
  border-bottom: 0;
}
.grok-routine-ico {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: #f3f5f7;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.grok-routine-ico .icon {
  width: 16px;
  height: 16px;
}
.grok-routine-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.grok-routine-copy strong {
  font-size: 13.5px;
  font-weight: 570;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grok-routine-copy small {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grok-switch[aria-checked='true'] {
  background: var(--app-accent, #2459bd);
}
.grok-more {
  width: 100%;
  padding: 10px 13px;
  text-align: center;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  border-top: 1px solid #eef1f3;
}
.grok-more:hover {
  background: #f7f9fa;
  color: var(--ink);
}

.grok-computer-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.grok-computer-card:hover {
  border-color: var(--app-accent-ink, #2459bd);
  background: #fbfdff;
}
.grok-computer-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.grok-computer-copy strong {
  font-size: 14px;
  font-weight: 600;
}
.grok-computer-copy small {
  font-size: 12.5px;
  color: var(--app-accent-ink, #2459bd);
  font-weight: 550;
}
.grok-computer-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.grok-computer-thumb {
  width: 62px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  background: linear-gradient(145deg, #e9edf2, #dfe4ea);
  border: 1px solid #d5dce4;
  display: grid;
  place-items: center;
}
.thumb-dots {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #8792a0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.thumb-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
}
.grok-footer-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

/* Colored connector logos */
.app-logo-tile {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: #f6f8fa;
  border: 1px solid #e6eaee;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.app-logo-tile > img,
.app-logo-tile > svg {
  width: 21px;
  height: 21px;
  max-width: 21px;
  max-height: 21px;
  object-fit: contain;
  display: block;
}
.app-logo-fallback {
  background: hsl(var(--tile-h, 215) 75% 94%);
  color: hsl(var(--tile-h, 215) 60% 34%);
  border-color: hsl(var(--tile-h, 215) 55% 86%);
  font-size: 15px;
  font-weight: 700;
}
.drawer-connector {
  align-items: center;
}
.drawer-connector-copy {
  flex: 1;
}
.approval-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.approval-app .app-logo-tile {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
.approval-app .app-logo-tile > img,
.approval-app .app-logo-tile > svg {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
}
.intro-sources-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.intro-logos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.intro-logos .app-logo-tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.intro-logos .app-logo-tile > img,
.intro-logos .app-logo-tile > svg {
  width: 17px;
  height: 17px;
  max-width: 17px;
  max-height: 17px;
}
.file-row-btn {
  width: 100%;
  text-align: left;
}
.file-row-btn:hover {
  border-color: var(--app-accent-ink, #2459bd);
}

/* Rich Markdown rendering inside assistant bubbles (tables, quotes, headings, links) */
.md-table-wrap {
  width: 100%;
  margin: 10px 0;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e1e6ea;
  border-radius: 12px;
}
.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.md-table th,
.md-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #edf0f3;
  text-align: left;
  vertical-align: top;
}
.md-table th {
  background: #f7f9fb;
  font-weight: 620;
  color: var(--ink);
  font-size: 12.5px;
  white-space: nowrap;
}
.md-table tbody tr:hover {
  background: #fafcff;
}
.md-table tbody tr:last-child td {
  border-bottom: 0;
}
.md-heading {
  margin: 12px 0 4px;
  font-size: 15px;
  font-weight: 640;
  color: var(--ink);
}
.md-heading:first-child {
  margin-top: 0;
}
.md-quote {
  position: relative;
  margin: 10px 0;
  padding: 13px 68px 13px 16px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
  color: #1f2937;
  font-size: 14px;
  line-height: 1.52;
}
.md-quote-body p {
  margin: 0 0 8px;
}
.md-quote-body p:last-child {
  margin-bottom: 0;
}
.md-quote-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.md-quote-copy:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.22);
}
.md-quote-copy.is-copied {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(4, 120, 87, 0.25);
}
.md-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}
.md-link {
  color: var(--app-accent-ink, #1c4799);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.msg.bot.with-cards {
  width: min(96%, 680px);
}


/* Full-width crisp tables inside chat bubbles */
.msg.bot.has-table {
  width: min(100%, 740px);
  max-width: 100%;
}
.msg.bot.has-table .md-table-wrap {
  width: 100%;
  margin: 10px 0 6px;
  border-radius: 12px;
  border: 1px solid #e2e6eb;
  background: #fff;
  box-shadow: 0 1px 2px #0f172a08;
}
.msg.bot.has-table .md-table {
  width: 100%;
  min-width: 100%;
  font-size: 13px;
}
.msg.bot.has-table .md-table th,
.msg.bot.has-table .md-table td {
  padding: 7px 12px;
}
.msg.bot.has-table .md-table td:last-child,
.msg.bot.has-table .md-table th:last-child {
  white-space: nowrap;
  color: var(--muted);
}

/* WhatsApp QR connector card */
.wa-connector-card {
  display: grid !important;
  gap: 12px;
}
.wa-connector-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wa-qr-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.wa-qr-svg {
  width: 196px;
  height: 196px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e3e7eb;
}
.wa-qr-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}
.wa-qr-actions {
  display: flex;
  gap: 8px;
}

/* Full-screen Grok-Bot Computer Screen Share Overlay */
.computer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #0f1115;
  color: #f4f6f8;
  display: grid;
  place-items: center;
  padding: 20px 24px 28px;
}
.computer-close {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 62;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff18;
  color: #fff;
}
.computer-close:hover {
  background: #ffffff2e;
}
.computer-stage {
  width: min(1220px, 100%);
  height: min(100%, 820px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  justify-items: center;
}
.computer-screen-box {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 30% 25%, #3c424d 0%, #1d2128 55%, #13161b 100%);
  border: 1px solid #ffffff1c;
  box-shadow: 0 24px 60px #00000080;
  display: grid;
  place-items: center;
  position: relative;
}
.computer-idle {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 460px;
  padding: 24px;
  text-align: center;
}
.computer-idle h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}
.computer-idle p {
  font-size: 14px;
  line-height: 1.5;
  color: #b7c0cb;
}
.computer-idle-orb {
  opacity: 0.9;
}
.computer-live-wrap {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
}
.computer-live-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.computer-handoff-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 99px;
  background: #0f1115d9;
  border: 1px solid #ffffff26;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}
.computer-handoff {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.computer-top-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #171a20;
  border-bottom: 1px solid #ffffff18;
}
.computer-url-bar,
.computer-text-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 240px;
  min-width: 0;
}
.computer-url-bar input,
.computer-text-bar input {
  width: 100%;
  min-width: 0;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid #ffffff24;
  background: #0f1115;
  color: #fff;
  font-size: 13.5px;
}
.computer-quick-keys {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.computer-bar-btn {
  padding: 7px 11px;
  border-radius: 8px;
  background: #ffffff1a;
  color: #fff;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
}
.computer-bar-btn:hover:not(:disabled) {
  background: #ffffff2e;
}
.computer-control-badge {
  font-size: 13px;
  font-weight: 550;
  color: #9dc2ff;
}
.computer-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0b0d10;
  display: grid;
  place-items: center;
  position: relative;
}
.computer-frame .frame-button {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.computer-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.computer-frame .frame-status {
  position: absolute;
  color: #b7c0cb;
  font-size: 14px;
}
.computer-kb-hud {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 99px;
  background: #11161ee6;
  color: #f3f6fa;
  border: 1px solid #ffffff26;
  font-size: 13px;
  font-weight: 540;
  pointer-events: none;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 6px 18px #00000055;
}

/* Floating white segmented pill (Observation / Prendre le contrôle) */
.computer-dock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 28px #00000055;
}
.computer-dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 570;
  color: #4b5563;
}
.computer-dock-btn .icon {
  width: 16px;
  height: 16px;
}
.computer-dock-btn:hover:not(.active) {
  color: #111827;
}
.computer-dock-btn.active {
  background: #14171c;
  color: #fff;
}


/* Grok-Bot Bibliothèque (Documents / Médias / Tableaux) */
.lib-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lib-filter-pill {
  padding: 6px 12px;
  border-radius: 99px;
  background: #f1f3f5;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}
.lib-filter-pill:hover {
  color: var(--ink);
}
.lib-filter-pill.active {
  background: var(--ink);
  color: #fff;
}
.lib-item-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid #eef1f3;
}
.lib-item-row:last-child {
  border-bottom: 0;
}
.lib-item-row:hover {
  background: #f8fafc;
}
.lib-item-name {
  font-size: 13.5px;
  font-weight: 520;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-ico {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.lib-pdf { background: #fdecec; color: #b42318; }
.lib-xls { background: #e8f7ee; color: #166534; }
.lib-img { background: #f3ecfe; color: #6941c6; }
.lib-doc { background: #eef4ff; color: #1c4799; }

/* Grok-Bot 2-column "Connecter des applications" Modal */
.apps-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: #10182852;
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.apps-modal {
  width: min(780px, 100%);
  max-height: min(680px, 90vh);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px #0f172a2e;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}
.apps-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
}
.apps-modal-head h2 {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.025em;
}
.apps-modal-head-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.apps-connected-counter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 99px;
  background: #f4f6f8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
}
.apps-connected-counter:hover {
  background: #e9edf2;
}
.apps-mini-stack {
  display: inline-flex;
  align-items: center;
}
.apps-mini-stack .app-logo-tile {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  margin-left: -4px;
  border-color: #fff;
}
.apps-mini-stack .app-logo-tile:first-child {
  margin-left: 0;
}
.apps-mini-stack .app-logo-tile > img,
.apps-mini-stack .app-logo-tile > svg {
  width: 13px;
  height: 13px;
  max-width: 13px;
  max-height: 13px;
}
.apps-modal-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 22px 12px;
  padding: 0 14px;
  background: #f5f7f9;
  border: 1px solid #e4e8ec;
  border-radius: 99px;
}
.apps-modal-search .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.apps-modal-search input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 14.5px;
  outline: none;
}
.apps-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 22px 14px;
  border-bottom: 1px solid #eef1f3;
}
.apps-cat-pill {
  padding: 6px 13px;
  border-radius: 99px;
  background: #f3f5f7;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
}
.apps-cat-pill:hover {
  color: var(--ink);
}
.apps-cat-pill.active {
  background: var(--ink);
  color: #fff;
}
.apps-modal-body {
  overflow-y: auto;
  padding: 18px 22px 24px;
  display: grid;
  gap: 16px;
  align-content: start;
}
.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.apps-grid-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid #eef1f3;
  background: #fff;
}
.apps-grid-item:hover {
  border-color: #d5dce3;
  background: #fbfcfd;
}
.apps-grid-span {
  grid-column: 1 / -1;
}
.apps-grid-extra {
  grid-column: 1 / -1;
  margin-top: 6px;
}
.apps-item-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.apps-item-copy strong {
  font-size: 14px;
  font-weight: 600;
}
.apps-item-copy small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.apps-item-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.apps-pill-btn {
  padding: 6px 13px;
  border-radius: 99px;
  background: #f3f5f7;
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
}
.apps-pill-btn:hover {
  background: #e5e9ee;
}
.apps-connected-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: #166534;
  white-space: nowrap;
}
.apps-remove {
  font-size: 12px;
  padding: 2px 3px;
}
.apps-subhead {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 4px 0 0;
}
@media (max-width: 720px) {
  .apps-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Roadmap modal inside profile menu */
.rail-dialog[data-panel='roadmap'] {
  width: min(520px, calc(100vw - 24px));
}
.roadmap-intro {
  margin-bottom: 14px;
}
.roadmap-list {
  display: grid;
  gap: 10px;
  max-height: 56vh;
  overflow-y: auto;
}
.roadmap-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  display: grid;
  gap: 5px;
}
.roadmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.roadmap-head strong {
  font-size: 14.5px;
  font-weight: 600;
}
.roadmap-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.roadmap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

/* Grok-Bot animated liquid-fill & blinking cloud loading screen */
.loading-grok {
  gap: 8px;
  background: #fbfcfd;
}
.cloud-loader {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.cloud-loader-svg {
  width: 82px;
  height: 70px;
  overflow: visible;
  animation: pixelCloudBob 2.2s ease-in-out infinite;
}
.cloud-shell {
  fill: #dbeafe;
}
.cloud-liquid {
  animation: pixelCloudFill 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.cloud-wave {
  fill: #1179f9;
}
.cloud-wave.wave-back {
  fill: #60a5fa;
  opacity: 0.72;
  animation: pixelWaveSlideBack 2.4s linear infinite;
}
.cloud-wave.wave-front {
  fill: #1179f9;
  animation: pixelWaveSlideFront 1.8s linear infinite;
}
.cloud-eyes rect {
  fill: #ffffff;
  transform-box: fill-box;
  transform-origin: center;
  animation: pixelEyeBlink 3.2s ease-in-out infinite;
}
.cloud-shadow {
  width: 44px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #1179f938 0%, #1179f900 72%);
  animation: pixelShadowBreath 2.2s ease-in-out infinite;
}
.loading-title {
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.loading-sub {
  font-size: 14px;
  color: var(--muted);
}
.loading-bar {
  position: relative;
  width: 132px;
  height: 4px;
  margin-top: 8px;
  border-radius: 99px;
  background: #e5ecf6;
  overflow: hidden;
}
.loading-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 46%;
  border-radius: 99px;
  background: #1179f9;
  animation: pixelBarSweep 1.35s ease-in-out infinite;
}
@keyframes pixelCloudBob {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-6px) scale(1.03, 0.98); }
}
@keyframes pixelCloudFill {
  0% { transform: translateY(38px); }
  55% { transform: translateY(-16px); }
  80% { transform: translateY(-16px); }
  100% { transform: translateY(38px); }
}
@keyframes pixelWaveSlideFront {
  0% { transform: translateX(0); }
  100% { transform: translateX(-80px); }
}
@keyframes pixelWaveSlideBack {
  0% { transform: translateX(-80px); }
  100% { transform: translateX(0); }
}
@keyframes pixelEyeBlink {
  0%, 42%, 48%, 100% { transform: rotate(-8deg) scaleY(1); }
  45% { transform: rotate(-8deg) scaleY(0.14); }
}
@keyframes pixelShadowBreath {
  0%, 100% { transform: scaleX(1); opacity: 0.9; }
  50% { transform: scaleX(0.76); opacity: 0.45; }
}
@keyframes pixelBarSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}
.small-brand-cloud .cloud-avatar {
  width: 28px;
  height: 22px;
}

/* Minimal full-screen shell without left sidebar + floating bottom-left dock */
.app-shell.app-shell-minimal {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  position: relative;
}
.app-shell.app-shell-minimal .main-content {
  grid-column: 1;
  grid-row: 1;
}
.floating-dock {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.floating-dock .dock-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #525964;
  background: #ffffffeb;
  border: 1px solid #e6e9ee;
  box-shadow: 0 2px 10px #0f172a0f;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.floating-dock .dock-btn:hover {
  background: #f3f5f8;
  border-color: #cfd6df;
  color: var(--ink);
  transform: translateY(-1px);
}
.floating-dock .user-avatar {
  width: 30px;
  height: 30px;
  font-size: 11.5px;
}
.app-shell-minimal .rail-dialog[data-panel='profile'] {
  inset: auto auto 68px 16px;
  margin: 0;
}
@media (min-width: 701px) and (max-width: 960px) {
  .app-shell-minimal .composer-area {
    padding-inline: 68px;
  }
}
.topbar-back {
  position: absolute;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px 7px 9px;
  border-radius: 99px;
  border: 1px solid #e5e8ec;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.topbar-back:hover {
  background: #f4f6f8;
  border-color: #cfd6df;
}
.topbar-back .icon {
  width: 15px;
  height: 15px;
}
@media (max-width: 700px) {
  .floating-dock {
    top: 10px;
    right: 10px;
    left: auto;
    bottom: auto;
    flex-direction: row;
    gap: 5px;
  }
  .floating-dock .dock-btn {
    width: 36px;
    height: 36px;
  }
  .floating-dock .user-avatar {
    width: 28px;
    height: 28px;
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] {
    inset: 56px 10px auto auto;
    margin: 0;
  }
  .topbar-back {
    position: static;
    margin-bottom: 4px;
  }
}

/* Grok-Bot clean floating profile popover */
.rail-dialog[data-panel='profile'] {
  width: min(312px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 18px;
  border: 1px solid #e6e8ec;
  box-shadow: 0 18px 48px #0f172a1f, 0 2px 8px #0f172a0d;
  background: #fff;
  overflow: visible;
}
.grok-profile-menu {
  display: grid;
  gap: 4px;
}
.grok-menu-top {
  display: grid;
  gap: 8px;
  padding: 6px 6px 8px;
  border-bottom: 1px solid #eef0f3;
}
.grok-menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
}
.grok-menu-id {
  display: grid;
  min-width: 0;
  flex: 1;
}
.grok-menu-id strong {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grok-menu-id small {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grok-menu-usage {
  width: 100%;
  text-align: left;
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--app-accent-soft, #eef5ff);
  display: grid;
  gap: 6px;
  transition: background 0.15s ease;
}
.grok-menu-usage:hover {
  background: color-mix(in srgb, var(--app-accent, #1179f9) 13%, white);
}
.grok-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
}
.grok-usage-plan {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--ink);
}
.grok-usage-plan .icon {
  width: 16px;
  height: 16px;
  color: var(--app-accent-ink, #1256a9);
}
.grok-usage-pct {
  font-size: 13px;
  font-weight: 560;
  color: var(--muted);
}
.grok-menu-usage .usage-rail {
  display: block;
  width: 100%;
  height: 6px;
  margin: 0;
  border: 0;
  border-radius: 99px;
  appearance: none;
  overflow: hidden;
  background: #ffffffbf;
}
.grok-menu-usage .usage-rail::-webkit-progress-bar {
  background: #ffffffbf;
}
.grok-menu-usage .usage-rail::-webkit-progress-value {
  background: var(--assistant-color, #1179f9);
  border-radius: 99px;
}
.grok-menu-usage .usage-rail::-moz-progress-bar {
  background: var(--assistant-color, #1179f9);
  border-radius: 99px;
}
.grok-menu-usage small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}
.grok-menu-group {
  display: grid;
  gap: 1px;
  padding: 2px 0;
}
.grok-menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 480;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  transition: background 0.12s ease;
}
.grok-menu-row:hover {
  background: #f3f5f8;
}
.grok-menu-ico {
  display: grid;
  place-items: center;
  color: #4b5563;
  flex: none;
}
.grok-menu-ico .icon {
  width: 18px;
  height: 18px;
}
.grok-menu-lbl {
  flex: 1;
  min-width: 0;
}
.grok-menu-chev {
  color: #9aa3ae;
  display: grid;
  place-items: center;
}
.grok-menu-chev .icon {
  width: 14px;
  height: 14px;
}
.grok-menu-sep {
  height: 1px;
  background: #eef0f3;
  margin: 2px 8px;
}

/* Ordinateur card live status & thumbnail */
.computer-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 580;
}
.computer-state-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: #9ca3af;
}
.computer-state-pill.tone-live {
  color: #15803d;
}
.computer-state-pill.tone-live i {
  background: #22c55e;
  box-shadow: 0 0 0 3px #22c55e33;
}
.computer-state-pill.tone-working {
  color: var(--app-accent-ink, #1256a9);
}
.computer-state-pill.tone-working i {
  background: var(--app-accent, #1179f9);
  animation: dotPulse 1.4s ease-in-out infinite;
}
.computer-state-pill.tone-warn {
  color: #b45309;
}
.computer-state-pill.tone-warn i {
  background: #f59e0b;
  box-shadow: 0 0 0 3px #f59e0b33;
}
.computer-state-pill.tone-idle {
  color: #556170;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
.grok-computer-card.tone-live {
  border-color: #bbf7d0;
  background: #f7fef9;
}
.grok-computer-card.tone-warn {
  border-color: #fde68a;
  background: #fffdf5;
}
.grok-computer-thumb {
  position: relative;
  overflow: hidden;
}
.thumb-live-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-live-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: #22c55e;
}
.thumb-live-dot.warn {
  background: #f59e0b;
}
.thumb-dots.is-working {
  background: var(--app-accent, #1179f9);
  animation: dotPulse 1.5s ease-in-out infinite;
}

/* Catalog pagination footer */
.apps-more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #eef1f3;
}

/* Assistance floating submenu (Grok-Bot style) */
.grok-sub-wrap {
  position: relative;
}
.grok-submenu {
  position: absolute;
  left: calc(100% + 10px);
  bottom: -6px;
  min-width: 242px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #e6e8ec;
  background: #fff;
  box-shadow: 0 16px 40px #0f172a1f, 0 2px 8px #0f172a0c;
  display: grid;
  gap: 1px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 60;
}
.grok-sub-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 14px;
}
.grok-sub-wrap:hover > .grok-submenu,
.grok-sub-wrap:focus-within > .grok-submenu,
.grok-sub-wrap.is-open > .grok-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
@media (max-width: 700px) {
  .rail-dialog[data-panel='profile'] {
    overflow: auto;
  }
  .grok-sub-wrap::after {
    display: none;
  }
  .grok-submenu {
    position: static;
    display: none;
    margin: 4px 0 4px 12px;
    padding: 4px;
    box-shadow: none;
    background: #f7f8fa;
    border-radius: 12px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .grok-sub-wrap.is-open > .grok-submenu {
    display: grid;
  }
}

/* Raccourcis clavier modal (Grok-Bot 2-column style) */
.rail-dialog[data-panel='shortcuts'] {
  width: min(760px, calc(100vw - 24px));
  border-radius: 20px;
}
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 36px;
  margin-top: 14px;
}
.shortcuts-col {
  display: grid;
  gap: 22px;
  align-content: start;
}
.shortcuts-group {
  display: grid;
  gap: 2px;
}
.shortcuts-group h3 {
  font-size: 13px;
  font-weight: 560;
  color: var(--muted);
  margin-bottom: 6px;
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f3f5;
}
.shortcut-row:last-child {
  border-bottom: 0;
}
.shortcut-label {
  font-size: 14px;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
}
.shortcut-label small {
  font-size: 12px;
  color: var(--muted);
}
.kbd-combo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.kbd-combo kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: #f3f5f7;
  border: 1px solid #e2e6eb;
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  color: #4b5563;
  line-height: 1;
}
@media (max-width: 680px) {
  .shortcuts-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

/* À propos modal */
.rail-dialog[data-panel='about'] {
  width: min(400px, calc(100vw - 24px));
  border-radius: 20px;
}
.about-card {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  text-align: center;
}
.about-hero {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 0 4px;
}
.about-hero strong {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}
.about-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

/* Discreet connected-apps pill & resume thread pill on Home */
.intro-apps-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 7px;
  border-radius: 99px;
  background: #f5f7fa;
  border: 1px solid #e6e9ef;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.intro-apps-pill:hover {
  background: #edf1f6;
  border-color: #d2d9e2;
  color: var(--ink);
}
.intro-apps-pill .intro-logos {
  display: inline-flex;
  align-items: center;
}
.intro-apps-pill .app-logo-tile {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  margin-left: -4px;
  border-color: #fff;
}
.intro-apps-pill .app-logo-tile:first-child {
  margin-left: 0;
}
.intro-apps-pill .app-logo-tile img {
  width: 14px;
  height: 14px;
}
.intro-apps-plus {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e2e6ec;
  color: #5b6470;
}
.intro-apps-plus .icon,
.intro-apps-empty .icon {
  width: 12px;
  height: 12px;
}
.intro-apps-empty {
  padding: 6px 12px;
}
.intro-resume-row {
  margin-top: 6px;
}
.intro-resume-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
  transition: background 0.14s ease, color 0.14s ease;
}
.intro-resume-pill:hover {
  background: #f2f4f7;
  color: var(--ink);
}
.intro-resume-pill .icon {
  width: 14px;
  height: 14px;
}

/* Profile photo avatar & edit button */
.user-avatar.has-photo {
  padding: 0;
  overflow: hidden;
  background: #eef2f6;
}
.user-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-edit-btn {
  position: relative;
  border-radius: 50%;
  padding: 0;
  flex: none;
}
.avatar-edit-btn:hover .user-avatar {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--assistant-color, #1179f9);
}
.avatar-edit-lg .user-avatar {
  width: 52px;
  height: 52px;
  font-size: 17px;
}
.avatar-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
.avatar-links .text-button {
  margin: 0;
  padding: 0;
  font-size: 12.5px;
}

/* Inline IMAP connector card inside Apps modal */
.app-logo-imap {
  background: #eef5ff;
  color: #1179f9;
  border-color: #d6e6ff;
}
.app-logo-imap .icon {
  width: 18px;
  height: 18px;
}
.modal-imap-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6ebf0;
}
.modal-imap-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 10px;
}
.modal-imap-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 600px) {
  .modal-imap-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Smooth computer screen frame refresh */
.computer-frame img.is-refreshing {
  opacity: 0.72;
  transition: opacity 0.14s ease;
}

/* Covera-inspired 2-column split Login & Onboarding in Pixel Assistant aesthetic */
.auth-split {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 14px;
  gap: 14px;
  background: #f6f8fb;
}
.auth-left {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #ffffff;
  border-radius: 22px;
  padding: clamp(22px, 3vw, 38px) clamp(22px, 4vw, 56px);
  border: 1px solid #ebeff4;
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.auth-brand-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.auth-top-link {
  border: 1px solid #d9e2ec;
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 550;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.auth-top-link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.auth-left-body {
  width: min(410px, 100%);
  margin: auto;
  padding-block: 24px;
}
.auth-left-body h1 {
  font-size: clamp(24px, 2.3vw, 30px);
  font-weight: 620;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.auth-left-body .auth-intro {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.auth-left-footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.auth-left-footer .text-button {
  font-size: 13px;
}
.auth-submit {
  width: 100%;
  background: #14171c;
  color: #fff;
  border-radius: 12px;
  min-height: 46px;
}
.auth-submit:hover:not(:disabled) {
  background: #232830;
}
.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.check-row input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: #1179f9;
  flex: none;
}
.auth-left .step-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 12.5px;
}
.auth-left .step-num {
  font-weight: 650;
  color: var(--ink);
}
.auth-left .step-lbl {
  color: var(--muted);
}
.auth-left .step-progress > div {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.auth-left .step-progress i {
  height: 3px;
  border-radius: 99px;
  background: #e6ebf2;
}
.auth-left .step-progress i.current {
  background: #1179f9;
}
.auth-right {
  position: relative;
  border-radius: 22px;
  background: radial-gradient(circle at 30% 25%, #3b93ff 0%, #1179f9 55%, #0c5fd1 100%);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 40px;
  overflow: hidden;
}
.auth-hero-mark {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  max-width: 560px;
}
.auth-hero-cloud {
  width: 96px;
  height: 82px;
  filter: drop-shadow(0 14px 28px #07337a40);
  animation: pixelCloudBob 3.2s ease-in-out infinite;
}
.auth-hero-name {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.auth-hero-tag {
  font-size: 15px;
  color: #e6f0ff;
  line-height: 1.45;
  white-space: nowrap;
}
.auth-hero-by {
  position: absolute;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.01em;
}
.auth-hero-pd-logo {
  width: 13px;
  height: 16px;
  flex-shrink: 0;
  color: #ffffff;
}
@media (max-width: 1080px) {
  .auth-hero-tag {
    white-space: normal;
  }
}
@media (max-width: 860px) {
  .auth-split {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    background: #fff;
  }
  .auth-left {
    border-radius: 0;
    border: 0;
  }
  .auth-right {
    display: none;
  }
}
@media (max-width: 480px) {
  .field-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Inline chat images & direct download */
.chat-img-card {
  margin: 8px 0 2px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e3e7ed;
  background: #fff;
  max-width: min(440px, 100%);
}
.chat-img-open {
  display: block;
  width: 100%;
  padding: 0;
  background: #f5f7fa;
  cursor: zoom-in;
}
.chat-img-open img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #f8fafc;
}
.chat-img-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid #eef1f4;
  font-size: 12.5px;
}
.chat-img-name {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-img-dl {
  flex: none;
  padding: 4px 10px;
  border-radius: 99px;
  background: #f1f5f9;
  color: var(--ink);
  font-weight: 560;
  text-decoration: none;
}
.chat-img-dl:hover {
  background: #e2e8f0;
}
.attachment-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
.attachment-dl {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f2f4f7;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}
.attachment-dl:hover {
  background: #e3e7ee;
}

/* Inline clickable app/vault pill inside Markdown text */
.md-inline-action {
  display: inline-flex;
  align-items: center;
  padding: 1px 9px;
  border-radius: 99px;
  background: #eef5ff;
  border: 1px solid #cfe2ff;
  color: #1158c7;
  font-size: 0.92em;
  font-weight: 560;
  vertical-align: baseline;
}
.md-inline-action:hover {
  background: #dcebff;
}

/* Dynamic inline connector card inside chat bubbles */
.inline-conn-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e3e7ee;
  display: grid;
  gap: 8px;
}
.inline-conn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.inline-conn-head .text-button {
  margin: 0;
  padding: 0;
  font-size: 12px;
}
.inline-conn-list {
  display: grid;
  gap: 6px;
}
.inline-conn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
}
.inline-conn-row .app-logo-tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.inline-conn-row .app-logo-tile > img,
.inline-conn-row .app-logo-tile > svg {
  width: 17px;
  height: 17px;
  max-width: 17px;
  max-height: 17px;
}
.inline-conn-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--ink);
}
.inline-connect-btn {
  background: #14171c;
  color: #fff;
}
.inline-connect-btn:hover {
  background: #252b34;
}

/* Vault modal & inline chat encrypted vault card */
.rail-dialog[data-panel='vault'] {
  width: min(580px, calc(100vw - 24px));
  border-radius: 20px;
}
.vault-title-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.vault-head-act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vault-info-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f3f5f8;
}
.vault-info-btn:hover {
  background: #e5ebf3;
  color: var(--ink);
}
.vault-info-btn .icon {
  width: 15px;
  height: 15px;
}
.vault-sub {
  margin-bottom: 12px;
}
.vault-info-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef5ff;
  border: 1px solid #d5e5ff;
  color: #193a6e;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.vault-list {
  display: grid;
  gap: 8px;
  max-height: 44vh;
  overflow-y: auto;
  margin-bottom: 12px;
}
.vault-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid #e7ebf0;
  background: #fff;
}
.vault-row-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.vault-row-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vault-row-title strong {
  font-size: 14px;
  font-weight: 600;
}
.vault-row-copy small {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vault-2fa-pill {
  padding: 1px 6px;
  border-radius: 99px;
  background: #e8f7ee;
  color: #166534;
  font-size: 10.5px;
  font-weight: 650;
}
.vault-row-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vault-empty {
  padding: 18px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #d8dfe8;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.vault-add-form,
.vault-edit-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
}
.vault-edit-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.inline-vault-card {
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid #dce5f2;
  display: grid;
  gap: 10px;
}
.inline-vault-card.is-saved {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f5fcf7;
  border-color: #c8ebd4;
}
.inline-vault-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inline-vault-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink);
}
.inline-vault-title .icon {
  width: 16px;
  height: 16px;
  color: #1179f9;
}
.inline-vault-form {
  display: grid;
  gap: 9px;
}
.inline-vault-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* Post-connection smart suggestion bar above composer */
.just-connected-bar {
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f4f8ff;
  border: 1px solid #d5e4ff;
  display: grid;
  gap: 8px;
}
.just-connected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #1e3a5f;
}
.just-connected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Pricing Mensuel/Annuel toggle + Premium active billing badges */
.pricing-period-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 18px;
}
.pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 99px;
  background: #f2f4f7;
  border: 1px solid #e4e8ee;
}
.pricing-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 560;
  color: var(--muted);
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.pricing-toggle-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px #0f172a12;
}
.pricing-save {
  padding: 1px 6px;
  border-radius: 99px;
  background: #e6f6ec;
  color: #166534;
  font-size: 11px;
  font-weight: 650;
}
.plan-sub-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: -6px;
}
.plan-active-wrap {
  margin-top: auto;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.plan-current-ok {
  color: #166534;
}
.grok-plan-active {
  padding: 1px 6px;
  border-radius: 99px;
  background: #e6f6ec;
  color: #166534;
  font-size: 10.5px;
  font-weight: 650;
}
.billing-plan-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.status-pill.info {
  background: #eef5ff;
  color: #1158c7;
}
.status-pill.muted {
  background: #f1f3f5;
  color: #5b6470;
}
.billing-portal-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e3e5e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.billing-portal-row strong {
  font-size: 14.5px;
}
.billing-portal-row p {
  font-size: 12.5px;
  margin-top: 2px;
}
.apps-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  border-top: 1px solid #eef0f3;
  background: #fafbfc;
  flex-wrap: wrap;
}
.apps-foot-hint {
  font-size: 12.5px;
  color: #6b7280;
}
.apps-mcp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #e2e6ec;
  background: #fff;
  color: #374151;
  font: 500 12.5px/1.2 inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.apps-mcp-btn:hover {
  background: #f3f6fa;
  border-color: #cbd5e1;
  color: #111827;
}
.apps-mcp-btn svg {
  width: 14px;
  height: 14px;
}
.modal-mcp-form {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fbff;
  display: grid;
  gap: 12px;
}
.modal-mcp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.modal-mcp-head strong {
  font-size: 14px;
  color: #111827;
}
.rail-dialog[data-panel="audit"],
.rail-dialog[data-panel="skills"] {
  width: min(560px, calc(100vw - 24px));
  border-radius: 20px;
}
.audit-summary {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f5f7fa;
  font-size: 13px;
  color: #4b5563;
}
.audit-summary strong {
  color: #111827;
}
.audit-list,
.skills-list {
  display: grid;
  gap: 8px;
  max-height: 55vh;
  overflow-y: auto;
  margin-top: 10px;
}
.audit-row,
.skill-row {
  padding: 11px 13px;
  border: 1px solid #e5e7eb;
  border-radius: 11px;
  background: #fff;
}
.audit-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.audit-row-top strong {
  font-size: 13.5px;
  font-weight: 560;
  color: #111827;
  line-height: 1.35;
}
.audit-row-top time {
  font-size: 11.5px;
  color: #6b7280;
  white-space: nowrap;
}
.audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.audit-chip {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #eef5ff;
  color: #1158c7;
}
.audit-chip.is-err {
  background: #fef2f2;
  color: #b91c1c;
}
.audit-err {
  display: block;
  margin-top: 6px;
  color: #b91c1c;
  font-size: 12px;
}
.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.skill-copy {
  display: grid;
  gap: 2px;
}
.skill-copy strong {
  font-size: 13.5px;
  color: #111827;
}
.skill-copy small {
  font-size: 12px;
  color: #6b7280;
}
.grok-menu-head-acts {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.grok-icon-subtle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.grok-icon-subtle:hover {
  background: #f1f3f5;
  color: #374151;
}
.grok-icon-subtle svg {
  width: 15px;
  height: 15px;
}
.rail-dialog[data-panel="feedback"] {
  width: min(460px, calc(100vw - 24px));
  border-radius: 20px;
}
.fb-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.fb-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fb-cat-pill {
  cursor: pointer;
}
.fb-cat-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fb-cat-pill span {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #dfe3e8;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  transition: all 140ms ease;
}
.fb-cat-pill input:checked + span {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.fb-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid #d5dbe2;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.fb-form textarea:focus {
  outline: none;
  border-color: var(--assistant-color, #1179f9);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--assistant-color, #1179f9) 15%, transparent);
}
.fb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.fb-done {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 8px 6px;
}
.fb-done-check {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #e6f6ec;
  color: #166534;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

/* Native iOS-style mobile experience (<= 700px) */
@keyframes mobileSheetUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.36); }
  50% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
}
.composer .dictate[aria-pressed='true'],
.composer .dictate.is-recording {
  background: #fee2e2;
  color: #dc2626;
  animation: micPulse 1.3s ease-in-out infinite;
}

/* Full-screen Image Lightbox + crisp Drawer filename overflow fix */
.drawer-header {
  gap: 8px;
}
.drawer-header h2 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-back {
  white-space: nowrap;
  flex-shrink: 0;
}
.drawer-file-bar {
  gap: 10px;
}
.drawer-file-meta {
  min-width: 0;
  flex: 1;
  display: grid;
}
.drawer-file-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-section {
  min-width: 0;
  max-width: 100%;
}
.drawer-image img {
  max-width: 100%;
  height: auto;
  display: block;
}
.rail-dialog[data-panel='lightbox'] {
  inset: 0;
  margin: auto;
  width: min(1040px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(15, 18, 24, 0.94);
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.rail-dialog[data-panel='lightbox']::backdrop {
  background: rgba(10, 13, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-wrap {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
}
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lightbox-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.lightbox-meta strong {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox-meta span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}
.lightbox-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.lightbox-dl {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  color: #0d1117;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 140ms ease;
}
.lightbox-dl:hover {
  opacity: 0.9;
}
.rail-dialog[data-panel='lightbox'] .dialog-close {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.rail-dialog[data-panel='lightbox'] .dialog-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.lightbox-stage {
  margin: 0;
  padding: 18px;
  display: grid;
  place-items: center;
  overflow: auto;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  display: block;
}
@media (max-width: 700px) {
  body:has(.app-shell-minimal) {
    overflow: hidden;
    overscroll-behavior: none;
    height: 100dvh;
  }
  .app-shell.app-shell-minimal,
  .app-shell.app-shell-minimal .main-content,
  .app-shell.app-shell-minimal .main-column.is-chat {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  .app-shell.app-shell-minimal .main-column.is-chat .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 104px 12px 12px;
    justify-content: flex-start;
    z-index: 26;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 74%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
  }
  .app-shell.app-shell-minimal .main-column.is-chat .topbar > * {
    pointer-events: auto;
  }
  .app-shell.app-shell-minimal .agent-pill {
    padding: 6px 12px 6px 9px;
    font-size: 13.5px;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  }
  .app-shell.app-shell-minimal .floating-dock {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 12px;
    left: auto;
    bottom: auto;
    flex-direction: row;
    gap: 7px;
    z-index: 27;
  }
  .app-shell.app-shell-minimal .floating-dock .dock-btn {
    width: 36px;
    height: 36px;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  }
  .app-shell.app-shell-minimal .workspace-split {
    height: 100%;
    overflow: hidden;
  }
  .app-shell.app-shell-minimal .chat-view {
    height: 100%;
    overflow: hidden;
  }
  .app-shell.app-shell-minimal .chat-log {
    padding-top: calc(env(safe-area-inset-top, 0px) + 60px);
    padding-bottom: 12px;
    overscroll-behavior-y: contain;
  }
  .app-shell.app-shell-minimal .chat-log:has(.chat-intro) {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .app-shell.app-shell-minimal .chat-intro {
    padding: 8px 6px;
    gap: 8px;
  }
  .app-shell.app-shell-minimal .chat-intro .cloud-large {
    width: 60px;
    height: 47px;
    margin-top: 0;
  }
  .app-shell.app-shell-minimal .chat-intro h2 {
    font-size: 27px;
  }
  .app-shell.app-shell-minimal .chat-intro .intro-sub {
    font-size: 14px;
    margin-bottom: 2px;
  }
  .app-shell.app-shell-minimal .chat-intro .chips {
    margin-top: 8px;
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-shell.app-shell-minimal .chat-intro .chip {
    padding: 10px 11px;
    font-size: 12.5px;
    line-height: 1.3;
    border-radius: 14px;
    gap: 8px;
  }
  .app-shell.app-shell-minimal .composer-area {
    padding: 6px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
  }
  html.kb-open .app-shell.app-shell-minimal .composer-area {
    padding: 6px 12px 6px;
  }
  .app-shell.app-shell-minimal .composer {
    min-height: 48px;
    padding: 5px 7px 5px 8px;
    gap: 8px;
    border-radius: 26px;
    align-items: center;
  }
  .app-shell.app-shell-minimal .composer textarea {
    font-size: 16px;
    line-height: 22px;
    min-height: 22px;
    max-height: 110px;
    padding: 7px 2px;
  }
  .app-shell.app-shell-minimal .composer button.send,
  .app-shell.app-shell-minimal .composer button.mic,
  .app-shell.app-shell-minimal .composer button.attach-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  /* Native iOS full-screen sheet for Profile */
  .app-shell-minimal .rail-dialog[data-panel='profile'] {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #f3f4f6;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 28px);
    overflow-y: auto;
    box-shadow: none;
    animation: mobileSheetUp 220ms cubic-bezier(.22,1,.36,1);
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] .grok-profile-menu {
    gap: 12px;
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] .grok-menu-top {
    background: #fff;
    border: 1px solid #e7eaef;
    border-radius: 18px;
    padding: 12px;
    gap: 10px;
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] .grok-menu-group {
    background: #fff;
    border: 1px solid #e7eaef;
    border-radius: 18px;
    padding: 6px;
    display: grid;
    gap: 2px;
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] .grok-menu-sep {
    display: none;
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] .grok-menu-row {
    min-height: 46px;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 12px;
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] .grok-submenu {
    position: static;
    box-shadow: none;
    border: 0;
    background: #f8f9fb;
    border-radius: 12px;
    margin: 4px 6px 6px;
    padding: 4px;
    width: auto;
    min-width: 0;
  }
  .app-shell-minimal .rail-dialog[data-panel='profile'] .dialog-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f3f6;
  }

  /* Native iOS full-screen sheet for Connectors */
  .apps-modal-overlay {
    padding: 0;
    align-items: stretch;
  }
  .apps-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
    animation: mobileSheetUp 220ms cubic-bezier(.22,1,.36,1);
  }
  .apps-modal-head {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 10px;
    gap: 8px;
  }
  .apps-modal-head h2 {
    font-size: 16.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .apps-connected-counter {
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  .apps-connected-counter .apps-mini-stack {
    display: none;
  }
  .apps-modal-search {
    margin: 2px 14px 8px;
    padding: 9px 12px;
    border-radius: 999px;
  }
  .apps-modal-search input {
    font-size: 16px;
  }
  .apps-modal-tabs {
    padding: 0 14px 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }
  .apps-modal-tabs::-webkit-scrollbar {
    display: none;
  }
  .apps-cat-pill {
    flex: none;
    padding: 7px 13px;
    font-size: 13px;
  }
  .apps-modal-body {
    padding: 4px 14px 16px;
  }
  .apps-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .apps-grid-item {
    border: 0;
    border-bottom: 1px solid #eef0f3;
    border-radius: 0;
    padding: 12px 2px;
    background: transparent;
  }
  .apps-grid-item:last-child {
    border-bottom: 0;
  }
  .apps-item-copy strong {
    font-size: 15px;
  }
  .apps-item-copy small {
    font-size: 12.5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .apps-pill-btn {
    padding: 7px 13px;
    font-size: 13px;
  }
  .apps-modal-foot {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .modal-imap-row {
    grid-template-columns: 1fr;
  }
}
.inline-conn-sub {
  margin: -2px 0 4px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.35;
}
/* Adresse e-mail dédiée par assistant dans la modale Applications */
.apps-inbox-card {
  background: linear-gradient(135deg, rgba(24, 100, 240, 0.055), rgba(24, 100, 240, 0.015));
  border: 1px solid rgba(24, 100, 240, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.apps-inbox-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.apps-inbox-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.apps-inbox-copy strong {
  font-size: 0.93rem;
  color: var(--ink, #111827);
}
.apps-inbox-copy small {
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
  line-height: 1.4;
}
.apps-inbox-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 6px 8px 6px 12px;
}
.apps-inbox-addr {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1d4ed8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}
.apps-inbox-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.apps-inbox-toggle {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.apps-mode-pill {
  border: 0;
  background: transparent;
  color: var(--muted, #4b5563);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.apps-mode-pill.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

/* Carte e-mail reçu dans le chat (sobre, ludique et dépliable) */
.msg.user.msg-inbound-email {
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(24, 100, 240, 0.16);
  border-radius: 18px;
  padding: 13px 15px;
  max-width: min(460px, 92%);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(24, 100, 240, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: emailCardPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes emailCardPop {
  from { opacity: 0; transform: translateY(6px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.email-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.email-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1d4ed8;
  background: rgba(24, 100, 240, 0.09);
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.email-card-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.email-card-to {
  font-size: 11px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.email-card-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #e0edff, #eef2ff);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(29, 78, 216, 0.12);
}
.email-card-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.email-card-subject {
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-word;
}
.email-card-from {
  font-size: 12px;
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-card-addr {
  color: #9ca3af;
}
.email-card-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: #374151;
  padding-top: 2px;
}
.email-card-details {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding-top: 8px;
}
.email-card-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.email-card-summary::-webkit-details-marker {
  display: none;
}
.email-card-preview {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-card-details[open] .email-card-preview {
  display: none;
}
.email-card-toggle {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #1d4ed8;
  background: rgba(24, 100, 240, 0.07);
  padding: 3px 9px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.email-card-summary:hover .email-card-toggle {
  background: rgba(24, 100, 240, 0.14);
}
.email-card-details .when-open {
  display: none;
}
.email-card-details[open] .when-open {
  display: inline;
}
.email-card-details[open] .when-closed {
  display: none;
}
.email-card-full {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
  word-break: break-word;
}
.email-card-files {
  padding-top: 6px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.email-card-files .msg-attachments {
  margin-top: 0;
}

/* Grande visionneuse centrée pour tableaux CSV, PDF et documents (style Quick Look) */
.rail-dialog[data-panel='docview'] {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1140px, calc(100vw - 28px));
  height: min(86dvh, 840px);
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 20px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.rail-dialog[data-panel='docview']::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.docview-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.docview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #fbfcfe;
  flex-shrink: 0;
}
.docview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.docview-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.docview-titles strong {
  font-size: 14.5px;
  font-weight: 650;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docview-titles small {
  font-size: 12px;
  color: #6b7280;
}
.docview-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.docview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  overflow: hidden;
}
.docview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.docview-search {
  width: min(320px, 100%);
  padding: 7px 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  font-size: 13px;
  background: #f8fafc;
  color: #111827;
}
.docview-search:focus {
  outline: none;
  border-color: #1d4ed8;
  background: #ffffff;
}
.docview-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 12px;
  background: #ffffff;
}
.docview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.docview-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f6fb;
  color: #0f172a;
  font-weight: 650;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  white-space: nowrap;
}
.docview-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: #1f2937;
  vertical-align: top;
}
.docview-table tbody tr:nth-child(even) td {
  background: #fafbfd;
}
.docview-table tbody tr:hover td {
  background: #eff6ff;
}
.docview-pdf {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
}
.docview-code-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
}
.docview-code {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
}
.docview-fallback {
  margin: auto;
  text-align: center;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Sélecteur de modèle discret dans Paramètres */
.model-preset-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line, rgba(15, 23, 42, 0.08));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.model-preset-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.model-preset-head strong {
  font-size: 14px;
  color: var(--ink, #111827);
}
.model-preset-head small {
  font-size: 12px;
  color: var(--muted, #6b7280);
}
.model-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.model-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fbfcfe;
  color: #111827;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.model-preset-btn:hover {
  border-color: rgba(24, 100, 240, 0.32);
  background: #f5f9ff;
}
.model-preset-btn.active {
  border-color: #1d4ed8;
  background: rgba(24, 100, 240, 0.07);
  box-shadow: 0 0 0 1px rgba(29, 78, 216, 0.15);
}
.model-preset-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.model-preset-top strong {
  font-size: 13.5px;
  font-weight: 650;
}
.model-preset-cost {
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  background: rgba(15, 23, 42, 0.06);
  padding: 2px 7px;
  border-radius: 999px;
}
.model-preset-btn.active .model-preset-cost {
  background: rgba(29, 78, 216, 0.14);
  color: #1d4ed8;
}
.model-preset-btn small {
  font-size: 11.5px;
  color: #6b7280;
}
@media (max-width: 640px) {
  .model-preset-grid {
    grid-template-columns: 1fr;
  }
}

/* Logos Claude & Gemini dans Paramètres */
.model-preset-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.model-brand-svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.model-brand-svg.is-claude {
  color: #d97757;
}

/* Sélecteur de niveau discret dans la barre de chat (façon Grok Bot) */
.composer-model-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.composer-model-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.composer-model-btn:hover,
.composer-model-wrap.is-open .composer-model-btn {
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
}
.model-gauge-ico {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.composer-model-chev {
  width: 13px;
  height: 13px;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.composer-model-wrap.is-open .composer-model-chev {
  transform: rotate(180deg);
}
.composer-model-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: max-content;
  min-width: 256px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: popUpFast 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes popUpFast {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.model-pop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease;
}
.model-pop-item:hover {
  background: #f3f4f6;
}
.model-pop-item.active {
  background: rgba(24, 100, 240, 0.08);
}
.model-pop-ico {
  display: inline-flex;
  color: #374151;
}
.model-pop-item.active .model-pop-ico {
  color: #1d4ed8;
}
.model-pop-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.model-pop-copy strong {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}
.model-pop-copy small {
  font-size: 11.5px;
  color: #6b7280;
  white-space: nowrap;
}
.model-pop-check {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
}
@media (max-width: 640px) {
  .composer-model-lbl {
    display: none;
  }
  .composer-model-btn {
    padding: 0 6px;
  }
}

/* Accueil conversationnel animé façon Grok Bot (nouvel espace) */
.onboard-thread {
  width: min(560px, 100%);
  margin: 18px auto 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px;
}
.onboard-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
  animation: onboardSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.onboard-msg-anim {
  animation: onboardSlideUp 0.4s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.onboard-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
}
.onboard-card-anim {
  animation: onboardSlideUp 0.45s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.onboard-card-done {
  animation: onboardSlideUp 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.onboard-q {
  font-size: 15px;
  font-weight: 650;
  color: #0f172a;
}
.onboard-card-done .onboard-q {
  color: #6b7280;
  font-weight: 550;
  font-size: 13.5px;
}
.onboard-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.onboard-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #111827;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.12s ease;
}
.onboard-opt:hover {
  background: #f3f6fb;
  transform: translateX(2px);
}
.onboard-letter {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.onboard-opt:hover .onboard-letter {
  background: rgba(24, 100, 240, 0.12);
  color: #1d4ed8;
}
.onboard-letter.is-chosen {
  background: #1d4ed8;
  color: #ffffff;
}
.onboard-chosen {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 550;
  color: #0f172a;
}
.onboard-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 6px 8px 6px 10px;
  margin-top: 2px;
}
.onboard-custom input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  color: #111827;
  outline: none;
}
.onboard-custom-go {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #1d4ed8;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.onboard-custom-go svg {
  width: 14px;
  height: 14px;
}
.onboard-reply-anim {
  animation: onboardSlideUp 0.4s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.onboard-cta-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
  animation: onboardSlideUp 0.42s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.onboard-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--app-accent, #1864f0);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(24, 100, 240, 0.24);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.onboard-enter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 100, 240, 0.32);
  filter: brightness(1.04);
}
.onboard-enter-btn svg {
  width: 15px;
  height: 15px;
}
.chat-intro {
  animation: onboardSlideUp 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Mini nuage expressif discret dans la ligne d'activité (remplace les 3 points) */
.app-logo-pixeldrop svg {
  height: 62%;
  width: auto;
  max-width: 68%;
  display: block;
}
.mini-cloud-mood {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: miniCloudFloat 2.2s ease-in-out infinite;
}
.mini-cloud-mood.is-thinking .mc-eyes {
  animation: miniCloudGlance 2.4s ease-in-out infinite;
}
.mini-cloud-mood.is-inspect .mc-loupe {
  transform-origin: 21px 15.3px;
  animation: miniCloudLoupe 1.8s ease-in-out infinite;
}
@keyframes miniCloudFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes miniCloudGlance {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-1.3px); }
  70% { transform: translateX(1.4px); }
}
@keyframes miniCloudLoupe {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-7deg) scale(1.06); }
}
@keyframes onboardSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cockpit opérateur 1 page */
dialog[data-panel="operator"] {
  width: min(1020px, calc(100vw - 32px));
  max-width: 1020px;
  max-height: calc(100vh - 40px);
  padding: 22px 24px;
  border-radius: 18px;
}
.op-head-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.op-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}
.op-kpi {
  background: #f8fafc;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.op-kpi span {
  font-size: 12px;
  color: #64748b;
}
.op-kpi strong {
  font-size: 20px;
  color: #0f172a;
  font-weight: 700;
}
.op-link-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
}
.op-link-banner code {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: #1e3a8a;
  word-break: break-all;
}
.op-invite-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.op-invite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 74px auto;
  gap: 8px;
  align-items: center;
}
.op-invite-grid input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d7dee9;
  border-radius: 9px;
  font-size: 13px;
  background: #fff;
}
.op-table-wrap {
  overflow: auto;
  max-height: 55vh;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
}
.op-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.op-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  z-index: 1;
}
.op-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.op-table tr:last-child td {
  border-bottom: 0;
}
.op-table tr.is-muted td {
  opacity: 0.62;
}
.op-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.op-slot {
  font-size: 11px;
  background: #f1f5f9;
  color: #475569;
  padding: 1px 6px;
  border-radius: 6px;
}
.op-user-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.op-user-mail {
  font-size: 11.5px;
  color: #2563eb;
  margin-top: 2px;
}
.op-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.op-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 4px;
}
.op-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.op-pill.is-ok { background: #dcfce7; color: #166534; }
.op-pill.is-wait { background: #fef3c7; color: #92400e; }
.op-pill.is-trial { background: #eff6ff; color: #1d4ed8; }
.op-pill.is-paid { background: #e0e7ff; color: #3730a3; }
.op-pill.is-op { background: #0f172a; color: #fff; }
.op-pill.is-exp { background: #fee2e2; color: #991b1b; }
.op-msg-line {
  font-size: 12.5px;
  color: #0f172a;
}
.op-preset {
  color: #64748b;
  font-weight: 500;
}
.op-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.op-chip {
  font-size: 11px;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 7px;
  border-radius: 6px;
}
.op-usage {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 96px;
}
.op-usage-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.op-usage-bar span {
  display: block;
  height: 100%;
  background: var(--accent, #2563eb);
  border-radius: 999px;
}
.op-actions {
  white-space: nowrap;
  display: flex;
  gap: 5px;
}
.op-btn {
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 8px;
}
.op-btn.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
}
.op-btn.is-danger:hover {
  background: #fef2f2;
}
@media (max-width: 820px) {
  .op-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-invite-grid { grid-template-columns: 1fr 1fr; }
}

.model-pop-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.model-pop-tag {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}
.model-pop-brand {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}
.model-pop-brand.is-claude {
  color: #d97757;
}

/* Multi-comptes (Gmail, Outlook, Drive, Calendar) */
.apps-grid-multi {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  gap: 8px;
}
.apps-multi-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.apps-multi-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px solid #eef2f6;
}
.apps-multi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.apps-multi-addr {
  color: #166534;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Visionneuse document propre (.md) */
.docview-md-acts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.docview-prose {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 34px 40px;
  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  color: #0f172a;
  font-size: 14.5px;
  line-height: 1.65;
}
.docview-prose h1 { font-size: 22px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #eef2f6; letter-spacing: -0.02em; }
.docview-prose h2 { font-size: 17px; margin: 22px 0 8px; letter-spacing: -0.015em; }
.docview-prose h3 { font-size: 15px; margin: 16px 0 6px; }
.docview-prose p { margin: 0 0 12px; }
.docview-prose ul, .docview-prose ol { margin: 0 0 12px; padding-left: 22px; }
.docview-prose li { margin: 4px 0; }
.docview-prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.docview-prose th, .docview-prose td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; }
.docview-prose th { background: #f8fafc; font-weight: 600; }
@media (max-width: 680px) {
  .docview-prose { padding: 18px 16px 26px; }
}

.otp-form {
  margin-top: 14px;
}
.otp-input {
  font-size: 22px !important;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-align: center;
}

/* Carte adresse assistant plus compacte */
.apps-inbox-card.is-compact {
  padding: 11px 13px;
  gap: 8px;
}
.apps-inbox-card.is-compact .app-logo-tile {
  width: 30px;
  height: 30px;
}
.apps-inbox-card.is-compact .apps-inbox-copy strong {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.apps-inbox-card.is-compact .apps-inbox-copy small {
  font-size: 11.5px;
  line-height: 1.4;
}
.apps-inbox-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 1px 7px;
  border-radius: 999px;
}
.apps-inbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.apps-inbox-card.is-compact .apps-inbox-bar {
  flex: 1;
  min-width: 220px;
  padding: 5px 7px 5px 10px;
}
.apps-inbox-card.is-compact .apps-inbox-addr {
  font-size: 12px;
}
