:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #172026;
  --muted: #65737e;
  --line: #d8e0e5;
  --primary: #116a5b;
  --primary-dark: #0a4d42;
  --danger: #b42318;
  --notice: #e9f7ef;
}

.schedule-card {
  display: grid;
  gap: 16px;
}

.schedule-form select,
.schedule-form input[type="datetime-local"] {
  width: 100%;
}

.permission-fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.permission-fieldset legend {
  padding: 0 8px;
  font-weight: 800;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.permission-grid .check {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.permission-grid .check span {
  display: grid;
  gap: 3px;
}

.permission-grid small {
  color: var(--muted);
}

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

.nested-disclosure {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.permission-denied-panel {
  max-width: 720px;
  margin: 80px auto;
  text-align: center;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

input,
textarea,
select,
button,
.button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  background: #fff;
}

textarea {
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}

button:hover,
.button:hover {
  background: var(--primary-dark);
}

.ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.ghost:hover {
  background: #edf2f4;
}

.secondary {
  background: #24546f;
  border-color: #24546f;
}

.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-panel h1,
.section-heading h1 {
  margin: 0 0 8px;
}

.heading-actions,
.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.heading-actions form { margin: 0; }
.archive-toggle { position: relative; z-index: 1; }
.archived-row { background: #fafafa; opacity: 0.82; }
.archived-row:hover { background: #f6f7f8; opacity: 1; }
.archive-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 7px;
  border: 1px solid #d8dee6;
  border-radius: 999px;
  background: #f2f4f7;
  color: #687386;
  font-size: 11px;
}

.login-panel p,
.section-heading p,
.muted {
  margin: 0;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.alert {
  margin-top: 16px;
  padding: 10px;
  border: 1px solid #f2b8b5;
  background: #ffedeb;
  color: var(--danger);
  border-radius: 6px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar div {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar span {
  color: var(--muted);
  font-size: 14px;
}

.toplink {
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
}

.toplink:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 56px;
  display: grid;
  gap: 18px;
}

.project-tree-panel {
  position: fixed;
  inset: 0 auto 0 236px;
  z-index: 15;
  display: flex;
  width: 260px;
  height: 100vh;
  padding: 24px 14px 18px;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #dce3ea;
  background: #f7f9fb;
  box-shadow: 8px 0 24px rgba(20, 35, 52, 0.04);
}

.shell.project-shell {
  grid-template-columns: minmax(0, 1fr);
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 24px 24px 56px 516px;
}

.shell.project-shell > * {
  min-width: 0;
  max-width: 100%;
}

.project-tree-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 8px 15px;
  border-bottom: 1px solid #dfe5ec;
}
.project-tree-heading span { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; }
.project-tree-heading h2 { margin: 2px 0 0; font-size: 20px; }
.project-tree-heading > strong {
  display: grid;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
}

.project-tree-home,
.project-tree-link {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #455267;
  text-decoration: none;
}
.project-tree-home {
  margin: 12px 2px 8px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
.project-tree-home::before { content: "⌂"; color: #6f7d90; }
.project-tree-home > span { flex: 1; }
.project-tree-home em,
.project-tree-link em {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e9edf2;
  color: #758195;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}
.project-tree-home.current,
.project-tree-link.current {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.project-tree-home.current em,
.project-tree-link.current em { background: #d4eee3; color: #247456; }

.project-tree {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 2px 2px 18px;
  scrollbar-width: thin;
}
.project-tree-list { margin: 0; padding: 0; list-style: none; }
.project-tree-list .project-tree-list {
  margin: 2px 0 4px 13px;
  padding-left: 10px;
  border-left: 1px solid #d8e0e8;
}
.project-tree-node { position: relative; }
.project-tree-row { display: flex; min-width: 0; align-items: center; gap: 2px; }
.project-tree-toggle,
.project-tree-spacer {
  flex: 0 0 24px;
  width: 24px;
  height: 30px;
}
.project-tree-toggle {
  position: relative;
  min-width: 24px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.project-tree-toggle::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid #7b8797;
  transition: transform 140ms ease;
}
.project-tree-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.project-tree-toggle:hover { background: #e9f2ee; }
.project-tree-node.loading > .project-tree-row .project-tree-toggle { opacity: 0.45; }
.project-tree-node.load-error > .project-tree-row .project-tree-toggle::before { border-left-color: var(--danger); }
.project-tree-link {
  flex: 1;
  margin: 2px 0;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.project-tree-link > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-tree-link:hover { background: #eaf1ee; color: var(--primary-dark); }
.project-tree-link.current { font-weight: 700; box-shadow: inset 3px 0 0 var(--primary); }
.project-tree-children[hidden] { display: none; }
.project-tree-note {
  margin: 10px 6px 0;
  padding-top: 12px;
  border-top: 1px solid #dfe5ec;
  color: #7b8796;
  font-size: 10px;
  line-height: 1.55;
}

.notice {
  padding: 10px 12px;
  border: 1px solid #b7dfc3;
  background: var(--notice);
  border-radius: 6px;
}

.form-note {
  margin-top: 14px;
}

.amount-positive {
  color: #116a5b;
  font-weight: 700;
}

.amount-negative {
  color: #b42318;
  font-weight: 700;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
}

.section-heading,
.panel,
.shop-editor,
.ad-editor {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
}

.panel {
  padding: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.stat-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  font-size: 28px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.grid-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

label input,
label textarea,
label select {
  color: var(--text);
}

.wide {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.check input {
  width: auto;
  min-height: auto;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.log-detail {
  max-width: 320px;
  word-break: break-word;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

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

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

.contact-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 140px minmax(220px, 2fr);
  gap: 8px;
}

.shop-list {
  display: grid;
  gap: 16px;
}

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

.emergency-card {
  min-width: 0;
}

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

.emergency-save {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.ad-empty {
  margin-top: 14px;
}

.delivery-grid,
.delivery-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.delivery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delivery-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.delivery-card > summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
}

.delivery-form,
.delivery-order-detail {
  margin-top: 14px;
}

.delivery-order-detail {
  display: grid;
  gap: 6px;
}

.delivery-order-detail p {
  margin: 0;
  word-break: break-word;
}

.shop-editor,
.ad-editor {
  padding: 16px;
}

.shop-editor > form + form,
.ad-editor > form + form {
  margin-top: 12px;
}

.image-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.image-grid label {
  width: 140px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfc;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #edf2f4;
}

.mini-image {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.mini-image img {
  width: 96px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-form,
  .stats-grid,
  .contact-row,
  .emergency-grid,
  .delivery-grid,
  .emergency-form {
    grid-template-columns: 1fr;
  }

  .emergency-save {
    align-items: stretch;
    flex-direction: column;
  }
}

/* 2026 admin refresh: Dcat-style clarity with fewer page jumps. */
:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #748094;
  --line: #e4e9f1;
  --primary: #2f9b72;
  --primary-dark: #247c5b;
  --primary-soft: #eaf7f1;
  --danger: #d14343;
  --notice: #ecf8f1;
  --sidebar: #182436;
  --sidebar-muted: #9eabba;
  --shadow: 0 8px 28px rgba(24, 36, 54, 0.07);
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 236px;
  height: 100vh;
  padding: 24px 16px 18px;
  align-items: stretch;
  flex-direction: column;
  background: var(--sidebar);
  border: 0;
  color: #fff;
  box-shadow: 8px 0 28px rgba(15, 25, 40, 0.08);
}

.topbar > div {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 6px;
}

.topbar strong {
  display: block;
  margin: 0 4px 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.topbar span {
  order: 10;
  margin: 14px 4px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--sidebar-muted);
  font-size: 12px;
}

.toplink {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #c7d0dc;
  font-size: 14px;
  text-decoration: none;
  transition: 160ms ease;
}

.toplink::before {
  content: "•";
  width: 18px;
  color: #5d7188;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.toplink[href="/admin"]::before { content: "⌂"; }
.toplink[href="/admin/content"]::before { content: "文"; font-size: 13px; }
.toplink[href="/admin/delivery"]::before { content: "▣"; font-size: 15px; }
.toplink[href="/admin/users"]::before { content: "◎"; font-size: 15px; }
.toplink[href="/admin/esim"]::before { content: "◇"; font-size: 16px; }
.toplink[href="/admin/phone-recharge"]::before { content: "▣"; font-size: 15px; }
.toplink[href="/admin/emergency"]::before { content: "+"; font-size: 18px; }

.toplink:hover,
.toplink.active {
  background: rgba(68, 185, 138, 0.16);
  color: #fff;
  text-decoration: none;
}

.toplink.active::before { color: #57d29f; }

.topbar > form {
  width: 100%;
  margin-top: auto;
}

.topbar > form button {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #dbe3ec;
}

.topbar > form button:hover { background: rgba(255, 255, 255, 0.13); }

.shell {
  width: auto;
  max-width: 1440px;
  margin: 0 0 64px 236px;
  padding: 28px 32px;
  gap: 18px;
}

.breadcrumbs {
  min-height: 28px;
  align-items: center;
  font-size: 13px;
}

.breadcrumbs a { color: var(--primary-dark); }

.section-heading,
.panel,
.shop-editor,
.ad-editor,
.stat-card,
.login-panel {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.section-heading {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 24px 26px;
  border: 0;
  background: linear-gradient(135deg, #ffffff 55%, #eef8f4 100%);
}

.section-heading::after {
  content: "";
  position: absolute;
  right: -35px;
  top: -55px;
  width: 160px;
  height: 160px;
  border: 28px solid rgba(47, 155, 114, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.section-heading h1 {
  margin: 2px 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.025em;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel { padding: 20px; }

.stats-grid { gap: 16px; }

.stat-card {
  min-height: 126px;
  padding: 18px 20px;
  border: 0;
  background: #fff;
}

.stat-card strong {
  color: #1d2a3e;
  font-size: 30px;
  line-height: 1;
}

.stat-card small { color: var(--muted); }

.accent-card {
  background: linear-gradient(145deg, #2f9b72, #257c5d);
  color: #fff;
}

.accent-card span,
.accent-card strong,
.accent-card small { color: #fff; }
.accent-card small { opacity: 0.76; }

.quick-card {
  align-content: start;
  grid-template-columns: 1fr;
}

.quick-card .button { width: 100%; }

input,
textarea,
select,
button,
.button {
  min-height: 40px;
  border-radius: 9px;
}

input,
textarea,
select {
  border-color: #dce2ea;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #55ad89;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(47, 155, 114, 0.12);
}

button,
.button {
  border: 0;
  box-shadow: 0 3px 9px rgba(47, 155, 114, 0.16);
  font-weight: 600;
}

.ghost { border: 1px solid var(--line); box-shadow: none; }
.danger { box-shadow: 0 3px 9px rgba(209, 67, 67, 0.14); }
.ghost.danger {
  border: 1px solid #efc4c4;
  background: #fff;
  color: var(--danger);
  box-shadow: none;
}
.ghost.danger:hover { background: #fff2f2; }
.compact { min-height: 34px; padding: 7px 12px; font-size: 13px; }

.disclosure {
  padding: 0;
  scroll-margin-top: 20px;
}

.disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  user-select: none;
}

.disclosure > summary::-webkit-details-marker { display: none; }

.disclosure > summary::after {
  content: "+";
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1;
}

.disclosure[open] > summary::after { content: "−"; }

.disclosure > summary span {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.disclosure > summary small {
  margin-left: auto;
  color: var(--muted);
}

.disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.disclosure > form,
.disclosure > .ad-list,
.disclosure > .ad-empty { margin: 20px; }
.disclosure > form + .ad-empty { margin-top: -4px; }

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-heading h2 { margin: 2px 0 0; }

.panel-heading h2 em {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-style: normal;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 11px;
}

table { min-width: 920px; }

th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 10px;
  border-top: 0;
  background: #f8fafc;
  color: #5e697c;
  letter-spacing: 0.02em;
}

td { padding: 12px 10px; }
tbody tr { transition: background 140ms ease; }
tbody tr:hover { background: #fbfdfc; }
.actions form { margin: 0; }

.shop-editor,
.ad-editor {
  border: 0;
  background: #fff;
}

.login-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(76, 187, 142, 0.18), transparent 34%),
    radial-gradient(circle at 90% 90%, rgba(44, 90, 140, 0.15), transparent 36%),
    #eef3f8;
}

.login-panel {
  padding: 34px;
  border: 0;
}

.login-approval {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #b8c8dc;
  border-radius: 12px;
  background: #f4f8fc;
}

.login-approval > span { color: var(--muted); font-size: 12px; }
.login-approval p { font-size: 12px; line-height: 1.6; }
.login-code { color: #173d68; font-size: clamp(28px, 8vw, 38px); letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }
.login-approval code { padding: 2px 5px; border-radius: 5px; background: #e4edf7; color: #173d68; }
.login-approval-status { padding: 9px 10px; border-radius: 8px; background: #fff4d8; color: #7a5b0d; font-size: 12px; font-weight: 700; }
.login-approval[data-status="approved"] { border-color: #86caaa; background: #eefaf5; }
.login-approval[data-status="approved"] .login-approval-status { background: #dff4e9; color: #176747; }
.login-approval[data-status="expired"] .login-approval-status,
.login-approval[data-status="used"] .login-approval-status { background: #fff0f0; color: #9f2f2f; }
.login-code-refresh { width: fit-content; color: var(--primary-dark); font-size: 12px; font-weight: 700; }

.login-panel::before {
  content: "SEA";
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #37a97c, #257c5d);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 20px rgba(47, 155, 114, 0.22);
}

.notice,
.alert { border-radius: 10px; }

@media (min-width: 901px) and (max-width: 1100px) {
  .shell.project-shell .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 901px) and (max-width: 1400px) {
  .shell.project-shell .grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shell.project-shell .grid-form > * { min-width: 0; }
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    width: 100%;
    height: auto;
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
    background: #fff;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }

  .topbar > div {
    flex: 1;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .topbar strong {
    margin: 0 10px 0 0;
    padding: 0;
    border: 0;
    font-size: 15px;
  }

  .topbar span { display: none; }
  .toplink { width: auto; min-height: 36px; padding: 7px 9px; color: var(--primary-dark); }
  .toplink::before { display: none; }
  .toplink:hover,
  .toplink.active { background: var(--primary-soft); color: var(--primary-dark); }
  .topbar > form { width: auto; margin: 0; }
  .topbar > form button { width: auto; background: #fff; color: var(--text); border-color: var(--line); }
  .shell { margin-left: 0; padding: 22px; }
  .shell.project-shell {
    width: auto;
    margin: 18px 16px 56px;
  }
  .project-tree-panel {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    max-height: 380px;
    margin: 18px 22px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .project-tree { min-height: 180px; }
  .project-tree-note { display: none; }
}

@media (max-width: 720px) {
  .section-heading,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  body { overflow-x: hidden; }
  .topbar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    overflow: hidden;
  }
  .topbar > div {
    min-width: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar > div::-webkit-scrollbar { display: none; }
  .topbar strong,
  .topbar span { display: none; }
  .toplink { width: auto; flex: 0 0 auto; }
  .topbar > form,
  .topbar > form button { width: auto; flex: 0 0 auto; }
  .shell { padding: 16px; }
  .project-tree-panel { max-height: 330px; margin: 14px 16px 0; padding: 16px 12px; }
  .section-heading { padding: 20px; }
  .disclosure > summary { align-items: flex-start; }
  .disclosure > summary small { display: none; }
  .panel-heading .button { width: 100%; }
  .panel,
  .table-wrap { min-width: 0; }
}

/* Telegram no-code message editor */
.format-guide {
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 70%, #eef9f5 100%);
}

.compact-format-guide { display: grid; gap: 14px; }
.compact-format-guide .telegram-api-status { margin-bottom: 0; }

.bot-preview-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 360px);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #8ebddd;
  border-radius: 10px;
  background: #eef7fd;
}

.bot-preview-controls > div { display: grid; gap: 4px; }
.bot-preview-controls > div strong { color: #174f74; }
.bot-preview-controls > div span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.bot-preview-controls label { display: grid; gap: 5px; color: #174f74; font-size: 12px; font-weight: 700; }
.page-preview-controls { margin-bottom: 18px; }
.admin-telegram-access form { display: grid; gap: 12px; padding: 12px; }
.telegram-user-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.telegram-user-choice { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.telegram-user-choice input { width: auto; margin: 0; }
.telegram-user-choice span { display: grid; gap: 2px; }
.telegram-user-choice small { color: var(--muted); font-weight: 500; }

.editor-usage-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.editor-usage-note > summary {
  padding: 11px 13px;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.editor-usage-note[open] > summary { border-bottom: 1px solid var(--line); }
.editor-usage-note ul { margin: 0; padding: 10px 16px 12px 32px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.editor-usage-note li + li { margin-top: 3px; }
.content-page .format-playground { display: grid; gap: 7px; }
.content-page .tg-editor-disclosure { width: 100%; }
.content-page .tg-editor-disclosure .compact-editor { width: 100%; }
.content-page .grid-form > label.wide { gap: 7px; }

.format-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.format-feature-grid > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
}

.format-feature-grid strong { font-size: 14px; }
.format-feature-grid span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.format-playground { color: var(--text); font-weight: 700; }
.format-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8df;
  color: #735f24;
  font-size: 13px;
  line-height: 1.65;
}

.telegram-api-status {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #f0cd7a;
  border-radius: 11px;
  background: #fff9e9;
  transition: box-shadow 0.2s, transform 0.2s;
}

.telegram-api-status.connected {
  border-color: #96d3b8;
  background: #eefaf5;
}

.telegram-api-status.needs-attention {
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.2);
}

.telegram-api-status > div {
  display: grid;
  gap: 4px;
}

.telegram-api-status strong { color: #5f4b18; }
.telegram-api-status.connected strong { color: #176747; }
.telegram-api-status span { color: var(--muted); font-size: 12px; line-height: 1.55; }

.token-inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 0;
}

.token-inline-form input,
.token-inline-form button { min-height: 39px; }
.token-inline-form button { width: auto; white-space: nowrap; }

.directory-preview-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}
.directory-preview-card,
.current-directory-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(24, 36, 54, 0.06);
}
.current-directory-card { padding: 0; }
.directory-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}
.directory-card-heading > div { min-width: 0; }
.directory-card-heading h2,
.directory-card-heading h3 { margin: 2px 0 0; overflow: hidden; color: #1d2a3c; text-overflow: ellipsis; white-space: nowrap; }
.directory-card-heading h2 { font-size: 20px; }
.directory-card-heading h3 { font-size: 17px; }
.directory-status { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.directory-status.active { background: #eaf8f2; color: #237758; }
.directory-status.inactive { background: #f0f2f5; color: #7a8490; }
.directory-message-preview { border: 0; border-radius: 0; }
.directory-message-preview .tg-preview-head { min-height: 50px; }
.directory-message-bubble { min-width: min(360px, calc(100% - 42px)); max-width: min(660px, calc(100% - 42px)); padding: 0; overflow: visible; }
.directory-message-bubble .tg-message-content { min-width: 130px; padding: 10px 12px 4px; white-space: pre-wrap; }
.directory-message-bubble .tg-message-meta { padding: 0 11px 8px; }
.directory-message-image { display: block; width: 100%; max-height: 390px; border-bottom: 1px solid rgba(31, 60, 66, 0.08); border-radius: 15px 15px 0 0; background: #eef2f3; object-fit: cover; }
.directory-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}
.directory-preview-actions button,
.directory-preview-actions .button { width: auto; min-height: 36px; padding: 7px 13px; }
.directory-edit-panel { padding: 15px; background: #fbfcfd; }
.directory-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #fff;
}
.directory-edit-form[hidden],
.directory-edit-panel[hidden] { display: none; }
.directory-edit-form .wide { grid-column: 1 / -1; }
.directory-image-edit { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.directory-image-edit > img { width: min(220px, 100%); max-height: 150px; border-radius: 9px; object-fit: cover; }
.directory-image-edit > label:not(.check) { flex: 1 1 260px; }
.directory-edit-actions { display: flex; justify-content: flex-end; gap: 9px; }
.directory-edit-actions button { width: auto; }
.directory-delete-form { display: flex; justify-content: flex-end; margin-top: 10px; }
.directory-delete-form button { width: auto; }

.tg-editor-shell {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce2ea;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 36, 54, 0.03);
}

.tg-editor-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.tg-editor-field > label { min-width: 0; }

.tg-editor-disclosure {
  min-width: 220px;
  border: 1px solid #dce2ea;
  border-radius: 9px;
  background: #fff;
}

.tg-editor-disclosure > summary {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  cursor: pointer;
  list-style: none;
}

.tg-editor-disclosure > summary::-webkit-details-marker { display: none; }
.tg-editor-disclosure > summary strong { color: var(--primary-dark); font-size: 12px; }
.tg-editor-disclosure > summary strong::before { content: "✎ "; }
.tg-editor-disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f6fbf9;
}
.tg-editor-excerpt {
  max-width: 320px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-editor-disclosure .compact-editor {
  width: min(580px, 72vw);
  border: 0;
  border-radius: 0 0 9px 9px;
  box-shadow: none;
}
.tg-editor-disclosure .tg-visual-editor { min-height: 96px; }
.tg-editor-disclosure .tg-message-bubble { max-width: 90%; }

.tg-editor-collapse-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.tg-editor-collapse-button {
  width: auto;
  min-height: 34px;
  padding: 7px 14px;
  color: var(--primary-dark);
}

.tg-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  overflow-x: auto;
  background: #f8fafc;
  scrollbar-width: thin;
}

.tg-toolbar { border-bottom: 1px solid var(--line); }

.tg-tool {
  flex: 0 0 auto;
  min-width: 32px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  background: #fff;
  color: #354258;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.tg-tool:hover {
  border-color: #8fcbb2;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tg-tool.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.tg-send-preview {
  position: sticky;
  left: 0;
  z-index: 2;
  margin-right: 3px;
  border-color: #2f89bd;
  background: #eaf6fd;
  color: #155f8c;
  font-weight: 750;
  box-shadow: 6px 0 8px #f8fafc;
}

.tg-send-preview:hover { background: #d8effc; }

.usage-users-disclosure { padding: 0; overflow: hidden; }
.usage-users-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; color: var(--primary-dark); list-style: none; }
.usage-users-disclosure > summary::-webkit-details-marker { display: none; }
.usage-users-disclosure > summary::after { content: "展开 ▾"; color: var(--muted); font-size: 12px; font-weight: 700; }
.usage-users-disclosure[open] > summary::after { content: "收起 ▴"; }
.usage-users-disclosure > summary span { display: grid; gap: 3px; }
.usage-users-disclosure > summary small { color: var(--muted); font-weight: 500; }
.usage-users-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.usage-users-disclosure > .muted { padding: 0 20px 18px; }
.selected-row { background: #eefaf5; }

.usage-log-panel { display: grid; gap: 16px; }
.usage-filter-form { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) minmax(220px, 1fr) auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.usage-filter-form > label { display: grid; gap: 6px; color: var(--primary-dark); font-size: 12px; font-weight: 700; }
.usage-filter-actions { display: flex; gap: 8px; align-items: center; }
.usage-quick-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.usage-quick-filters a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--primary-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.usage-quick-filters a:hover { border-color: var(--primary); background: #eefaf5; }
.usage-empty { padding: 14px; border-radius: 8px; background: #f8fafc; }
.usage-log-table { min-width: 1050px; }
.usage-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.usage-action-detail { display: grid; gap: 4px; min-width: 260px; }
.usage-action-detail strong { color: var(--primary-dark); }
.usage-action-detail span { line-height: 1.5; }
.usage-action-detail small { color: var(--muted); word-break: break-all; }
.usage-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; }
.usage-pagination span { color: var(--muted); font-size: 13px; font-weight: 700; }

.tg-editor-status {
  padding: 7px 11px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  color: #7b8796;
  font-size: 11px;
  line-height: 1.45;
}

.tg-editor-status[data-state="attention"] {
  background: #fff8e4;
  color: #8a6714;
}

.tg-editor-status[data-state="success"] {
  background: #eefaf5;
  color: #247456;
}

.tg-editor-storage {
  display: none !important;
}

.tg-visual-editor {
  min-height: 126px;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: #172033;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.tg-visual-editor:focus { box-shadow: inset 0 0 0 2px rgba(47, 155, 114, 0.18); }
.tg-visual-editor:empty::before {
  content: attr(data-placeholder);
  color: #929caa;
  pointer-events: none;
}

.tg-visual-editor blockquote {
  margin: 7px 0;
  padding: 5px 10px;
  border-left: 3px solid #42a981;
  border-radius: 3px 8px 8px 3px;
  background: #edf8f3;
}

.tg-visual-editor code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #edf0f3;
  color: #c13f5a;
  font-family: Consolas, monospace;
}

.tg-visual-editor .tg-spoiler {
  color: #334155;
  background: repeating-linear-gradient(135deg, #dfe4ea, #dfe4ea 3px, #edf0f3 3px, #edf0f3 6px);
}

.tg-preview {
  position: relative;
  isolation: isolate;
  border-top: 1px solid var(--line);
  background-color: #d9e5e7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%236f8b91' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round' opacity='.16'%3E%3Cpath d='M18 24h18l-9 12zM83 17l3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1zM132 22c5-5 14 3 6 11-8-8-15-15-6-11zM21 86c8-10 18 0 9 9-9 9-19 0-9-9zM77 82h23v16H77zM82 98l-5 6M95 98l5 6M135 78l17 8-17 8 4-8zM21 145c9-7 18 2 10 10-8 8-18-1-10-10zM71 142l12-9 12 9-12 9zM132 138h20M142 128v20M49 52c5 0 9 4 9 9s-4 9-9 9-9-4-9-9 4-9 9-9zM112 53c8 0 14 5 14 12h-28c0-7 6-12 14-12zM116 108l10 5-10 5-2-4h-9v-3h9zM47 112l8 8-8 8-8-8z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
  background-position: center top;
  background-size: 180px 180px;
  overflow: hidden;
}

.tg-preview.preview-updated {
  animation: tg-preview-updated 1.2s ease;
}

@keyframes tg-preview-updated {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(47, 155, 114, 0); }
  35% { box-shadow: inset 0 0 0 3px rgba(47, 155, 114, 0.42); }
}

.tg-preview-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 8px 13px;
  border-bottom: 1px solid rgba(46, 69, 74, 0.1);
  background: rgba(255, 255, 255, 0.97);
  color: #52606d;
  font-size: 11px;
  box-shadow: 0 1px 3px rgba(43, 68, 75, 0.08);
  backdrop-filter: blur(10px);
}

.tg-preview-contact {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tg-preview-contact > span:last-child {
  display: grid;
  gap: 1px;
}

.tg-preview-contact strong { color: #1f2d3d; font-size: 13px; font-weight: 650; }
.tg-preview-contact small { color: #6f7f8e; font-size: 10px; }
.tg-preview-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #5db9ef, #2499d5);
  box-shadow: 0 2px 7px rgba(27, 133, 191, 0.24);
  color: #fff;
}
.tg-preview-avatar svg { width: 21px; height: 21px; fill: currentColor; transform: translate(-1px, 1px); }

.tg-character-count {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2f5;
  color: #778391;
}

.tg-message-bubble {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: min(560px, 94%);
  min-height: 42px;
  margin: 18px 21px 22px;
  padding: 9px 11px 7px;
  border-radius: 16px 16px 16px 5px;
  background: #fff;
  color: #182533;
  box-shadow: 0 1px 2px rgba(31, 60, 66, 0.2), 0 3px 10px rgba(31, 60, 66, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  word-break: break-word;
}

.tg-message-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  bottom: 1px;
  width: 13px;
  height: 16px;
  background: #fff;
  border-bottom-right-radius: 13px 11px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%, 45% 78%, 68% 45%);
  filter: drop-shadow(-1px 1px 1px rgba(31, 60, 66, 0.08));
}

.tg-message-content { min-width: 90px; }

.tg-message-meta {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 2px;
  color: #8795a1;
  font-size: 10px;
  line-height: 1;
}

.tg-message-check { color: #3ca6dd; font-weight: 700; letter-spacing: -2.5px; }

.tg-message-bubble blockquote {
  position: relative;
  margin: 7px 0;
  padding: 4px 9px;
  border-left: 3px solid #42a981;
  border-radius: 3px 8px 8px 3px;
  background: #edf8f3;
}

.tg-message-bubble blockquote.expandable {
  max-height: 58px;
  overflow: hidden;
  padding-bottom: 19px;
}

.tg-message-bubble blockquote.expandable::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 26px;
  background: linear-gradient(transparent, #edf8f3 62%);
}

.tg-message-bubble blockquote.expandable > span {
  position: absolute;
  right: 7px;
  bottom: 2px;
  z-index: 1;
  color: var(--primary-dark);
  font-size: 10px;
}

.tg-message-bubble code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #edf0f3;
  color: #c13f5a;
  font-family: Consolas, monospace;
}

.tg-spoiler {
  padding: 0 3px;
  border-radius: 3px;
  background: #7b8491;
  color: transparent;
  text-shadow: none;
  cursor: help;
}

.tg-premium-emoji {
  position: relative;
  display: inline-grid;
  width: 1.45em;
  height: 1.45em;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, #fbf1ff, #e6d2ff);
  vertical-align: -0.22em;
  overflow: hidden;
  user-select: all;
}

.tg-premium-emoji .tg-emoji-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 0.92em;
  line-height: 1;
}

.tg-premium-emoji img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.tg-premium-emoji img[hidden] {
  display: none;
}

.tg-premium-emoji[data-emoji-editor="true"] {
  overflow: visible;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.tg-premium-emoji[data-emoji-editor="true"] img { pointer-events: none; }

.tg-premium-emoji[data-emoji-editor="true"]:hover,
.tg-premium-emoji[data-emoji-editor="true"]:focus,
.tg-premium-emoji[data-emoji-editor="true"].selected {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(47, 155, 114, 0.62);
  transform: translateY(-1px) scale(1.06);
}

.tg-premium-emoji-remove {
  position: absolute;
  z-index: 3;
  top: -8px;
  right: -8px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 2px 5px rgba(45, 53, 66, 0.24);
  color: #fff;
  font: 700 13px/1 Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.78);
  transition: opacity 120ms ease, transform 120ms ease;
}

.tg-premium-emoji[data-emoji-editor="true"]:hover .tg-premium-emoji-remove,
.tg-premium-emoji[data-emoji-editor="true"]:focus .tg-premium-emoji-remove,
.tg-premium-emoji[data-emoji-editor="true"].selected .tg-premium-emoji-remove {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

@media (hover: none), (pointer: coarse) {
  .tg-premium-emoji[data-emoji-editor="true"] .tg-premium-emoji-remove {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }
}

.tg-variable {
  display: inline-flex;
  padding: 1px 5px;
  border: 1px dashed #76b99d;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
}

.tg-variable::before { content: "{"; }
.tg-variable::after { content: "}"; }
.preview-empty { color: #8a95a4; }

.tg-premium-dialog {
  width: min(520px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: 0 24px 70px rgba(16, 29, 45, 0.3);
}
.tg-premium-dialog::backdrop {
  background: rgba(16, 29, 45, 0.55);
  backdrop-filter: blur(3px);
}
.tg-premium-dialog-card {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
}
.tg-premium-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.tg-premium-dialog-heading span { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.tg-premium-dialog-heading h3 { margin: 2px 0 0; font-size: 21px; }
.tg-dialog-close {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  background: #eef2f5;
  color: #5f6b7a;
  box-shadow: none;
  font-size: 20px;
}
.tg-premium-help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.tg-premium-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #657184;
  font-size: 12px;
}
.tg-premium-check-icon { font-size: 22px; }
.tg-premium-check [data-state="loading"] { color: #8a6714; }
.tg-premium-check [data-state="success"] { color: #247456; }
.tg-premium-check [data-state="error"] { color: #b43c3c; }
.tg-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.tg-dialog-actions button { width: auto; }

.tg-premium-library-tray {
  min-width: 0;
  border-bottom: 1px solid #cfe4da;
  background: #f4fbf8;
}
.tg-premium-library-tray[hidden] { display: none; }
.tg-premium-library-tray-head,
.tg-premium-library-set-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tg-premium-library-tray-head { padding: 9px 10px; border-bottom: 1px solid #dcebe5; }
.tg-premium-library-tray-head > div:first-child,
.tg-premium-library-set-head > div { display: grid; gap: 2px; min-width: 0; }
.tg-premium-library-tray-head strong,
.tg-premium-library-set-head strong { color: var(--primary-dark); font-size: 13px; }
.tg-premium-library-tray-head span,
.tg-premium-library-set-head span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tg-premium-library-tray-head > div:last-child { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tg-premium-library-tray-head button { width: auto; min-height: 30px; padding: 5px 9px; font-size: 11px; }
.tg-premium-library-tray-body { display: flex; gap: 10px; max-height: 280px; padding: 10px; overflow: auto; }
.tg-premium-library-set {
  display: grid;
  flex: 0 0 min(520px, 94%);
  gap: 9px;
  min-width: 250px;
  padding: 10px;
  border: 1px solid #dce7e2;
  border-radius: 10px;
  background: #fff;
}
.tg-premium-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 7px;
}
.tg-premium-library-item { display: grid; gap: 4px; min-width: 0; }
.tg-premium-library-item small {
  overflow: hidden;
  color: #657184;
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-premium-library-emoji {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 50px;
  min-height: 50px;
  padding: 5px;
  place-items: center;
  border: 1px solid #dfe7e3;
  border-radius: 9px;
  background: #f8fbfa;
  box-shadow: none;
  cursor: grab;
  overflow: hidden;
}
.tg-premium-library-emoji:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.tg-premium-library-emoji:active { cursor: grabbing; }
.tg-premium-library-emoji > span { font-size: 25px; }
.tg-premium-library-emoji img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
.tg-premium-library-empty { display: grid; min-width: 240px; gap: 4px; padding: 16px; color: var(--muted); font-size: 12px; text-align: center; }
.tg-visual-editor.premium-drop-target { background: #effbf6; box-shadow: inset 0 0 0 3px rgba(47, 155, 114, 0.4); }

.tg-premium-library-dialog { width: min(920px, calc(100vw - 28px)); }
.tg-premium-library-card { max-height: min(820px, calc(100vh - 32px)); overflow: auto; }
.tg-premium-import-box { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 1fr); gap: 10px; padding: 12px; border: 1px solid #dfe7e3; border-radius: 11px; background: #f7fbf9; }
.tg-premium-import-box .tg-dialog-actions { grid-column: 1 / -1; align-items: center; justify-content: space-between; }
.tg-premium-import-box [data-library-status] { color: var(--muted); font-size: 12px; }
.tg-premium-import-box [data-library-status][data-state="loading"] { color: #8a6714; }
.tg-premium-import-box [data-library-status][data-state="success"] { color: #247456; }
.tg-premium-import-box [data-library-status][data-state="error"] { color: #b43c3c; }
.tg-premium-library-manager { display: grid; gap: 12px; }
.tg-premium-library-manager .tg-premium-library-set { width: 100%; }
.tg-premium-library-manager .tg-premium-library-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); max-height: 390px; padding: 2px; overflow: auto; }
.tg-premium-library-manager .tg-premium-library-item { grid-template-columns: 52px minmax(0, 1fr); align-items: center; }
.tg-premium-library-manager .tg-premium-library-item input { min-width: 0; height: 36px; padding: 6px 8px; font-size: 11px; }
.tg-premium-library-manager .tg-premium-library-emoji { min-width: 52px; min-height: 52px; }
.tg-premium-library-item-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; min-width: 0; }
.tg-premium-library-item-controls .danger-link { width: auto; min-width: 42px; min-height: 34px; padding: 5px 7px; font-size: 10px; }
.tg-premium-library-note { display: grid; grid-template-columns: auto minmax(180px, 1fr); align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.tg-premium-library-note input { min-width: 0; height: 36px; }
.tg-premium-library-save { display: flex; justify-content: flex-end; }
.tg-premium-library-save button,
.tg-premium-library-set-head .danger-link { width: auto; min-height: 32px; padding: 6px 10px; font-size: 11px; }
.tg-premium-context-menu {
  position: fixed;
  z-index: 3200;
  display: grid;
  width: 198px;
  gap: 4px;
  padding: 7px;
  border: 1px solid #e0e5ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(16, 29, 45, 0.24);
}
.tg-premium-context-menu[hidden] { display: none; }
.tg-premium-context-menu button { width: 100%; min-height: 36px; padding: 7px 9px; background: #fff1f1; color: #b43c3c; box-shadow: none; text-align: left; }
.tg-premium-context-menu small { padding: 0 8px 3px; color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .format-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telegram-api-status { grid-template-columns: 1fr; }
  .bot-preview-controls { grid-template-columns: 1fr; }
  .usage-filter-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .format-feature-grid { grid-template-columns: 1fr; }
  .token-inline-form { grid-template-columns: 1fr; }
  .token-inline-form button { width: 100%; }
  .tg-toolbar { align-items: stretch; }
  .tg-message-bubble { max-width: 100%; }
  .tg-editor-disclosure .compact-editor { width: min(520px, 84vw); }
  .tg-dialog-actions { display: grid; grid-template-columns: 1fr; }
  .tg-dialog-actions button { width: 100%; }
  .usage-filter-form { grid-template-columns: 1fr; }
  .usage-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tg-premium-library-tray-head { align-items: flex-start; flex-direction: column; }
  .tg-premium-library-tray-head > div:last-child { width: 100%; justify-content: flex-start; }
  .tg-premium-library-tray-body { max-height: 340px; }
  .tg-premium-library-set { flex-basis: 92%; }
  .tg-premium-import-box { grid-template-columns: 1fr; }
  .tg-premium-import-box .tg-dialog-actions { grid-column: auto; }
  .tg-premium-library-manager .tg-premium-library-grid { grid-template-columns: 1fr; }
  .tg-premium-library-note { grid-template-columns: 1fr; }
  .directory-card-heading { align-items: flex-start; padding: 13px; }
  .directory-preview-actions { align-items: stretch; flex-direction: column; }
  .directory-preview-actions button,
  .directory-preview-actions .button { width: 100%; text-align: center; }
  .directory-edit-form { grid-template-columns: 1fr; padding: 12px; }
  .directory-edit-form .wide { grid-column: auto; }
  .directory-edit-actions { align-items: stretch; flex-direction: column-reverse; }
  .directory-edit-actions button,
  .directory-delete-form button { width: 100%; }
  .directory-message-bubble { min-width: calc(100% - 24px); max-width: calc(100% - 24px); margin: 12px; }
}

/* 2026-08 enterprise glass UI: restrained, dense and system-native. */
:root {
  --bg: #f1f3f6;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #17202e;
  --muted: #667085;
  --line: rgba(15, 23, 42, 0.09);
  --primary: #0b6fd3;
  --primary-dark: #0758aa;
  --primary-soft: rgba(11, 111, 211, 0.09);
  --danger: #c9363e;
  --notice: #edf7f1;
  --sidebar: rgba(249, 250, 252, 0.82);
  --sidebar-muted: #7a8494;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.045);
  --shadow-float: 0 18px 50px rgba(15, 23, 42, 0.12);
}

html { background: #eef1f5; }

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 280px),
    #f1f3f6;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: -0.005em;
}

button,
.button,
input,
textarea,
select { font-family: inherit; }

.topbar {
  width: 224px;
  padding: 20px 14px 16px;
  background: var(--sidebar);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text);
  box-shadow: none;
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}

.topbar > div { gap: 3px; }

.topbar strong {
  margin: 0 4px 15px;
  padding: 2px 2px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  color: #101828;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.topbar strong small {
  display: block;
  margin-top: 5px;
  color: #8a94a3;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar .topbar-user {
  margin: 14px 4px 0;
  padding: 14px 2px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #7b8492;
  font-size: 11px;
}

.toplink {
  min-height: 39px;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #4b5565;
  font-size: 13px;
  font-weight: 550;
}

.topbar .toplink::before {
  content: "" !important;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #a8b0bc;
  color: transparent;
  font-size: 0;
}

.toplink:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.06);
  color: #111827;
  text-decoration: none;
}

.toplink.active {
  background: rgba(11, 111, 211, 0.1);
  border-color: rgba(11, 111, 211, 0.09);
  color: #0758aa;
}

.topbar .toplink.active::before { background: #0b6fd3; }

.topbar > form button {
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.58);
  color: #475467;
  box-shadow: none;
}

.topbar > form button:hover {
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
}

.shell {
  max-width: 1600px;
  margin: 0 0 64px 224px;
  padding: 24px 30px 40px;
  gap: 14px;
}

.project-tree-panel {
  left: 224px;
  width: 272px;
  padding: 20px 12px 16px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(249, 250, 252, 0.74);
  box-shadow: none;
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
}

.shell.project-shell {
  margin: 20px 24px 64px 520px;
}

.project-tree-heading {
  padding: 3px 8px 15px;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.project-tree-heading span,
.eyebrow {
  color: #687386;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.project-tree-heading h2 {
  margin-top: 4px;
  color: #17202e;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-tree-heading > strong,
.project-tree-home em,
.project-tree-link em,
.panel-heading h2 em {
  background: rgba(15, 23, 42, 0.055);
  color: #667085;
}

.project-tree-heading > strong {
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  font-weight: 650;
}

.project-tree-home {
  margin: 10px 2px 7px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #4b5565;
}

.project-tree-home::before { display: none; }

.project-tree-home.current,
.project-tree-link.current {
  background: rgba(11, 111, 211, 0.085);
  color: #0758aa;
}

.project-tree-home.current em,
.project-tree-link.current em {
  background: rgba(11, 111, 211, 0.11);
  color: #0758aa;
}

.project-tree-list .project-tree-list { border-left-color: rgba(15, 23, 42, 0.1); }

.project-tree-toggle::before { border-left-color: #8b95a3; }
.project-tree-toggle:hover { background: rgba(15, 23, 42, 0.05); }

.project-tree-link {
  margin: 1px 0;
  padding: 6px 8px;
  border-radius: 7px;
  color: #4f5b6b;
  font-size: 12px;
}

.project-tree-link:hover {
  background: rgba(255, 255, 255, 0.86);
  color: #17202e;
}

.project-tree-link.current {
  box-shadow: inset 2px 0 0 #0b6fd3;
  font-weight: 650;
}

.project-tree-note {
  border-top-color: rgba(15, 23, 42, 0.08);
  color: #929aa7;
}

.section-heading,
.panel,
.shop-editor,
.ad-editor,
.stat-card,
.login-panel,
.delivery-card,
.nested-disclosure {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.section-heading {
  min-height: 112px;
  padding: 21px 24px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.82);
}

.section-heading::after { display: none; }

.section-heading h1 {
  margin: 3px 0 5px;
  color: #101828;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.section-heading p,
.panel p,
.muted { color: var(--muted); }

.panel { padding: 18px; }

.stats-grid { gap: 12px; }

.stat-card,
.accent-card {
  min-height: 104px;
  padding: 16px 17px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

.stat-card span,
.accent-card span {
  color: #667085;
  font-size: 12px;
  font-weight: 560;
}

.stat-card strong,
.accent-card strong {
  color: #101828;
  font-size: 26px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.stat-card small,
.accent-card small {
  color: #8a94a3;
  font-size: 11px;
  opacity: 1;
}

.accent-card strong { color: #0b6fd3; }
.stat-card .stat-word { font-size: 20px; letter-spacing: -0.02em; }

.panel-heading {
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading h2,
.panel h2 {
  color: #17202e;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.018em;
}

.panel-heading h2 em {
  min-width: 24px;
  height: 24px;
  border: 1px solid rgba(15, 23, 42, 0.055);
  font-size: 11px;
}

button,
.button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #0b6fd3;
  border-radius: 8px;
  background: #0b6fd3;
  color: #fff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 620;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

button:hover,
.button:hover {
  border-color: #0758aa;
  background: #0758aa;
}

.secondary {
  border-color: #344054;
  background: #344054;
}

.secondary:hover {
  border-color: #1d2939;
  background: #1d2939;
}

.ghost {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: #344054;
  box-shadow: none;
}

.ghost:hover {
  border-color: rgba(15, 23, 42, 0.2);
  background: #fff;
  color: #101828;
}

.danger {
  border-color: #c9363e;
  background: #c9363e;
  box-shadow: none;
}

.compact {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
}

input,
textarea,
select {
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #17202e;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.018);
}

input:hover,
textarea:hover,
select:hover { border-color: rgba(15, 23, 42, 0.22); }

input:focus,
textarea:focus,
select:focus {
  border-color: #0b6fd3;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(11, 111, 211, 0.12);
}

label {
  color: #5f6b7a;
  font-size: 12px;
  font-weight: 550;
}

.grid-form { gap: 12px; }

.disclosure {
  border-color: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.disclosure > summary {
  min-height: 54px;
  padding: 15px 18px;
}

.disclosure > summary span {
  color: #17202e;
  font-size: 15px;
  font-weight: 660;
}

.disclosure > summary small {
  color: #8a94a3;
  font-size: 11px;
}

.disclosure > summary::after {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.045);
  color: #667085;
  font-size: 17px;
}

.disclosure[open] > summary {
  border-bottom-color: rgba(15, 23, 42, 0.075);
  background: rgba(248, 250, 252, 0.62);
}

.table-wrap {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
}

table { font-size: 12px; }

th {
  padding: 10px 11px;
  border-color: rgba(15, 23, 42, 0.07);
  background: rgba(247, 249, 252, 0.94);
  color: #667085;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

td {
  padding: 10px 11px;
  border-color: rgba(15, 23, 42, 0.065);
}

tbody tr:hover { background: rgba(11, 111, 211, 0.028); }

.notice,
.alert {
  border: 1px solid rgba(21, 128, 61, 0.18);
  border-radius: 9px;
  background: rgba(240, 253, 244, 0.82);
  color: #24613d;
  box-shadow: none;
}

.notice.error,
.alert.error {
  border-color: rgba(201, 54, 62, 0.18);
  background: rgba(254, 242, 242, 0.84);
  color: #a22d34;
}

.breadcrumbs {
  min-height: 24px;
  font-size: 12px;
}

.breadcrumbs a { color: #5b6575; }
.breadcrumbs a:hover { color: #0b6fd3; }

.directory-preview-card,
.current-directory-card,
.schedule-card,
.usage-filter-form,
.telegram-user-choice,
.permission-grid .check {
  border-color: rgba(15, 23, 42, 0.085);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: none;
}

.directory-card-heading {
  border-bottom-color: rgba(15, 23, 42, 0.075);
  background: rgba(248, 250, 252, 0.68);
}

.directory-status.active {
  background: rgba(21, 128, 61, 0.08);
  color: #287044;
}

.directory-status.inactive {
  background: rgba(201, 54, 62, 0.07);
  color: #a22d34;
}

.format-guide { background: rgba(255, 255, 255, 0.82); }

.telegram-api-status,
.telegram-api-status.connected,
.telegram-api-status.needs-attention {
  border-color: rgba(15, 23, 42, 0.09);
  background: rgba(248, 250, 252, 0.78);
}

.telegram-api-status strong,
.telegram-api-status.connected strong { color: #344054; }

.tg-editor-shell,
.tg-static-preview,
.tg-premium-dialog-card,
.tg-premium-library-set {
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: none;
}

.tg-premium-dialog {
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.tg-premium-dialog::backdrop {
  background: rgba(15, 23, 42, 0.3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.permission-fieldset {
  border-color: rgba(15, 23, 42, 0.09);
  background: rgba(248, 250, 252, 0.5);
}

.permission-grid .check strong { color: #344054; font-size: 12px; }

.login-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 55%),
    #edf0f4;
}

.login-panel {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  -webkit-backdrop-filter: blur(30px) saturate(130%);
  backdrop-filter: blur(30px) saturate(130%);
}

.login-panel::before {
  content: "管理";
  border: 1px solid rgba(11, 111, 211, 0.14);
  border-radius: 12px;
  background: rgba(11, 111, 211, 0.1);
  color: #0758aa;
  box-shadow: none;
  letter-spacing: 0;
}

.login-approval {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.72);
}

.login-code { color: #0758aa; }

* {
  scrollbar-color: rgba(100, 116, 139, 0.38) transparent;
  scrollbar-width: thin;
}

@media (min-width: 901px) and (max-width: 1180px) {
  .topbar { width: 210px; }
  .project-tree-panel { left: 210px; width: 250px; }
  .shell { margin-left: 210px; padding-inline: 22px; }
  .shell.project-shell { margin-left: 482px; }
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    width: 100%;
    height: auto;
    padding: 10px 14px;
    background: rgba(250, 251, 253, 0.82);
    border-right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.09);
    color: var(--text);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
  }

  .topbar strong {
    margin: 0 10px 0 0;
    padding: 0;
    border: 0;
  }

  .topbar strong small { display: none; }
  .topbar .topbar-user { display: none; }
  .toplink { min-height: 34px; padding: 6px 8px; }
  .topbar .toplink::before { display: none; }

  .topbar > form button {
    width: auto;
    background: rgba(255, 255, 255, 0.76);
    color: #344054;
  }

  .shell {
    margin-left: 0;
    padding: 18px;
  }

  .shell.project-shell {
    width: auto;
    margin: 14px 14px 52px;
  }

  .project-tree-panel {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    max-height: 350px;
    margin: 14px 18px 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow);
  }

  .section-heading { min-height: 0; }
}

@media (max-width: 720px) {
  .topbar { padding: 8px 10px; }
  .topbar strong { display: none; }
  .toplink { font-size: 12px; }
  .shell { padding: 13px; }
  .project-tree-panel { margin: 12px 13px 0; padding: 14px 10px; }
  .shell.project-shell { margin: 12px 13px 44px; }
  .section-heading { padding: 17px; }
  .section-heading h1 { font-size: 23px; }
  .panel { padding: 14px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 96px; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 88px; }
  .disclosure > summary { padding: 13px 14px; }
}

/* Shop display media and menu media are intentionally separate assets. */
.shop-asset-section,
.shop-asset-upload {
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.78);
}

.shop-asset-upload.menu-upload,
.shop-asset-section.menu-assets {
  border-color: rgba(11, 111, 211, 0.2);
  background: rgba(239, 247, 255, 0.72);
}

.shop-asset-upload small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 400;
}

.shop-asset-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

details.shop-asset-section > summary {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}

details.shop-asset-section > summary::-webkit-details-marker { display: none; }
details.shop-asset-section[open] > summary { margin-bottom: 10px; }

/* One shared Telegram reply-keyboard preview for country, city and category buttons. */
.menu-button-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
}

.menu-button-workspace > .panel { min-width: 0; }

.menu-button-preview-panel {
  padding: 0;
  overflow: hidden;
}

.menu-button-preview-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 252, 253, 0.88);
}

.menu-button-preview-current {
  max-width: min(420px, 55%);
  color: var(--muted);
  font-size: 12px;
}

.menu-button-preview-current strong {
  color: #176b9b;
  overflow-wrap: anywhere;
}

.telegram-keyboard-device {
  width: min(560px, calc(100% - 32px));
  margin: 18px auto;
  overflow: hidden;
  border: 1px solid rgba(25, 55, 68, 0.2);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(34, 57, 73, 0.14);
}

.telegram-keyboard-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(43, 69, 81, 0.13);
  background: rgba(255, 255, 255, 0.97);
}

.telegram-keyboard-topbar > span:last-child { display: grid; gap: 1px; }
.telegram-keyboard-topbar strong { color: #172331; font-size: 14px; }
.telegram-keyboard-topbar small { color: #58a662; font-size: 11px; }

.telegram-keyboard-chat {
  display: flex;
  align-items: flex-end;
  min-height: 150px;
  padding: 20px 15px;
}

.telegram-keyboard-message {
  position: relative;
  min-width: 145px;
  max-width: 80%;
  padding: 9px 48px 18px 12px;
  border-radius: 5px 15px 15px 15px;
  background: #fff;
  color: #1e2b35;
  box-shadow: 0 1px 2px rgba(31, 48, 59, 0.18);
  font-size: 14px;
}

.telegram-keyboard-message small {
  position: absolute;
  right: 9px;
  bottom: 5px;
  color: #81919c;
  font-size: 10px;
}

.telegram-reply-panel {
  display: grid;
  gap: 6px;
  padding: 7px;
  border-top: 1px solid rgba(47, 70, 82, 0.12);
  background: rgba(224, 232, 235, 0.95);
  backdrop-filter: blur(14px);
}

.telegram-compose-row {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 6px;
  color: #6f808b;
  text-align: center;
}

.telegram-compose-row > div {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 18px;
  background: #fff;
  color: #9aa6ae;
  text-align: left;
  font-size: 12px;
}

.telegram-reply-grid {
  display: grid;
  grid-template-columns: repeat(var(--keyboard-columns, 4), minmax(0, 1fr));
  gap: 5px;
}

.telegram-reply-grid button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 7px;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.98);
  color: #26343f;
  box-shadow: 0 1px 2px rgba(37, 57, 69, 0.18);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.telegram-reply-grid button[hidden] { display: none; }

.telegram-reply-grid button.telegram-button-style-primary {
  background: #2aabee;
  color: #fff;
}

.telegram-reply-grid button.telegram-button-style-success {
  background: #43a65f;
  color: #fff;
}

.telegram-reply-grid button.telegram-button-style-danger {
  background: #e35b5b;
  color: #fff;
}

.telegram-button-label-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telegram-button-custom-emoji {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
}

.telegram-menu-flag {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: -4px;
}

.menu-button-preview-current .telegram-menu-flag {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.menu-button-preview-current .telegram-button-custom-emoji {
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

.menu-button-settings-panel {
  overflow: hidden;
  padding: 0;
}

.menu-button-workspace > .menu-button-settings-panel { padding: 0; }

.menu-button-settings-panel > summary {
  cursor: pointer;
  list-style: none;
}

.menu-button-settings-panel > summary::-webkit-details-marker { display: none; }

.menu-button-settings-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 15px 18px;
  background: rgba(250, 252, 253, 0.88);
}

.menu-button-settings-summary:hover { background: rgba(244, 248, 250, 0.96); }

.menu-button-settings-summary-copy {
  display: grid;
  gap: 3px;
}

.menu-button-settings-summary-copy strong {
  color: #172331;
  font-size: 17px;
}

.menu-button-settings-summary-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-button-settings-summary-hint {
  color: var(--muted);
  font-size: 12px;
}

.menu-button-settings-summary-hint::after {
  display: inline-block;
  margin-left: 6px;
  color: #667085;
  content: '⌄';
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease;
}

.menu-button-settings-panel[open] .menu-button-settings-summary-hint::after {
  transform: rotate(180deg);
}

.menu-button-settings-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.menu-button-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.menu-button-settings-heading h2 { margin: 2px 0 0; }

.menu-button-settings-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.menu-button-settings-form {
  display: grid;
  gap: 12px;
}

.menu-button-settings-form label {
  display: grid;
  gap: 6px;
}

.menu-button-settings-form label small {
  color: #8a94a3;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.menu-button-emoji-field {
  display: grid;
  gap: 7px;
}

.menu-button-field-label {
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.menu-button-emoji-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.8);
  color: #8a94a3;
  font-size: 12px;
}

.menu-button-emoji-choice.selected {
  border-style: solid;
  border-color: rgba(42, 171, 238, 0.35);
  background: rgba(42, 171, 238, 0.07);
  color: #344054;
}

.menu-button-emoji-choice img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.menu-button-emoji-choice span {
  display: grid;
  gap: 2px;
}

.menu-button-emoji-choice strong { font-size: 12px; }
.menu-button-emoji-choice small { color: #8a94a3; font-size: 10px; }

.menu-button-emoji-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.menu-button-emoji-actions button {
  width: auto;
  padding: 7px 10px;
  font-size: 11px;
}

.menu-button-emoji-field > small {
  color: #8a94a3;
  font-size: 11px;
  line-height: 1.45;
}

.menu-button-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 3px;
}

.menu-button-settings-actions button { width: auto; }

.menu-button-settings-empty {
  display: grid;
  align-content: center;
  flex: 1;
  min-height: 190px;
  padding: 20px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.72);
  color: #667085;
  text-align: center;
}

.menu-button-settings-empty strong { color: #344054; }
.menu-button-settings-empty p { margin: 7px 0 0; font-size: 12px; line-height: 1.6; }

.menu-sort-panel { overflow: hidden; }

.menu-sort-heading { align-items: flex-start; }
.menu-sort-heading p { max-width: 760px; margin: 5px 0 0; font-size: 12px; line-height: 1.55; }
.menu-sort-count { flex: 0 0 auto; color: #667085; font-size: 12px; }

.menu-sort-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-sort-item {
  display: grid;
  grid-template-columns: 34px 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.86);
  transition: border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.menu-sort-item:hover {
  border-color: rgba(11, 111, 211, 0.28);
  box-shadow: 0 4px 14px rgba(18, 45, 72, 0.06);
}

.menu-sort-item.dragging {
  opacity: 0.55;
  border-color: #0b6fd3;
  box-shadow: 0 8px 20px rgba(11, 111, 211, 0.14);
}

.menu-sort-handle {
  width: 32px;
  min-height: 34px;
  padding: 3px;
  border-color: transparent;
  background: transparent;
  color: #98a2b3;
  cursor: grab;
  font-size: 17px;
  letter-spacing: -4px;
}

.menu-sort-handle:hover {
  border-color: rgba(15, 23, 42, 0.1);
  background: #f3f6f9;
  color: #475467;
}

.menu-sort-handle:active { cursor: grabbing; }

.menu-sort-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.menu-sort-name { display: grid; min-width: 0; gap: 2px; }
.menu-sort-name strong { overflow: hidden; color: #253143; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.menu-sort-name small { display: flex; align-items: center; gap: 4px; overflow: hidden; color: #7b8795; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.menu-sort-name .telegram-menu-flag { width: 15px; height: 15px; margin-right: 1px; }

.menu-sort-move { display: flex; gap: 4px; }
.menu-sort-move button { width: 32px; min-height: 32px; padding: 3px; }
.menu-sort-move button:disabled { opacity: 0.28; cursor: not-allowed; }
.menu-sort-edit { white-space: nowrap; }

.menu-sort-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
}

.menu-sort-actions span { margin-right: auto; color: #8a94a3; font-size: 12px; }
.menu-sort-actions button { width: auto; }
.menu-sort-actions button:disabled { border-color: #d5d9df; background: #e9edf1; color: #98a2b3; cursor: default; }
[data-menu-sort-form].is-dirty .menu-sort-actions span { color: #0b6fd3; }

.field-disabled { opacity: 0.48; }

@media (max-width: 1040px) {
  .menu-button-workspace { grid-template-columns: 1fr; }
  .menu-button-settings-empty { min-height: 120px; }
}

@media (max-width: 620px) {
  .menu-button-preview-current { max-width: 100%; }
  .telegram-keyboard-device { width: calc(100% - 20px); margin: 10px auto; border-radius: 13px; }
  .telegram-keyboard-chat { min-height: 120px; padding: 14px 10px; }
  .telegram-reply-grid button { min-height: 38px; padding-inline: 4px; font-size: 11px; }
  .menu-button-settings-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .menu-button-settings-actions button { width: 100%; }
  .menu-sort-item { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 6px; padding: 7px; }
  .menu-sort-handle { display: none; }
  .menu-sort-edit { grid-column: 2 / -1; justify-self: start; }
  .menu-sort-move button { width: 30px; min-height: 30px; }
  .menu-sort-actions { align-items: stretch; flex-direction: column; }
  .menu-sort-actions button { width: 100%; }
}

.shop-asset-heading strong { color: #273444; font-size: 13px; }
.shop-asset-heading span {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(11, 111, 211, 0.1);
  color: #0758aa;
  font-size: 11px;
  font-weight: 700;
}

.shop-asset-section .image-grid { margin: 0; }

/* Global scheduled messages: spacious desktop time controls with one active mode at a time. */
.schedule-form {
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
}

.schedule-form > * { min-width: 0; }

.schedule-settings {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.11);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
}

.schedule-settings legend {
  padding: 0 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.schedule-settings-head {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(300px, 1.2fr);
  align-items: end;
  gap: 16px;
}

.schedule-mode-field select,
.schedule-form input[type="datetime-local"],
.schedule-form input[type="number"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 15px;
}

.schedule-enable-check,
.schedule-option-check {
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.schedule-enable-check input,
.schedule-option-check input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  min-height: 19px;
}

.schedule-enable-check span,
.schedule-option-check span,
.schedule-panel-heading {
  display: grid;
  gap: 3px;
}

.schedule-enable-check strong,
.schedule-option-check strong,
.schedule-panel-heading strong {
  color: #344054;
  font-size: 13px;
}

.schedule-enable-check small,
.schedule-option-check small,
.schedule-panel-heading small {
  color: #7b8795;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.schedule-enable-check:has(input:checked),
.schedule-option-check:has(input:checked) {
  border-color: rgba(47, 155, 114, 0.3);
  background: rgba(47, 155, 114, 0.07);
}

.schedule-enable-check:has(input:disabled) {
  opacity: 0.58;
  cursor: default;
}

.schedule-time-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(47, 155, 114, 0.18);
  border-radius: 11px;
  background: #fff;
}

.schedule-time-panel[hidden],
.schedule-manual-note[hidden] {
  display: none;
}

.schedule-time-panel-once {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
  align-items: end;
  gap: 18px;
}

.schedule-time-panel-interval .schedule-panel-heading { margin-bottom: 13px; }

.schedule-interval-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.schedule-manual-note {
  margin: 16px 0 0;
  padding: 13px 15px;
  border: 1px dashed rgba(15, 23, 42, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}

.schedule-message-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

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

.schedule-form-actions button {
  width: auto;
  min-width: 220px;
  min-height: 46px;
}

@media (min-width: 901px) and (max-width: 1180px) {
  .schedule-interval-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .schedule-interval-grid > label:last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .schedule-form,
  .schedule-settings-head,
  .schedule-time-panel-once,
  .schedule-interval-grid,
  .schedule-message-options {
    grid-template-columns: 1fr;
  }

  .schedule-settings { padding: 14px; }
  .schedule-interval-grid > label:last-child { grid-column: auto; }
  .schedule-form-actions button { width: 100%; }
}

/* 2026-08-10 Apple workspace refresh
   One quiet material system for the whole admin: translucent navigation,
   restrained system colours, hairline borders and compact enterprise density. */
:root {
  --bg: #edf1f7;
  --panel: rgba(255, 255, 255, 0.66);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.12);
  --primary: #0071e3;
  --primary-dark: #005bb5;
  --primary-soft: rgba(0, 113, 227, 0.1);
  --danger: #ff3b30;
  --notice: rgba(52, 199, 89, 0.1);
  --sidebar: rgba(247, 249, 252, 0.62);
  --sidebar-muted: #7d7d82;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --shadow: 0 1px 1px rgba(24, 35, 52, 0.035), 0 12px 36px rgba(44, 55, 74, 0.07);
  --shadow-float: 0 28px 80px rgba(36, 45, 64, 0.2);
  --hairline: rgba(255, 255, 255, 0.72);
  --apple-blue: #0071e3;
  --apple-green: #34c759;
  --apple-orange: #ff9500;
  --apple-red: #ff3b30;
}

html {
  min-height: 100%;
  background: #e9edf4;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -8%, rgba(0, 113, 227, 0.11), transparent 31rem),
    radial-gradient(circle at 104% 5%, rgba(175, 82, 222, 0.065), transparent 28rem),
    linear-gradient(180deg, #f5f7fb 0, #edf1f7 38rem, #e9edf4 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection {
  background: rgba(0, 113, 227, 0.2);
}

.topbar,
.project-tree-panel {
  background: rgba(247, 249, 252, 0.58);
  border-color: rgba(60, 60, 67, 0.1);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.58);
  -webkit-backdrop-filter: blur(38px) saturate(175%);
  backdrop-filter: blur(38px) saturate(175%);
}

.topbar {
  width: 232px;
  padding: 22px 15px 16px;
}

.topbar > div { gap: 2px; }

.topbar strong {
  margin: 0 5px 17px;
  padding: 1px 1px 18px;
  border-bottom-color: rgba(60, 60, 67, 0.1);
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.028em;
}

.topbar strong small {
  margin-top: 4px;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 580;
  letter-spacing: 0.08em;
  text-transform: none;
}

.topbar .topbar-user {
  margin: 15px 5px 0;
  padding: 15px 1px 0;
  border-top-color: rgba(60, 60, 67, 0.1);
  color: #8e8e93;
  font-size: 11px;
}

.toplink {
  min-height: 40px;
  gap: 10px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  color: #515154;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: -0.008em;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.topbar .toplink::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: #aeaeb2;
  box-shadow: 0 0 0 3px rgba(174, 174, 178, 0.1);
}

.toplink:hover {
  border: 0;
  background: rgba(255, 255, 255, 0.58);
  color: #1d1d1f;
}

.toplink:active { transform: scale(0.985); }

.toplink.active {
  border: 0;
  background: rgba(0, 113, 227, 0.11);
  color: #0066cc;
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.055);
}

.topbar .toplink.active::before {
  background: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.topbar > form button {
  min-height: 38px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.48);
  color: #515154;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.topbar > form button:hover {
  border-color: rgba(60, 60, 67, 0.17);
  background: rgba(255, 255, 255, 0.8);
  color: #1d1d1f;
}

.project-tree-panel {
  left: 232px;
  width: 284px;
  padding: 22px 13px 17px;
}

.shell {
  max-width: 1620px;
  margin: 0 0 64px 232px;
  padding: 25px 32px 48px;
}

.shell.project-shell {
  margin: 21px 25px 68px 542px;
}

.project-tree-heading {
  padding: 2px 9px 16px;
  border-bottom-color: rgba(60, 60, 67, 0.1);
}

.project-tree-heading span,
.eyebrow {
  color: #86868b;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.075em;
}

.project-tree-heading h2 {
  margin-top: 5px;
  color: #1d1d1f;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.project-tree-heading > strong,
.project-tree-home em,
.project-tree-link em,
.panel-heading h2 em {
  background: rgba(118, 118, 128, 0.09);
  color: #6e6e73;
}

.project-tree-heading > strong {
  border-color: rgba(60, 60, 67, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.project-tree-home {
  margin: 11px 2px 8px;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  color: #515154;
}

.project-tree-home.current,
.project-tree-link.current {
  background: rgba(0, 113, 227, 0.105);
  color: #0066cc;
}

.project-tree-home.current em,
.project-tree-link.current em {
  background: rgba(0, 113, 227, 0.11);
  color: #0066cc;
}

.project-tree-toggle::before { border-left-color: #8e8e93; }
.project-tree-toggle:hover { background: rgba(118, 118, 128, 0.08); }

.project-tree-link {
  margin: 1px 0;
  padding: 7px 9px;
  border-radius: 9px;
  color: #5c5c60;
  font-size: 12px;
}

.project-tree-link:hover {
  background: rgba(255, 255, 255, 0.48);
  color: #1d1d1f;
}

.project-tree-link.current {
  box-shadow: inset 2px 0 0 var(--apple-blue);
  font-weight: 630;
}

.project-tree-list .project-tree-list { border-left-color: rgba(60, 60, 67, 0.11); }
.project-tree-note { border-top-color: rgba(60, 60, 67, 0.1); color: #98989d; }

.section-heading,
.panel,
.shop-editor,
.ad-editor,
.stat-card,
.login-panel,
.delivery-card,
.nested-disclosure {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.52);
  -webkit-backdrop-filter: blur(30px) saturate(155%);
  backdrop-filter: blur(30px) saturate(155%);
}

.section-heading {
  min-height: 110px;
  padding: 23px 25px;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.61);
}

.section-heading h1 {
  margin: 4px 0 5px;
  color: #1d1d1f;
  font-size: clamp(25px, 2.35vw, 31px);
  font-weight: 720;
  letter-spacing: -0.04em;
}

.section-heading p,
.panel p,
.muted { color: #6e6e73; }

.panel { padding: 19px; }
.stats-grid { gap: 13px; }

.stat-card,
.accent-card {
  min-height: 103px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.57);
  color: #1d1d1f;
  box-shadow: 0 8px 24px rgba(44, 55, 74, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.stat-card span,
.accent-card span {
  color: #6e6e73;
  font-size: 12px;
  font-weight: 560;
}

.stat-card strong,
.accent-card strong {
  color: #1d1d1f;
  font-size: 27px;
  font-weight: 720;
  letter-spacing: -0.045em;
}

.accent-card strong { color: var(--apple-blue); }
.stat-card small,
.accent-card small { color: #8e8e93; }

.panel-heading h2,
.panel h2 {
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.022em;
}

button,
.button {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--apple-blue);
  border-radius: 10px;
  background: var(--apple-blue);
  color: #fff;
  box-shadow: 0 1px 1px rgba(0, 64, 128, 0.08);
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.008em;
  transition: background 130ms ease, border-color 130ms ease, box-shadow 130ms ease, transform 130ms ease;
}

button:hover,
.button:hover {
  border-color: #0077ed;
  background: #0077ed;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.17);
}

button:active,
.button:active { transform: scale(0.985); }

.secondary {
  border-color: #3a3a3c;
  background: #3a3a3c;
}

.ghost {
  border: 1px solid rgba(60, 60, 67, 0.14);
  background: rgba(255, 255, 255, 0.52);
  color: #3a3a3c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.ghost:hover {
  border-color: rgba(60, 60, 67, 0.19);
  background: rgba(255, 255, 255, 0.82);
  color: #1d1d1f;
  box-shadow: none;
}

.danger {
  border-color: var(--apple-red);
  background: var(--apple-red);
}

.compact { border-radius: 9px; }

input,
textarea,
select {
  min-height: 40px;
  border: 1px solid rgba(60, 60, 67, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.69);
  color: #1d1d1f;
  box-shadow: inset 0 1px 2px rgba(24, 35, 52, 0.025), 0 1px 0 rgba(255, 255, 255, 0.46);
}

input:hover,
textarea:hover,
select:hover { border-color: rgba(60, 60, 67, 0.24); }

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 113, 227, 0.72);
  outline: 0;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.13);
}

label { color: #5d5d62; font-weight: 560; }

.disclosure {
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.disclosure > summary { min-height: 56px; padding: 15px 18px; }
.disclosure > summary span { color: #1d1d1f; }
.disclosure > summary small { color: #8e8e93; }
.disclosure > summary::after {
  border-color: rgba(60, 60, 67, 0.08);
  border-radius: 9px;
  background: rgba(118, 118, 128, 0.08);
  color: #6e6e73;
}

.disclosure[open] > summary {
  border-bottom-color: rgba(60, 60, 67, 0.1);
  background: rgba(255, 255, 255, 0.3);
}

.table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

th {
  border-color: rgba(60, 60, 67, 0.09);
  background: rgba(246, 247, 250, 0.68);
  color: #6e6e73;
}

td { border-color: rgba(60, 60, 67, 0.085); }
tbody tr:hover { background: rgba(0, 113, 227, 0.035); }

.notice,
.alert {
  border-color: rgba(52, 199, 89, 0.19);
  border-radius: 12px;
  background: rgba(52, 199, 89, 0.095);
  color: #207b38;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.notice.error,
.alert.error {
  border-color: rgba(255, 59, 48, 0.18);
  background: rgba(255, 59, 48, 0.085);
  color: #c4261d;
}

.breadcrumbs { color: #8e8e93; }
.breadcrumbs a { color: #6e6e73; }
.breadcrumbs a:hover { color: var(--apple-blue); }

.directory-preview-card,
.current-directory-card,
.schedule-card,
.usage-filter-form,
.telegram-user-choice,
.permission-grid .check,
.schedule-settings,
.schedule-time-panel,
.schedule-enable-check,
.schedule-option-check,
.menu-sort-item,
.menu-button-settings-empty,
.menu-button-emoji-choice {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.directory-card-heading {
  border-bottom-color: rgba(60, 60, 67, 0.09);
  background: rgba(255, 255, 255, 0.28);
}

.directory-status.active {
  background: rgba(52, 199, 89, 0.11);
  color: #248a3d;
}

.directory-status.inactive {
  background: rgba(255, 59, 48, 0.09);
  color: #c4261d;
}

.tg-editor-shell,
.tg-static-preview,
.telegram-keyboard-device,
.tg-premium-library-set {
  border-color: rgba(60, 60, 67, 0.12);
  box-shadow: 0 10px 28px rgba(44, 55, 74, 0.075);
}

.tg-premium-dialog {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: rgba(250, 250, 252, 0.78);
  box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(42px) saturate(170%);
  backdrop-filter: blur(42px) saturate(170%);
}

.tg-premium-dialog::backdrop {
  background: rgba(35, 38, 45, 0.28);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}

.modal,
dialog:not(.tg-premium-dialog) {
  border-radius: 22px;
  background: rgba(250, 250, 252, 0.8);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(42px) saturate(165%);
  backdrop-filter: blur(42px) saturate(165%);
}

.login-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 113, 227, 0.16), transparent 32rem),
    radial-gradient(circle at 92% 12%, rgba(175, 82, 222, 0.1), transparent 30rem),
    linear-gradient(180deg, #f6f8fc, #e8edf5);
}

.login-panel {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 30px 90px rgba(44, 55, 74, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(42px) saturate(175%);
  backdrop-filter: blur(42px) saturate(175%);
}

.login-panel::before {
  border-color: rgba(0, 113, 227, 0.13);
  border-radius: 14px;
  background: rgba(0, 113, 227, 0.1);
  color: #0066cc;
}

.login-approval {
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.43);
}

.login-code { color: #0066cc; }

* {
  scrollbar-color: rgba(110, 110, 115, 0.32) transparent;
}

@media (min-width: 901px) and (max-width: 1180px) {
  .topbar { width: 210px; }
  .project-tree-panel { left: 210px; width: 256px; }
  .shell { margin-left: 210px; padding-inline: 22px; }
  .shell.project-shell { margin-left: 490px; }
}

@media (max-width: 900px) {
  body {
    background:
      radial-gradient(circle at 12% -5%, rgba(0, 113, 227, 0.11), transparent 23rem),
      linear-gradient(180deg, #f4f6fa, #e9edf4);
  }

  .topbar {
    position: sticky;
    width: 100%;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
    background: rgba(248, 249, 252, 0.68);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.52);
    -webkit-backdrop-filter: blur(30px) saturate(175%);
    backdrop-filter: blur(30px) saturate(175%);
  }

  .topbar strong { margin-right: 9px; }
  .toplink { min-height: 35px; padding: 7px 9px; border-radius: 9px; }
  .topbar > form button { background: rgba(255, 255, 255, 0.56); }

  .shell { margin-left: 0; padding: 18px; }
  .shell.project-shell { margin: 14px 14px 52px; }

  .project-tree-panel {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    max-height: 350px;
    margin: 14px 18px 0;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.57);
    box-shadow: var(--shadow);
  }

  .section-heading { min-height: 0; }
}

@media (max-width: 720px) {
  .topbar {
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .toplink { flex: 0 0 auto; font-size: 12px; }
  .shell { padding: 13px; }
  .project-tree-panel { margin: 12px 13px 0; padding: 14px 10px; }
  .shell.project-shell { margin: 12px 13px 44px; }
  .section-heading { padding: 19px; border-radius: 17px; }
  .section-heading h1 { font-size: 24px; }
  .panel { padding: 15px; border-radius: 16px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 94px; border-radius: 15px; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 86px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep long management pages smooth: the fixed navigation carries the
   strongest material; content panes use a lighter compositing layer. */
.topbar,
.project-tree-panel {
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  backdrop-filter: blur(24px) saturate(155%);
}

.section-heading,
.panel,
.shop-editor,
.ad-editor,
.stat-card,
.login-panel,
.delivery-card,
.nested-disclosure {
  -webkit-backdrop-filter: blur(15px) saturate(125%);
  backdrop-filter: blur(15px) saturate(125%);
}

.tg-premium-dialog,
.modal,
dialog:not(.tg-premium-dialog) {
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
}

/* Unified operations overview */
.module-overview {
  padding: 20px;
  overflow: clip;
}

.module-overview-heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.module-overview-heading p {
  max-width: 660px;
  margin: 6px 0 0;
}

.module-overview-total {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(60, 60, 67, 0.09);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.45);
  color: #6e6e73;
  font-size: 12px;
}

.module-overview-total strong {
  color: #1d1d1f;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.module-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: start;
  gap: 18px;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 10px;
  min-width: 0;
}

.module-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.module-card:hover {
  border-color: rgba(0, 113, 227, 0.2);
  background: rgba(255, 255, 255, 0.63);
}

.module-card.selected {
  border-color: rgba(0, 113, 227, 0.46);
  background: rgba(245, 250, 255, 0.77);
  box-shadow: 0 7px 22px rgba(0, 91, 190, 0.08), inset 0 0 0 1px rgba(0, 113, 227, 0.08);
}

.module-card-select {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 98px;
  padding: 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d1d1f;
  text-align: left;
  box-shadow: none;
}

.module-card-select:hover,
.module-card-select:focus-visible {
  border: 0;
  background: transparent;
  color: #1d1d1f;
  box-shadow: none;
  transform: none;
}

.module-card-select:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.18);
  outline-offset: -3px;
}

.module-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 113, 227, 0.11);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(229, 239, 252, 0.84));
  color: #0066cc;
  font-size: 14px;
  font-style: normal;
  font-weight: 720;
  letter-spacing: -0.03em;
  box-shadow: 0 3px 9px rgba(30, 85, 145, 0.08), inset 0 1px 0 #fff;
}

.module-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.module-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
}

.module-card-title strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 670;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-status {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.08);
  color: #6e6e73;
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0;
}

.module-status.ready {
  background: rgba(52, 199, 89, 0.1);
  color: #248a3d;
}

.module-status.attention {
  background: rgba(255, 149, 0, 0.11);
  color: #a95e00;
}

.module-card-copy > small {
  color: #0066cc;
  font-size: 11px;
  font-weight: 640;
}

.module-card-copy > span:last-child {
  overflow: hidden;
  color: #77777c;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-card-arrow {
  color: #a0a0a5;
  font-size: 23px;
  font-weight: 300;
}

.module-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 10px 10px;
}

.module-card-actions > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
}

.module-preview-console {
  position: sticky;
  top: 18px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 18px;
  background: rgba(247, 248, 251, 0.72);
  box-shadow: 0 14px 36px rgba(38, 50, 70, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}

.module-preview-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.09);
  background: rgba(255, 255, 255, 0.52);
  color: #6e6e73;
  font-size: 11px;
}

.module-preview-toolbar > span { display: flex; gap: 5px; }
.module-preview-toolbar i { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; }
.module-preview-toolbar i:nth-child(2) { background: #febc2e; }
.module-preview-toolbar i:nth-child(3) { background: #28c840; }
.module-preview-toolbar strong { color: #3a3a3c; font-size: 12px; }
.module-preview-toolbar em { justify-self: end; color: #248a3d; font-size: 10px; font-style: normal; font-weight: 650; }

.overview-telegram-device {
  margin: 13px;
  overflow: hidden;
  border: 1px solid rgba(33, 69, 93, 0.17);
  border-radius: 16px;
  background: #d7e6e2;
  box-shadow: 0 8px 23px rgba(39, 63, 75, 0.12);
}

.overview-telegram-topbar {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 53px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.93);
  color: #1d2730;
}

.overview-bot-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #58aee8, #2389cf);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.overview-telegram-topbar > span:last-child { display: grid; gap: 1px; }
.overview-telegram-topbar strong { font-size: 13px; }
.overview-telegram-topbar small { color: #338cc8; font-size: 10px; }

.overview-telegram-chat {
  min-height: 244px;
  padding: 12px 11px 16px;
  background-color: #d9e8e3;
  background-image:
    radial-gradient(circle at 15px 17px, rgba(74, 120, 104, 0.065) 0 2px, transparent 2.5px),
    radial-gradient(circle at 37px 38px, rgba(74, 120, 104, 0.05) 0 3px, transparent 3.5px);
  background-size: 52px 52px;
}

.overview-date-chip {
  width: max-content;
  margin: 0 auto 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(72, 105, 117, 0.46);
  color: #fff;
  font-size: 9px;
}

.overview-message-bubble {
  position: relative;
  display: grid;
  gap: 5px;
  width: min(88%, 300px);
  padding: 10px 12px 8px;
  border-radius: 13px 13px 13px 4px;
  background: rgba(255, 255, 255, 0.96);
  color: #1d2730;
  box-shadow: 0 1px 2px rgba(33, 53, 64, 0.12);
}

.overview-message-bubble strong { font-size: 13px; }
.overview-message-bubble p {
  margin: 0;
  color: #28343d;
  font-size: 12px;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.overview-message-bubble small { justify-self: end; color: #8c989e; font-size: 9px; }

.overview-test-feedback {
  width: min(92%, 320px);
  margin: 11px 0 0 auto;
  padding: 8px 10px;
  border-radius: 12px 12px 4px 12px;
  background: #d9fdd3;
  color: #35523a;
  font-size: 10px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.overview-test-feedback.show { opacity: 1; transform: translateY(0); }

.overview-keyboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border-top: 1px solid rgba(39, 66, 75, 0.12);
  background: rgba(238, 244, 244, 0.94);
}

.overview-keyboard button {
  min-width: 0;
  min-height: 35px;
  padding: 6px 5px;
  overflow: hidden;
  border: 1px solid rgba(34, 97, 136, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #2176aa;
  font-size: 10px;
  font-weight: 630;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(34, 62, 80, 0.08);
}

.overview-keyboard button:hover {
  border-color: rgba(0, 113, 227, 0.28);
  background: #fff;
  color: #0066cc;
  box-shadow: 0 2px 6px rgba(25, 88, 130, 0.11);
}

.overview-keyboard button:active { transform: scale(0.98); }
.overview-keyboard button:disabled { color: #8e8e93; }

.module-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 13px 13px;
}

.module-preview-actions > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  text-align: center;
}

.module-preview-actions > span {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(118, 118, 128, 0.07);
  color: #6e6e73;
  font-size: 11px;
  text-align: center;
}

@media (min-width: 1500px) {
  .module-overview-layout { grid-template-columns: minmax(0, 1fr) 400px; }
}

@media (max-width: 1450px) {
  .module-overview-layout { grid-template-columns: 1fr; }
  .module-preview-console { position: relative; top: auto; }
  .module-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .module-overview { padding: 14px; }
  .module-overview-heading { display: grid; gap: 11px; }
  .module-overview-total { justify-self: start; }
  .module-card-grid { grid-template-columns: 1fr; }
  .module-card-select { min-height: 92px; }
  .module-preview-console { border-radius: 15px; }
  .overview-telegram-device { margin: 9px; }
  .module-preview-actions { grid-template-columns: 1fr; padding: 0 9px 9px; }
}

@media (max-width: 430px) {
  .module-card-title { align-items: flex-start; flex-direction: column; }
  .module-status { align-self: flex-start; }
  .overview-keyboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Complete Telegram home keyboard overview */
.home-keyboard-overview {
  padding: 20px;
  overflow: clip;
}

.home-keyboard-heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.home-keyboard-heading p {
  max-width: 720px;
  margin: 6px 0 0;
}

.home-keyboard-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.home-keyboard-counts span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(60, 60, 67, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.46);
  color: #6e6e73;
  font-size: 11px;
}

.home-keyboard-counts strong {
  color: #1d1d1f;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.home-keyboard-counts .total {
  border-color: rgba(0, 113, 227, 0.14);
  background: rgba(0, 113, 227, 0.07);
  color: #0066cc;
}

.home-keyboard-counts .total strong { color: #0066cc; }

.home-telegram-console {
  width: min(100%, 760px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 20px;
  background: rgba(247, 248, 251, 0.72);
  box-shadow: 0 18px 45px rgba(38, 50, 70, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
}

.home-telegram-device {
  margin: 14px;
  overflow: hidden;
  border: 1px solid rgba(33, 69, 93, 0.17);
  border-radius: 17px;
  background: #d8e7e2;
  box-shadow: 0 9px 26px rgba(39, 63, 75, 0.13);
}

.home-telegram-chat {
  min-height: 235px;
  padding: 12px 12px 15px;
  background-color: #d9e8e3;
  background-image:
    radial-gradient(circle at 15px 17px, rgba(74, 120, 104, 0.065) 0 2px, transparent 2.5px),
    radial-gradient(circle at 37px 38px, rgba(74, 120, 104, 0.05) 0 3px, transparent 3.5px);
  background-size: 52px 52px;
}

.home-message-bubble { width: min(78%, 450px); }

.home-message-content {
  color: #28343d;
  font-size: 12px;
  line-height: 1.48;
  white-space: normal;
  overflow-wrap: anywhere;
}

.home-test-feedback {
  width: min(86%, 520px);
  margin: 12px 0 0 auto;
  padding: 9px 11px;
  border-radius: 13px 13px 4px 13px;
  background: #d9fdd3;
  color: #35523a;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(33, 53, 64, 0.09);
}

.home-reply-panel {
  padding: 6px;
  border-top: 1px solid rgba(39, 66, 75, 0.12);
  background: rgba(238, 244, 244, 0.96);
}

.home-reply-panel .telegram-compose-row {
  margin-bottom: 6px;
  border: 1px solid rgba(34, 97, 136, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.home-keyboard-section + .home-keyboard-section {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(39, 66, 75, 0.09);
}

.home-keyboard-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
  padding: 0 4px 4px;
  color: #52646d;
  font-size: 10px;
  font-weight: 650;
}

.home-keyboard-section-label em {
  color: #829098;
  font-size: 9px;
  font-style: normal;
  font-weight: 550;
}

.home-country-grid {
  display: grid;
  grid-template-columns: repeat(var(--keyboard-columns, 4), minmax(0, 1fr));
  gap: 5px;
  padding: 0;
  background: transparent;
}

.home-country-grid button,
.home-feature-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 39px;
  padding: 6px 7px;
  overflow: hidden;
  border: 1px solid rgba(34, 97, 136, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  color: #2176aa;
  font-size: 11px;
  font-weight: 640;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(34, 62, 80, 0.08);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.home-country-grid button { pointer-events: auto; }

.home-country-grid button:hover,
.home-feature-row button:hover {
  border-color: rgba(0, 113, 227, 0.3);
  filter: brightness(1.01);
  box-shadow: 0 3px 8px rgba(25, 88, 130, 0.12);
}

.home-country-grid button.is-testing,
.home-feature-row button.is-testing {
  border-color: rgba(52, 199, 89, 0.58);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.14), 0 3px 9px rgba(25, 88, 130, 0.1);
  transform: scale(0.975);
}

.home-country-grid .telegram-button-style-primary,
.home-feature-row .telegram-button-style-primary {
  border-color: rgba(0, 113, 227, 0.24);
  background: linear-gradient(180deg, #1689dc, #0877c8);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 61, 111, 0.14);
}

.home-country-grid .telegram-button-style-success {
  border-color: rgba(52, 199, 89, 0.22);
  background: linear-gradient(180deg, #4ecb6c, #30aa50);
  color: #fff;
}

.home-country-grid .telegram-button-style-danger {
  border-color: rgba(255, 59, 48, 0.24);
  background: linear-gradient(180deg, #ff6259, #e43e35);
  color: #fff;
}

.home-country-grid .telegram-button-custom-emoji {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.home-country-grid .telegram-button-label-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-feature-rows { display: grid; gap: 5px; }

.home-feature-row {
  display: grid;
  grid-template-columns: repeat(var(--feature-columns, 1), minmax(0, 1fr));
  gap: 5px;
}

.home-feature-row button { min-height: 41px; }

.home-keyboard-testbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}

.home-keyboard-testbar > span {
  min-width: 0;
  overflow: hidden;
  color: #6e6e73;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-keyboard-testbar > span strong { color: #1d1d1f; }

.home-keyboard-testbar > button,
.home-keyboard-testbar > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 11px;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 720px) {
  .home-keyboard-overview { padding: 14px; }
  .home-keyboard-heading { display: grid; gap: 11px; }
  .home-keyboard-counts { justify-content: flex-start; }
  .home-telegram-console { border-radius: 16px; }
  .home-telegram-device { margin: 9px; border-radius: 14px; }
  .home-telegram-chat { min-height: 215px; }
  .home-country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-keyboard-testbar { grid-template-columns: 1fr; padding: 0 9px 9px; }
  .home-keyboard-testbar > span { text-align: center; }
}

@media (max-width: 430px) {
  .home-keyboard-counts span { flex: 1 1 auto; justify-content: center; }
  .home-message-bubble { width: 88%; }
  .home-country-grid button,
  .home-feature-row button { min-height: 38px; font-size: 10px; }
}

/* Cross-border travel hierarchy */
.home-keyboard-screen[hidden] { display: none !important; }

.home-keyboard-screen {
  animation: travel-screen-in 180ms ease both;
}

.home-navigation-row {
  margin-top: 3px;
  padding-top: 7px;
  border-top: 1px solid rgba(39, 66, 75, 0.09);
}

.home-navigation-row button {
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: #52646d;
}

@keyframes travel-screen-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.travel-shell { display: grid; gap: 16px; }

.travel-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.travel-hero h1 {
  margin: 5px 0 7px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.travel-hero p {
  max-width: 720px;
  margin: 0;
  color: #6e6e73;
  line-height: 1.6;
}

.travel-hero-count {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(0, 113, 227, 0.13);
  border-radius: 12px;
  background: rgba(0, 113, 227, 0.07);
  color: #0066cc;
  font-size: 12px;
}

.travel-hero-count strong { font-size: 19px; }

.travel-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.travel-module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 15px;
  min-height: 250px;
  padding: 20px;
}

.travel-module-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(226, 241, 255, 0.74));
  font-size: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 16px rgba(50, 80, 120, 0.08);
}

.travel-module-copy { display: grid; align-content: start; gap: 9px; min-width: 0; }

.travel-module-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.travel-module-title h2 { margin: 0; font-size: 18px; }

.travel-module-copy p {
  margin: 0;
  color: #6e6e73;
  font-size: 13px;
  line-height: 1.55;
}

.travel-module-metric { color: #3a3a3c; font-size: 12px; }

.travel-module-action {
  grid-column: 1 / -1;
  align-self: end;
  width: 100%;
  min-height: 42px;
}

@media (max-width: 1050px) {
  .travel-module-grid { grid-template-columns: 1fr; }
  .travel-module-card { min-height: 0; }
}

@media (max-width: 600px) {
  .travel-hero { display: grid; padding: 18px; }
  .travel-hero-count { justify-self: start; }
  .travel-module-card { padding: 17px; }
  .travel-module-title { display: grid; justify-content: stretch; }
  .travel-module-title .module-status { justify-self: start; }
}

/* Scheduled and pinned message retention */
.message-retention-settings {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(0, 113, 227, 0.14);
  border-radius: 14px;
  background: rgba(0, 113, 227, 0.045);
}

.message-retention-settings legend {
  padding: 0 6px;
  color: #1d1d1f;
  font-weight: 680;
}

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

.message-retention-grid label { display: grid; gap: 7px; }

.message-retention-grid small,
.message-retention-settings > p {
  margin: 0;
  color: #6e6e73;
  font-size: 11px;
  line-height: 1.5;
}

.sent-message-manager { overflow: hidden; }

.sent-message-manager .schedule-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 13px;
}

.table-subline {
  display: block;
  max-width: 280px;
  margin-top: 4px;
  color: #8e8e93;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.directory-status.warning {
  background: rgba(255, 149, 0, 0.12);
  color: #9a5a00;
}

@media (max-width: 720px) {
  .message-retention-grid { grid-template-columns: 1fr; }
}

/* 2026-08-10 macOS native refinement
   Move the admin away from floating dashboard cards and toward the quieter,
   grouped surfaces used by macOS system apps. */
:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e1e1e6;
  --primary: #007aff;
  --primary-dark: #0068d9;
  --primary-soft: rgba(0, 122, 255, 0.1);
  --sidebar: rgba(236, 238, 243, 0.92);
  --sidebar-muted: #77777c;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --hairline: rgba(60, 60, 67, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
  --shadow-float: 0 20px 55px rgba(0, 0, 0, 0.16);
}

html,
body {
  background: #f5f5f7;
}

body {
  background-image: none;
  color: #1d1d1f;
  font-size: 13px;
  letter-spacing: -0.006em;
}

.topbar,
.project-tree-panel {
  border-color: rgba(60, 60, 67, 0.16);
  background: rgba(235, 237, 242, 0.91);
  box-shadow: none;
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}

.topbar {
  width: 224px;
  padding: 18px 12px 13px;
}

.topbar strong {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 45px;
  margin: 0 4px 14px;
  padding: 0 0 15px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.13);
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.topbar strong::before {
  content: "商";
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: linear-gradient(180deg, #2997ff 0%, #0071e3 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 75, 160, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.topbar strong small {
  grid-column: 2;
  margin: 1px 0 0;
  color: #86868b;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.topbar > div { gap: 1px; }

.toplink {
  min-height: 36px;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #3f3f43;
  font-size: 12px;
  font-weight: 540;
}

.topbar .toplink::before {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 5px;
  background: #8e8e93;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.82);
}

.toplink:hover {
  background: rgba(255, 255, 255, 0.55);
}

.toplink.active {
  background: #007aff;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 86, 180, 0.18);
}

.topbar .toplink.active::before {
  background: #fff;
  box-shadow: inset 0 0 0 5px rgba(0, 122, 255, 0.78);
}

.topbar .topbar-user {
  margin: 13px 4px 0;
  padding: 13px 2px 0;
  border-top-color: rgba(60, 60, 67, 0.13);
  font-size: 10px;
}

.topbar > form button {
  min-height: 34px;
  border-color: rgba(60, 60, 67, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
  font-size: 12px;
}

.project-tree-panel {
  left: 224px;
  width: 272px;
  padding: 19px 11px 14px;
  background: rgba(242, 243, 246, 0.92);
}

.project-tree-heading {
  padding: 1px 9px 14px;
  border-bottom-color: rgba(60, 60, 67, 0.13);
}

.project-tree-heading span,
.eyebrow {
  color: #86868b;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.project-tree-heading h2 {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 670;
}

.project-tree-heading > strong,
.project-tree-home em,
.project-tree-link em,
.panel-heading h2 em {
  border: 0;
  background: rgba(118, 118, 128, 0.11);
  color: #6e6e73;
  box-shadow: none;
}

.project-tree-home,
.project-tree-link {
  border-radius: 7px;
}

.project-tree-home {
  min-height: 35px;
  margin: 9px 1px 6px;
  padding: 7px 9px;
}

.project-tree-link {
  margin: 0;
  padding: 6px 8px;
}

.project-tree-home.current,
.project-tree-link.current {
  background: #007aff;
  color: #fff;
  box-shadow: none;
}

.project-tree-home.current em,
.project-tree-link.current em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.project-tree-link.current { box-shadow: none; }
.project-tree-link:hover { background: rgba(255, 255, 255, 0.62); }
.project-tree-link.current:hover { background: #007aff; color: #fff; }
.project-tree-toggle:hover { background: rgba(118, 118, 128, 0.09); }
.project-tree-list .project-tree-list { border-left-color: rgba(60, 60, 67, 0.13); }

.shell {
  max-width: 1640px;
  margin: 0 0 64px 224px;
  padding: 29px 36px 48px;
}

.shell.project-shell {
  margin: 0 0 64px 496px;
  padding-top: 29px;
}

.breadcrumbs {
  min-height: 24px;
  margin: 0 2px 10px;
  font-size: 11px;
}

.section-heading {
  min-height: 0;
  margin: 0 0 18px;
  padding: 2px 2px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.section-heading h1 {
  margin: 6px 0 5px;
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.042em;
}

.section-heading p {
  max-width: 780px;
  margin: 0;
  font-size: 13px;
  line-height: 1.52;
}

.panel,
.shop-editor,
.ad-editor,
.delivery-card,
.nested-disclosure,
.login-panel,
.stat-card,
.accent-card {
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.panel { padding: 18px; }
.panel + .panel,
.panel + details.panel,
details.panel + .panel { margin-top: 14px; }

.panel-heading {
  min-height: 38px;
  margin-bottom: 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.11);
}

.panel-heading h2,
.panel h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.018em;
}

.stats-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 12px;
  background: #fff;
}

.stat-card,
.accent-card {
  min-height: 100px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid rgba(60, 60, 67, 0.11);
  border-radius: 0;
  box-shadow: none;
}

.stats-grid > :last-child { border-right: 0; }
.stat-card strong,
.accent-card strong { font-size: 25px; font-weight: 680; }

button,
.button {
  min-height: 36px;
  padding: 7px 14px;
  border-color: #007aff;
  border-radius: 8px;
  background: #007aff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 590;
}

button:hover,
.button:hover {
  border-color: #1687ff;
  background: #1687ff;
  box-shadow: none;
}

.secondary {
  border-color: #58585d;
  background: #58585d;
}

.ghost {
  border-color: rgba(60, 60, 67, 0.17);
  background: #fff;
  color: #3a3a3c;
  box-shadow: none;
}

.ghost:hover {
  border-color: rgba(60, 60, 67, 0.23);
  background: #f2f2f7;
}

input,
textarea,
select {
  min-height: 38px;
  border-color: rgba(60, 60, 67, 0.2);
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.025);
}

input:focus,
textarea:focus,
select:focus {
  border-color: #007aff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.16);
}

label { color: #4b4b50; font-weight: 540; }

.disclosure {
  overflow: hidden;
  border-color: rgba(60, 60, 67, 0.13);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.disclosure > summary {
  min-height: 51px;
  padding: 12px 15px;
}

.disclosure > summary::after {
  border: 0;
  border-radius: 6px;
  background: #ededf0;
  box-shadow: none;
}

.disclosure[open] > summary {
  border-bottom-color: rgba(60, 60, 67, 0.12);
  background: #fafafa;
}

.table-wrap {
  border-color: rgba(60, 60, 67, 0.13);
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

th {
  height: 39px;
  border-color: rgba(60, 60, 67, 0.1);
  background: #f7f7f8;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 600;
}

td {
  border-color: rgba(60, 60, 67, 0.09);
  background: #fff;
}

tbody tr:hover td { background: #f7faff; }

.notice,
.alert {
  border-color: rgba(52, 199, 89, 0.2);
  border-radius: 9px;
  background: #effaf2;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.directory-preview-card,
.current-directory-card,
.schedule-card,
.usage-filter-form,
.telegram-user-choice,
.permission-grid .check,
.schedule-settings,
.schedule-time-panel,
.schedule-enable-check,
.schedule-option-check,
.menu-sort-item,
.menu-button-settings-empty,
.menu-button-emoji-choice,
.message-retention-settings {
  border-color: rgba(60, 60, 67, 0.13);
  border-radius: 9px;
  background: #f7f7f8;
  box-shadow: none;
}

.schedule-card,
.ad-editor,
.shop-editor,
.delivery-card { background: #fff; }

.schedule-settings,
.message-retention-settings { padding: 14px; }
.schedule-time-panel { background: #fff; }

.module-overview,
.home-keyboard-overview { padding: 18px; }

.module-overview-layout { gap: 14px; }

.module-card-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 10px;
  background: #fff;
}

.module-card {
  border: 0;
  border-right: 1px solid rgba(60, 60, 67, 0.1);
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.module-card:hover { background: #f8fbff; }
.module-card.selected {
  border-color: rgba(60, 60, 67, 0.1);
  background: #eef6ff;
  box-shadow: inset 3px 0 0 #007aff;
}

.module-card-select { min-height: 91px; padding: 12px; }

.module-icon {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #007aff;
  color: #fff;
  box-shadow: none;
}

.module-status { border-radius: 5px; }

.module-preview-console,
.home-telegram-console {
  border-color: rgba(60, 60, 67, 0.15);
  border-radius: 12px;
  background: #f2f2f7;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.module-preview-toolbar { background: #ececef; }
.home-telegram-device,
.overview-telegram-device { border-radius: 11px; }

.home-keyboard-counts span,
.module-overview-total,
.travel-hero-count {
  border-color: rgba(60, 60, 67, 0.13);
  border-radius: 7px;
  background: #f2f2f7;
}

.travel-shell { gap: 14px; }

.travel-hero {
  padding: 2px 2px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.travel-hero h1 { font-size: clamp(26px, 2.8vw, 34px); }

.travel-module-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 12px;
  background: #fff;
}

.travel-module-card {
  min-height: 232px;
  border: 0;
  border-right: 1px solid rgba(60, 60, 67, 0.11);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.travel-module-card:last-child { border-right: 0; }

.travel-module-icon {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: #e9f3ff;
  box-shadow: none;
}

.tg-premium-dialog,
.modal,
dialog:not(.tg-premium-dialog) {
  border-color: rgba(60, 60, 67, 0.15);
  border-radius: 14px;
  background: rgba(250, 250, 252, 0.96);
  box-shadow: var(--shadow-float);
}

.login-page {
  background: #f5f5f7;
  background-image: none;
}

.login-panel {
  border-color: rgba(60, 60, 67, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.11);
}

@media (min-width: 901px) and (max-width: 1180px) {
  .topbar { width: 206px; }
  .project-tree-panel { left: 206px; width: 250px; }
  .shell { margin-left: 206px; padding-inline: 24px; }
  .shell.project-shell { margin-left: 456px; }
}

@media (max-width: 900px) {
  body { background: #f5f5f7; }

  .topbar {
    padding: 8px 10px;
    background: rgba(244, 244, 246, 0.93);
  }

  .topbar strong {
    display: flex;
    min-height: 35px;
    margin: 0 8px 0 0;
    padding: 0 10px 0 0;
    border-right: 1px solid rgba(60, 60, 67, 0.13);
    border-bottom: 0;
    font-size: 14px;
  }

  .topbar strong::before { width: 25px; height: 25px; flex: 0 0 25px; margin-right: 7px; }
  .topbar strong small { display: none; }
  .toplink { min-height: 33px; }
  .topbar .toplink::before { display: none; }

  .shell,
  .shell.project-shell { margin-left: 0; padding: 21px 18px 45px; }

  .project-tree-panel {
    margin: 14px 18px 0;
    border-color: rgba(60, 60, 67, 0.14);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
  }

  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid > :nth-child(2n) { border-right: 0; }
  .stats-grid > :nth-child(n + 3) { border-top: 1px solid rgba(60, 60, 67, 0.11); }
}

@media (max-width: 720px) {
  .shell,
  .shell.project-shell { padding: 17px 13px 39px; }
  .project-tree-panel { margin: 12px 13px 0; }
  .section-heading { margin-bottom: 14px; padding: 1px; }
  .section-heading h1 { font-size: 27px; }
  .panel { padding: 14px; border-radius: 11px; }
  .module-overview,
  .home-keyboard-overview { padding: 14px; }
  .module-card-grid { grid-template-columns: 1fr; }
  .module-card { border-right: 0; }
  .travel-module-grid { display: grid; grid-template-columns: 1fr; }
  .travel-module-card { min-height: 0; border-right: 0; border-bottom: 1px solid rgba(60, 60, 67, 0.11); }
  .travel-module-card:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
  .topbar strong { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card,
  .accent-card { border-right: 0; border-bottom: 1px solid rgba(60, 60, 67, 0.11); }
  .stats-grid > :last-child { border-bottom: 0; }
}

/* Dashboard navigation uses one left rail: module links and the country /
   city / category tree share the same vertical scroll area. */
@media (min-width: 901px) {
  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: 320px;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid rgba(60, 60, 67, 0.14);
    background: rgba(242, 243, 246, 0.95);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.045);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    backdrop-filter: blur(28px) saturate(150%);
    scrollbar-width: thin;
  }

  .admin-sidebar .topbar {
    position: static;
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 18px 12px 12px;
    border: 0;
    border-bottom: 1px solid rgba(60, 60, 67, 0.12);
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .admin-sidebar .topbar > div {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    flex-wrap: nowrap;
  }

  .admin-sidebar .topbar strong {
    margin: 0 4px 8px;
    padding-bottom: 13px;
  }

  .admin-sidebar .topbar .topbar-user {
    order: 2;
    margin: 5px 4px 0;
    padding: 10px 2px 0;
    border-top: 1px solid rgba(60, 60, 67, 0.12);
  }

  .admin-sidebar .topbar .toplink { width: 100%; }

  .admin-sidebar .topbar > form {
    width: 100%;
    margin: 0;
  }

  .admin-sidebar .topbar > form button { width: 100%; }

  .admin-sidebar .topbar-directory {
    width: 100%;
    margin: 2px 0 0;
    border: 1px solid rgba(60, 60, 67, 0.13);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
  }

  .admin-sidebar .topbar-directory > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 39px;
    padding: 8px 10px;
    color: #3f3f43;
    cursor: pointer;
    list-style: none;
  }

  .admin-sidebar .topbar-directory > summary::-webkit-details-marker { display: none; }
  .admin-sidebar .topbar-directory > summary::after {
    color: #86868b;
    content: '⌄';
    font-size: 15px;
    transition: transform .16s ease;
  }
  .admin-sidebar .topbar-directory[open] > summary::after { transform: rotate(180deg); }
  .admin-sidebar .topbar-directory > summary span { font-size: 12px; font-weight: 650; }
  .admin-sidebar .topbar-directory > summary small { color: #86868b; font-size: 10px; }

  .admin-sidebar .topbar-directory-body {
    padding: 0 7px 8px;
    border-top: 1px solid rgba(60, 60, 67, 0.1);
  }

  .admin-sidebar .topbar-directory .project-tree-home { margin: 7px 0 4px; }
  .admin-sidebar .topbar-directory .project-tree { overflow: visible; }
  .admin-sidebar .topbar-directory .project-tree-note { display: none; }

  .admin-sidebar .project-tree-panel {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 15px 12px 18px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .admin-sidebar .sidebar-directory {
    flex: 0 0 auto;
    margin: 0;
    border: 0;
  }

  .admin-sidebar .sidebar-directory > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-top: 1px solid rgba(60, 60, 67, 0.12);
    border-bottom: 1px solid rgba(60, 60, 67, 0.12);
    background: rgba(255, 255, 255, 0.24);
    color: #3f3f43;
    cursor: pointer;
    list-style: none;
  }

  .admin-sidebar .sidebar-directory > summary::-webkit-details-marker { display: none; }

  .admin-sidebar .sidebar-directory > summary::after {
    display: inline-block;
    color: #86868b;
    content: '⌄';
    font-size: 16px;
    transition: transform .16s ease;
  }

  .admin-sidebar .sidebar-directory[open] > summary::after { transform: rotate(180deg); }

  .admin-sidebar .sidebar-directory > summary span { font-size: 13px; font-weight: 650; }
  .admin-sidebar .sidebar-directory > summary small { color: #86868b; font-size: 10px; }

  .admin-sidebar .project-tree { flex: none; overflow: visible; }

  .shell.project-shell { margin-left: 344px; }
}

@media (max-width: 900px) {
  .admin-sidebar { display: block; }

  .admin-sidebar .topbar-directory {
    width: 100%;
    margin: 3px 0 0;
    border: 1px solid rgba(60, 60, 67, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    overflow: hidden;
  }

  .admin-sidebar .topbar-directory > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
  }

  .admin-sidebar .topbar-directory > summary::-webkit-details-marker { display: none; }
  .admin-sidebar .topbar-directory > summary::after { color: #86868b; content: '⌄'; font-size: 16px; }
  .admin-sidebar .topbar-directory[open] > summary::after { transform: rotate(180deg); }
  .admin-sidebar .topbar-directory > summary span { font-size: 12px; font-weight: 650; }
  .admin-sidebar .topbar-directory > summary small { color: #86868b; font-size: 10px; }
  .admin-sidebar .topbar-directory-body { padding: 0 7px 8px; border-top: 1px solid rgba(60, 60, 67, 0.1); }
  .admin-sidebar .topbar-directory .project-tree { overflow: auto; max-height: 310px; }

  .admin-sidebar .sidebar-directory > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(60, 60, 67, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    list-style: none;
  }

  .admin-sidebar .sidebar-directory > summary::-webkit-details-marker { display: none; }

  .admin-sidebar .sidebar-directory > summary::after {
    content: '⌄';
    color: #86868b;
    font-size: 16px;
  }

  .admin-sidebar .sidebar-directory[open] > summary::after { transform: rotate(180deg); }

  .admin-sidebar .project-tree-panel {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    max-height: 350px;
    margin: 14px 18px 0;
  }

  .admin-sidebar .project-tree { overflow: auto; }
}

/* Compact desktop rail: preserve the tree hierarchy while removing the
   oversized gaps that made the left navigation feel stretched. */
@media (min-width: 901px) {
  .admin-sidebar {
    width: 280px;
  }

  .admin-sidebar .topbar {
    gap: 6px;
    padding: 13px 9px 9px;
  }

  .admin-sidebar .topbar > div { gap: 2px; }

  .admin-sidebar .topbar strong {
    min-height: 37px;
    margin: 0 3px 5px;
    padding-bottom: 9px;
    font-size: 14px;
  }

  .admin-sidebar .topbar strong::before {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .admin-sidebar .topbar strong small { font-size: 9px; }
  .admin-sidebar .topbar .topbar-user { margin: 3px 3px 0; padding: 7px 2px 0; font-size: 9px; }

  .admin-sidebar .topbar .toplink {
    min-height: 31px;
    padding: 5px 7px;
    border-radius: 7px;
    font-size: 11px;
  }

  .admin-sidebar .topbar .toplink::before {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .admin-sidebar .topbar-directory {
    margin-top: 1px;
    border-radius: 8px;
  }

  .admin-sidebar .topbar-directory > summary {
    min-height: 34px;
    padding: 6px 8px;
  }

  .admin-sidebar .topbar-directory > summary span { font-size: 11px; }
  .admin-sidebar .topbar-directory > summary small { font-size: 9px; }
  .admin-sidebar .topbar-directory-body { padding: 0 4px 5px; }
  .admin-sidebar .topbar-directory .project-tree-home { margin: 4px 0 2px; }

  .admin-sidebar .project-tree-home {
    min-height: 29px;
    margin: 2px 0;
    padding: 5px 6px;
    border-radius: 6px;
    font-size: 11px;
  }

  .admin-sidebar .project-tree-link {
    min-height: 27px;
    margin: 0;
    padding: 4px 5px;
    border-radius: 6px;
    font-size: 11px;
  }

  .admin-sidebar .project-tree-toggle,
  .admin-sidebar .project-tree-spacer {
    width: 20px;
    height: 27px;
    min-width: 20px;
    min-height: 27px;
    flex-basis: 20px;
  }

  .admin-sidebar .project-tree-toggle::before {
    left: 6px;
    top: 9px;
    border-top-width: 4px;
    border-bottom-width: 4px;
    border-left-width: 5px;
  }

  .admin-sidebar .project-tree-list .project-tree-list {
    margin: 1px 0 2px 9px;
    padding-left: 7px;
  }

  .admin-sidebar .topbar > form { margin-top: 2px; }
  .admin-sidebar .topbar > form button { min-height: 29px; padding: 5px 8px; font-size: 11px; }
  .shell.project-shell { margin-left: 304px; }
}

/* The directory is a compact nested menu, not a large white card. */
@media (min-width: 901px) {
  .admin-sidebar .topbar-directory {
    margin: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    overflow: visible;
  }

  .admin-sidebar .topbar-directory > summary {
    min-height: 31px;
    padding: 5px 7px;
    border: 0;
    border-radius: 7px;
    background: transparent;
  }

  .admin-sidebar .topbar-directory > summary:hover { background: rgba(255, 255, 255, 0.58); }
  .admin-sidebar .topbar-directory > summary span { font-size: 11px; font-weight: 600; }
  .admin-sidebar .topbar-directory > summary::after { font-size: 13px; }

  .admin-sidebar .topbar-directory-body {
    padding: 0 0 0 9px;
    border: 0;
    background: transparent;
  }

  .admin-sidebar .topbar-directory .project-tree { padding: 0; }
  .admin-sidebar .topbar-directory .project-tree-list .project-tree-list { margin-left: 8px; padding-left: 6px; }
}

@media (max-width: 900px) {
  .admin-sidebar .topbar-directory {
    margin: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    overflow: visible;
  }

  .admin-sidebar .topbar-directory > summary {
    min-height: 33px;
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
  }

  .admin-sidebar .topbar-directory > summary:hover { background: rgba(255, 255, 255, 0.58); }
  .admin-sidebar .topbar-directory > summary span { font-size: 12px; font-weight: 600; }
  .admin-sidebar .topbar-directory > summary::after { font-size: 14px; }
  .admin-sidebar .topbar-directory-body { padding: 0 0 0 8px; border: 0; background: transparent; }
  .admin-sidebar .topbar-directory .project-tree { max-height: none; padding: 0; }
}

/* Final tree simplification: parent text itself expands one level. Keep all
   rows full-width and remove counters, brackets, dots, arrows and placeholders. */
.admin-sidebar .topbar-directory > summary::after { display: none !important; }
.admin-sidebar .topbar-directory .project-tree-row { display: block !important; }
.admin-sidebar .topbar-directory .project-tree-link,
.admin-sidebar .topbar-directory .project-tree-expand-link {
  display: flex !important;
  align-items: center;
  width: 100%;
  min-height: 25px;
  margin: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4b4b50;
  font: inherit;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}

.admin-sidebar .topbar-directory .project-tree-link::before,
.admin-sidebar .topbar-directory .project-tree-link::after { display: none !important; content: none !important; }
.admin-sidebar .topbar-directory .project-tree-link em { display: none !important; }
.admin-sidebar .topbar-directory .project-tree-expand-link { cursor: pointer; }
.admin-sidebar .topbar-directory .project-tree-link:hover,
.admin-sidebar .topbar-directory .project-tree-link.current,
.admin-sidebar .topbar-directory .project-tree-expand-link:hover {
  background: rgba(118, 118, 128, 0.1);
  color: #1d1d1f;
  box-shadow: none;
}

.admin-sidebar .topbar-directory .project-tree-list .project-tree-list {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border-left: 0 !important;
}

.admin-sidebar .topbar-directory .project-tree-list .project-tree-list .project-tree-link { padding-left: 18px; }
.admin-sidebar .topbar-directory .project-tree-list .project-tree-list .project-tree-list .project-tree-link { padding-left: 30px; }
.admin-sidebar .topbar-directory .project-tree-list .project-tree-list .project-tree-list .project-tree-list .project-tree-link { padding-left: 42px; }
.admin-sidebar .topbar-directory .project-tree-children[hidden] { display: none !important; }

/* Telegram-like compact tree rows: text first, a small disclosure arrow on
   the right, and child rows tucked directly beneath their parent. */
@media (min-width: 901px) {
  .admin-sidebar .topbar-directory .project-tree-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 0;
  }

  .admin-sidebar .topbar-directory .project-tree-toggle {
    grid-column: 2;
    grid-row: 1;
    width: 18px;
    min-width: 18px;
    height: 26px;
    min-height: 26px;
    order: 2;
    border-radius: 5px;
  }

  .admin-sidebar .topbar-directory .project-tree-toggle::before {
    left: 6px;
    top: 8px;
    border-top-width: 4px;
    border-bottom-width: 4px;
    border-left-width: 5px;
  }

  .admin-sidebar .topbar-directory .project-tree-toggle:hover { background: rgba(60, 60, 67, 0.08); }

  .admin-sidebar .topbar-directory .project-tree-spacer { display: none; }

  .admin-sidebar .topbar-directory .project-tree-link {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 4px 5px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.2;
  }

  .admin-sidebar .topbar-directory .project-tree-link::before {
    content: '○';
    flex: 0 0 auto;
    color: #9a9aa1;
    font-size: 9px;
  }

  .admin-sidebar .topbar-directory > .topbar-directory-body > .project-tree > .project-tree-list > .project-tree-node > .project-tree-row > .project-tree-link::before {
    content: '•';
    color: #6e6e73;
    font-size: 12px;
  }

  .admin-sidebar .topbar-directory .project-tree-link:hover,
  .admin-sidebar .topbar-directory .project-tree-link.current {
    background: rgba(118, 118, 128, 0.11);
    color: #1d1d1f;
    box-shadow: none;
  }

  .admin-sidebar .topbar-directory .project-tree-list .project-tree-list {
    margin: 0 0 0 8px;
    padding-left: 7px;
    border-left: 1px solid rgba(60, 60, 67, 0.12);
  }

  .admin-sidebar .topbar-directory .project-tree-link em {
    min-width: 18px;
    margin-left: auto;
    padding: 1px 4px;
    border-radius: 999px;
    background: rgba(118, 118, 128, 0.1);
    color: #86868b;
    font-size: 9px;
    line-height: 1.35;
  }
}

@media (max-width: 900px) {
  .admin-sidebar .topbar-directory .project-tree-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    align-items: center;
  }

  .admin-sidebar .topbar-directory .project-tree-toggle {
    grid-column: 2;
    grid-row: 1;
    width: 20px;
    min-width: 20px;
    height: 28px;
    min-height: 28px;
  }

  .admin-sidebar .topbar-directory .project-tree-spacer { display: none; }
  .admin-sidebar .topbar-directory .project-tree-link { grid-column: 1; grid-row: 1; min-height: 28px; padding: 5px 6px; }
  .admin-sidebar .topbar-directory .project-tree-link::before { content: '○'; color: #9a9aa1; font-size: 9px; }
  .admin-sidebar .topbar-directory .project-tree-list .project-tree-list { margin: 0 0 0 8px; padding-left: 7px; }
}
