/* Client console. Tokens match the public prototype in ../style.css */
:root {
  --bg-main: #ffffff;
  --bg-sidebar: #f8f9fa;
  --bg-soft: #f6f7f8;
  --text-main: #111111;
  --text-muted: #666666;
  --border-color: #eaeaea;
  --accent-orange: #dc5726;
  --accent-orange-dark: #b84316;
  --accent-green: #67953f;
  --warn: #9a6700;
  --warn-bg: #fff6e5;
  --danger: #9f1239;
  --danger-bg: #fff1f2;
  --ok-bg: #f3f8ee;
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 0;
  --radius-btn: 14px;
  --rail-w: 90px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--bg-soft);
  color: var(--text-main);
  min-height: 100vh;
}
button, input, select, textarea { font-family: inherit; }
button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 2;
  background: var(--bg-soft);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.menu-open .app { transform: translateX(400px); }

.rail {
  width: 90px;
  flex-shrink: 0;
  background: #f8f9fa;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}
body.menu-open .rail {
  width: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.menu-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.menu-icon svg {
  stroke: var(--text-main);
  transition: 0.3s;
}
.menu-icon .icon-close { display: none; position: absolute; }
body.menu-open .menu-icon .icon-burger { display: none; }
body.menu-open .menu-icon .icon-close { display: block; }
.menu-icon:hover svg { stroke: var(--accent-orange); }

.offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 100vh;
  background: #111;
  color: #fff;
  z-index: 1;
  overflow-y: auto;
  transform: translateX(-20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
body.menu-open .offcanvas {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.offcanvas__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px 32px 48px;
}
.offcanvas__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.offcanvas__brand img {
  height: 34px;
  width: 58px;
  max-width: 58px;
  object-fit: contain;
  object-position: left center;
  background: none;
  border-radius: 14px;
  padding: 0;
  flex: 0 0 auto;
}
.offcanvas { overflow-x: hidden; }
.offcanvas__close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  transition: 0.25s;
}
.offcanvas__close:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
}
.offcanvas__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.offcanvas__nav { display: grid; gap: 22px; }
.offcanvas__group { display: grid; gap: 10px; }
.offcanvas__footer { margin-top: auto; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  font-weight: 500;
  transition: 0.2s;
}
.nav__link:hover,
.nav__link.is-active { color: var(--accent-orange); }
.nav__ico {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
img.nav__ico { filter: brightness(0) invert(1); }
.nav__count { margin-left: auto; }
.nav__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.nav__spacer { flex: 1; }
.nav__back {
  margin: 8px 10px 0;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.nav__back:hover { color: var(--text-main); }

.workspace { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar__logo { display: flex; align-items: center; }
.topbar__logo img { height: 40px; width: auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  background: #fff;
}
.topbar__usage {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.meter {
  width: 120px;
  height: 6px;
  border-radius: 999px;
  background: #ececec;
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  background: var(--accent-green);
  border-radius: inherit;
}
.meter--wide { display: block; width: 100%; margin-top: 12px; }
.meter.is-warn > span { background: #e0a100; }
.meter.is-stop > span { background: var(--danger); }
.topbar__user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
}
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.user-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 200px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.08);
  padding: 6px;
  display: grid;
}
.user-menu__panel a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 0;
  font-size: 13px;
}
.user-menu__panel a:hover { background: var(--bg-soft); }
.user-menu:not([open]) .user-menu__panel { display: none; }

.content {
  padding: 28px;
  width: 100%;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.page-head h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.lede { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.5; max-width: 62ch; }
.page-head__actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-btn);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  line-height: 1.2;
}
.btn-solid { background: var(--accent-orange); color: #fff; }
.btn-solid:hover { background: var(--accent-orange-dark); }
.btn-outline { border-color: var(--text-main); background: #fff; }
.btn-outline:hover { background: var(--text-main); color: #fff; }
.btn-quiet { border-color: var(--border-color); background: #fff; color: var(--text-main); font-weight: 600; }
.btn-quiet:hover { border-color: #ccc; }
.btn-danger { border-color: #fecdd3; color: var(--danger); background: #fff; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn:focus-visible, .nav__link:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.mail-connect {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 12px;
  align-items: start;
}
.mail-connect__ms {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-soft);
}
.mail-connect__ms p { margin: 0; }
.mail-connect__ms .btn { justify-self: start; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1.4fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: grid; gap: 14px; }

.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.card h2, .card h3 { margin: 0 0 8px; letter-spacing: -0.02em; }
.card h2 { font-size: 16px; }
.card h3 { font-size: 15px; }
.card p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 650;
  background: var(--bg-soft);
  color: var(--text-muted);
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.pill-ok { background: var(--ok-bg); color: var(--accent-green); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-stop { background: var(--danger-bg); color: var(--danger); }
.pill-plain::before { display: none; }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 0;
  background: #fff4ef;
  border: 1px solid #ffd7c8;
  margin-bottom: 14px;
}
.banner strong { display: block; margin-bottom: 2px; }
.banner p { margin: 0; color: var(--text-muted); font-size: 13px; }

.agent-card {
  display: grid;
  gap: 10px;
  align-content: start;
}
.agent-grid .agent-card {
  height: 100%;
  align-content: space-between;
  grid-template-rows: auto 1fr auto;
}
.agent-card__top, .row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.agent-card__id {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.agent-card__id img { width: 28px; height: 28px; }
.agent-card > .btn { justify-self: start; }
.metric { font-size: 22px; font-weight: 750; letter-spacing: -0.03em; }
.metric span { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; margin-top: 2px; }

.catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
}
.catalog-row:first-child { border-top: 0; padding-top: 0; }

.tabs { display: grid; gap: 16px; }
.tablist {
  display: flex;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
.tab {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  padding: 10px 16px 12px;
  margin-bottom: -1px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.tab:hover { color: var(--text-main); }
.tab:focus-visible { outline: 2px solid var(--accent-orange); outline-offset: -2px; }
.tab.is-active {
  background: transparent;
  color: var(--text-main);
  border-bottom-color: var(--text-main);
}
.tabpanel { display: none; }
.tabpanel.is-active { display: block; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span, .label {
  font-size: 12px;
  font-weight: 650;
  color: var(--text-muted);
}
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  background: #fafafa;
  color: var(--text-main);
  border-radius: 0;
  padding: 11px 12px;
  font-size: 14px;
}
textarea { min-height: 96px; resize: vertical; }
.help { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 0;
  background: #fff;
  margin-bottom: 8px;
}
.choice.is-on { border-color: #111; }
.choice input { margin-top: 3px; }
.choice strong { display: block; font-size: 14px; }
.choice span { display: block; color: var(--text-muted); font-size: 12px; line-height: 1.4; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border-color); vertical-align: top; }
th { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

.split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  align-items: start;
}
.list-btn {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  padding: 12px 4px;
  display: grid;
  gap: 3px;
}
.list-btn.is-active { background: #fff4ef; border-radius: 0; padding-inline: 10px; }
.list-btn strong { font-size: 14px; }
.list-btn span { color: var(--text-muted); font-size: 12px; }

.bubble {
  border-radius: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 70ch;
}
.bubble-user { background: #111; color: #fff; margin-left: auto; }
.bubble-agent { background: #fff; border: 1px solid var(--border-color); }
.thread { display: grid; gap: 8px; }
.source {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.source a { color: var(--accent-orange); }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #111;
  color: #f5f5f5;
  border-radius: 0;
  padding: 12px 14px;
  overflow-x: auto;
  line-height: 1.5;
}
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: var(--radius-btn);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
}
.chip.is-on { background: #111; color: #fff; border-color: #111; }

.flow {
  display: grid;
  gap: 8px;
}
.step {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 0;
  background: #fff;
}
.step__n {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.note {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-radius: 0;
  padding: 8px 10px;
}

.support {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.support__panel {
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.12);
  display: none;
}
.support.is-open .support__panel { display: grid; }
.support__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: #111;
  color: #fff;
}
.support__head strong { display: block; font-size: 14px; }
.support__head span { display: block; font-size: 12px; color: rgba(255,255,255,0.7); }
.support__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-green);
}
.support__body { display: grid; gap: 8px; padding: 14px; background: var(--bg-soft); max-height: 320px; overflow-y: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.support__form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}
.support__form input { flex: 1; }
.support__note {
  padding: 0 14px 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: #fff;
}
.support__launch {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-btn);
  background: var(--accent-orange);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(220, 87, 38, 0.35);
}
.support__launch:hover { background: var(--accent-orange-dark); }

/* Live Escalations & Conversational Console */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.8s infinite;
  vertical-align: middle;
  margin-right: 5px;
  flex-shrink: 0;
}
.pulse-dot--danger {
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-red 1.8s infinite;
}
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pill-live {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1;
}
.pill-urgent {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-btn);
  font-weight: 600;
}

/* Chat Console (Ads Agent, Support Test, Live Case) */
.chat-console {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-color);
  min-height: 480px;
}
.chat-console__header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: #fafafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.chat-console__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
}
.chat-console__meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-console__body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  max-height: 440px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-console__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.prompt-chip {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.prompt-chip:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: #fff8f5;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-input-row textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.4;
  border-radius: 0;
  border: 1px solid var(--border-color);
  background: #fafafa;
}
.chat-input-row textarea:focus {
  outline: none;
  border-color: #111;
  background: #fff;
}

/* Chat Action Cards (proposals & pending mutates) */
.chat-action-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-orange);
  padding: 12px 14px;
  margin-top: 8px;
  display: grid;
  gap: 8px;
}
.chat-action-card--confirmed {
  border-left-color: var(--accent-green);
  background: #fcfdfa;
}
.chat-action-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-action-card__title {
  font-size: 13px;
  font-weight: 700;
}
.chat-action-card__details {
  font-size: 12.5px;
  color: var(--text-main);
  background: #fafafa;
  padding: 8px 10px;
  border: 1px solid #f0f0f0;
  line-height: 1.45;
}
.chat-action-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Live Agent Escalation Thread */
.escalation-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  position: relative;
  text-align: center;
}
.escalation-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #fed7aa;
}
.escalation-divider span {
  position: relative;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.system-event {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 8px 12px;
  font-size: 12px;
  color: #475569;
  text-align: center;
  border-radius: 0;
  margin: 6px 0;
}

.bubble-operator {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #0f172a;
  margin-left: auto;
  border-right: 3px solid #16a34a;
}
.bubble-operator strong {
  display: block;
  font-size: 11px;
  color: #15803d;
  margin-bottom: 3px;
}

.canned-responses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.canned-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 4px 8px;
  font-size: 11.5px;
  color: #374151;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: all 0.15s;
  white-space: nowrap;
}
.canned-btn:hover {
  background: #e5e7eb;
  color: #111;
  border-color: #d1d5db;
}

.customer-context {
  background: #fafafa;
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  font-size: 12px;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.customer-context__row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #e5e7eb;
  padding-bottom: 4px;
}
.customer-context__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.customer-context__label {
  color: var(--text-muted);
}
.customer-context__value {
  font-weight: 600;
  color: var(--text-main);
}

.list-btn__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.list-btn__badge {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
}

.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast-notice.is-show {
  opacity: 1;
}

@media (max-width: 980px) {
  body.menu-open .app { transform: translateX(min(400px, 100vw)); }
  .offcanvas { width: min(400px, 100vw); }
  .topbar__firm { display: none; }
  .tablist { scrollbar-width: thin; }
  .grid-2, .grid-3, .grid-4, .agent-grid, .mail-connect, .split, .kpis { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 88px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 10px 14px; }
  .meter { display: none; }
}
