:root {
  --purple: #6f35e8;
  --purple-dark: #5323c7;
  --purple-soft: #f0e8ff;
  --purple-ghost: #f7f2ff;
  --bg: #f7f7fa;
  --card: #ffffff;
  --line: #e4e5eb;
  --line-dark: #d8dae4;
  --ink: #171923;
  --muted: #7d8493;
  --subtle: #a0a5b2;
  --green: #13a66b;
  --blue: #2f6fe4;
  --pink: #e63e8a;
  --orange: #f28c28;
  --red: #e64857;
  --black: #111827;
  --shadow: 0 14px 34px rgba(31, 35, 48, .045);
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 1360px;
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input, select, textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 13px;
  cursor: pointer;
  transition: .16s ease;
}

button:hover {
  border-color: #c8c7d2;
  background: #faf9ff;
}

button:disabled {
  cursor: not-allowed;
  color: #a0a5b2;
  background: #f4f5f8;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: 0; }
h2 { font-size: 18px; font-weight: 620; }
h3 { font-size: 15px; font-weight: 650; }
p { color: var(--muted); }

.shell {
  display: grid;
  grid-template-columns: 236px minmax(1124px, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: 70px 1fr auto;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  padding: 8px;
  display: grid;
  gap: 4px;
  background: transparent;
}

.icon-button span {
  display: block;
  height: 3px;
  border-radius: 99px;
  background: #1f2430;
}

.nav {
  padding: 28px 14px;
  overflow: auto;
}

.nav-group {
  margin-bottom: 22px;
}

.nav-label {
  margin: 0 6px 8px;
  color: #8e95a5;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.nav-button {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 10px 8px;
  color: #1f2430;
}

.nav-button.active {
  color: var(--purple);
  background: var(--purple-soft);
  border-color: transparent;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: currentColor;
  position: relative;
}

.nav-icon.grid::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px currentColor, 11px 0 0 0 currentColor, 0 11px 0 0 currentColor, 11px 11px 0 0 currentColor;
}

.nav-icon.mail::before {
  content: "";
  width: 17px;
  height: 12px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}

.nav-icon.mail::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 7px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  top: 5px;
}

.nav-icon.user::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  position: absolute;
  top: 3px;
}

.nav-icon.user::after {
  content: "";
  width: 16px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  position: absolute;
  bottom: 2px;
}

.nav-icon.ticket::before,
.nav-icon.settings::before,
.nav-icon.chart::before,
.nav-icon.ai::before {
  content: "";
  width: 17px;
  height: 17px;
  border: 1.8px solid currentColor;
  border-radius: 4px;
}

.nav-icon.chart::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 3px;
  height: 12px;
  background: currentColor;
  box-shadow: -6px 4px 0 currentColor, 6px -3px 0 currentColor;
}

.nav-icon.ai::after {
  content: "KB";
  position: absolute;
  font-size: 8px;
  font-weight: 800;
}

.count-pill {
  min-width: 36px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f1f4;
  color: #696f7e;
  font-size: 12px;
}

.sidebar-footer {
  padding: 14px 20px 24px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 8px 0;
  background: transparent;
}

.line-icon.shop {
  width: 18px;
  height: 16px;
  border: 1.6px solid currentColor;
  border-radius: 2px;
}

.arrow-up {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.chevron-left {
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: 70px 1fr;
}

.topbar {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(420px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}

.top-title {
  font-size: 18px;
  font-weight: 650;
}

.top-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.top-center {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.review-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 12px;
  font-weight: 650;
}

.review-pill.muted {
  background: #f2f3f7;
  color: #697180;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #1f2530;
  font-size: 13px;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #ded9ea;
  background: #f6f4fb;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.language-switch button {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #687084;
  font-size: 12px;
  font-weight: 700;
}

.language-switch button.active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 10px rgba(111, 53, 232, .18);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.bell {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
}

.bell::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 14px;
  height: 16px;
  border: 2px solid #1f2430;
  border-radius: 10px 10px 5px 5px;
}

.bell span {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
}

.profile-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #c79b67 0 26%, #111827 27% 100%);
}

.profile-copy {
  display: grid;
  gap: 1px;
}

.profile-copy small {
  color: #344e92;
}

.logout-button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #5f6675;
  font-size: 12px;
  font-weight: 750;
}

.logout-button:hover {
  border-color: #cdbdff;
  color: var(--purple);
  background: #faf7ff;
}

.content {
  padding: 22px 24px 28px;
  overflow: auto;
}

.page { display: none; }
.page.active { display: block; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.page-head p { margin-top: 4px; }

#inbox .inbox-compact-page .page-head {
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

#inbox .inbox-compact-page .page-head h1 {
  font-size: 19px;
}

#inbox .inbox-compact-page .page-head p {
  max-width: 640px;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
}

#inbox .inbox-compact-page .page-head .button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.inbox-compact-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.primary-status-switch {
  display: flex;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.primary-status-switch .tab-button {
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 12px;
}

.primary-status-switch .tab-button span {
  margin-left: 6px;
  color: inherit;
  opacity: .78;
}

.channel-strip {
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.channel-strip .chip {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
}

#inbox .compact-summary {
  margin: 0 0 10px;
  min-height: 32px;
  padding: 7px 10px;
}

#inbox .compact-summary span {
  font-size: 12px;
}

.head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #dbe7ff;
  border-radius: 9px;
  background: #f7faff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.button {
  border-radius: 9px;
  min-height: 36px;
}

.button.primary {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.button.primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
}

.button.ghost {
  background: #fff;
}

.button.danger {
  color: var(--red);
  border-color: #ffd3d8;
  background: #fff6f7;
}

.button.locked {
  color: #9fa5b1;
  background: #f3f4f7;
  border-color: #e2e3e8;
}

.toolbar-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.compact-ticket-tabs {
  margin-bottom: 10px;
}

.compact-ticket-tabs .tab-button span {
  margin-left: 6px;
  opacity: .8;
}

.compact-kpi-row {
  gap: 12px;
}

.compact-kpi-row .kpi-card {
  min-height: 82px;
  padding: 12px 14px;
}

.compact-kpi-row .kpi-value {
  font-size: 22px;
  margin-top: 6px;
}

.compact-kpi-row .kpi-sub {
  margin-top: 6px;
}

.tab-button,
.seg-button {
  min-height: 34px;
  padding: 7px 14px;
}

.tab-button.active,
.seg-button.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px 12px;
}

.card-body {
  padding: 16px 18px 18px;
}

.kpi-card {
  min-height: 98px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 12px;
  align-items: start;
}

.kpi-label {
  color: #314263;
  font-size: 13px;
}

.kpi-value {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
}

.kpi-sub {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.kpi-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--purple);
  background: var(--purple-soft);
}

.kpi-icon::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 7px -5px 0 currentColor, 14px -10px 0 currentColor;
}

.trend {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: #eaf8ef;
  color: var(--green);
}

.trend.down {
  background: #fff0f1;
  color: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
}

.badge.manual { background: #f2f3f6; color: #626a78; border-color: #e3e5eb; }
.badge.planned { background: #faf9ff; color: #6b5f80; border-color: #e8defd; }
.badge.action { background: #fff2df; color: #be6200; border-color: #ffdfae; }
.badge.risk { background: #fff0f2; color: #c7243a; border-color: #ffcbd2; }
.badge.ai { background: var(--purple-soft); color: var(--purple); border-color: #e2d1ff; }
.badge.good { background: #eaf8ef; color: var(--green); border-color: #cff0dd; }
.badge.reference { background: #fff4e8; color: #b95e05; border-color: #ffd9ac; }
.badge.blue { background: #edf3ff; color: var(--blue); border-color: #d6e2ff; }
.badge.dark { background: #eef0f5; color: #1f2530; border-color: #dfe2e8; }

.ticket-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field span {
  color: #6d7484;
  font-size: 12px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
  padding: 9px 10px;
  color: var(--ink);
}

.form-field textarea {
  min-height: 76px;
  resize: vertical;
}

.ticket-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
}

.dot.whatsapp { color: var(--green); }
.dot.instagram { color: var(--pink); }
.dot.facebook { color: var(--blue); }
.dot.tiktok { color: var(--black); }
.dot.email { color: var(--orange); }
.dot.shopify { color: #8b5cf6; }

.line-chart {
  position: relative;
  height: 218px;
  padding: 16px 10px 8px;
}

.line-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: #eceef5;
  stroke-width: 1;
}

.chart-axis {
  fill: #8c93a1;
  font-size: 11px;
}

.chart-y-axis {
  fill: #8c93a1;
  font-size: 10px;
}

.chart-axis-line {
  stroke: #dadde7;
  stroke-width: 1;
}

.chart-point-label rect {
  fill: #fff;
  stroke: #dadde7;
  filter: drop-shadow(0 3px 6px rgba(31, 35, 48, .08));
}

.chart-point-label text {
  fill: #374151;
  font-size: 10px;
  font-weight: 700;
}

.bar-chart {
  --bar-color: var(--purple);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  height: 218px;
  padding: 8px 2px 0;
}

.bar-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 18px 0 26px;
  color: #8c93a1;
  font-size: 10px;
  font-weight: 800;
}

.bar-plot {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
  border-left: 1px solid #dfe3ee;
  border-bottom: 1px solid #dfe3ee;
  background:
    linear-gradient(to bottom, #eef1f7 1px, transparent 1px) 0 18px / 100% 39px repeat-y;
  padding: 12px 8px 0;
  min-width: 0;
}

.bar-column {
  min-width: 0;
  display: grid;
  grid-template-rows: 20px minmax(0, 1fr) 24px;
  align-items: end;
  justify-items: center;
  gap: 4px;
}

.bar-value {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.bar-track-vertical {
  position: relative;
  width: 100%;
  max-width: 34px;
  height: 100%;
  border-radius: 7px 7px 0 0;
  background: #eef1f7;
  overflow: hidden;
}

.bar-fill-vertical {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 7px 7px 0 0;
  background: var(--bar-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
}

.bar-column strong {
  align-self: center;
  color: #8c93a1;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.donut {
  width: 142px;
  height: 142px;
  margin: auto;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 34%, var(--pink) 34% 58%, var(--blue) 58% 76%, #111827 76% 85%, var(--purple) 85% 94%, #9aa0ad 94% 100%);
  position: relative;
}

.donut::after {
  content: "248";
  position: absolute;
  inset: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 26px;
  color: #1f2530;
}

.legend {
  display: grid;
  gap: 8px;
}

.legend-row {
  display: grid;
  grid-template-columns: 14px minmax(118px, 1fr) minmax(58px, max-content) minmax(104px, max-content);
  gap: 10px;
  align-items: center;
  color: #4c5362;
  font-size: 12px;
}

.legend-row strong,
.legend-row em {
  font-style: normal;
  text-align: right;
  white-space: nowrap;
}

.legend-row strong {
  color: #1f2530;
}

.legend-row em {
  color: #7d8493;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 132px 1fr 46px;
  gap: 12px;
  align-items: center;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #ece7f8;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--purple);
}

.bar-fill.purple { background: var(--purple); }
.bar-fill.green { background: var(--green); }
.bar-fill.blue { background: var(--blue); }
.bar-fill.pink { background: var(--pink); }
.bar-fill.orange { background: var(--orange); }
.bar-fill.black { background: var(--black); }
.bar-fill.red { background: var(--red); }

.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: #858c99;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
}

td {
  color: #272b36;
  font-size: 14px;
}

tr:last-child td { border-bottom: 0; }

.search-field {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #9097a5;
}

.search-field::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  box-shadow: 6px 6px 0 -4px currentColor;
}

.search-field input {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
}

.dashboard-main {
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  align-items: stretch;
}

.dashboard-v212 .card-head {
  padding-bottom: 8px;
}

.dashboard-v212 .card-body {
  padding-top: 8px;
}

.dashboard-chart-card {
  min-height: 0;
}

.dashboard-chart-card .line-chart {
  height: 196px;
  padding: 8px 8px 2px;
}

.dashboard-chart-card .bar-chart {
  height: 196px;
  padding-top: 2px;
}

.dashboard-donut {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.dashboard-donut .donut {
  width: 130px;
  height: 130px;
}

.dashboard-donut .donut::after {
  inset: 29px;
  font-size: 24px;
}

.dashboard-donut .legend {
  gap: 6px;
  min-width: 0;
}

.dashboard-donut .legend-row {
  grid-template-columns: 12px minmax(112px, 1fr) 38px 50px;
  gap: 7px;
  font-size: 12px;
  min-width: 0;
}

.dashboard-donut .legend-row span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-donut .legend-row strong,
.dashboard-donut .legend-row em {
  min-width: 0;
}

.dashboard-alerts .card-head {
  padding: 14px 18px 8px;
}

.alert-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.alert-pager .button {
  min-height: 30px;
  padding: 5px 10px;
}

.alert-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-top: 8px;
}

.alert-tile {
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.alert-title {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.alert-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.alert-tile .badge {
  justify-self: start;
}

.workbench-grid {
  grid-template-columns: minmax(0, .9fr) minmax(0, .8fr) 340px;
}

.top-list {
  display: grid;
  gap: 12px;
}

.mini-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.avatar.purple { background: var(--purple); }
.avatar.green { background: var(--green); }
.avatar.orange { background: var(--orange); }

.small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.link { color: var(--purple); font-weight: 600; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-entry {
  min-height: 64px;
  border: 0;
  background: #f7f4ff;
  color: var(--purple);
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  font-size: 12px;
}

.quick-entry .glyph {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 6px;
}

.progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
}

.progress-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: #ebe5fa;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--purple);
  border-radius: inherit;
}

.inbox-page-grid {
  display: grid;
  grid-template-columns: 306px minmax(540px, 1fr) 338px;
  gap: 14px;
  height: 742px;
}

.conversation-list,
.chat-panel,
.support-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.conversation-list {
  display: grid;
  grid-template-rows: auto 1fr;
}

.list-tools {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.conversation-rows {
  overflow: auto;
  padding: 8px 10px;
}

.conversation-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  padding: 10px 9px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
}

.conversation-row.active {
  background: var(--purple-ghost);
  border-color: #eadcff;
}

.conversation-row:hover {
  background: #faf9ff;
}

.conversation-row strong {
  display: block;
  font-weight: 600;
}

.unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--purple);
  vertical-align: 1px;
}

.conversation-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.chat-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-title {
  display: flex;
  gap: 13px;
  align-items: center;
}

.chat-actions {
  display: flex;
  gap: 8px;
}

.chat-body {
  overflow: auto;
  padding: 16px 18px 12px;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(180deg, rgba(111, 53, 232, .04), transparent) border-box;
}

.message {
  max-width: 72%;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  position: relative;
}

.message.customer {
  background: #f5f5f8;
  border-bottom-left-radius: 5px;
}

.message.agent,
.message.ai {
  margin-left: auto;
  background: #efe8ff;
  border-bottom-right-radius: 5px;
}

.message.ai {
  border: 1px solid #dfd0ff;
}

.message.ai.internal-only-draft {
  max-width: 74%;
  background: #f4edff;
  border-color: #d9c8ff;
}

.message.ai.internal-only-draft p {
  margin-top: 8px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.compact-ai-assist {
  max-width: 82%;
}

.assistant-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-top: 10px;
  padding: 9px;
  border-radius: 9px;
  background: rgba(255,255,255,.64);
  color: #665e74;
  font-size: 12px;
}

.assistant-mini-grid span,
.assistant-mini-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.manual-flow-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfd;
}

.manual-flow-strip > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 12px;
  border-right: 1px solid #e7e9f0;
  background: transparent;
}

.manual-flow-strip > div:last-child {
  border-right: 0;
  padding-right: 0;
}

.manual-flow-strip strong,
.manual-flow-strip span {
  overflow-wrap: anywhere;
}

.manual-flow-strip span {
  color: var(--muted);
  font-size: 12px;
}

.manual-action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 16px 10px;
  background: #fbfbfd;
  border-bottom: 1px solid var(--line);
}

.manual-action-bar button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.chat-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfd;
}

.chat-toolbar-status,
.chat-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.chat-toolbar-actions {
  justify-content: flex-end;
}

.chat-toolbar .button,
.chat-toolbar .inline-status {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.chat-date-separator {
  width: max-content;
  margin: 0 auto 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f0f2f7;
  color: #858c99;
  font-size: 11px;
  font-weight: 800;
}

.staff-reply-workspace {
  margin: 6px 0 12px auto;
  max-width: 78%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dde4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.staff-reply-workspace p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.38;
}

.staff-reply-meta {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.draft-header {
  display: grid;
  gap: 4px;
}

.draft-header span {
  color: #7b718d;
  font-size: 12px;
  font-weight: 700;
}

.message small {
  display: block;
  margin-top: 7px;
  color: #8a8f9e;
  text-align: right;
}

.chat-boundary-pills {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  margin: -2px 0 8px auto;
  max-width: 80%;
}

.internal-note {
  margin: 8px 0 18px auto;
  max-width: 78%;
  border: 1px dashed #d9c8ff;
  background: #faf7ff;
  border-radius: 12px;
  padding: 12px 14px;
  color: #5b536b;
}

.internal-visibility-note {
  background: #f7faff;
  border-color: #d8e7ff;
}

.customer-facing-preview {
  background: #f8fff9;
  border-color: #cdeed4;
}

.customer-facing-preview p {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.composer {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  align-items: end;
}

.composer-box textarea {
  border: 0;
  outline: none;
  min-height: 42px;
  resize: none;
}

.composer .head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.composer .head-actions .inline-status {
  min-height: 28px;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.context-tabs button {
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 11px 4px;
  color: #5e6574;
  font-size: 12px;
}

.context-tabs button.active {
  color: #fff;
  background: var(--purple);
}

.support-panel {
  display: grid;
  grid-template-rows: auto 1fr;
}

.support-content {
  padding: 13px;
  overflow: auto;
}

.profile-block {
  display: grid;
  gap: 14px;
}

.profile-head {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 13px;
  align-items: center;
}

.big-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111827;
}

.field-list {
  display: grid;
  gap: 12px;
}

.field-line {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #2f3440;
}

.field-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.field-line span:first-child {
  color: #89909e;
  font-size: 12px;
}

.compact-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  background: #fff;
}

.item-stack {
  display: grid;
  gap: 9px;
}

.item-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.item-card.compact-item {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
  border-radius: 9px;
}

.product-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  border: 1px dashed #c7cbd6;
  display: grid;
  place-items: center;
  color: #8a90a0;
  background: linear-gradient(135deg, #fafafa, #f0edf8);
  font-weight: 700;
  font-size: 11px;
}

.compact-item .product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-size: 10px;
}

.item-title-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 6px;
}

.item-title-line strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
}

.item-url {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 7px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f8f9fc;
  color: #647084;
  font-size: 11px;
  line-height: 1.25;
}

.item-url span {
  color: #8b92a1;
}

.item-url strong {
  min-width: 0;
  color: #343946;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.item-mini-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  margin-top: 7px;
}

.item-mini-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  border: 1px solid #edf0f5;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.25;
}

.item-mini-field span {
  color: #8b92a1;
}

.item-mini-field strong {
  min-width: 0;
  color: #2f3440;
  overflow-wrap: anywhere;
}

.compact-item .badge {
  justify-self: end;
  max-width: 132px;
  height: auto;
  min-height: 21px;
  white-space: normal;
  line-height: 1.15;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.item-field {
  border: 1px solid #eef0f4;
  border-radius: 8px;
  padding: 7px;
  font-size: 12px;
}

.item-field span {
  display: block;
  color: #8b92a1;
  margin-bottom: 3px;
}

.split-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.settings-layout .split-page {
  grid-template-columns: minmax(0, 1fr) 350px;
}

.settings-layout th,
.settings-layout td {
  padding-left: 12px;
  padding-right: 12px;
}

.knowledge-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.dense-table th,
.dense-table td {
  padding: 13px 10px;
  font-size: 13px;
}

.dense-table th {
  font-size: 11px;
}

.ticket-table th,
.ticket-table td,
.ticket-type-table th,
.ticket-type-table td {
  padding: 11px 8px;
  font-size: 12px;
  line-height: 1.35;
}

.ticket-table th,
.ticket-type-table th {
  font-size: 10px;
  letter-spacing: 0;
}

.ticket-table .badge,
.ticket-type-table .badge {
  white-space: nowrap;
}

.ticket-table .button,
.ticket-type-table .button {
  min-height: 30px;
  padding: 0 10px;
}

.ticket-type-table td {
  vertical-align: top;
}

.settings-menu {
  padding: 18px;
}

.settings-menu button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.settings-menu button.active {
  background: var(--purple-ghost);
  color: var(--purple);
}

.settings-menu small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 430px;
  height: 100vh;
  background: #fff;
  box-shadow: -16px 0 50px rgba(27, 31, 45, .16);
  border-left: 1px solid var(--line);
  z-index: 30;
  transform: translateX(110%);
  transition: .2s ease;
  display: grid;
  grid-template-rows: auto 1fr;
}

.drawer.open { transform: translateX(0); }

.drawer-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.drawer-body {
  padding: 18px 20px;
  overflow: auto;
}

.drawer .head-actions {
  flex-wrap: wrap;
}

.drawer .button {
  white-space: normal;
  line-height: 1.25;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 34, .2);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 20;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 350px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, .24);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: .2s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden { display: none !important; }

.kpi-action,
.alert-tile,
.mini-row,
.compact-card,
.chart-click,
.link-button {
  font: inherit;
  color: inherit;
  text-align: left;
}

.kpi-action,
.alert-tile,
.mini-row,
.compact-card,
.chart-click {
  cursor: pointer;
}

.kpi-action:hover,
.alert-tile:hover,
.mini-row:hover,
.compact-card:hover,
.chart-click:hover {
  border-color: rgba(111, 53, 232, .36);
  box-shadow: 0 12px 34px rgba(111, 53, 232, .1);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--purple);
  padding: 0;
  font-weight: 700;
  cursor: pointer;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.chip.active,
.chip:hover {
  background: var(--purple-ghost);
  color: var(--purple);
  border-color: rgba(111, 53, 232, .24);
}

.filter-board {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 12px;
  margin: -4px 0 12px;
}

.filter-block {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 11px 12px;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-title strong {
  color: var(--ink);
  font-size: 13px;
}

.filter-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid #cfe0ff;
  background: #f7faff;
  border-radius: 10px;
  color: var(--blue);
}

.filter-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--purple-ghost);
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.empty-state {
  border: 1px dashed #cfd6e6;
  border-radius: 12px;
  padding: 18px;
  background: #fafbfe;
  color: var(--muted);
}

.selected-row {
  background: #f7f2ff;
}

.drawer-sub {
  overflow-wrap: anywhere;
}

.fact-note {
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid #dbe8ff;
  background: #f6faff;
  border-radius: 8px;
}

.fact-note strong {
  display: block;
  color: #254b85;
  margin-bottom: 5px;
}

.fact-note p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.flag-section {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}

.flag-section > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.flag-section > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.flag-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid #ffd4a3;
  border-radius: 8px;
  background: #fff8ee;
  color: #8a4f08;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.flag-chip small {
  color: #9a6a2f;
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.outcome-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.outcome-controls .button {
  min-height: 38px;
  white-space: normal;
  text-align: center;
}

.badge.blue {
  background: #edf4ff;
  color: #2f6fe4;
}

.clickable-badge {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.po-route-hint,
.po-flow-explanation {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #ffd0d5;
  border-radius: 8px;
  background: #fff7f8;
  color: #7c2d38;
}

.po-route-hint span,
.po-flow-explanation p {
  margin: 0;
  color: #8f4b54;
  font-size: 12px;
  line-height: 1.45;
}

.po-route-hint .button {
  justify-self: start;
}

.button.compact {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.ticket-row-focused {
  outline: 2px solid #f4a7b4;
  outline-offset: -2px;
  background: #fff8fa;
}

.po-decision-outcome {
  border-color: #dbe4f0;
  background: #f8fafc;
}

.po-decision-outcome.active {
  border-color: #b8d6ff;
  background: #f5f9ff;
}

.po-review-controls-block {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.po-review-controls-block > strong {
  color: var(--text);
}

.po-review-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.po-review-controls .button {
  white-space: normal;
  min-height: 38px;
}

.po-subtabs {
  margin-top: 12px;
}

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

.row-actions .button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.staff-accounts-layout {
  margin-top: 8px;
}

.staff-table-card {
  width: 100%;
}

.staff-table-card .card-head {
  padding: 12px 14px 8px;
}

.staff-accounts-table th,
.staff-accounts-table td {
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.22;
}

.staff-accounts-table th {
  white-space: nowrap;
}

.staff-accounts-table td {
  vertical-align: middle;
}

.staff-accounts-table .badge {
  min-height: 18px;
  padding: 2px 6px;
  font-size: 11px;
  white-space: nowrap;
}

.staff-accounts-table .nowrap {
  white-space: nowrap;
}

.staff-actions-cell {
  width: 275px;
}

.staff-action-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.staff-action-group .button {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 11px;
  white-space: nowrap;
}

.staff-action-menu {
  height: 26px;
  max-width: 118px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  padding: 3px 7px;
}

.login-screen {
  display: none;
}

body.auth-preview {
  background: #f5f6fa;
}

body.auth-preview .shell {
  display: none;
}

body.auth-preview .login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-shell {
  width: min(520px, 100%);
}

.login-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.login-copy {
  grid-column: 1;
  padding-top: 2px;
}

.login-copy h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
}

.login-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-language {
  grid-column: 1;
  justify-self: start;
  margin-top: 12px;
}

.login-panel {
  grid-column: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  overflow: hidden;
}

.login-panel .card-head {
  padding: 15px 18px 6px;
  align-items: flex-start;
}

.login-panel .card-head h2 {
  margin: 0;
  font-size: 18px;
}

.login-panel .card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-form-grid .full {
  grid-column: 1 / -1;
}

.auth-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

.login-boundary {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.login-boundary-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d9cbff;
  border-radius: 8px;
  background: #f8f5ff;
  color: #565c6b;
  font-size: 12px;
  line-height: 1.45;
}

.login-tabs {
  display: none;
  grid-column: 1;
  gap: 7px;
  margin-top: 12px;
}

.login-tabs button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 6px 10px;
}

.login-tabs button.active {
  border-color: #cdbdff;
  background: #f4efff;
  color: var(--purple);
  font-weight: 800;
}

.auth-back {
  display: none;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--purple);
  font-weight: 750;
  padding: 4px 0;
  cursor: pointer;
}

.auth-back-link {
  margin-top: 10px;
}

.auth-disabled-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ffd3d8;
  border-radius: 9px;
  background: #fff7f8;
}

.auth-disabled-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.archive-rule-note {
  border-color: #dbe8ff;
  background: #f6faff;
}
