:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #122117;
  --muted: #53665b;
  --line: #dbe5df;
  --emerald: #0b9459;
  --emerald-dark: #087344;
  --emerald-soft: #e8f6ee;
  --dark: #102016;
  --amber: #d97706;
  --amber-soft: #fff4e5;
  --danger: #dc2626;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.22);
}

.brand-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 20% 20%, #163323 0%, #0d1c13 65%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card .brand-name { color: var(--emerald); }
.login-card h1 { font-size: 23px; font-weight: 800; }
.login-sub { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

.demo-creds {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--emerald-soft);
  border: 1px solid #c5e6d3;
  font-size: 12px;
  color: #16402b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-creds code {
  background: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

/* Forms & Buttons */
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 700; color: #2b3d32; }
.field input, .field select, textarea {
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1.5px solid #cbd8d0;
  background: #ffffff;
  color: var(--ink);
}
.field input:focus, .field select:focus, textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(11, 148, 89, 0.14);
}
.form-err { font-size: 12.5px; font-weight: 700; color: var(--danger); }
.form-msg { font-size: 12.5px; font-weight: 700; color: var(--emerald-dark); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 9px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--emerald); color: #ffffff; }
.btn-primary:hover { background: var(--emerald-dark); }
.btn-ghost { background: #ffffff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald-dark); }
.btn-ghost.is-active { background: var(--dark); color: #ffffff; border-color: var(--dark); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-full { width: 100%; }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--dark);
  color: #ffffff;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-tabs { display: flex; align-items: center; gap: 6px; }
.nav-tab {
  border: 0;
  background: transparent;
  color: #b7d2c3;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.nav-tab:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.nav-tab.is-active { background: var(--emerald); color: #ffffff; }

.user-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 700;
  color: #d8efe2;
}

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

.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #bbf7d0;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.online-chip.is-admin {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fde68a;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
  animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.45); }
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  border-left: 2.5px solid #cde5d7;
}

.reply-item {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f2f7f4;
  font-size: 12.5px;
  line-height: 1.4;
}

.reply-item.is-admin {
  background: #e7f6ee;
  border: 1px solid #b6e5cb;
}

.reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.reply-form {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.reply-form input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd8d0;
  font-size: 12px;
}

.topbar .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Main */
.hub-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 24px 48px;
}

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

.section-head h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.muted { font-size: 13.5px; color: var(--muted); }
.muted-xs { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.deck-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--emerald);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(16, 32, 22, 0.04);
}

.deck-card h3 { font-size: 17px; font-weight: 800; line-height: 1.25; }
.deck-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.deck-stats { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-chip {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #edf4f0;
  color: #2c4135;
}
.stat-chip.is-green { background: var(--emerald-soft); color: var(--emerald-dark); }
.stat-chip.is-amber { background: var(--amber-soft); color: #9a3412; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(16, 32, 22, 0.04);
}
.card h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }

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

.table-wrap { overflow-x: auto; }
table.perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.perm-table th, table.perm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.perm-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #f8fbf9;
}

/* Lightweight Messenger-Style Comments */
.comment-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }

.msg-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.msg-wrap.is-mine {
  align-items: flex-end;
}

.msg-line {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 92%;
}

.msg-wrap.is-mine .msg-line {
  flex-direction: row-reverse;
}

.msg-bubble {
  padding: 8px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 32, 22, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-wrap.is-mine .msg-bubble {
  border-radius: 14px 14px 4px 14px;
  background: #e4f6ec;
}

.msg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #74877b;
}

.msg-author {
  font-weight: 700;
  color: #0b7a49;
}

.msg-text {
  font-size: 13.5px;
  line-height: 1.38;
  color: #142116;
  word-break: break-word;
}

.msg-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10.5px;
  color: #7c8f83;
  margin-top: 1px;
}

.msg-status-work { color: #2563eb; font-weight: 700; }
.msg-status-done { color: #0b9459; font-weight: 800; }

.msg-more-wrap {
  position: relative;
  flex: none;
  margin-top: 4px;
}

.msg-more-btn {
  border: 0;
  background: transparent;
  color: #7c8f83;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msg-more-btn:hover {
  background: rgba(16, 32, 22, 0.08);
  color: #142116;
}

.msg-menu {
  position: absolute;
  top: 24px;
  right: 0;
  z-index: 30;
  min-width: 132px;
  background: #ffffff;
  border: 1px solid #d2dfd7;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(16, 32, 22, 0.16);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-wrap:not(.is-mine) .msg-menu {
  right: auto;
  left: 0;
}

.msg-menu-item {
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #142116;
  text-align: left;
  cursor: pointer;
}

.msg-menu-item:hover {
  background: #eef6f1;
  color: #0b7a49;
}

.msg-menu-item.is-work {
  color: #2563eb;
}

.msg-replies {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 86%;
  padding-left: 10px;
  border-left: 2px solid #cfe3d7;
}

.msg-reply {
  padding: 6px 10px;
  border-radius: 11px;
  background: #f1f6f3;
  font-size: 12.5px;
  line-height: 1.38;
  color: #1c2e22;
}

.msg-reply.is-admin {
  background: #e9f7ef;
}

.msg-done-note {
  font-size: 11.5px;
  color: #066039;
  padding: 2px 4px;
}

.msg-reply-form {
  display: flex;
  gap: 6px;
  width: 86%;
}

.msg-reply-form input {
  flex: 1;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #cbd8d0;
  background: #ffffff;
  font-size: 12.5px;
}

.msg-reply-form button {
  border: 0;
  background: var(--emerald);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
}

.comment-drawer {
  width: 360px;
  max-width: 92vw;
  background: #eef3f0;
  border-left: 1px solid #d5e0d9;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.drawer-head {
  padding: 11px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.drawer-title { font-size: 14.5px; font-weight: 800; }

.drawer-scope-inline {
  display: inline-flex;
  gap: 8px;
}

.scope-link {
  border: 0;
  background: none;
  padding: 2px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #6b7d72;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.scope-link.is-active {
  color: #0b9459;
  border-bottom-color: #0b9459;
}

.icon-close {
  border: 0;
  background: transparent;
  color: #5a6d61;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.icon-close:hover { background: #edf3ef; color: #142116; }

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.msg-composer input {
  flex: 1;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #d0ddd5;
  background: #f6faf7;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.msg-composer input:focus {
  outline: none;
  border-color: var(--emerald);
  background: #ffffff;
}

.msg-send {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--emerald);
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.msg-send:hover { background: var(--emerald-dark); }

.comment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.comment-card.status-new { border-left-color: var(--amber); }
.comment-card.status-in_progress { border-left-color: #2563eb; background: #f8fbff; }
.comment-card.status-resolved { border-left-color: var(--emerald); background: #f5fcf8; }

.c-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.c-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.c-author-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}

.c-author-name {
  font-weight: 800;
  color: var(--ink);
}

.c-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink);
}

.c-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.c-cmd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid #cbd8d0;
  background: #ffffff;
  color: #1f3327;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.c-cmd:hover {
  border-color: var(--emerald);
  color: var(--emerald-dark);
}

.c-cmd.is-ai-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.c-cmd.is-tech {
  cursor: default;
  background: #f1f5f3;
  border-color: #dce4df;
  color: #829489;
}

.c-cmd.is-tech.is-done {
  background: #dcfce7;
  border-color: #86efac;
  color: #047857;
  font-weight: 800;
}

.c-tech-note {
  font-size: 11.5px;
  color: #065f46;
  background: #eaf8f0;
  padding: 5px 8px;
  border-radius: 7px;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.slide-tag {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--dark);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 800;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}
.status-badge.new { background: var(--amber-soft); color: #9a3412; }
.status-badge.in_progress { background: #dbeafe; color: #1d4ed8; }
.status-badge.resolved { background: #dcfce7; color: #047857; border: 1px solid #86efac; }

.comment-body { font-size: 14px; line-height: 1.48; color: var(--ink); }

.resolution-box {
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--emerald-soft);
  border: 1px solid #a7f3d0;
  font-size: 12.5px;
  color: #064e3b;
}

.history-details summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}
.history-list {
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid #d1e3d8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  color: #3d5145;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.admin-actions input {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd8d0;
  font-size: 12px;
}

/* Fullscreen Viewer */
.viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0b1610;
  display: flex;
  flex-direction: column;
}

.viewer-bar {
  height: 52px;
  padding: 0 16px;
  background: #102016;
  border-bottom: 1px solid rgba(110, 231, 183, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffffff;
}

.viewer-bar-left, .viewer-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.viewer-bar .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.viewer-title { font-size: 13.5px; font-weight: 800; }
.slide-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid #34d399;
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
}
.cnt-chip {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 11px;
}

.viewer-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.viewer-iframe {
  flex: 1;
  border: 0;
  width: 100%;
  height: 100%;
  background: #0d1a12;
}

.comment-drawer {
  width: 390px;
  max-width: 92vw;
  background: #f6faf7;
  border-left: 1px solid #cbd8d0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.drawer-head {
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--emerald); }
.drawer-title { font-size: 16px; font-weight: 800; }

.drawer-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 14px 0;
}
.scope-btn {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.scope-btn.is-active {
  background: var(--dark);
  border-color: var(--dark);
  color: #ffffff;
}

.drawer-form {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 820px) {
  .admin-grid { grid-template-columns: 1fr; }
  .topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; }
}


/* ==========================================================================
   Team Chat Upgrade: Personal Stats, Search, Filters, Pins ★ & AI Feedback
   ========================================================================== */
.comment-drawer {
  width: 410px;
}

.drawer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 12px;
  background: #f4f8f5;
  border-bottom: 1px solid #e2ebe5;
}

.ds-pill {
  border: 1px solid #d4e3da;
  background: #ffffff;
  color: #2b4235;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ds-pill strong { font-weight: 800; }
.ds-pill:hover { border-color: #0b9459; color: #0b7a49; }
.ds-pill.is-active { background: #0f291c; border-color: #0f291c; color: #ffffff; }
.ds-pill.is-amber strong { color: #c46b22; }
.ds-pill.is-amber.is-active { background: #c46b22; border-color: #c46b22; color: #ffffff; }
.ds-pill.is-amber.is-active strong { color: #ffffff; }
.ds-pill.is-green strong { color: #0b9459; }
.ds-pill.is-green.is-active { background: #0b9459; border-color: #0b9459; color: #ffffff; }
.ds-pill.is-green.is-active strong { color: #ffffff; }
.ds-pill.is-star strong { color: #d97706; }

.drawer-toolbar {
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e6eee9;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.drawer-search {
  width: 100%;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid #d5e2da;
  background: #f7faf8;
  font-size: 12.5px;
  color: #142116;
  outline: none;
}
.drawer-search:focus {
  border-color: #0b9459;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(11, 148, 89, 0.12);
}

.drawer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.df-chip {
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid #dce7e0;
  background: #f7faf8;
  color: #41584b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.df-chip:hover { border-color: #0b9459; color: #0b7a49; }
.df-chip.is-active { background: #0b9459; border-color: #0b9459; color: #ffffff; }

.msg-wrap.is-pinned .msg-bubble {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.msg-head-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.msg-slide-jump {
  border: 1px solid #cde0d5;
  background: #eff7f2;
  color: #0b7a49;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.msg-slide-jump:hover {
  background: #0b9459;
  border-color: #0b9459;
  color: #ffffff;
}

.msg-pin-btn {
  border: none;
  background: transparent;
  color: #9bb0a3;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.msg-pin-btn:hover,
.msg-pin-btn.is-pinned {
  color: #f59e0b;
}

.msg-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.msg-reply-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}
.msg-reply-badge.is-yes {
  background: #e6f6ed;
  color: #0b7a49;
}
.msg-reply-badge.is-no {
  background: #f1f4f2;
  color: #6b7f73;
}

.msg-reply.is-ai {
  background: linear-gradient(135deg, #0f291c 0%, #163b28 100%);
  border: 1px solid rgba(110, 231, 183, 0.35);
  color: #eef7f2;
  padding: 7px 9px;
  border-radius: 9px;
}
.msg-reply.is-ai .msg-reply-who {
  color: #6ee7b7;
}
.msg-reply.is-ai .msg-reply-time {
  color: rgba(214, 234, 222, 0.65);
}
.msg-reply.is-ai .msg-reply-body {
  color: #eef7f2;
  margin-top: 2px;
}
.msg-reply-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.msg-reply-who {
  color: #0b7a49;
}
.msg-reply-time {
  font-size: 10px;
  color: #7c9084;
}
.msg-reply-body {
  font-size: 12.2px;
  line-height: 1.4;
  margin-top: 1px;
}

.msg-reply-form {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.msg-reply-row {
  display: flex;
  gap: 5px;
}
.msg-reply-row input {
  flex: 1;
}
.msg-reopen-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
  cursor: pointer;
  padding-left: 2px;
}
