@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/Roboto-Variable.woff2") format("woff2");
}

:root {

  /* Fresh Green palette */
  --white: #ffffff;

  /* Neutral text tokens */
  --info: #3b82f6;

  /* Status accents */
  --danger: #ef4444;
  --danger-bg: color-mix(in srgb, var(--danger) 10%, var(--white));
  --warn: #f59e0b;
  --warn-bg: color-mix(in srgb, var(--warn) 12%, var(--white));

  /* Non-color design tokens. */
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: var(--sans);
  --shadow-sm: 0 1px 2px rgba(16, 185, 129, .05), 0 2px 6px rgba(16, 185, 129, .04);
  --shadow-md: 0 8px 20px rgba(16, 185, 129, .09);
  --shadow-lg: 0 18px 48px rgba(16, 185, 129, .16);
  --ease: 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}


.spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.icon {
  flex: none;
}

code,
.path {
  font-family: var(--sans);
  font-size: 15px;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);

  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: var(--white);
}

.app.nav-collapsed {
  grid-template-columns: 1fr;
}

.app.nav-collapsed .sidebar {
  display: none;
}

.app:not(.nav-collapsed) #toggle-nav {
  display: none;
}

/* Dim layer behind the mobile sidebar drawer; only shown by the 900px @media below. */
.nav-backdrop {
  display: none;
}

.app-logo {
  width: auto;
  display: block;
  flex: none;
}

.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  display: flex;
  align-items: center;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.nav-row .icon {
  stroke-width: 1.9;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.nav-row:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
  color: var(--ink);
}

.nav-row.active {
  background: var(--primary-green);
  color: var(--white);
  font-weight: 600;
  border-color: var(--primary-green);
}

.nav-label {
  flex: 1;
}

.nav-badge {
  text-align: center;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.hairline-scroll::-webkit-scrollbar,
.sidebar-scroll::-webkit-scrollbar,
.transcript::-webkit-scrollbar,
.pane-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.hairline-scroll::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb,
.transcript::-webkit-scrollbar-thumb,
.pane-scroll::-webkit-scrollbar-thumb {
  background: var(--secondary-green);
  border: 2px solid var(--border);
}

.sidebar-group {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 14px 10px 7px;
  font-weight: 600;
  color: var(--muted);
}

.sidebar-note {
  font-size: 15.5px;
  color: var(--secondary-green);
  padding: 8px 6px;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 9px;
  border-radius: 0;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}

.session-row:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
  color: color-mix(in srgb, var(--primary-green) 75%, var(--primary-green));
}

.session-row.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.session-row .title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.row-pin,
.row-sleep {
  color: var(--muted);
}

.row-attention {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--light-green);
  border-radius: 0;
  padding: 0 5px;
}

.row-origin {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.row-time {
  flex: none;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.row-actions {
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}

.session-row:hover .row-actions,
.row-actions:has(.row-menu) {
  opacity: 1;
  pointer-events: auto;
}

.row-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 176px;
  background: var(--white);
  border: 1px solid var(--secondary-green);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.row-menu-divider {
  height: 1px;
  background: var(--light-green);
  margin: 5px 2px;
}

.row-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 10px;
  border-radius: 0;
  font-size: 15.5px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.row-menu-item:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
}

.row-menu-item.danger {
  color: var(--danger);
}

.row-menu-item.danger:hover {
  background: var(--danger-bg);
}


.sidebar-foot .status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}





.sidebar .round {
  border-radius: 0;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;

  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
}

.topbar-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-sub {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-sub:has(.topbar-chip) {
  display: flex;
  overflow: hidden;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 260px;
}

.topbar-chip svg {
  flex: none;
}

.topbar-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pane[hidden] {
  display: none;
}

.transcript {
  flex: 1;
  overflow-y: auto;
  padding: 22px 0 12px;
  min-height: 0;
}

.stream {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.msg {
  margin-bottom: 18px;
}

.msg-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.msg-user {
  color: var(--white);
  max-width: min(82%, 680px);
  width: fit-content;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble-ts {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 3px;
}

.msg-assistant {
  overflow-wrap: anywhere;
}

.msg-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14.5px;
}

.msg-assistant> :first-child {
  margin-top: 0;
}

.msg-assistant> :last-child {
  margin-bottom: 0;
}

.msg-assistant pre {
  background: var(--light-green);
  border: 1px solid var(--border);
  padding: 11px 13px;
  overflow-x: auto;

  font-family: var(--mono);
  font-size: 15.5px;
}

.msg-assistant code {
  font-family: var(--mono);
  font-size: 15.5px;
}

.msg-assistant :not(pre)>code {
  background: var(--light-green);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1px 4px;
}

.msg-assistant table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

.msg-assistant th,
.msg-assistant td {
  border: 1px solid var(--border);
  padding: 8px 11px;
  text-align: left;
  vertical-align: top;
}

/* ---- Answer typography: a reply with headings/tables reads as a designed card ---- */

.msg-assistant {
  line-height: 1.6;
}

.msg-assistant h1,
.msg-assistant h2,
.msg-assistant h3,
.msg-assistant h4 {
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.msg-assistant h1 {
  font-size: 21px;
  margin: 4px 0 14px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--secondary-green, #10b981);
}

.msg-assistant h2 {
  font-size: 17px;
  margin: 22px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.msg-assistant h3 {
  font-size: 15.5px;
  margin: 18px 0 6px;
  color: var(--primary-green-dark, #065f46);
}

.msg-assistant h4 {
  font-size: 14.5px;
  margin: 14px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.msg-assistant p {
  margin: 8px 0;
}

.msg-assistant ul,
.msg-assistant ol {
  margin: 6px 0 10px;
  padding-left: 22px;
}

.msg-assistant li {
  margin: 4px 0;
}

.msg-assistant li::marker {
  color: var(--secondary-green, #10b981);
}

.msg-assistant .table-scroll {
  margin: 10px 0 12px;
  border: 1px solid var(--border);
}

.msg-assistant .table-scroll table th,
.msg-assistant .table-scroll table td {
  border-width: 0 0 1px;
}

.msg-assistant .table-scroll tr:last-child td {
  border-bottom: 0;
}

.msg-assistant th {
  background: color-mix(in srgb, var(--primary-green, #10b981) 9%, var(--white));
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary-green-dark, #065f46);
}

.msg-assistant tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--primary-green, #10b981) 3%, var(--white));
}

.msg-assistant blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--secondary-green, #10b981);
  background: color-mix(in srgb, var(--primary-green, #10b981) 6%, var(--white));
  color: var(--ink);
}

.msg-assistant blockquote> :first-child {
  margin-top: 0;
}

.msg-assistant blockquote> :last-child {
  margin-bottom: 0;
}

.msg-assistant hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.msg-assistant strong {
  color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
}

.attach-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: flex-end;
}

.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 0;
  padding: 3px 8px;
  font-size: 15px;
  color: var(--ink);
  max-width: 220px;
}

.attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-thumb {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 0;
}

img.attach-thumb {
  width: 120px;
  height: auto;
  max-height: 120px;
  border-radius: 0;
}

.attach-chip img.attach-thumb {
  width: 22px;
  height: 22px;
}

.conn-msg {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 0;
  padding: 10px 13px;
}

.conn-msg-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.conn-msg-badge {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.conn-msg-who {
  font-weight: 600;
  color: var(--ink);
}

.conn-msg-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reasoning {
  border-left: 2px solid var(--secondary-green);
  background: var(--very-light-green);
  padding: 8px 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 16px;
  white-space: pre-wrap;
}

.reasoning-head {
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.reasoning-head::-webkit-details-marker {
  display: none;
}

/* ---- Turn work group: live loader → collapsed "Worked through N steps" ---- */

.msg.held {
  display: none;
}

#conn-status[hidden] {
  display: none;
}

.work {
  margin: 4px 0 12px;
}

.work-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
}

.work-head:hover .work-label {
  color: var(--ink);
}

.work-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-count {
  font-size: 12.5px;
  color: var(--muted);
}

.work-count:empty {
  display: none;
}

.msg-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  padding: 2px 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
}

.msg-skill-chip:only-child {
  margin-bottom: 0;
}

.work-skill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 2px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-green-dark, #065f46);
  background: color-mix(in srgb, var(--primary-green, #10b981) 12%, var(--white));
  border: 1px solid color-mix(in srgb, var(--primary-green, #10b981) 35%, var(--white));
}

.work-skill svg {
  color: var(--secondary-green, #10b981);
}

.work-chevron {
  flex: none;
  opacity: 0.7;
  transition: transform var(--ease, 0.15s ease);
}

.work.open .work-chevron {
  transform: rotate(180deg);
}

/* The orb: three dots pulsing in sequence. Hidden once the turn is done. */
.work-orb {
  display: none;
  align-items: center;
  gap: 4px;
  flex: none;
}

.work-orb span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary-green, #10b981);
  animation: work-pulse 1.2s ease-in-out infinite;
}

.work-orb span:nth-child(2) {
  animation-delay: 0.15s;
}

.work-orb span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes work-pulse {

  0%,
  80%,
  100% {
    transform: scale(0.55);
    opacity: 0.35;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.work.live .work-orb {
  display: inline-flex;
}

.work.live .work-head {
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary-green, #10b981) 5%, var(--white));
  color: var(--ink);
  cursor: default;
}

.work.live .work-chevron {
  display: none;
}

/* Shimmer across the live label so it reads as "in progress", not static text. */
.work.live .work-label {
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, var(--secondary-green, #10b981) 50%, var(--ink) 60%, var(--ink) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: work-shimmer 2.2s linear infinite;
}

@keyframes work-shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -150% 0;
  }
}

.work-steps {
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.work-steps .msg {
  opacity: 0.8;
}

.tool {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 8px 11px;
  margin-bottom: 9px;
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.tool-line {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-line b {
  color: var(--ink);
  font-weight: 600;
}

.tool.running {
  border-color: var(--primary-green);
  background: var(--light-green);
}

.tool.failed {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.tool-hidden {
  font-size: 13.5px;
  color: var(--ink);
  background: var(--light-green);
  border-radius: 0;
  padding: 1px 6px;
}

.tool-output-wrap {
  margin: -4px 0 9px;
}

.tool-output-wrap>summary {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  list-style: none;
}

.tool-output-wrap>summary::-webkit-details-marker {
  display: none;
}

.tool-output {
  font-family: var(--mono);
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 9px 11px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
}

.card {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 13px 15px;
  margin-bottom: 14px;
}

.card:hover {
  border-color: color-mix(in srgb, var(--primary-green) 35%, var(--border));
}

.card.approval {
  border-color: var(--primary-green);
  background: var(--light-green);
}

.card.approval .card-title {
  color: var(--ink);
}

.card.plan {
  border-color: var(--primary-green);
}

.card.question {
  border-color: var(--secondary-green);
  background: var(--light-green);
}

.card.directory {
  border-color: var(--secondary-green);
}

.card-title {
  font-weight: 640;
  font-size: 16.5px;
  margin-bottom: 4px;
}

.card-title b {
  font-weight: 700;
}

.card-body {
  font-size: 16px;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.card-body p {
  margin: 0 0 6px;
}

.card-body pre {
  font-family: var(--mono);
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 10px;
  overflow-x: auto;
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.card-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
}

.inbox-card>.card-actions {
  flex: none;
  margin-top: 2px;
}

.inbox-card>.card-actions .text-input {
  width: 190px;
}

.card.resolved {
  opacity: 0.6;
}

.card.resolved .card-actions {
  display: none;
}

.card-outcome {
  font-size: 15px;
  color: var(--muted);
  margin-top: 9px;
}

.card-input {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--secondary-green);
  background: var(--white);
  border-radius: 0;
  padding: 7px 10px;
  font-size: 16px;
}

.btn {
  border: 1px solid var(--secondary-green);
  background: var(--white);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease), filter var(--ease);
}


.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  color: var(--white);
  font-weight: 600;
}


.btn.primary:active {
  transform: translateY(0);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}


.btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn.quiet:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
  color: var(--ink);
}

/* The topbar's exit from a full-page view back to chat — a plain quiet button reads as
   floating text at rest, easy to miss as clickable, so this one keeps a visible border. */
.close-btn {
  border-color: var(--secondary-green);
  color: var(--muted);
}

.close-btn:hover {
  border-color: var(--primary-green);
  color: var(--ink);
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
}

.btn.block {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.round {
  border: 0;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}

.round:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
  color: var(--ink);
}

.round.send {
  background: var(--primary-green);
  color: var(--white);
}

.round.send:hover {
  filter: brightness(1.08);
}

.round.send:disabled {
  background: var(--light-green);
  color: var(--ink);
  filter: none;
  cursor: not-allowed;
}

.round.stop {
  background: var(--primary-green);
  color: var(--white);
}

.link {
  border: 0;
  background: transparent;
  color: var(--info);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}

.link:hover {
  text-decoration: underline;
}

/* "← Connectors" above a detail page: a quiet ghost button, set apart from the title
   below it (the topbar arrow goes to chat, so this is the way back to the list). */
.back-link {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  padding: 5px 10px 5px 7px;
  margin: 0 0 18px -7px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.back-link:hover {
  color: var(--primary-green);
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
}

.back-link:focus-visible {
  outline: none;
  border-color: var(--primary-green);
}


.composer .skill-menu {
  right: 0;
  max-width: none;
  max-height: 280px;
}

.composer .skill-menu[hidden] {
  display: none;
}

.composer .skill-menu .chip-menu-label-text {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--primary-green-dark, #065f46);
}

.composer {
  position: relative;
  margin: 0 auto;
}


.composer-wrap.dropping .composer {
  border-color: var(--primary-green);
  background: var(--light-green);
}

.composer-input {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  max-height: 220px;
}


.composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.composer-attachments[hidden] {
  display: none;
}

.composer-notice {
  font-size: 15px;
  color: var(--muted);
  background: var(--light-green);
  border-radius: 0;
  padding: 6px 9px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.composer-notice[hidden] {
  display: none;
}

.composer-controls {
  display: flex;
  align-items: center;
}

.chip-picker {
  position: relative;
}

.chip-picker[hidden] {
  display: none;
}

.chip-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 4px 9px;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  max-width: 26ch;
  overflow: hidden;
  white-space: nowrap;
}

.chip-button:hover {
  border-color: var(--secondary-green);
  color: var(--ink);
}

.chip-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.chip-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 240px;
  max-width: 320px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 5px;
  display: flex;
  flex-direction: column;
}

.chip-menu-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 6px 9px;
  cursor: pointer;
  color: var(--ink);
}

.chip-menu-item:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
}

.chip-menu-item.active {
  background: var(--light-green);
  color: var(--ink);
}

.chip-menu-label {
  width: 100%;
  min-width: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip-menu-label-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-menu-hint {
  font-size: 14px;
  color: var(--muted);
}

.chip-tag {
  flex: none;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--light-green);
  border-radius: 0;
  padding: 0 5px;
}

.chip-menu-empty {
  font-size: 15.5px;
  color: var(--muted);
  padding: 8px 9px;
}

.chip-menu-heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  padding: 8px 9px 4px;
}

.chip-menu-heading:first-child {
  padding-top: 4px;
}

.chip-menu .switch-row {
  display: flex;
  width: 100%;
  padding: 6px 9px;
  border-radius: 0;
  margin: 0;
  box-sizing: border-box;
}

.chip-menu .switch-row:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
}

.chip-menu-item.chip-menu-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.chip-menu-body {
  display: flex;
  flex-direction: column;
}

.chip-menu-list {
  display: flex;
  flex-direction: column;
}

.chip-menu-search {
  position: sticky;
  top: -5px;
  z-index: 1;
  flex: none;
  width: 100%;
  box-sizing: border-box;
  margin: -5px 0 5px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--white);
  border: 0;
  border-bottom: 1px solid var(--border);
  outline: none;
}

.chip-menu-search:focus {
  border-bottom-color: var(--secondary-green, var(--primary-green));
}

.chip-menu-footer {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 4px;
}

.chip-menu-action {
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 15.5px;
}

.chip-menu-action:hover {
  color: var(--ink);
}

.chip-menu-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.usage-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
}

.usage-chip[hidden] {
  display: none;
}

button.usage-chip {
  padding: 4px 8px;
  border: 1px solid transparent;
  background: none;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

button.usage-chip:hover {
  border-color: var(--border);
  background: var(--light-green, rgba(16, 185, 129, 0.08));
}

.usage-dir b {
  font-weight: 600;
  color: var(--text, inherit);
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.usage-stat {
  padding: 10px 12px;
  border: 1px solid var(--border);
}

.usage-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.usage-stat-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 2px;
}

.usage-stat-hint {
  font-size: 12px;
  color: var(--muted);
}

.usage-line {
  margin: 4px 0;
  font-size: 14px;
}

.usage-table {
  width: 100%;
  margin: 12px 0 8px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.usage-table th,
.usage-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.usage-table th:first-child,
.usage-table td:first-child {
  text-align: left;
}

.context-meter {
  width: 46px;
  height: 5px;
  border-radius: 0;
  background: var(--light-green);
  overflow: hidden;
}

.context-fill {
  display: block;
  height: 100%;
  background: var(--primary-green);
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  flex: none;
}

.dot.ok {
  background: var(--primary-green);
}

.dot.warn {
  background: var(--warn);
}

.dot.off {
  background: var(--muted);
}

.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--secondary-green);
  border-top-color: var(--primary-green);
  border-radius: 0;
  animation: spin 0.7s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty {
  text-align: center;
  color: var(--muted);
}


.empty-illustration svg {
  display: block;
}



.help {
  font-size: 15px;
  color: var(--muted);
}

.error-text {
  font-size: 15.5px;
  color: var(--danger);
}

.error-banner {
  border: 1px solid var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
  padding: 9px 12px;
  margin-bottom: 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  background: var(--white);
  border: 1px solid var(--secondary-green);
  padding: 9px 12px;
  font-size: 15.5px;
  box-shadow: 0 14px 34px rgba(16, 185, 129, .18);
}

.toast-error {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 60;
}

.modal-scrim[hidden] {
  display: none;
}

.modal-scrim.confirm-scrim {
  background: rgba(31, 41, 55, .76);
}

.modal {
  background: var(--white);
  border: 1px solid var(--border);
  width: min(560px, 100%);
  max-height: min(84vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;

}

.modal.wide {
  width: min(900px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
  flex: 1;
}

.modal-body {
  overflow-y: auto;
  padding: 16px;
}

/* Scoped exception to the app's flat-corners rule, for this one dialog only — everything
   else keeps the sharp edges from `* { border-radius: 0 !important; }`; the extra class
   selector here outranks that universal one, `!important` or not. */
.confirm-modal {
  width: min(436px, 100%);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 22px 55px rgba(9, 17, 31, .28), 0 2px 8px rgba(9, 17, 31, .12);
}

.confirm-modal .modal-head {
  min-height: 58px;
  padding: 12px 18px;
}

.confirm-modal .modal-head h2 {
  font-size: 17px;
  font-weight: 650;
}

.confirm-modal .modal-head .btn {
  color: #667085;
  font-size: 19px;
}

.confirm-modal .btn {
  min-height: 36px;
  border-radius: 5px !important;
}

.confirm-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.confirm-icon {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50% !important;
  display: grid;
  place-items: center;
  background: var(--danger-bg);
  color: var(--danger);
}

.confirm-text {
  min-width: 0;
}

.confirm-question {
  margin: 0;
  font-size: 16.5px;
  font-weight: 640;
  line-height: 1.4;
  color: var(--ink);
}

.confirm-detail {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}

.confirm-actions {
  margin-top: 22px;
  justify-content: flex-end;
}

.pane-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.pane-column {
  padding: 22px 24px 60px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head-text {
  flex: 1;
  min-width: 0;
}

.panel-head h1 {
  font-size: 23px;
  margin: 0 0 3px;
}

.panel-head-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pane-lede {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 8px;
}

.prose {
  font-size: 15.5px;
  color: var(--ink);
  margin: 0;
  white-space: pre-wrap;
}

.pane-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.pane-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
  padding: 18px 2px;
}

/* Whole-page loader while a view opens: centered in the pane, not tucked top-left. */
.pane-loading.page-loading {
  justify-content: center;
  min-height: 60vh;
  padding: 0;
}

.sub-head {
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  margin: 18px 0 7px;
}

.card-panel {
  border: 1px solid var(--border);
  background: var(--white);
  overflow: hidden;
  transition: box-shadow var(--ease), border-color var(--ease);
}

.card-panel-head {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}




.card-panel-body> :last-child {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.card-grid>*>.card-panel {
  margin-bottom: 0;
}

.tabstrip {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 0 8px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  color: var(--ink);
  font-weight: 650;
  border-bottom-color: var(--primary-green);
}

.tab-badge {
  font-size: 13.5px;
  padding: 0 5px;
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-chip {
  font-size: 14px;
  font-weight: 550;
  padding: 5px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.filter-chip:hover {
  border-color: var(--secondary-green);
  color: var(--ink);
}

.filter-chip.active {
  border-color: var(--primary-green);
  color: var(--white);
  background: var(--primary-green);
  border-radius: 10px !important;
}

.switch-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  padding: 4px 0;
}

.switch-row.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.switch {
  position: relative;
  width: 34px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: inherit;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: var(--secondary-green);
  transition: background 0.15s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(16, 185, 129, .25);
  transition: transform 0.15s ease;
}

.switch input:checked+.switch-track {
  background: var(--primary-green);
}

.switch input:checked+.switch-track::after {
  transform: translateX(14px);
}

.switch input:focus-visible+.switch-track {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

.switch-text {
  display: flex;
  flex-direction: column;
}

.switch-label {
  font-size: 16px;
}

.switch-hint {
  font-size: 14px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.data-table th {
  text-align: left;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 10px;
  white-space: nowrap;
}

.data-table td {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th.right,
.data-table td.right {
  text-align: right;
}

.table-empty {
  font-size: 15.5px;
  color: var(--muted);
  padding: 14px;
  border: 1px dashed var(--secondary-green);
  border-radius: 0;
  margin-bottom: 12px;
}

.cell-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cell-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
}

.cell-clamp {
  display: inline-block;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.cell-nowrap {
  white-space: nowrap;
}

.field {
  margin-bottom: 14px;
}

.field>label {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 3px;
}

.field .help {
  margin-bottom: 6px;
}

.text-input,
.select-input {
  width: 100%;
  border: 1px solid var(--secondary-green);
  background: var(--white);
  border-radius: 0;
  padding: 7px 10px;
  font-size: 16px;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.text-input:focus,
.select-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-green) 18%, transparent);
}

.text-input::placeholder {
  color: var(--muted);
}

.textarea {
  min-height: 86px;
  resize: vertical;
  margin-top: 7px;
}

.time-input,
.num-input {
  width: auto;
  min-width: 88px;
}

.select-input {
  cursor: pointer;
}

.row-form {
  display: flex;
  align-items: stretch;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.row-form>.text-input,
.row-form>.select-input {
  flex: 1;
  min-width: 180px;
}

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15.5px;
  color: var(--muted);
}

.inline-field[hidden] {
  display: none;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  margin-bottom: 8px;
}

.plain-list {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 15.5px;
  color: var(--ink);
}

.plain-list li {
  margin-bottom: 3px;
}

.setup-steps {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 15.5px;
  color: var(--ink);
}

.setup-steps li {
  margin-bottom: 4px;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 5px 14px;
  margin: 0;
  font-size: 15.5px;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  padding: 2px 7px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill-ok {
  color: var(--ink);
  background: var(--light-green);
  border-color: var(--secondary-green);
}

.pill-warn {
  color: var(--warn);
  background: var(--warn-bg);
}

.pill-danger {
  color: var(--danger);
  background: var(--danger-bg);
}

.pill-info {
  color: var(--dark-green);
  background: var(--light-green);
}

.pill-quiet {
  color: var(--muted);
  background: var(--light-green);
  border-color: var(--border);
}

.seg {
  display: inline-flex;
  background: var(--light-green);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 3px;
  margin-bottom: 10px;
}

.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 0;
  font-size: 15px;
  cursor: pointer;
}

.seg button.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 185, 129, .08);
}

/* Text prompt (ui.promptText): same shell as the confirm modal, with one input. */
.prompt-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.prompt-input {
  width: 100%;
  font-size: 15px;
}

.prompt-modal .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-head h2 {
  font-size: 21.5px;
  margin: 0;
  letter-spacing: -0.01em;
}

.detail-head p {
  margin: 2px 0 0;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.detail-actions .btn {
  min-width: 132px;
  justify-content: center;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  border: 1px solid var(--secondary-green);
  background: var(--white);
  border-radius: 0;
  padding: 9px 12px;
  font-size: 17px;
  margin-bottom: 10px;
  outline: none;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  color: var(--ink);
}

.search-hit:hover {
  background: color-mix(in srgb, var(--primary-green) 8%, transparent);
}

.search-hit-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.search-hit-meta {
  font-size: 14px;
  color: var(--muted);
}

.roots-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.root-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 11px;
  font-size: 15.5px;
}

.root-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 15px;
}

.root-access {
  font-size: 13.5px;
  color: var(--muted);
}

.root-missing {
  font-size: 13.5px;
  color: var(--danger);
}

.inbox-routing {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inbox-routing strong {
  color: var(--ink);
  font-weight: 550;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inbox-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 0;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}

.inbox-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-green);
  transform: translateY(-1px);
}

.inbox-card.resolved {
  opacity: 0.5;
  pointer-events: none;
}

.inbox-card-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 0;
  display: grid;
  place-items: center;
}

.inbox-card-icon.tone-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.inbox-card-icon.tone-info {
  background: var(--light-green);
  color: var(--info);
}

.inbox-card-icon.tone-ok {
  background: var(--light-green);
  color: var(--primary-green);
}

.inbox-card-icon.tone-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.inbox-card-body {
  flex: 1;
  min-width: 0;
}

.inbox-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.inbox-title {
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.35;
}

.inbox-title b {
  font-weight: 700;
}

.inbox-body {
  font-size: 16px;
  color: var(--ink);
  margin-top: 4px;
  white-space: pre-wrap;
}

.inbox-preview {
  font-family: var(--sans);
  font-size: 15px;
  background: var(--light-green);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 10px;
  margin: 8px 0 0;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}

.inbox-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--light-green);
  border-radius: 0;
  padding: 3px 9px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  max-width: 260px;
}

.session-chip:hover:not(:disabled) {
  border-color: var(--primary-green);
  color: var(--ink);
}

.session-chip:disabled {
  cursor: default;
  opacity: 0.6;
}

.session-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sched-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sched-card {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 11px 14px;
  cursor: pointer;
}

.sched-card:hover {
  border-color: var(--secondary-green);
}

.sched-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.sched-card-title {
  font-size: 16.5px;
  font-weight: 640;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sched-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  color: var(--muted);
  flex-wrap: wrap;
}

.sched-instructions {
  font-size: 16px;
  white-space: pre-wrap;
  color: var(--ink);
}

.grant-list,
.run-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
}

.grant-target {
  color: var(--ink);
}

.sched-run {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 11px;
  font-size: 15.5px;
}

.sched-run.open {
  cursor: pointer;
}

.sched-run.open:hover {
  border-color: var(--primary-green);
}

.sched-run-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sched-run-peek {
  margin-top: 5px;
  font-size: 15px;
  color: var(--muted);
  max-height: 54px;
  overflow: hidden;
  white-space: pre-wrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  border-radius: 0;
  border: 1px solid transparent;
  font-weight: 700;
  flex: none;
  line-height: 1;
}

.brand-mark.small {
  width: 22px;
  height: 22px;
  font-size: 13.5px;
  border-radius: 0;
  background: var(--light-green);
  color: var(--ink);
  border-color: var(--border);
}

.conn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;

  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--secondary-green);
  box-shadow: var(--shadow-md);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  text-align: left;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 250ms;
}

.conn-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 15px 16px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  min-height: 72px;
  transition: background 220ms ease-out, border-color 220ms ease-out;
}

.conn-card:hover {
  background: color-mix(in srgb, var(--primary-green) 5%, var(--white));
  border-color: var(--secondary-green);
}

.conn-card.disabled {
  cursor: default;
  opacity: .6;
}

.conn-card.disabled:hover {
  background: var(--white);
  border-color: var(--border);
}

.conn-card-status {
  display: flex;
  flex: 0 0 104px;
  justify-content: flex-end;
}

.conn-card-chevron {
  color: var(--muted);
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity var(--ease), transform var(--ease), color var(--ease);
}

.conn-card:hover .conn-card-chevron {
  opacity: 1;
  transform: translateX(0);
  color: var(--ink);
}

.conn-card-title>.title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.settings-layout {
  display: grid;
  align-items: start;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  position: sticky;
}

.settings-nav-group {
  text-transform: uppercase;
}


.settings-nav-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}



.section-lede {
  margin: -4px 0 14px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 10px 12px;
  background: var(--light-green);
}

.skill-row-text {
  flex: 1;
  min-width: 0;
}

.skill-row-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16.5px;
  font-weight: 640;
  margin-bottom: 3px;
}

.skill-row-desc {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.45;
}

.empty-state {
  text-align: center;
  padding: 26px 18px;
  border: 1px dashed var(--secondary-green);
  border-radius: 0;
}

.empty-state-title {
  font-size: 17px;
  font-weight: 640;
  margin-bottom: 5px;
}

.empty-state .help {
  max-width: 460px;
  margin: 0 auto 14px;
}

.method-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 0;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  color: var(--ink);
}

.method-row:hover {
  border-color: var(--secondary-green);
  background: var(--light-green);
}

.method-row-title {
  font-size: 16.5px;
  font-weight: 640;
  margin-bottom: 2px;
}

.method-row-blurb {
  font-size: 15px;
  color: var(--muted);
}

.seg-tag {
  margin-left: 6px;
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 0;
  background: var(--light-green);
  color: var(--ink);
}

.copy-command {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  background: var(--light-green);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 10px;
  margin: 0 0 10px;
  overflow-x: auto;
  user-select: all;
}

.conn-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.conn-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.conn-card-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.conn-card-title>.pill {
  flex: none;
}

.conn-card-blurb {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conn-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.conn-head-text {
  flex: 1;
  min-width: 0;
}

.conn-head-text h2 {
  margin: 0;
  font-size: 21.5px;
  letter-spacing: -0.01em;
}

.conn-head-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tool-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.tool-toggle:last-child {
  border-bottom: 0;
}

.tool-chip {
  border: 1px solid var(--border);
  background: var(--light-green);
  border-radius: 0;
  padding: 2px 7px;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--light-green);
  border-radius: 0;
  padding: 2px 4px 2px 9px;
  font-size: 15px;
}

.person-chip .btn {
  padding: 0 4px;
  font-size: 13.5px;
}

.parked-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.parked-row {
  border: 1px solid var(--border);
  background: var(--light-green);
  border-radius: 0;
  padding: 10px 12px;
}

.parked-text {
  font-size: 15.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.parked-body {
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.55;
}

.persona-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.persona-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 0;
  padding: 11px 13px;
}

.persona-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.persona-glyph {
  width: 30px;
  height: 30px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: var(--light-green);
  color: var(--ink);
  flex: none;
}

.persona-glyph.large {
  width: 38px;
  height: 38px;
  border-radius: 0;
}

.persona-card-text {
  min-width: 0;
}

.persona-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16.5px;
  font-weight: 600;
}

.persona-card-tagline {
  font-size: 15px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.persona-conn-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.persona-conn-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.persona-conn-row:last-child {
  border-bottom: 0;
}

.persona-conn-text {
  min-width: 0;
}

.persona-conn-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.gallery-card {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gallery-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16.5px;
  font-weight: 640;
}

.gallery-card-body {
  font-size: 15.5px;
  color: var(--ink);
  margin: 0;
  flex: 1;
}

.gallery-risk {
  font-size: 14px;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 0;
  padding: 5px 8px;
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.model-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 7px 11px;
  font-size: 16px;
}

.model-row.selected {
  border-color: var(--primary-green);
  background: var(--light-green);
}

.model-name {
  font-weight: 550;
}

.model-row .id {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}

.mcp-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.mcp-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 9px 11px;
}

.mcp-row-text {
  min-width: 0;
}

.mcp-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16.5px;
  font-weight: 600;
}

.mcp-add {
  border-top: 1px solid var(--border);
  padding-top: 11px;
}

.risk-notice {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 0;
  padding: 9px 11px;
  margin-bottom: 10px;
}

.qr-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.qr-code {
  width: 240px;
  height: 240px;
  background: var(--white);
  border-radius: 0;
}

.conn-optin {
  margin-top: 18px;
}

.msg-assistant a.artifact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}

.msg-assistant a.artifact-link::before {
  content: "📎";
  font-size: 15px;
}

.msg-assistant a.artifact-link:hover {
  border-color: currentColor;
}

.artifact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.artifact-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 0;
}

.artifact-frame {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--white);
}

.artifact-text {
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  font-family: var(--sans);
  font-size: 15.5px;
}

/* ========================================================================== */
/* Fresh Green theme refinements                                               */
/* ========================================================================== */

/* Sidebar */
.sidebar,
.sidebar-foot {
  color: var(--white);
}

.app-logo {
  filter: brightness(0) invert(1);
}

.sidebar-head {
  gap: 9px;
}


.sidebar .btn {
  padding: 10px 12px;
}

.sidebar .btn.primary {
  color: var(--white);
  background: var(--primary-green);
  border-color: var(--primary-green);
}




.sidebar .btn.quiet,
.sidebar .status-line,
.sidebar .session-row {
  color: var(--white);
}


.sidebar .nav-row:hover,
.sidebar .session-row:hover {
  color: var(--white);
}


.sidebar .session-row.active {
  color: var(--white);
}

.sidebar .session-row .title {
  color: var(--white);
}

.sidebar .row-time,
.sidebar .row-pin,
.sidebar .row-sleep {
  color: var(--sidebar-time);
}

.sidebar .row-menu {
  background: var(--sidebar-hover);
  border-color: var(--sidebar-divider);
}

.sidebar .row-menu-item {
  color: var(--white);
}

.sidebar .row-menu-item.danger {
  color: #fca5a5;
}

.sidebar .row-menu-item.danger:hover {
  background: color-mix(in srgb, var(--danger) 25%, transparent);
}


.sidebar-foot .btn.quiet {
  color: var(--white);
}

.sidebar-foot .btn.quiet:hover {
  color: var(--white);
  background: var(--sidebar-hover);
}

.sidebar-foot .status-line {
  color: var(--sidebar-time);
}


.sidebar .sidebar-group {
  font-weight: 600;
}

.sidebar .row-menu-divider {
  background: var(--sidebar-divider);
}

/* Main workspace */
.main,
.transcript,
.composer-wrap {
  background: var(--white);
}




.composer {
  border-color: var(--border);
}


.composer-wrap {
  padding-bottom: 22px;
}

.panel-head h1 {
  letter-spacing: -0.025em;
}

.hairline-scroll::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb,
.transcript::-webkit-scrollbar-thumb,
.pane-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
}

/* Keep descriptive and helper text readable on the pale canvas. */
.main .section-lede,
.main .pane-lede,
.main .pane-note,
.main .inbox-routing,
.main .empty,
.main .empty-state,
.main .empty-state .help,
.main .hint,
.main .subtle,
.main .muted,
.main .topbar-sub,
.main .status-line {
  color: var(--muted);
}

.main input::placeholder,
.main textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* -- Google Account card (connectors.js googleCard) ------------------------------------ */
.google-rows {
  display: flex;
  flex-direction: column;
}

.google-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  flex-wrap: wrap;
}

.google-row+.google-row {
  border-top: 1px solid var(--border);
}

.google-row-text {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.google-row-title {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.google-row-title:hover {
  color: var(--primary-green);
  text-decoration: underline;
}

/* ===== Composer polish (sits last so it wins the cascade) ===== */

.composer {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}


.composer-input {
  padding: 2px 2px 6px;
}

.composer-controls {
  flex-wrap: wrap;
}

/* Attach (+): a square outlined button so it reads as clickable, not a stray glyph. */
.composer-controls>.icon-btn,
.composer-controls>button:first-child {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
}

.composer-controls>.icon-btn:hover,
.composer-controls>button:first-child:hover {
  border-color: var(--secondary-green, #10b981);
  color: var(--primary-green-dark, #065f46);
}

/* Model / Thinking / approval / attended: quiet tinted chips instead of boxed outlines. */
.composer .chip-button {
  padding: 0 11px;
  gap: 6px;
}


/* Send: solid, square, unmistakable. */
.composer .round.send,
.composer .round.stop {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}



/* Keyboard hints under the card. */
.composer-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.composer-hint kbd {
  display: inline-block;
  padding: 0 5px;
  font-family: var(--sans);
  line-height: 18px;
}

/* ===== Enterprise workspace refinement ===== */


.sidebar::before,
.sidebar::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 150%;
  height: 190px;
  left: -27%;
  bottom: -133px;
  border: 1px solid rgba(110, 231, 183, 0.13);
  border-radius: 50% !important;
  background: rgba(16, 185, 129, 0.035);
  transform: rotate(-8deg);
}

.sidebar::after {
  width: 145%;
  height: 164px;
  left: 7%;
  bottom: -124px;
  border-color: rgba(167, 243, 208, 0.1);
  background: rgba(52, 211, 153, 0.035);
  transform: rotate(8deg);
}

.sidebar>* {
  position: relative;
  z-index: 1;
}

.sidebar-foot {
  border-color: var(--sidebar-divider);
}


.sidebar-head {
  margin-bottom: 8px;
}


.sidebar .btn,
.sidebar #open-search {
  min-height: 40px;
  border-radius: 8px !important;
}

.sidebar .btn.primary {
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.16);
}

.sidebar .btn.primary:hover,
.btn.primary:hover {
  background: #0da875;
  border-color: #0da875;
}

.sidebar #open-search {
  border-color: rgba(167, 243, 208, 0.16);
}




.sidebar .session-row {
  padding: 8px 9px;
}



.sidebar-foot .btn.quiet {
  border-radius: 7px !important;
}




.topbar-chip {
  min-height: 24px;
}






.empty {
  width: 100%;
}


.empty h2 {
  font-family: var(--sans);
}






.composer-controls {
  border-top-color: rgba(229, 231, 235, 0.8);
}

.composer-controls>.icon-btn,
.composer-controls>button:first-child,
.composer .chip-button {
  min-height: 34px;
  border-radius: 8px !important;
}



.composer .round.send:hover:not(:disabled) {
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.22);
}

.composer-hint {
  margin-top: 7px;
}


/* Quiet dot grids sit behind the chat surface and never intercept input. */

.pane-chat::before,
.pane-chat::after {
  position: absolute;
  z-index: 0;
  width: 112px;
  height: 88px;
  pointer-events: none;
  opacity: 0.45;
  background-image: radial-gradient(circle, rgba(16, 185, 129, 0.34) 1px, transparent 1.25px);
  background-size: 12px 12px;
  mask-image: linear-gradient(135deg, #000 0%, transparent 88%);
}

.pane-chat::before {
  top: 20px;
  left: 22px;
}

.pane-chat::after {
  top: 72px;
  right: 20px;
  width: 96px;
  height: 124px;
  mask-image: linear-gradient(225deg, #000 0%, transparent 90%);
}



.topbar-profile {
  min-height: 34px;
}

/* ==========================================================================
   REDESIGN v2 — premium enterprise AI workspace (owner spec, 2026-10-07)
   Layout, markup and behaviour are unchanged; this block only restyles. It
   sits last so it wins over the earlier passes above.
   ========================================================================== */

:root {
  /* Brand: emerald (deep enough for white text), mint accents. */
  --primary-green: #059669;
  --primary-green-hover: #047857;
  --primary-green-dark: #065f46;
  --secondary-green: #34d399;
  --light-green: #ecfdf5;
  --very-light-green: #f3fbf7;
  --dark-green: #062f27;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-divider: rgba(167, 243, 208, 0.12);
  --sidebar-section: #86efac;
  --sidebar-time: rgba(209, 250, 229, 0.55);

  /* Neutrals: charcoal text, muted gray, green-gray hairlines. */
  --ink: #111827;
  --muted: #6b7280;
  --border: #e6ebe8;

  /* Type: Roboto everywhere (bundled, see @font-face at the top). */
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Radii: one scale everywhere. */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --sidebar-w: 248px;
  --shadow-composer: 0 10px 32px rgba(17, 24, 39, 0.07), 0 1px 3px rgba(17, 24, 39, 0.05);
}

body {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: -0.005em;
}

/* ---- Radii: the global `border-radius: 0` stays for layout boxes; components get the scale. */
.btn,
.text-input,
input.text-input,
textarea.text-input,
select,
.chip-button,
.chip-menu-item,
.tool,
.table-scroll,
.conn-card,
.sched-card,
.error-banner,
.usage-stat,
kbd {
  border-radius: var(--r-md) !important;
}

.card,
.modal,
.toast,
.reasoning,
.chip-menu,
.work.live .work-head,
.msg-assistant pre,
.msg-assistant blockquote {
  border-radius: var(--r-lg) !important;
}

.pill,
.topbar-chip,
.work-skill,
.msg-skill-chip,
.usage-chip {
  border-radius: 999px !important;
}

.dot {
  border-radius: 50% !important;
}

/* ---- Buttons */
.btn {
  border-color: var(--border);
  font-size: 14px;
  min-height: 34px;
  padding: 6px 12px;
}

.btn:hover {
  border-color: color-mix(in srgb, var(--primary-green) 35%, var(--border));
  background: var(--very-light-green);
}

.btn.primary {
  background: var(--primary-green);
  border-color: var(--primary-green);
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}

.btn.primary:hover {
  background: var(--primary-green-hover);
  border-color: var(--primary-green-hover);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.22);
  transform: none;
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary-green) 55%, transparent);
  outline-offset: 2px;
}

/* Text fields show focus with their OWN border, not the ring above: the offset outline drew a
   second border around them ("double border"). One border, recoloured green, is the cue. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible {
  outline: none;
  outline-offset: 0;
  border-color: var(--primary-green);
  box-shadow: none;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark-green);
  border-right: 1px solid rgba(167, 243, 208, 0.08);
}

/* Retire the earlier gradient/ellipse passes: the SVG ribbons replace them. */
.sidebar::before,
.sidebar::after {
  content: none;
}

.sidebar-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
  z-index: 0;
  pointer-events: none;
}

.sidebar> :not(.sidebar-waves) {
  position: relative;
  z-index: 1;
}

.sidebar-head {
  min-height: 64px;
  padding: 18px 20px 10px;
  margin: 0;
}

.app-logo {
  height: 40px;
  margin: auto;
}

.sidebar-actions {
  gap: 10px;
  padding: 8px 0 16px;
}

.sidebar #new-session {
  min-height: 40px;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px !important;
  background: var(--primary-green);
  border-color: var(--primary-green);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.sidebar #new-session:hover {
  background: var(--primary-green-hover);
  border-color: var(--primary-green-hover);
}

.sidebar #open-search {
  min-height: 38px;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(209, 250, 229, 0.62);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 243, 208, 0.14);
  border-radius: 10px !important;
}

.sidebar #open-search:hover {
  color: rgba(236, 253, 245, 0.9);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(167, 243, 208, 0.26);
}


.sidebar .nav-row {
  box-shadow: none;
}

.sidebar .nav-row svg,
.sidebar .nav-row .icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke-width: 1.6;
  opacity: 0.9;
}


/* Active: a soft emerald tint, not a solid block. */

.sidebar .nav-row.active svg,
.sidebar .nav-row.active .icon {
  color: #6ee7b7;
  opacity: 1;
}

.sidebar .sidebar-group {
  padding: 16px 12px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(134, 239, 172, 0.7);
}

.sidebar-scroll {
  padding: 0 12px;
}

.sidebar .session-row {
  border-radius: 8px !important;
  color: rgba(236, 253, 245, 0.85);
}

.sidebar .session-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar .session-row.active {
  background: rgba(52, 211, 153, 0.12);
  box-shadow: none;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin: 0 12px;
  background: transparent;
}

.sidebar-foot .spacer {
  display: none;
}

.sidebar-foot #open-settings {
  justify-content: flex-start;
  gap: 12px;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14.5px;
  color: rgba(236, 253, 245, 0.82);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px !important;
}

.sidebar-foot #open-settings:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-foot #open-settings svg {
  width: 18px;
  height: 18px;
}

.sidebar-foot #conn-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 13px;
  font-size: 12.5px;
  color: rgba(209, 250, 229, 0.6);
  display: none;
}

.sidebar-foot #conn-status[hidden] {
  display: none;
}

.sidebar-foot .dot {
  width: 7px;
  height: 7px;
}

.sidebar-foot .dot.ok {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.topbar {
  min-height: 64px;
  gap: 14px;
  padding: 10px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef2f0;
}

.topbar-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-sub:has(.topbar-chip) {
  gap: 6px;
  margin-top: 5px;
}

.topbar-chip {
  height: 24px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--primary-green-dark);
  background: var(--very-light-green);
  border: 1px solid #d5efe3;
}

.topbar-chip svg {
  color: var(--primary-green);
}

.topbar-actions {
  gap: 6px;
}

.topbar-actions .btn,
.topbar-actions .round {
  min-height: 34px;
  border-radius: 8px !important;
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}

.topbar-actions .btn:hover,
.topbar-actions .round:hover {
  color: var(--ink);
  background: #f3f6f4;
}

.topbar-profile {
  margin-left: 6px;
}


/* ==========================================================================
   WORKSPACE: white, with green dot grids and thin curves at the edges only
   ========================================================================== */

.pane-chat {
  position: relative;
  isolation: isolate;
  background: #fcfdfc;
}

/* The earlier corner dot squares are replaced by the SVG decoration layer. */
.pane-chat::before,
.pane-chat::after {
  content: none;
}

.workspace-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  /* Soft mint organic shapes in the far corners only. */
}

.workspace-deco .deco {
  position: absolute;
  display: block;
}

.deco-tl {
  top: 22px;
  left: 26px;
  width: 160px;
  height: 120px;
  opacity: 0.32;
}

.deco-tr {
  top: 0;
  right: 0;
  width: 420px;
  height: 300px;
  opacity: 0.9;
}

.deco-tr rect {
  opacity: 0.4;
}

.deco-bl {
  left: 0;
  bottom: 0;
  width: 380px;
  height: 260px;
  opacity: 0.85;
}

.deco-br {
  right: 34px;
  bottom: 120px;
  width: 140px;
  height: 110px;
  opacity: 0.26;
}

.transcript,
.composer-wrap {
  position: relative;
  z-index: 1;
}

.transcript {
  background: transparent;
}

/* ---- Empty state */
.transcript:has(.empty) .stream {
  display: grid;
  min-height: 100%;
  place-items: center;
}

.empty {
  padding: 40px 24px;
}

.empty-illustration {
  margin: 0 auto 24px;
}

.empty h2 {
  font-size: clamp(28px, 2.2vw, 32px);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 10px;
}

.empty p {
  font-size: 15.5px;
  color: var(--muted);
  margin: 0;
}

/* ---- Chat content */
.msg-user {
  background: var(--dark-green);
  border-radius: 16px 16px 4px 16px !important;
  padding: 11px 16px;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(6, 47, 39, 0.12);
}

.msg-assistant {
  font-size: 15.5px;
}

.tool {
  box-shadow: none;
}

/* ==========================================================================
   COMPOSER
   ========================================================================== */

.composer-wrap {
  padding: 12px 28px 16px;
  background: transparent;
}

.composer {
  width: min(72%, 960px);
  max-width: 960px;
  padding: 14px 16px 12px;
  background: #fff;
  border: 1px solid #e3e9e6;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--shadow-composer);
}



.composer-input {
  min-height: 52px;
  font-size: 15.5px;
  line-height: 1.55;
}

.composer-input::placeholder {
  color: #9ca3af;
}

.composer-controls {
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #eef2f0;
}

/* Every control: same height, radius, hairline and quiet fill. */
.composer-controls>button:first-child,
.composer .chip-button {
  height: 34px;
  min-height: 34px;
  border-radius: var(--r-md) !important;
  border: 1px solid #e3e9e6;
  font-size: 13px;
  font-weight: 500;
}

.composer-controls>button:first-child {
  width: 34px;
  padding: 0;
}

.composer-controls>button:first-child:hover,
.composer .chip-button:hover {
  color: var(--ink);
}

/* Send: the one strong green in the composer. */
.composer .round.send,
.composer .round.stop {
  width: 38px;
  height: 38px;
  border-radius: 11px !important;
  background: var(--primary-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.composer .round.send:hover:not(:disabled) {
  background: var(--primary-green-hover);
  transform: translateY(-1px);
}

.composer .round.send:disabled {
  background: #eef2f0;
  color: #9ca3af;
  box-shadow: none;
}

.composer .usage-chip {
  font-size: 12px;
}

.composer-hint {
  max-width: min(72%, 960px);
  margin: 10px auto 0;
  gap: 4px 18px;
  font-size: 12px;
  color: #9ca3af;
}

.composer-hint kbd {
  border-radius: 5px !important;
  font-size: 11px;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e3e9e6;
  border-bottom-width: 2px;
}

.chip-menu {
  border-color: #e3e9e6;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
}

/* ==========================================================================
   VIEWS (Settings, Connectors, Scheduled...): same white canvas and cards
   ========================================================================== */

.pane-view {
  background: #fcfdfc;
}

.card {
  border-color: #e6ebe8;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

/* The composer card shows focus itself; no second outline around the textarea inside it. */
.composer-input:focus,
.composer-input:focus-visible {
  outline: none;
}

/* Inputs inside views (connector search, settings fields) share the component radius. */
.pane-view input[type="text"],
.pane-view input[type="search"],
.pane-view input[type="email"],
.pane-view input[type="url"],
.pane-view input[type="number"],
.pane-view input[type="password"],
.pane-view input[type="time"],
.pane-view textarea,
.modal input[type="text"],
.modal input[type="password"],
.modal textarea {
  border-radius: var(--r-md) !important;
}

/* ---- Header profile: larger avatar + static dropdown */
.profile-wrap {
  position: relative;
  margin-left: 6px;
}

.topbar-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 3px 9px 3px 3px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px !important;
  cursor: pointer;
  font: inherit;
  transition: background var(--ease), border-color var(--ease);
}

.topbar-profile:hover,
.topbar-profile[aria-expanded="true"] {
  background: #f3f6f4;
  border-color: var(--border);
}

.topbar-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50% !important;
  background: var(--light-green);
  border: 1px solid #cdeedd;
  color: var(--primary-green-dark);
  font-size: 14px;
  font-weight: 700;
}

.topbar-avatar.lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 232px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e3e9e6;
  border-radius: var(--r-lg) !important;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
}

.profile-menu[hidden] {
  display: none;
}

.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
}

.profile-menu-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.profile-menu-sub {
  font-size: 12px;
  color: var(--muted);
}

.profile-menu-sep {
  height: 1px;
  margin: 2px 4px 6px;
  background: #eef2f0;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: #374151;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--r-md) !important;
  cursor: pointer;
}

.profile-menu-item svg {
  color: var(--muted);
}

.profile-menu-item:hover {
  color: var(--ink);
  background: var(--very-light-green);
}

.profile-menu-item:hover svg {
  color: var(--primary-green);
}

/* The header (and its dropdown) must stack above the chat pane, which is its own layer. */
.topbar {
  position: relative;
  z-index: 30;
}

/* Profile menu items: 16px text, 20px icons (owner request). */
.profile-menu-item {
  font-size: 16px;
  gap: 12px;
}

.profile-menu-item svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---- Workspace decoration v3: mint organic shapes + dot grids on the edges (owner reference) */
.workspace-deco {
  background: none;
}

.deco-left {
  top: 0;
  left: 0;
  width: clamp(220px, 21vw, 320px);
  height: auto;
  aspect-ratio: 300 / 460;
}

.deco-right {
  top: 50%;
  right: 0;
  width: clamp(260px, 26vw, 400px);
  height: auto;
  aspect-ratio: 380 / 600;
  transform: translateY(-46%);
}

/* Illustration a touch larger, like the reference. */
.empty-illustration {
  width: 168px;
  height: 120px;
  margin-bottom: 26px;
}

.empty-illustration svg {
  width: 100%;
  height: 100%;
}

/* Composer controls: soft filled chips, no hairline (reference look). */
.composer-controls>button:first-child,
.composer .chip-button {
  border-color: transparent;
  background: #f2f5f4;
  color: #1f2937;
}

.composer-controls>button:first-child:hover,
.composer .chip-button:hover {
  border-color: transparent;
  background: #e8efec;
}

/* Sidebar foot: Settings moved to the header profile menu. The foot keeps only the
   connection line (hidden while its own rule says so), so no empty divider is drawn. */
.sidebar-foot {
  border-top: 0;
  padding: 0;
  min-height: 0;
}

/* ---- Sidebar navigation v2: section label, icon tiles, accent bar on the active row */
.sidebar-nav {
  gap: 4px;
  padding: 6px 0 12px;
}

.nav-section {
  padding: 6px 10px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(134, 239, 172, 0.55);
}

.sidebar .nav-row {
  position: relative;
  min-height: 44px;
  gap: 12px;
  padding: 6px 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(236, 253, 245, 0.78);
  border: 1px solid transparent;
  border-radius: 11px !important;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.nav-icon {
  display: grid;
  flex: none;
  width: 34px;
  height: 34px;
  place-items: center;
  color: rgba(209, 250, 229, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(167, 243, 208, 0.08);
  border-radius: 9px !important;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.sidebar .nav-row .nav-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
  opacity: 1;
}

.nav-label {
  transition: transform var(--ease);
}

.sidebar .nav-row:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-row:hover .nav-icon {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.22);
}

.sidebar .nav-row:hover .nav-label {
  transform: translateX(2px);
}

/* Active: soft emerald wash fading right, a filled icon tile and a slim accent bar. */
.sidebar .nav-row.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.04));
  border-color: rgba(52, 211, 153, 0.2);
  box-shadow: none;
}

.sidebar .nav-row.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 4px;
  height: 22px;
  transform: translateY(-50%);
  background: #34d399;
  border-radius: 0 4px 4px 0 !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

.sidebar .nav-row.active .nav-icon {
  color: #fff;
  background: var(--primary-green);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.sidebar .nav-row.active .nav-icon svg {
  color: #fff;
}

.nav-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #053b2f;
  background: #34d399;
  border-radius: 999px !important;
}

/* ---- Back arrow before the page title (section pages only) */
.topbar-back {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px !important;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.topbar-back:hover {
  color: var(--primary-green-dark);
  background: var(--very-light-green);
  border-color: color-mix(in srgb, var(--primary-green) 35%, var(--border));
}

.topbar-back:hover svg {
  transform: translateX(-2px);
}

.topbar-back svg {
  transition: transform var(--ease);
}

.topbar-back[hidden] {
  display: none;
}

/* ---- Header "Folders": icon + label, a clear secondary action */
.topbar-folders {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-green-dark);
  background: var(--very-light-green);
  border: 1px solid #cdeedd;
  border-radius: 10px !important;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.topbar-folders svg {
  width: 17px;
  height: 17px;
  color: var(--primary-green);
}

.topbar-folders:hover {
  background: #e3f7ee;
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.14);
}

.topbar-folders:active {
  transform: translateY(1px);
}

/* ---- Settings v2: carded rail with icons, a real section header, roomier cards */
.settings-layout {
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 28px;
}

.settings-nav {
  gap: 2px;
  padding: 10px 0;
  top: 12px;
  background: #fff;
  border: 1px solid #e6ebe8;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.settings-nav-group {
  margin: 14px 0 6px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #9ca3af;
}

.settings-nav-group:first-child {
  margin-top: 4px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 500;
  color: #4b5563;
  border-left: 0;
  border-radius: 9px !important;
}

.settings-nav-item svg {
  flex: none;
  transition: color var(--ease);
}

.settings-nav-item:hover {
  color: var(--ink);
  background: #f3f6f4;
}

.settings-nav-item:hover svg {
  color: var(--primary-green);
}

.settings-nav-item.active {
  color: var(--primary-green-dark);
  font-weight: 600;
  background: var(--light-green);
  box-shadow: inset 3px 0 0 var(--primary-green);
}


/* Section header: icon tile + title + one-line description. */
.settings-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 20px;
}

.settings-head-icon {
  display: grid;
  flex: none;
  place-items: center;
  color: var(--primary-green);
  background: var(--light-green);
  border: 1px solid #cdeedd;
  border-radius: 12px !important;
}

.settings-head-title {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.settings-head-lede {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Cards inside settings (and every card-panel): rounded, roomy, quiet header. */
.card-panel {
  margin-bottom: 18px;
  border-color: #e6ebe8;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.card-panel:hover {
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.06);
}

.card-panel-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 16px 20px 14px;
  border-bottom-color: #eef2f0;
  background: linear-gradient(180deg, #fbfdfc, #fff);
}

.card-panel-title {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--ink);
}

.card-panel-sub {
  font-size: 13.5px;
  color: var(--muted);
}

.card-panel-body {
  padding: 18px 20px 20px;
}

.card-panel-body .help {
  font-size: 14px;
  color: #4b5563;
}

.card-panel-body .btn.primary {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 10px !important;
}

/* ---- Settings rail icons: one outline family, 20px, in a 32px tile (matches the sidebar) */
.settings-nav-item {
  gap: 12px;
  min-height: 46px;
  padding: 6px 10px;
}

.settings-nav-icon {
  display: grid;
  flex: none;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #6b7280;
  background: #f3f6f4;
  border: 1px solid #e6ebe8;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.settings-nav-icon>span,
.settings-head-icon>span {
  display: grid;
  place-items: center;
}

.settings-nav-icon svg {
  width: 20px;
  height: 20px;
  color: inherit;
}

.settings-nav-item:hover .settings-nav-icon {
  color: var(--primary-green);
  background: var(--light-green);
  border-color: #cdeedd;
}

.settings-nav-item.active .settings-nav-icon {
  color: #fff;
  background: var(--primary-green);
  border-color: var(--primary-green);
}

.settings-nav-item svg,
.settings-nav-item.active svg {
  color: inherit;
}

.settings-head-icon {
  width: 48px;
  height: 48px;
}

.settings-head-icon svg {
  width: 24px;
  height: 24px;
}

/* Danger buttons (Disconnect, Delete…) keep their red on hover. The redesign's generic
   `.btn:hover` light fill was landing on them and leaving white text on near-white. */
.btn.danger:hover,
.btn.danger:focus-visible {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
  filter: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn.danger:active {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* ---- Settings ▸ Account: signed-in card laid out as identity row + preferences row */
.cloud-account {
  display: flex;
  flex-direction: column;
}

.cloud-account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
}

.cloud-account-avatar {
  display: grid;
  flex: none;
  width: 44px;
  height: 44px;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: var(--primary-green);
}

.cloud-account-text {
  flex: 1;
  min-width: 0;
}

.cloud-account-email {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-account-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-green-dark);
  background: var(--light-green);
  border: 1px solid #cdeedd;
}

.cloud-account-dot {
  width: 6px;
  height: 6px;
  background: var(--primary-green);
}

.cloud-account-row .btn {
  flex: none;
}

.cloud-account-prefs {
  padding-top: 16px;
  border-top: 1px solid #eef2f0;
}

/* ==========================================================================
   ANSWER: brand mark, a "name · time" header, and the reply in a soft mint card that
   mirrors the user's dark bubble (same padding, size and shadow; sharp corners per theme)
   ========================================================================== */

.msg-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.msg-avatar {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--dark-green, #062f27);
  box-shadow: 0 2px 8px rgba(6, 47, 39, 0.18);
}

.msg-avatar img {
  width: 22px;
  height: 22px;
  /* icon.png is a black mark on white: invert it, then "screen" drops the (now black)
     background so only the white mark shows on the green tile. */
  filter: invert(1);
  mix-blend-mode: screen;
}

.msg-answer {
  min-width: 0;
  max-width: min(82%, 760px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.msg-answer-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
  padding-top: 2px;
}

.msg-answer-name {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--dark-green, #062f27);
}

.msg-answer-time {
  font-size: 12.5px;
  color: var(--muted);
}

.msg-answer .msg-assistant {
  max-width: 100%;
  background: #f4f9f7;
  border: 1px solid #e1ece7;
  padding: 11px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink, #0f172a);
  box-shadow: 0 2px 8px rgba(6, 47, 39, 0.06);
}

/* ==========================================================================
   SESSION ACTIONS MENU (sidebar ⋯): a solid white popover like the profile menu,
   instead of a translucent panel that blended into the dark sidebar
   ========================================================================== */

.sidebar .row-menu {
  min-width: 200px;
  padding: 6px;
  gap: 2px;
  background: #fff;
  border: 1px solid #e3e9e6;
  box-shadow: 0 16px 40px rgba(6, 47, 39, 0.28), 0 2px 6px rgba(6, 47, 39, 0.12);
}

.sidebar .row-menu-item {
  gap: 12px;
  padding: 9px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink, #0f172a);
}

.sidebar .row-menu-item svg {
  color: #6b7280;
  flex: none;
}

.sidebar .row-menu-item:hover {
  background: color-mix(in srgb, var(--primary-green) 9%, transparent);
  color: var(--dark-green, #062f27);
}

.sidebar .row-menu-item:hover svg {
  color: var(--primary-green);
}

.sidebar .row-menu-item.danger,
.sidebar .row-menu-item.danger svg {
  color: #dc2626;
}

.sidebar .row-menu-item.danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.sidebar .row-menu-divider {
  background: #eef2f0;
  margin: 4px 6px;
}

/* The row's ⋯ button: light dots on the dark sidebar (the default muted grey vanished). */
.sidebar .row-actions .round {
  width: 28px;
  height: 28px;
  color: rgba(236, 253, 245, 0.85);
}

.sidebar .row-actions .round svg {
  stroke-width: 0;
}

.sidebar .row-actions .round:hover,
.sidebar .row-actions:has(.row-menu) .round {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   SHARP CORNERS EVERYWHERE (owner, 2026-10-07: "border radius 0 in the whole theme").
   Earlier passes set radii with !important on classes and ids; between two !important
   declarations the more specific selector wins, so this uses :not(#_) twice (specificity
   2,0,0) to outrank every one of them, including id rules like `.sidebar #new-session`.
   Delete this block to bring the rounded design back.
   ========================================================================== */
*:not(#_):not(#_),
*:not(#_):not(#_)::before,
*:not(#_):not(#_)::after {
  border-radius: 0 !important;
}

/* ==========================================================================
   Responsive (keep every @media query below this line)
   ========================================================================== */

@media (min-width: 1800px) {
  .deco-tr {
    width: 480px;
    height: 340px;
  }
}

@media (max-width: 1100px) {

  .deco-tr,
  .deco-bl {
    opacity: 0.55;
  }

  .deco-left,
  .deco-right {
    opacity: 0.7;
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    height: 100vh;
    height: 100dvh;
  }

  /* The sidebar becomes an off-canvas drawer; #toggle-nav adds .nav-open (app.js). */
  .app .sidebar,
  .app.nav-collapsed .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: flex;
    width: min(84vw, 300px);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
  }

  .app.nav-open .sidebar {
    transform: none;
    visibility: visible;
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.25);
  }

  .app.nav-open .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(6, 30, 24, 0.45);
  }

  .app:not(.nav-collapsed) #toggle-nav {
    display: grid;
  }

  .topbar {
    gap: 10px;
    padding: 8px 16px;
  }

  .topbar-title {
    flex: 1 1 auto;
  }

  .topbar-actions {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .stream,
  .composer {
    max-width: none;
  }

  .pane-column {
    padding: 16px 14px 48px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .composer,
  .composer-hint {
    width: 100%;
    max-width: 100%;
  }

  .deco-bl,
  .deco-br {
    display: none;
  }

  .deco-right {
    display: none;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    position: static;
  }
}

@media (max-width: 880px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }

  .settings-nav-group {
    display: none;
  }

  .settings-nav-item {
    width: auto;
  }
}

@media (max-width: 640px) {
  .composer-hint span:last-child {
    display: none;
  }
}

@media (max-width: 600px) {
  .topbar {
    min-height: 58px;
  }

  .topbar-chip {
    max-width: 38vw;
  }

  .composer {
    padding: 11px 12px 10px;
    border-radius: 12px !important;
  }

  .pane-chat::before {
    top: 10px;
    left: 10px;
  }

  .pane-chat::after {
    right: 8px;
    top: 58px;
  }

  /* Narrow topbar: actions never shrink (so the profile stays on screen), Folders shows its
     icon only, and the session sub-line keeps just the first chip (the model). */
  .topbar-actions {
    flex: none;
    gap: 6px;
  }

  .topbar-folders {
    padding: 0 10px;
  }

  .topbar-folders > span {
    display: none;
  }

  .topbar-sub .topbar-chip:not(:first-child) {
    display: none;
  }

  /* Keep the profile menu reachable (Settings lives there); just drop the caret. */
  .topbar-profile {
    padding: 3px;
  }

  .topbar-profile > svg {
    display: none;
  }

  .topbar {
    padding: 8px 14px;
  }

  .composer-wrap {
    padding: 8px 12px 10px;
  }

  .workspace-deco {
    display: none;
  }
}

@media (max-width: 520px) {
  .usage-stats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  .work-orb span,
  .work.live .work-label {
    animation: none;
  }

  .work.live .work-label {
    color: var(--ink);
    background: none;
  }

  .spinner {
    animation: none;
  }

  * {
    transition: none !important;
  }
}

/* ==========================================================================
   SIGN IN / SIGN UP (template/auth.html)
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(16, 185, 129, 0.16), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(6, 47, 39, 0.12), transparent 60%),
    #f4f9f7;
}

.auth-card {
  width: min(420px, 100%);
  padding: 36px 34px 28px;
  background: #fff;
  border: 1px solid #e1ece7;
  box-shadow: 0 24px 60px rgba(6, 47, 39, 0.12), 0 2px 8px rgba(6, 47, 39, 0.05);
}

.auth-logo {
  display: inline-flex;
  margin-bottom: 26px;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink, #111827);
}

.auth-sub {
  margin: 0 0 22px;
  font-size: 14.5px;
  color: var(--muted, #6b7280);
}

.auth-error,
.auth-notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.auth-notice {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #111827);
  text-decoration: none;
  background: #fff;
  border: 1px solid #d6e2dc;
  transition: background 0.15s, border-color 0.15s;
}

.auth-google:hover {
  background: #f6faf8;
  border-color: var(--primary-green, #059669);
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5ece8;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink, #111827);
}

.auth-field input {
  min-height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink, #111827);
  background: #fff;
  border: 1px solid #d6e2dc;
}

.auth-field input::placeholder {
  color: #9ca3af;
}

/* Password input + its Show/Hide button (static/script/auth.js), drawn as one field. */
.auth-password {
  position: relative;
  display: flex;
}

.auth-password input {
  flex: 1;
  min-width: 0;
  padding-right: 64px;
}

.auth-field .auth-password {
  font-size: inherit;
  font-weight: inherit;
}

.auth-reveal {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-green, #059669);
  background: none;
  border: 0;
  cursor: pointer;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.auth-submit {
  margin-top: 6px;
  min-height: 46px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  background: var(--primary-green, #059669);
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.25);
  transition: background 0.15s, transform 0.15s;
}

.auth-submit:hover {
  background: #047857;
  transform: translateY(-1px);
}

.auth-switch {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted, #6b7280);
}

.auth-switch a {
  color: var(--primary-green, #059669);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-spinner {
  width: 34px;
  height: 34px;
  margin: 0 0 18px;
  border: 3px solid #d1fae5;
  border-top-color: var(--primary-green, #059669);
  animation: auth-spin 1s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

/* Sign out in the profile menu: always a solid red row with white text and icon, so the
   destructive choice is unmistakable; a darker red on hover. */
.profile-menu-item.danger {
  color: #fff;
  background: #dc2626;
  font-weight: 500;
}

.profile-menu-item.danger svg,
.profile-menu-item.danger:hover svg,
.profile-menu-item.danger:focus-visible svg {
  color: #fff;
}

.profile-menu-item.danger:hover,
.profile-menu-item.danger:focus-visible {
  color: #fff;
  background: #b91c1c;
}

/* A round spinner, the one exception to the sharp-corners rule above (it outranks 2,0,0). */
.auth-card .auth-spinner:not(#_):not(#_) {
  border-radius: 50% !important;
}

.auth-hint {
  margin: 0 0 18px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Device sign-in (Google, from another computer): steps, the big code, waiting line. */
.auth-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink, #111827);
}

.auth-steps a {
  color: var(--primary-green, #059669);
  font-weight: 600;
}

.auth-code {
  margin: 4px 0 18px;
  padding: 14px 12px;
  text-align: center;
  font: 700 30px/1 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.18em;
  color: var(--dark-green, #062f27);
  background: #ecfdf5;
  border: 1px dashed #6ee7b7;
  user-select: all;
}

.auth-waiting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13.5px;
  color: var(--muted, #6b7280);
}

.auth-spinner.sm {
  width: 16px;
  height: 16px;
  margin: 0;
  border-width: 2px;
  flex: none;
}

.auth-card .auth-spinner.sm:not(#_):not(#_) {
  border-radius: 50% !important;
}

/* ==========================================================================
   Composer dropdowns v2: chips with a leading icon, a divider after the
   model, and a menu of icon rows (icon · label + hint · check on the current one)
   ========================================================================== */

.composer .chip-picker {
  position: relative;
}

.composer .chip-picker-model {
  padding-right: 10px;
  margin-right: 2px;
  border-right: 1px solid #e5e7eb;
}

.composer .chip-button,
.composer-controls>button:first-child {
  height: 38px;
  min-height: 38px;
  border: 1px solid #e3e7ec;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.composer .chip-button {
  gap: 8px;
  padding: 0 12px;
  max-width: 320px;
  font-size: 13.5px;
  font-weight: 500;
}

.composer .chip-button:hover,
.composer-controls>button:first-child:hover {
  border-color: #cfd6dd;
  background: #f9fafb;
}

.composer .chip-picker.is-open .chip-button {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.composer .chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Every chip icon: one size, one gray. */
.composer .chip-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: #6b7280;
}

.composer .chip-caret {
  flex: none;
  margin-left: 2px;
  color: #6b7280;
  transition: transform 0.15s ease;
}

.composer .chip-picker.is-open .chip-caret {
  transform: rotate(180deg);
}

/* The menu */
.composer .chip-menu {
  bottom: calc(100% + 8px);
  min-width: 290px;
  max-width: 360px;
  max-height: 360px;
  padding: 6px;
  gap: 2px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.14), 0 2px 6px rgba(17, 24, 39, 0.06);
  animation: chip-menu-in 0.12s ease-out;
}

@keyframes chip-menu-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.composer .chip-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.composer .chip-menu-item {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.composer .chip-menu-item:hover {
  background: #f3f6f5;
}

.composer .chip-menu-item.active {
  background: #ecfdf5;
}

.composer .chip-menu-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #f3f4f6;
  color: #374151;
}

.composer .chip-menu-item.active .chip-menu-icon {
  background: #d1fae5;
  color: var(--primary-green);
}

.composer .chip-menu-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.composer .chip-menu-label {
  font-size: 13.5px;
  font-weight: 500;
}

.composer .chip-menu-hint {
  font-size: 12px;
  line-height: 1.35;
  color: #6b7280;
}

.composer .chip-menu-check {
  flex: none;
  color: var(--primary-green);
}

.composer .chip-menu-heading {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.composer .chip-menu-search {
  margin: 2px 2px 6px;
}

@media (max-width: 720px) {
  .composer .chip-picker-model {
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
  }

  .composer .chip-button {
    max-width: 18ch;
  }
}

/* ---- Connectors: remove an unused connector from the list (Hidden brings it back) */
.conn-card-remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #9ca3af;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.conn-card-remove:hover,
.conn-card-remove:focus-visible {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
  outline: none;
}

.conn-grid-hidden .conn-card-remove:hover,
.conn-grid-hidden .conn-card-remove:focus-visible {
  color: var(--primary-green);
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.conn-card.has-action .conn-card-chevron {
  display: none;
}

.conn-grid-hidden .conn-card {
  opacity: 0.7;
}

.conn-hidden-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.conn-hidden-toggle:hover {
  color: var(--ink);
}

/* ---- Switches v2: gray when off, green when on — the old light-green "off" read as "on".
   Round on purpose, the one exception to the square theme: a pill with a sliding knob is
   what people recognise as an on/off switch. The :not(#_) chain outranks the square rule. */
.switch {
  width: 42px;
  height: 24px;
  margin-top: 0;
}

.switch-row {
  align-items: center;
}

.switch-row:has(.switch-hint) {
  align-items: flex-start;
}

.switch-track {
  background: #d1d5db;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06);
  transition: background 0.18s ease;
}

.switch-track::after {
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.25);
  transition: transform 0.18s ease;
}

.switch input:checked+.switch-track {
  background: var(--primary-green);
}

.switch input:checked+.switch-track::after {
  transform: translateX(18px);
}

.switch-row:hover .switch input:not(:checked):not(:disabled)+.switch-track {
  background: #c4c9d1;
}

.switch-row:hover .switch input:checked:not(:disabled)+.switch-track {
  background: var(--primary-green-hover, #047857);
}

.switch-track:not(#_):not(#_):not(#_),
.switch-track:not(#_):not(#_):not(#_)::after {
  border-radius: 999px !important;
}

.switch-label {
  font-weight: 500;
}

/* ---- Desktop app: notifications bell (red dot = update available), hover dropdown */
.bell-wrap {
  position: relative;
  margin-left: 6px;
}

.topbar-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #4b5563;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.topbar-bell:hover,
.topbar-bell[aria-expanded="true"] {
  color: var(--ink);
  background: #f3f6f4;
  border-color: var(--border);
}

.bell-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 9px;
  height: 9px;
  background: #ef4444;
  box-shadow: 0 0 0 2px #fff;
}

.bell-dot:not(#_):not(#_):not(#_) {
  border-radius: 50% !important;
}

.bell-dot[hidden],
.bell-panel[hidden] {
  display: none;
}

.bell-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 340px;
  background: #fff;
  border: 1px solid #e3e9e6;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.14);
  animation: chip-menu-in 0.12s ease-out;
}

/* The hover bridge: the pointer crosses the 8px gap without the panel closing. */
.bell-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -9px;
  height: 9px;
}

.bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.bell-count {
  min-width: 20px;
  padding: 1px 6px;
  font-size: 11px;
  text-align: center;
  color: #fff;
  background: #ef4444;
}

.bell-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 14px;
  color: var(--primary-green);
}

.bell-empty div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  font-size: 13.5px;
}

.bell-empty span {
  font-size: 12.5px;
  color: #6b7280;
}

.bell-item {
  display: flex;
  gap: 12px;
  padding: 14px;
}

.bell-item-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--primary-green);
  background: #ecfdf5;
}

.bell-item-body {
  flex: 1;
  min-width: 0;
}

.bell-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.bell-item-sub {
  margin-top: 1px;
  font-size: 12px;
  color: #6b7280;
}

.bell-notes-head {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.bell-notes {
  margin: 6px 0 0;
  padding-left: 18px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
}

.bell-notes li + li {
  margin-top: 3px;
}

.bell-error {
  margin-top: 10px;
  font-size: 12.5px;
  color: #b91c1c;
}

.bell-update {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  margin-top: 14px;
  border: 0;
  background: var(--primary-green);
  color: #fff;
  font: 600 13.5px inherit;
  font-family: inherit;
  cursor: pointer;
}

.bell-update:hover:not(:disabled) {
  background: var(--primary-green-hover, #047857);
}

.bell-update:disabled {
  opacity: 0.75;
  cursor: default;
}

.bell-item + .bell-item {
  border-top: 1px solid #eef2f0;
}

/* ---- Header avatar: the profile photo when there is one */
.topbar-avatar {
  overflow: hidden;
}

.topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Settings → Account: your profile */
.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.profile-photo {
  flex: none;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  overflow: hidden;
  background: var(--light-green);
  border: 1px solid #cdeedd;
  color: var(--primary-green-dark);
  font-size: 32px;
  font-weight: 700;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.profile-photo-sub {
  font-size: 13.5px;
  color: var(--muted);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profile-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-inline {
  display: flex;
  gap: 8px;
}

.profile-inline .text-input {
  flex: 1;
  min-width: 0;
}

.profile-msg {
  min-height: 0;
  margin: 4px 0 8px;
  font-size: 13px;
}

.profile-msg:empty {
  margin: 0;
}

.profile-note {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.profile-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-input:disabled {
  background: #f6f8f7;
  color: var(--muted);
  cursor: not-allowed;
}

.profile-actions .btn[hidden] {
  display: none;
}

/* Name · Email · Save on one row; stacked on a narrow screen. */
.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.profile-row .field {
  margin-bottom: 0;
}

.profile-row.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.profile-row + .profile-msg {
  margin-top: 8px;
}

.profile-row > .btn {
  height: 42px;
  white-space: nowrap;
}

.profile-note.small {
  margin: 6px 0 4px;
  font-size: 12.5px;
}

@media (max-width: 760px) {
  .profile-row,
  .profile-row.cols-3 {
    grid-template-columns: 1fr;
  }

  .profile-row > .btn {
    justify-self: start;
  }
}
