@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #111318;
  --panel: #181b23;
  --input: #151820;
  --ink: #d7dbe3;
  --muted: #8b90a0;
  --line: #272b35;
  --brand: #4d8ea3;
  --brand-2: #3f7b8e;
  --ok: #4a8f6a;
  --warn: #a67c42;
  --danger: #a85a5a;
  --sidebar: #181b23;
  --sidebar-ink: #9aa0ae;
  --radius: 2px;
  --topbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body, .admin-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 400;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: #6aa9bb; }
.admin-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.admin-sidebar {
  width: 260px;
  background: var(--sidebar);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  border-right: 1px solid var(--line);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1c2430;
  color: var(--brand);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.brand-text { min-width: 0; }
.brand-text small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}
.sidebar-bot { padding: 0 12px 12px; }
.sidebar-bot .form-label {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
  font-weight: 400;
}
.sidebar-bot .form-select {
  background: var(--input);
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--radius);
}
.sidebar-bot .form-select:focus {
  border-color: var(--brand);
  box-shadow: none;
}
.nav-group {
  padding: 14px 16px 4px;
  font-size: 10px;
  color: #6b7180;
  font-weight: 500;
  letter-spacing: .08em;
  pointer-events: none;
  user-select: none;
}
.sidebar-nav {
  flex: 1;
  padding: 0 0 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #272b35; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  color: var(--sidebar-ink);
  text-decoration: none;
  padding: 8px 12px 8px 14px;
  margin: 1px 8px;
  font-size: 13px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  box-shadow: none;
  transform: none;
}
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: .65; }
.sidebar-link:hover {
  color: var(--ink);
  background: #1c2029;
  text-decoration: none;
  box-shadow: none;
  transform: none;
}
.sidebar-link.active {
  color: var(--ink);
  background: #1a222c;
  border-color: transparent;
}
.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--brand);
  border-radius: 1px;
}
.sidebar-link.active .nav-ico { opacity: 1; color: var(--brand); }
.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-ink);
  font-size: 13px;
  margin-bottom: 8px;
}
.user-ava {
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: #1c2430;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 11px;
  color: var(--brand);
}
.btn-ghost {
  color: var(--sidebar-ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
  padding: .35rem .7rem;
}
.btn-ghost:hover { background: #161920; color: var(--ink); }
.admin-main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-x: hidden;
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--topbar-h);
  background: #12141a;
  border-bottom: 1px solid var(--line);
  padding: 10px 18px;
  padding-top: calc(10px + var(--safe-t));
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.topbar-title { min-width: 0; flex: 1; }
.crumb {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 1px;
  font-weight: 400;
}
.admin-topbar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}
.badge-bot {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .18rem .6rem;
  font-weight: 400;
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sys-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}
.sys-dot.is-on { background: var(--ok); }
.sys-lab {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.btn-menu {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-menu span {
  display: block;
  width: 14px;
  height: 1.4px;
  background: var(--ink);
}
.admin-content {
  padding: 16px 18px calc(28px + var(--safe-b));
  max-width: 1200px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.page-hint { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.hero-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--panel);
}
.hero-banner h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.hero-banner p { margin: 0; color: var(--muted); font-size: 13px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  height: 100%;
}
.stat-card:hover { background: #1a1e27; }
.stat-card .k { color: var(--muted); font-size: 12px; font-weight: 400; }
.stat-card .v { font-size: 20px; font-weight: 500; margin-top: 4px; color: var(--ink); }
.stat-card .s { color: var(--muted); font-size: 12px; margin-top: 4px; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  min-height: 76px;
}
.quick-card:hover {
  background: #1a1e27;
  color: var(--ink);
  text-decoration: none;
}
.quick-card .q-k { font-size: 11px; color: var(--muted); font-weight: 400; }
.quick-card .q-t { font-weight: 500; }
.quick-card .q-s { font-size: 12px; color: var(--muted); }
.accordion { --bs-accordion-border-radius: 2px; --bs-accordion-btn-focus-box-shadow: none; --bs-accordion-bg: var(--panel); --bs-accordion-active-bg: #1a1e27; --bs-accordion-color: var(--ink); --bs-accordion-active-color: var(--ink); --bs-accordion-btn-color: var(--ink); --bs-accordion-border-color: var(--line); }
.accordion-item {
  border: 1px solid var(--line);
  border-radius: var(--radius) !important;
  overflow: hidden;
  background: var(--panel);
  margin-bottom: 8px;
}
.accordion-button {
  font-weight: 500;
  background: var(--panel);
  padding: 12px 16px;
  color: var(--ink);
  font-size: 14px;
  box-shadow: none;
}
.accordion-button:not(.collapsed) {
  background: #1a1e27;
  color: var(--ink);
  box-shadow: none;
}
.accordion-button::after {
  filter: invert(.7);
}
.accordion-body {
  background: var(--panel);
  padding: 14px 16px 16px;
  color: var(--ink);
  min-width: 0;
  overflow-x: auto;
}
.accordion-button { word-break: break-word; white-space: normal; }
.row { --bs-gutter-x: 0.75rem; }
.row > * { min-width: 0; max-width: 100%; }
.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.table-wrap > .table { min-width: 100%; }
.table { margin-bottom: 0; color: var(--ink); --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); --bs-table-hover-bg: #1a1e27; --bs-table-hover-color: var(--ink); --bs-table-striped-bg: #161920; --bs-table-striped-color: var(--ink); }
.table thead th {
  background: #151820;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
}
.table td, .table th { vertical-align: middle; border-color: var(--line); }
.table-hover > tbody > tr:hover > * { background: #1a1e27; color: var(--ink); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: #161920; }
.table td .btn, .table td .form-control, .table td .form-select { margin-bottom: 0; }
.btn {
  border-radius: var(--radius);
  font-weight: 500;
  box-shadow: none !important;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #0e1418;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-2);
  border-color: var(--brand-2);
  color: #0e1418;
}
.btn-success {
  background: var(--ok);
  border-color: var(--ok);
  color: #0e1410;
}
.btn-success:hover { background: #3d7a5a; border-color: #3d7a5a; color: #0e1410; }
.btn-outline-primary {
  color: var(--brand);
  border-color: #2d4550;
  background: transparent;
}
.btn-outline-primary:hover { background: #161e26; border-color: var(--brand); color: var(--brand); }
.btn-outline-danger {
  color: var(--danger);
  border-color: #4a3030;
  background: transparent;
}
.btn-outline-danger:hover { background: #241818; color: #c07070; border-color: var(--danger); }
.btn-outline-secondary {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}
.btn-outline-secondary:hover { background: #1a1e27; color: var(--ink); border-color: #3a4050; }
.btn-secondary {
  background: #222632;
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover { background: #2a2f3c; border-color: #3a4050; color: var(--ink); }
.btn-sm { border-radius: var(--radius); }
.form-control, .form-select, textarea.form-control {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--ink);
  box-shadow: none;
}
.form-control::placeholder, .form-select::placeholder { color: #5d6372; }
.form-control:focus, .form-select:focus, textarea.form-control:focus {
  border-color: var(--brand);
  box-shadow: none;
  background: var(--input);
  color: var(--ink);
}
.form-control:disabled, .form-select:disabled {
  background: #12151b;
  color: #5d6372;
  opacity: 1;
}
.form-label { font-weight: 400; color: var(--muted); }
.form-text { color: #6d7382; }
.form-check-input {
  background-color: var(--input);
  border: 1px solid #3a4050;
  border-radius: var(--radius);
}
.form-check-input:focus { box-shadow: none; border-color: var(--brand); }
.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}
.form-check-label { color: var(--ink); }
.alert {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.alert-success { background: #15201a; border-color: #274034; color: #7db392; }
.alert-danger { background: #221618; border-color: #3d2a2a; color: #c07070; }
.alert-info { background: #151c22; border-color: #2a3a44; color: #7aa3b3; }
.alert-warning { background: #211c14; border-color: #3d3424; color: #c4a06a; }
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  background: #151820;
  color: var(--muted);
  border: 1px solid var(--line);
}
.status-pill.is-on { background: #15201a; color: var(--ok); border-color: #274034; }
.status-pill.is-off { background: #221618; color: var(--danger); border-color: #3d2a2a; }
.status-pill.is-muted { background: #151820; color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
code {
  font-size: 0.9em;
  background: #151820;
  padding: 1px 5px;
  border-radius: var(--radius);
  color: #9eb4c0;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  word-break: break-word;
}
img, svg, video { max-width: 100%; height: auto; }
.form-control, .form-select, textarea, .btn { max-width: 100%; }
.mono { overflow-wrap: anywhere; word-break: break-word; }
.preview-phone {
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  background: #0e1014;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 12px 20px;
  min-height: 480px;
}
.preview-bubble {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preview-inline span {
  flex: 1 1 45%;
  text-align: center;
  background: #1c2430;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 4px;
  font-size: 13px;
}
.preview-reply {
  margin-top: 16px;
  background: #0e1014;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}
.preview-reply-row { display: flex; gap: 6px; margin-bottom: 6px; }
.preview-reply-row span {
  flex: 1;
  text-align: center;
  background: #1c2430;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 4px;
  font-size: 13px;
}
html.login-html,
html.login-html body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px calc(16px + var(--safe-b));
  background: var(--bg);
  overflow: hidden;
}
.login-shell {
  width: 100%;
  max-width: 380px;
  margin: 0;
}
.login-split {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.login-aside { display: none; }
.login-card, .install-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  min-width: 0;
  box-shadow: none;
}
.login-card { max-width: 400px; }
.login-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.login-head-text { min-width: 0; }
.login-card h1, .install-card h1, .login-card .h5, .install-card .h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}
.login-kicker {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
  font-weight: 400;
}
.login-form .form-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 400;
}
.login-form .form-control {
  min-height: 42px;
  background: var(--input);
}
.login-submit {
  min-height: 42px;
  font-weight: 500;
  letter-spacing: .02em;
}
.login-foot {
  margin: 14px 0 0;
  text-align: center;
  color: #6b7180;
  font-size: 12px;
}
.btn-child { font-size: 12px; }
.help-box {
  border: 1px solid var(--line);
  background: #151820;
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--muted);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.chip-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-right: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: #151820;
  border: 1px solid var(--line);
  text-decoration: none;
}
.chip:hover { background: #1a1e27; color: var(--ink); text-decoration: none; }
.chip.is-on {
  background: #161e26;
  border-color: #2d4550;
  color: var(--brand);
}
.table-wrap textarea.form-control {
  min-width: 180px;
  width: 100%;
  min-height: 96px;
  line-height: 1.45;
}
.admin-drawer {
  width: 260px;
  max-width: 86vw;
  background: var(--sidebar);
  color: var(--ink);
  border-right: 1px solid var(--line);
  box-shadow: none;
}
.admin-drawer .offcanvas-header {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}
.admin-drawer .offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 0 0 calc(12px + var(--safe-b));
}
.admin-drawer .sidebar-nav { padding-top: 6px; }
.offcanvas { --bs-offcanvas-bg: var(--sidebar); --bs-offcanvas-color: var(--ink); --bs-offcanvas-border-width: 0; --bs-offcanvas-box-shadow: none; --bs-offcanvas-width: 260px; }
.offcanvas-backdrop { background: #000; }
.offcanvas-backdrop.show { opacity: .48; }
.btn-close { filter: invert(.8); }
.pagination { flex-wrap: wrap; --bs-pagination-bg: var(--panel); --bs-pagination-border-color: var(--line); --bs-pagination-color: var(--muted); --bs-pagination-hover-bg: #1a1e27; --bs-pagination-hover-color: var(--ink); --bs-pagination-hover-border-color: #3a4050; --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-active-color: #0e1418; --bs-pagination-disabled-bg: var(--panel); --bs-pagination-disabled-border-color: var(--line); --bs-pagination-disabled-color: #5d6372; }
.pagination .page-link { border-radius: var(--radius); margin: 0 2px; }
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.install-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 16px calc(48px + var(--safe-b));
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.install-card {
  max-width: 640px;
  margin: 0 auto;
  flex-shrink: 0;
}
.install-card h2.h6 {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 500;
}
.page-foot {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}
hr { border-color: var(--line); opacity: 1; }
.modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: none;
}
.modal-header, .modal-footer { border-color: var(--line); }
.modal-backdrop { background: #000; }
.text-muted { color: var(--muted) !important; }
.small, small { color: var(--muted); }
.dropdown-menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.dropdown-item { color: var(--ink); }
.dropdown-item:hover { background: #1a1e27; color: var(--ink); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.list-group-item {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}
input[type="color"] { background: var(--input); border: 1px solid var(--line); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #272b35; }
@media (min-width: 768px) {
  .login-wrap { align-items: center; }
}
@media (max-width: 1199.98px) {
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-content { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 767.98px) {
  .admin-sidebar { display: none; }
  .admin-main { width: 100%; max-width: 100%; }
  .admin-topbar {
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;
  }
  .admin-content { padding: 12px 12px calc(18px + var(--safe-b)); }
  .badge-bot { max-width: 34vw; }
  .topbar-right { max-width: 46%; min-width: 0; }
  .stat-card .v { font-size: 18px; }
  .sys-lab { display: none; }
  .page-hint, .small { overflow-wrap: anywhere; }
}
@media (max-width: 575.98px) {
  .quick-grid { grid-template-columns: 1fr; }
  .login-wrap { padding: 16px 12px calc(16px + var(--safe-b)); }
  .install-wrap { padding: 12px 12px calc(56px + var(--safe-b)); }
  .login-shell { max-width: 100%; }
  .login-card, .install-card {
    max-width: 100%;
    padding: 20px 16px 18px;
  }
  .login-head { margin-bottom: 18px; padding-bottom: 14px; }
  .admin-topbar h1 { font-size: 15px; }
  .table td, .table th { font-size: 13px; }
  .form-control, .form-select, .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .accordion-button { font-size: 14px; padding-right: 2.4rem; }
  .preview-phone { min-height: 420px; }
  .table-wrap textarea.form-control { min-width: 140px; }
  .action-stack {
    flex-direction: column;
    align-items: stretch;
  }
  .action-stack .form-control,
  .action-stack .form-select,
  .action-stack .btn {
    width: 100% !important;
    min-width: 0;
  }
  .toolbar-row { align-items: stretch; }
  .toolbar-row > div { min-width: 0 !important; width: 100%; flex: 1 1 100%; }
  .chip-row { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .chip { flex-shrink: 0; }
}
@media (hover: none) {
  .sidebar-link:hover { background: transparent; color: var(--sidebar-ink); }
  .sidebar-link.active:hover { color: var(--ink); background: #1a222c; }
}
