:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --sidebar-bg: rgba(255, 255, 255, 0.88);
  --chat-bg: #f9fbfb;
  --panel: #ffffff;
  --panel-soft: #f9fbfb;
  --panel-strong: #eef4f2;
  --bubble-in-bg: #ffffff;
  --bubble-out-bg: #147d7e;
  --line: #dfe6e5;
  --line-strong: #cbd7d5;
  --text: #20282f;
  --text-strong: #111820;
  --muted: #697680;
  --muted-soft: #8a969e;
  --accent: #b74b37;
  --accent-strong: #7d2f23;
  --accent-soft: #fff0cf;
  --accent-tint: #fff6df;
  --gold: #b98516;
  --gold-soft: #fff3cf;
  --danger: #c94343;
  --danger-soft: #ffe8e8;
  --shadow: 0 16px 40px rgba(30, 50, 60, 0.08);
  --warm-bg: #5b2b18;
  --warm-bg-deep: #31170f;
  --warm-shell: #7a3d1d;
  --warm-shell-strong: #552819;
  --warm-line: #b57740;
  --warm-gold: #ffd66e;
  --warm-gold-deep: #b66b1f;
  --warm-cream: #fff0cf;
  --warm-cream-strong: #fff7df;
  --warm-cream-muted: rgba(255, 240, 207, 0.78);
  --warm-cream-soft: rgba(255, 240, 207, 0.14);
  --warm-glow: rgba(255, 214, 110, 0.2);
  --warm-glow-soft: rgba(255, 214, 110, 0.12);
  --warm-overlay: rgba(49, 23, 15, 0.28);
  --warm-overlay-soft: rgba(49, 23, 15, 0.16);
  --warm-shadow: rgba(27, 10, 5, 0.24);
  --royal: #2e219a;
  --window-scale: 1;
  --fs-10: 15px;
  --fs-11: 17px;
  --fs-12: 18px;
  --fs-13: 20px;
  --fs-14: 21px;
  --fs-15: 23px;
  --fs-16: 24px;
  --fs-18: 27px;
  --fs-19: 29px;
  --fs-20: 30px;
  --fs-21: 32px;
  --fs-22: 33px;
  --fs-26: 39px;
  --sidebar-min: 440px;
  --sidebar-max: 500px;
  --topbar-min: 172px;
  --topbar-margin: 11px;
  --topbar-pad-y: 21px;
  --topbar-pad-x: 23px;
  --chat-header-min: 120px;
  --chat-pad-y: 19px;
  --chat-pad-x: 23px;
  --bulk-heading-width: 215px;
  --bulk-pad-y: 17px;
  --bulk-pad-x: 21px;
  --bulk-textarea-height: 82px;
  --bulk-time-width: 240px;
  --bulk-button-width: 130px;
  --control-height: 60px;
  --bot-card-min: 104px;
  --bot-card-pad: 17px;
  --bot-card-gap: 12px;
  --bot-rank-size: 58px;
  --bot-count-height: 72px;
  --list-tools-pad-y: 14px;
  --list-tools-pad-x: 16px;
  --messages-pad: 29px;
  --messages-workspace-pad-y: 21px;
  --messages-workspace-pad-x: 26px;
  --stage-pad: 31px;
  --workspace-hero-min: 154px;
  --workspace-hero-pad: 22px;
  --workspace-rank-min: 114px;
  --workspace-rank-pad-x: 19px;
  --workspace-rank-height: 65px;
  --summary-card-min: 102px;
  --customer-card-min: 128px;
  --customer-card-pad: 17px;
  --customer-grid-min: 230px;
  --ui-gap: 16px;
  --reply-height: 120px;
  --reply-button-width: 128px;
  --reply-pad-y: 18px;
  --reply-pad-x: 21px;
  --brand-mark-size: 66px;
  --icon-btn-size: 60px;
  --account-strip-min: 54px;
  --admin-width: 620px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 14%, var(--warm-glow), transparent 28%),
    linear-gradient(135deg, var(--warm-shell) 0%, var(--warm-bg) 46%, var(--warm-bg-deep) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app {
  font-size: var(--fs-13);
  display: grid;
  grid-template-columns: minmax(var(--sidebar-min), var(--sidebar-max)) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: var(--warm-overlay-soft);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(20, 125, 126, 0.08), rgba(245, 247, 246, 0) 300px),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.login-brand {
  margin-bottom: 4px;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: var(--fs-13);
  font-weight: 700;
}

.login-card input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel-soft);
  outline: 0;
}

.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.login-card button,
.staff-form button,
.knowledge-form button,
.staff-actions button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.login-card button:disabled {
  opacity: 0.65;
  cursor: default;
}

.login-error {
  min-height: 20px;
  color: var(--danger);
  font-weight: 700;
}

.sidebar {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--warm-glow-soft), transparent 220px),
    linear-gradient(180deg, var(--warm-shell), var(--warm-bg-deep));
  border-right: 1px solid var(--warm-glow);
  display: flex;
  flex-direction: column;
  box-shadow: 14px 0 34px rgba(25, 10, 5, 0.28);
}

.topbar {
  min-height: var(--chat-header-min);
  padding: var(--topbar-pad-y) var(--topbar-pad-x);
  border-bottom: 1px solid var(--warm-glow);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
}

.chat-header {
  min-height: var(--chat-header-min);
  padding: var(--chat-pad-y) var(--chat-pad-x);
  border-bottom: 1px solid rgba(181, 119, 64, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  min-height: var(--topbar-min);
  margin: var(--topbar-margin) var(--topbar-margin) calc(var(--topbar-margin) - 2px);
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 18%, var(--warm-glow), transparent 34%),
    linear-gradient(135deg, var(--warm-shell), var(--warm-bg));
  box-shadow: inset 0 1px 0 var(--warm-cream-soft), 0 16px 34px var(--warm-shadow);
}

.account-strip {
  min-height: var(--account-strip-min);
  padding: 0 18px;
  border-top: 1px solid var(--warm-glow-soft);
  border-bottom: 1px solid var(--warm-glow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--warm-cream-muted);
  background: var(--warm-overlay);
  font-size: var(--fs-12);
}

.account-strip button {
  border: 0;
  background: transparent;
  color: var(--warm-gold);
  cursor: pointer;
  font-weight: 800;
}

.top-actions,
.chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.top-actions {
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.topbar {
  flex-direction: column;
}

.topbar .brand {
  align-items: flex-start;
}

.topbar .brand h1 {
  white-space: nowrap;
}

.topbar .brand > div {
  min-width: 0;
}

.brand-mark {
  width: var(--brand-mark-size);
  height: var(--brand-mark-size);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--warm-cream), var(--warm-gold));
  color: var(--warm-shell-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-14);
  font-weight: 800;
  flex: 0 0 auto;
  box-shadow: 0 10px 24px rgba(20, 125, 126, 0.22);
}

.sidebar h1 {
  color: var(--warm-cream-strong);
}

.sidebar p {
  color: var(--warm-cream-muted);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--text-strong);
  font-size: var(--fs-21);
  line-height: 1.2;
}

h2 {
  color: var(--text-strong);
  font-size: var(--fs-21);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

h3 {
  color: var(--text-strong);
  font-size: var(--fs-18);
  line-height: 1.3;
}

p {
  color: var(--muted);
  font-size: var(--fs-13);
  line-height: 1.45;
  margin-top: 5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
  margin-right: 7px;
  vertical-align: 1px;
  box-shadow: 0 0 0 4px rgba(185, 133, 22, 0.12);
}

.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 125, 126, 0.12);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(201, 67, 67, 0.12);
}

.icon-btn {
  width: var(--icon-btn-size);
  height: var(--icon-btn-size);
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(25, 40, 45, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.icon-btn:hover:not(:disabled) {
  background: var(--accent-tint);
  border-color: rgba(20, 125, 126, 0.3);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.text-btn {
  height: var(--control-height);
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(25, 40, 45, 0.06);
}

.text-btn:hover:not(:disabled) {
  background: var(--accent-tint);
  border-color: rgba(20, 125, 126, 0.3);
  color: var(--accent-strong);
}

.topbar .text-btn,
.topbar .icon-btn,
.chat-actions .text-btn,
.chat-actions .icon-btn {
  border-color: var(--warm-glow);
  background: linear-gradient(180deg, var(--warm-cream), var(--warm-gold));
  color: var(--warm-shell-strong);
  box-shadow: 0 8px 18px var(--warm-shadow);
}

.topbar .text-btn:hover:not(:disabled),
.topbar .icon-btn:hover:not(:disabled),
.chat-actions .text-btn:hover:not(:disabled),
.chat-actions .icon-btn:hover:not(:disabled) {
  border-color: var(--warm-gold);
  background: linear-gradient(180deg, var(--warm-cream-strong), var(--warm-gold));
  color: var(--warm-shell-strong);
}

.color-chip-btn {
  font-size: 0;
}

.color-swatch {
  width: calc(var(--icon-btn-size) * 0.52);
  height: calc(var(--icon-btn-size) * 0.52);
  border-radius: 8px;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 5px 14px var(--warm-shadow);
  display: block;
}

.text-btn.danger:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: rgba(201, 67, 67, 0.3);
  color: var(--danger);
}

.admin-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: min(var(--admin-width), 100vw);
  height: 100vh;
  font-size: var(--fs-13);
  overflow: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -18px 0 48px rgba(25, 40, 45, 0.16);
}

.admin-panel header {
  min-height: 78px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.staff-form {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--panel-soft);
}

.knowledge-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.data-feed-button {
  margin: 12px var(--topbar-margin);
  padding: 14px;
  border: 1px solid rgba(255, 214, 110, 0.35);
  border-radius: 8px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 74%, white 8%), color-mix(in srgb, var(--accent) 94%, black 10%));
  color: #fff5df;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.data-feed-button strong {
  display: block;
  font-size: var(--fs-18);
  line-height: 1.2;
}

.data-feed-button span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 245, 223, 0.78);
  font-size: var(--fs-12);
}

.data-feed-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.data-feed-actions button {
  height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(255, 245, 223, 0.35);
  border-radius: 8px;
  background: rgba(255, 245, 223, 0.14);
  color: #fff5df;
  font-size: var(--fs-12);
  white-space: nowrap;
}

.feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.feed-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.feed-card strong {
  display: block;
  color: var(--text-strong);
  font-size: var(--fs-16);
}

.feed-card span,
.feed-status {
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.4;
}

.feed-card input,
.feed-card select {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--text);
  outline: 0;
}

.feed-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: var(--fs-12);
}

.feed-card button {
  min-height: 40px;
  padding: 0 12px;
}

.feed-inline {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 8px;
}

.knowledge-form input[type="file"] {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel-soft);
}

.knowledge-form button {
  padding: 0 14px;
}

.section-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-12);
}

.staff-form input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  outline: 0;
  background: var(--panel);
}

.staff-form button {
  grid-column: span 2;
}

.admin-section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.staff-list,
.knowledge-list,
.audit-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.staff-row,
.knowledge-row,
.audit-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.staff-row,
.knowledge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-row strong,
.knowledge-row strong,
.audit-row strong {
  display: block;
  color: var(--text-strong);
  font-size: var(--fs-14);
  line-height: 1.35;
}

.staff-row span,
.knowledge-row span,
.knowledge-row time,
.audit-row span,
.audit-row time {
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.4;
}

.staff-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.staff-actions button {
  height: 34px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

.knowledge-row button {
  height: 34px;
  border: 1px solid rgba(201, 67, 67, 0.25);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  font-weight: 800;
  padding: 0 10px;
  flex: 0 0 auto;
}

.audit-row p {
  margin-top: 8px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.theme-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.theme-panel label {
  color: var(--muted);
  font-size: var(--fs-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.theme-panel input[type="color"] {
  width: 34px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
}

.theme-panel button {
  grid-column: 1 / -1;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.bot-panel {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 14px 14px;
  border-bottom: 1px solid var(--warm-glow-soft);
  background: var(--warm-overlay-soft);
  display: flex;
  flex-direction: column;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 8px;
}

.panel-heading strong {
  color: var(--warm-cream-strong);
  font-size: var(--fs-14);
  line-height: 1.2;
}

.panel-heading span {
  color: var(--warm-gold);
  font-size: var(--fs-12);
  font-weight: 800;
}

.bot-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(max(100px, var(--bot-card-min)), 1fr);
  gap: var(--bot-card-gap);
}

.bot-card {
  min-width: 0;
  min-height: max(100px, var(--bot-card-min));
  border: 1px solid var(--warm-line);
  border-radius: 8px;
  background-color: var(--warm-shell);
  background-image:
    linear-gradient(180deg, rgba(255, 245, 222, 0.18), rgba(42, 17, 9, 0.2)),
    linear-gradient(135deg, var(--warm-glow-soft), transparent 50%);
  color: var(--warm-cream-strong);
  padding: var(--bot-card-pad);
  display: grid;
  grid-template-columns: var(--bot-rank-size) minmax(0, 1fr) calc(var(--bot-count-height) + 8px);
  align-items: center;
  gap: var(--bot-card-gap);
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 222, 0.2),
    inset 0 -1px 0 rgba(43, 16, 8, 0.2),
    0 12px 20px var(--warm-shadow);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.bot-card:hover,
.bot-card.active {
  border-color: var(--warm-gold);
  background-color: var(--warm-gold-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 222, 0.28),
    0 16px 30px var(--warm-shadow);
}

.bot-card:hover {
  transform: translateY(-1px);
}

.bot-rank {
  width: var(--bot-rank-size);
  height: var(--bot-rank-size);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--warm-gold), var(--warm-gold-deep));
  color: var(--warm-bg-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-20);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.bot-card.active .bot-rank {
  background: linear-gradient(135deg, var(--warm-cream), var(--warm-gold));
  color: var(--warm-shell-strong);
}

.bot-body {
  min-width: 0;
}

.bot-menu-label {
  display: block;
  margin-bottom: 4px;
  color: var(--warm-gold);
  font-size: var(--fs-11);
  line-height: 1.2;
  font-weight: 900;
}

.bot-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bot-name-row strong {
  min-width: 0;
  color: var(--warm-cream-strong);
  font-size: var(--fs-15);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-state {
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-10);
  font-weight: 900;
  flex: 0 0 auto;
}

.bot-state.online {
  background: var(--warm-cream-soft);
  color: var(--warm-cream);
}

.bot-state.offline {
  background: var(--danger-soft);
  color: var(--danger);
}

.bot-username,
.bot-empty {
  margin-top: 5px;
  color: var(--warm-cream-muted);
  font-size: var(--fs-11);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-window-size="compact"] .bot-username {
  display: none;
}

:root[data-window-size="compact"] .bot-menu-label {
  margin-bottom: 2px;
}

:root[data-window-size="compact"] .bot-stats {
  margin-top: 5px;
}

.bot-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--warm-cream-strong);
  font-size: var(--fs-11);
  line-height: 1.2;
  font-weight: 800;
}

.bot-stats span {
  min-width: 0;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warm-cream-soft);
  color: var(--warm-cream);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.bot-stats span:first-child {
  background: var(--warm-cream-soft);
  color: var(--warm-cream);
}

.bot-stats span:last-child {
  background: var(--warm-glow);
  color: var(--warm-gold);
}

.bot-count-pill {
  min-width: 0;
  height: var(--bot-count-height);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--warm-gold), var(--warm-gold-deep));
  color: var(--warm-bg-deep);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  font-weight: 900;
}

.bot-count-pill strong {
  color: inherit;
  font-size: var(--fs-19);
  line-height: 1;
}

.bot-count-pill span {
  font-size: var(--fs-10);
  line-height: 1.1;
  white-space: nowrap;
}

.bot-card.active .bot-count-pill {
  background: linear-gradient(180deg, var(--warm-cream), var(--warm-gold));
  color: var(--warm-shell-strong);
}

.bot-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--warm-glow);
  border-radius: 8px;
  background: var(--warm-cream-soft);
  text-align: center;
}

.list-tools {
  display: none;
  padding: var(--list-tools-pad-y) var(--list-tools-pad-x) calc(var(--list-tools-pad-y) - 2px);
  border-bottom: 1px solid var(--warm-glow-soft);
  background: var(--warm-overlay-soft);
}

.search {
  height: 42px;
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background: var(--warm-cream);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search input::placeholder,
textarea::placeholder {
  color: var(--muted-soft);
}

.contact-count {
  margin-top: 10px;
  color: var(--warm-cream-muted);
  font-size: var(--fs-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selection-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--warm-cream-muted);
  font-size: var(--fs-12);
}

.select-all {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.selection-tools button {
  border: 0;
  background: transparent;
  color: var(--warm-gold);
  cursor: pointer;
  font-size: var(--fs-12);
  font-weight: 800;
  padding: 4px 0;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

.contacts {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px 18px;
  background: var(--warm-overlay-soft);
}

.contact-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 0 6px 0 4px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.contact-item + .contact-item {
  margin-top: 4px;
}

.contact-item:hover {
  background: var(--warm-cream-soft);
  border-color: var(--warm-glow);
}

.contact-item.active {
  background: var(--warm-glow-soft);
  border-color: var(--warm-glow);
  box-shadow: 0 10px 28px var(--warm-shadow);
}

.contact-check {
  width: 16px;
  height: 16px;
  margin: 0 auto;
}

.contact {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--warm-cream-strong);
  text-align: left;
  padding: 12px 6px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--warm-cream);
  color: var(--warm-shell-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  overflow: hidden;
}

.contact-item.active .avatar {
  background: var(--warm-gold);
  color: var(--warm-shell-strong);
}

.contact-body {
  min-width: 0;
}

.contact-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--warm-cream-strong);
  font-weight: 800;
  line-height: 1.25;
}

.contact-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-12);
  font-weight: 800;
  flex: 0 0 auto;
}

.tag,
.bot-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: var(--fs-11);
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.tag {
  background: var(--gold-soft);
  color: var(--gold);
}

.bot-tag {
  margin-right: 6px;
  background: var(--warm-cream-soft);
  color: var(--warm-gold);
}

.contact-meta,
.contact-last {
  color: var(--warm-cream-muted);
  font-size: var(--fs-12);
  line-height: 1.35;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-last {
  color: var(--warm-cream);
}

.empty-list {
  margin: 16px 6px;
  padding: 26px 14px;
  border: 1px dashed var(--warm-glow);
  border-radius: 8px;
  color: var(--warm-cream-muted);
  text-align: center;
  background: var(--warm-cream-soft);
}

.chat {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 80% 10%, var(--warm-glow-soft), transparent 30%),
    linear-gradient(135deg, var(--warm-shell) 0%, var(--warm-bg) 38%, var(--warm-bg-deep) 100%);
}

.chat-header {
  background:
    linear-gradient(180deg, var(--warm-cream-soft), var(--warm-overlay-soft)),
    var(--warm-overlay);
}

.chat-header h2 {
  color: var(--warm-cream-strong);
}

.chat-header p {
  color: var(--warm-cream-muted);
}

.chat-header > div {
  min-width: 0;
}

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

.back-btn {
  width: var(--icon-btn-size);
  height: var(--icon-btn-size);
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--warm-cream), var(--warm-gold));
  color: var(--warm-shell-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-22);
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px var(--warm-shadow);
}

.back-btn:hover {
  border-color: var(--warm-gold);
  background: linear-gradient(180deg, var(--warm-cream-strong), var(--warm-gold));
}

.funds-panel {
  padding: 14px var(--bulk-pad-x);
  border-bottom: 1px solid var(--warm-glow);
  background: rgba(255, 240, 207, 0.08);
  display: grid;
  gap: 10px;
}

.funds-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.funds-heading strong {
  display: block;
  color: var(--warm-cream-strong);
  font-size: var(--fs-14);
  line-height: 1.2;
}

.funds-heading span {
  display: block;
  margin-top: 4px;
  color: var(--warm-cream-muted);
  font-size: var(--fs-12);
}

.funds-heading button,
.funds-actions button,
.bonus-form button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: var(--warm-cream-strong);
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
}

.funds-heading button:disabled,
.funds-actions button:disabled,
.bonus-form button:disabled {
  opacity: 0.58;
  cursor: default;
}

.funds-grid,
.bonus-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) repeat(4, minmax(92px, 0.7fr)) minmax(150px, 1fr);
  gap: 8px;
  align-items: end;
}

.funds-grid label,
.bonus-form label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--warm-cream-muted);
  font-size: var(--fs-11);
  font-weight: 800;
}

.funds-grid input,
.funds-grid select,
.bonus-form input,
.bonus-form select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background: var(--warm-cream);
  color: var(--warm-bg-deep);
  padding: 0 9px;
  outline: none;
}

.fund-note-field {
  grid-column: auto;
}

.funds-actions {
  display: flex;
  justify-content: flex-end;
}

.bonus-form {
  grid-template-columns: minmax(90px, 0.7fr) minmax(92px, 0.7fr) minmax(130px, 0.8fr) minmax(150px, 1fr) auto;
}

.fund-request-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.fund-request-row,
.fund-empty,
.bonus-review-row {
  border: 1px solid rgba(255, 214, 110, 0.2);
  border-radius: 8px;
  background: rgba(255, 240, 207, 0.12);
  padding: 10px;
}

.fund-request-row strong,
.bonus-review-row strong {
  display: block;
  color: var(--warm-cream-strong);
  font-size: var(--fs-12);
  line-height: 1.3;
}

.fund-request-row span,
.fund-request-row time,
.fund-empty,
.bonus-review-row span,
.bonus-review-row time {
  display: block;
  margin-top: 4px;
  color: var(--warm-cream-muted);
  font-size: var(--fs-11);
  line-height: 1.35;
}

.bonus-review-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.bonus-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-color: var(--line);
  background: var(--panel-soft);
}

.bonus-review-row strong {
  color: var(--text-strong);
  font-size: var(--fs-14);
}

.bonus-review-row span,
.bonus-review-row time {
  color: var(--muted);
  font-size: var(--fs-12);
}

.bonus-review-row p {
  margin-top: 6px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.review-result {
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.bulk-panel {
  padding: var(--bulk-pad-y) var(--bulk-pad-x);
  border-bottom: 1px solid var(--warm-glow);
  background: var(--warm-overlay);
  display: grid;
  grid-template-columns: var(--bulk-heading-width) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.bulk-heading {
  min-width: 0;
}

.bulk-heading strong {
  display: block;
  color: var(--warm-cream-strong);
  font-size: var(--fs-14);
  line-height: 1.2;
}

.bulk-heading span {
  display: block;
  margin-top: 4px;
  color: var(--warm-cream-muted);
  font-size: var(--fs-12);
}

.bulk-panel textarea {
  height: var(--bulk-textarea-height);
  background: var(--warm-cream);
  color: var(--warm-bg-deep);
  border-color: var(--warm-glow);
}

.bulk-actions {
  display: grid;
  grid-template-columns: var(--bulk-time-width) var(--bulk-button-width) var(--bulk-button-width);
  gap: 8px;
  align-items: center;
}

.bulk-actions input {
  min-width: 0;
  height: var(--control-height);
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background: var(--warm-cream);
  color: var(--warm-bg-deep);
  padding: 0 10px;
  outline: none;
}

.bulk-actions button {
  min-width: 0;
  height: var(--control-height);
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: var(--warm-cream-strong);
  cursor: pointer;
  font-weight: 800;
}

.bulk-actions button:hover {
  background: var(--accent-strong);
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: var(--messages-pad);
  background:
    linear-gradient(180deg, var(--warm-cream-soft), var(--warm-overlay-soft)),
    radial-gradient(circle at 12px 12px, var(--warm-glow-soft) 1px, transparent 1px);
  background-size: auto, 24px 24px;
}

.messages.empty {
  color: var(--warm-cream-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.messages.bot-workspace {
  padding: var(--messages-workspace-pad-y) var(--messages-workspace-pad-x) var(--messages-pad);
}

.bot-overview {
  display: grid;
  gap: var(--ui-gap);
  align-content: start;
}

.bot-stage {
  min-height: 100%;
  border: 1px solid var(--warm-glow-soft);
  border-radius: 8px;
  background:
    linear-gradient(180deg, var(--warm-bg), var(--warm-bg-deep)),
    radial-gradient(circle at 50% 0%, var(--warm-glow-soft), transparent 38%);
  padding: var(--stage-pad);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 222, 0.08),
    0 18px 40px var(--warm-shadow);
}

.bot-workspace-hero {
  height: var(--workspace-hero-min);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background-color: var(--warm-shell);
  background-image:
    linear-gradient(135deg, var(--warm-glow), transparent 58%),
    linear-gradient(180deg, rgba(255, 245, 222, 0.12), rgba(42, 17, 9, 0.16));
  padding: var(--workspace-hero-pad);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ui-gap);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 222, 0.16),
    0 16px 34px var(--warm-shadow);
}

.workspace-rank {
  min-width: var(--workspace-rank-min);
  height: var(--workspace-rank-height);
  padding: 0 var(--workspace-rank-pad-x);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: var(--warm-cream-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-14);
  font-weight: 900;
  white-space: nowrap;
}

.workspace-title {
  min-width: 0;
}

.workspace-title h3 {
  color: var(--warm-cream-strong);
  overflow-wrap: anywhere;
}

.workspace-title p {
  color: var(--warm-cream-muted);
}

.workspace-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

:root[data-window-size="compact"] .workspace-badges {
  display: none;
}

:root[data-window-size="compact"] .bot-workspace-hero {
  grid-template-columns: auto minmax(0, 1fr);
}

:root[data-window-size="compact"] .workspace-title h3 {
  font-size: var(--fs-16);
  line-height: 1.18;
}

:root[data-window-size="compact"] .workspace-title p {
  margin-top: 3px;
  font-size: var(--fs-11);
  line-height: 1.28;
}

.workspace-badges span {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--warm-cream-soft);
  color: var(--warm-gold);
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-12);
  font-weight: 900;
  border: 1px solid var(--warm-glow);
}

.bot-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: var(--ui-gap);
}

.bot-summary-grid > div {
  min-height: var(--summary-card-min);
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background: var(--warm-cream);
  padding: 14px;
  box-shadow: 0 8px 22px var(--warm-shadow);
}

.bot-summary-grid strong {
  display: block;
  color: var(--text-strong);
  font-size: var(--fs-26);
  line-height: 1.1;
}

.bot-summary-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 800;
}

.bot-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.bot-section-title strong {
  color: var(--warm-cream-strong);
  font-size: var(--fs-15);
}

.bot-section-title span {
  color: var(--warm-cream-muted);
  font-size: var(--fs-12);
  font-weight: 800;
}

.bot-customer-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--customer-grid-min), 1fr));
  gap: var(--ui-gap);
}

.bot-gallery {
  padding: 8px 0 4px;
}

.bot-customer-card {
  min-width: 0;
  min-height: var(--customer-card-min);
  border: 1px solid var(--warm-glow);
  border-radius: 8px;
  background:
    linear-gradient(180deg, var(--warm-cream-strong), var(--warm-cream));
  color: var(--text);
  padding: var(--customer-card-pad);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 26px var(--warm-shadow);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.bot-customer-card:hover {
  border-color: var(--warm-gold);
  background: var(--warm-cream);
  transform: translateY(-1px);
}

.bot-customer-body,
.bot-customer-name,
.bot-customer-meta,
.bot-customer-last {
  min-width: 0;
  display: block;
}

.bot-customer-name {
  color: var(--text-strong);
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-customer-meta,
.bot-customer-last {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-customer-last {
  color: #55616a;
}

.empty-state {
  max-width: 340px;
  text-align: center;
  padding: 24px;
}

.empty-state p {
  margin-top: 8px;
}

.messages .empty-state h3,
.bot-stage .empty-state h3 {
  color: var(--warm-cream-strong);
}

.messages .empty-state p,
.bot-stage .empty-state p {
  color: var(--warm-cream-muted);
}

.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 8px;
  background: rgba(183, 75, 55, 0.34);
  color: var(--warm-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-22);
}

.bubble {
  position: relative;
  width: fit-content;
  min-width: 132px;
  max-width: min(680px, 78%);
  margin: 0 0 14px;
  padding: 12px 14px 10px;
  border-radius: 8px;
  line-height: 1.55;
  word-break: break-word;
  box-shadow: 0 8px 24px rgba(30, 48, 55, 0.07);
}

.bubble-text {
  white-space: pre-wrap;
}

.message-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-soft);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.bubble:hover .message-delete {
  opacity: 1;
}

.message-delete:hover {
  background: rgba(201, 67, 67, 0.12);
  color: var(--danger);
}

.bubble.out .message-delete {
  color: rgba(255, 255, 255, 0.72);
}

.bubble.out .message-delete:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.bubble.in {
  background: var(--bubble-in-bg);
  border: 1px solid var(--line);
  border-top-left-radius: 3px;
}

.bubble.out {
  background: var(--bubble-out-bg);
  color: #fff;
  margin-left: auto;
  border-top-right-radius: 3px;
  box-shadow: 0 10px 26px rgba(20, 125, 126, 0.18);
}

.bubble.out .time {
  color: rgba(255, 255, 255, 0.76);
}

.time {
  color: var(--muted-soft);
  font-size: var(--fs-11);
  line-height: 1.2;
  margin-top: 7px;
}

.reply {
  border-top: 1px solid var(--line);
  padding: var(--reply-pad-y) var(--reply-pad-x);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--reply-button-width);
  gap: var(--ui-gap);
  background: var(--warm-overlay);
  box-shadow: 0 -14px 34px var(--warm-shadow);
}

textarea {
  width: 100%;
  height: var(--reply-height);
  resize: none;
  border: 1px solid var(--line);
  background: var(--warm-cream);
  color: var(--warm-bg-deep);
  border-radius: 8px;
  padding: 13px 14px;
  outline: none;
  line-height: 1.45;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

textarea:focus {
  border-color: var(--warm-line);
  box-shadow: 0 0 0 4px var(--warm-glow-soft);
}

.reply button {
  min-width: 0;
  height: var(--reply-height);
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--warm-cream-strong);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px var(--warm-shadow);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.reply button:hover:not(:disabled) {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px var(--warm-shadow);
}

button:disabled,
textarea:disabled {
  opacity: 0.54;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 1280px) {
  .funds-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bonus-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bonus-form button {
    grid-column: 1 / -1;
  }

  .bulk-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .bulk-actions {
    grid-template-columns: minmax(0, 1fr) var(--bulk-button-width) var(--bulk-button-width);
  }
}

@media (max-width: 520px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 43vh 57vh;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar,
  .chat-header {
    min-height: 72px;
    padding: 14px 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  h1,
  h2 {
    font-size: var(--fs-18);
  }

  .list-tools {
    padding: 10px 12px;
  }

  .contacts {
    padding: 8px;
  }

  .chat {
    min-height: 0;
  }

  .funds-panel {
    padding: 12px;
  }

  .funds-grid,
  .bonus-form {
    grid-template-columns: 1fr 1fr;
  }

  .funds-actions button,
  .bonus-form button {
    width: 100%;
  }

  .bulk-panel {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .bulk-actions {
    grid-template-columns: 1fr 82px 82px;
  }

  .messages {
    padding: 16px 12px;
  }

  .bubble {
    max-width: 86%;
  }

  .reply {
    grid-template-columns: minmax(0, 1fr) 78px;
    padding: 12px;
  }

  textarea,
  .reply button {
    height: 80px;
  }
}

@media (max-width: 460px) {
  .theme-panel {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .chat-actions {
    gap: 6px;
  }

  .text-btn {
    padding: 0 9px;
  }

  .bulk-actions {
    grid-template-columns: 1fr;
  }

  .funds-grid,
  .bonus-form,
  .bonus-review-row {
    grid-template-columns: 1fr;
  }

  .contact {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 10px;
  }

  .contact-item {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

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

  textarea {
    height: 70px;
  }

  .reply button {
    width: 100%;
    height: 44px;
  }
}
