/* CSS — uses Telegram theme variables */
:root {
  --tg-bg: var(--tg-theme-bg-color, #17212b);
  --tg-text: var(--tg-theme-text-color, #ffffff);
  --tg-hint: var(--tg-theme-hint-color, #708499);
  --tg-link: var(--tg-theme-link-color, #6ab2f2);
  --tg-button: var(--tg-theme-button-color, #5288c1);
  --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
  --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #232e3c);
  --tg-section-bg: var(--tg-theme-section-bg-color, #17212b);
  --tg-section-header-text: var(--tg-theme-section-header-text-color, #6ab3f2);
  --tg-destructive: var(--tg-theme-destructive-text-color, #ec3942);
  --tg-accent: var(--tg-theme-accent-text-color, #6ab2f2);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --p: 16px;
}

* { box-sizing: border-box; }

/* CRITICAL: an author rule like `.loader { display:flex }` overrides the
   UA `[hidden] { display:none }`, so `el.hidden = true` would not actually
   hide it. This forces the `hidden` attribute to always win. */
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0;
  background: var(--tg-bg); color: var(--tg-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.45;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  min-height: 100vh;
  overscroll-behavior-y: none;
}

/* ===== Header ===== */
#topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--p);
  background: var(--tg-bg);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#topbar h1 {
  flex: 1; margin: 0; font-size: 17px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.back-btn {
  background: none; border: none; color: var(--tg-link);
  font-size: 30px; line-height: 1;
  padding: 0 4px; cursor: pointer;
}
.group-switcher {
  background: var(--tg-secondary-bg); border: none;
  color: var(--tg-text);
  padding: 6px 12px; border-radius: 14px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  max-width: 140px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== Loader ===== */
.loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 70vh; gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--tg-secondary-bg);
  border-top-color: var(--tg-button);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader p { color: var(--tg-hint); }

/* ===== Error ===== */
.error-box {
  margin: 40px var(--p); padding: 24px;
  background: var(--tg-secondary-bg); border-radius: var(--r-lg); text-align: center;
}
.error-box h2 { margin-top: 0; color: var(--tg-destructive); }

/* ===== Main ===== */
main { padding: 16px var(--p); }
.view { animation: fadeIn 0.18s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  color: var(--tg-section-header-text);
  margin: 24px 0 8px; padding: 0 4px; letter-spacing: 0.5px;
}
.section-title:first-child { margin-top: 0; }
.hint { color: var(--tg-hint); font-size: 14px; margin: 0 0 16px; padding: 0 4px; }

/* ===== Cards & lists ===== */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--tg-secondary-bg);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: scale(0.98); }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.card-body { flex: 1; min-width: 0; }
.card-title { font-weight: 500; }
.card-sub { color: var(--tg-hint); font-size: 13px; margin-top: 2px; }
.card-arrow { color: var(--tg-hint); font-size: 20px; opacity: 0.5; }
.hint-card { display: block; cursor: default; }
.hint-card:active { transform: none; }
.hint-card ul { margin: 8px 0 0; padding-left: 20px; color: var(--tg-hint); font-size: 14px; }

/* ===== Stats card ===== */
.stats-card {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 8px;
}
.stat {
  background: var(--tg-secondary-bg);
  padding: 14px 8px; border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.stat-num { font-size: 22px; font-weight: 700; color: var(--tg-text); }
.stat-label { font-size: 11px; color: var(--tg-hint); text-transform: uppercase; margin-top: 4px; letter-spacing: 0.5px; }

/* ===== Plugin grid ===== */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.plugin-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 6px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}
.plugin-tile:active { transform: scale(0.94); }
.plugin-icon {
  width: 60px; height: 60px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.icon-custombot   { background: linear-gradient(135deg, #6b46c1, #4c1d95); }
.icon-verify      { background: linear-gradient(135deg, #16a34a, #15803d); }
.icon-welcome     { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.icon-autoresp    { background: linear-gradient(135deg, #c97924, #92400e); }
.icon-scheduled   { background: linear-gradient(135deg, #1e40af, #1e3a8a); }
.icon-mod         { background: linear-gradient(135deg, #16a34a, #166534); }
.icon-raid        { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.icon-levels      { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.icon-utilities   { background: linear-gradient(135deg, #c97924, #92400e); }
.icon-roles       { background: linear-gradient(135deg, #15803d, #14532d); }
.icon-autoclean   { background: linear-gradient(135deg, #c97924, #92400e); }
.icon-filters     { background: linear-gradient(135deg, #4f46e5, #312e81); }
.icon-rules       { background: linear-gradient(135deg, #9333ea, #6b21a8); }

.plugin-tile span:nth-child(2) {
  font-size: 12px; text-align: center; color: var(--tg-text);
  line-height: 1.2;
}
.plugin-tile .dot {
  position: absolute;
  bottom: 36px; right: -2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #6b7280;
  border: 2px solid var(--tg-bg);
}
.plugin-tile .dot.active { background: #22c55e; }

/* ===== Plugin pages ===== */
.plugin-page { padding-bottom: 80px; }
.plugin-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.plugin-header .plugin-icon { width: 50px; height: 50px; font-size: 22px; }
.plugin-header h2 { margin: 0; font-size: 20px; }

.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  background: var(--tg-secondary-bg);
  margin-bottom: 1px;
}
.setting-row:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.setting-row:last-child { border-radius: 0 0 var(--r-md) var(--r-md); margin-bottom: 16px; }
.setting-row:only-child { border-radius: var(--r-md); }
.setting-row .label { flex: 1; }
.setting-row .label-title { font-weight: 500; }
.setting-row .label-sub { font-size: 12px; color: var(--tg-hint); margin-top: 2px; }

/* Switch */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #555; border-radius: 28px;
  transition: 0.2s;
}
.switch .slider:before {
  position: absolute; content: ""; height: 22px; width: 22px;
  left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider { background: var(--tg-button); }
.switch input:checked + .slider:before { transform: translateX(22px); }

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--tg-secondary-bg);
  border: 1px solid transparent;
  color: var(--tg-text);
  border-radius: var(--r-md);
  font-size: 15px; font-family: inherit;
}
.textarea { min-height: 100px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--tg-button);
}
.input-group { margin-bottom: 14px; }
.input-label { font-size: 13px; color: var(--tg-hint); margin-bottom: 6px; padding: 0 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px;
  border: none; border-radius: var(--r-md);
  font-size: 15px; font-weight: 500;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: opacity 0.1s;
}
.btn:active { opacity: 0.7; }
.btn-primary { background: var(--tg-button); color: var(--tg-button-text); }
.btn-secondary { background: var(--tg-secondary-bg); color: var(--tg-text); }
.btn-danger { background: var(--tg-destructive); color: white; }
.btn-full { width: 100%; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }

/* List items in plugins */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--tg-secondary-bg);
  margin-bottom: 1px;
}
.list-item:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.list-item:last-child { border-radius: 0 0 var(--r-md) var(--r-md); margin-bottom: 16px; }
.list-item:only-child { border-radius: var(--r-md); }
.list-item .item-body { flex: 1; min-width: 0; }
.list-item .item-name { font-weight: 500; }
.list-item .item-sub { font-size: 12px; color: var(--tg-hint); margin-top: 2px; word-break: break-word; }
.list-item .del-btn {
  background: none; border: none; color: var(--tg-destructive);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 30px 16px;
  background: var(--tg-secondary-bg);
  border-radius: var(--r-md);
  color: var(--tg-hint);
  margin-bottom: 16px;
}
.empty-state .icon { font-size: 36px; opacity: 0.5; margin-bottom: 8px; }

/* Toast */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.85); color: white;
  padding: 10px 18px; border-radius: 24px;
  font-size: 14px; z-index: 1000;
  animation: toastIn 0.2s ease-out;
}
@keyframes toastIn { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Owner announcement banner — a richer, dismissible toast shown on dashboard open */
.announce {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 460px;
  background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff;
  padding: 14px 16px; border-radius: 14px; z-index: 2000;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  animation: announceIn .28s ease-out;
}
.announce-row { display: flex; align-items: flex-start; gap: 10px; }
.announce-icon { font-size: 18px; line-height: 1.3; flex-shrink: 0; }
.announce-text { flex: 1; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.announce-close {
  flex-shrink: 0; background: rgba(255,255,255,.18); color: #fff; border: none;
  width: 26px; height: 26px; border-radius: 8px; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.announce-close:active { background: rgba(255,255,255,.3); }
.announce-foot { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; opacity: .92; cursor: pointer; user-select: none; }
.announce-foot input { width: 15px; height: 15px; accent-color: #fff; cursor: pointer; }
@keyframes announceIn { from { transform: translate(-50%, -12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Member history overlay sections */
.mh-sec { margin-bottom: 16px; }
.mh-sec-t { font-size: 12px; font-weight: 700; opacity: .8; margin-bottom: 8px; }
.mh-item {
  background: rgba(255,255,255,.04); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 6px; font-size: 12.5px; line-height: 1.4;
}

/* Audit log date-range filter bar */
.audit-range-bar { display: flex; gap: 6px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.audit-range-btn {
  flex: 0 0 auto; padding: 5px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--tg-secondary-bg, rgba(255,255,255,.06)); color: inherit;
  border: 1px solid rgba(255,255,255,.1);
}
.audit-range-btn.active { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; border-color: transparent; }
.audit-date {
  margin-left: auto; padding: 5px 8px; border-radius: 8px; font-size: 12px;
  background: var(--tg-secondary-bg, rgba(255,255,255,.06)); color: inherit;
  border: 1px solid rgba(255,255,255,.1);
}

/* Modal */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s;
}
.modal {
  background: var(--tg-bg);
  width: 100%; max-width: 500px;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 14px; }

/* Checkbox grid for auto clean */
.toggle-list .setting-row .label-title { font-size: 14px; }

/* Saving indicator */
.saving { opacity: 0.5; pointer-events: none; }

/* ══════════════════════════════════════════════════
   Quick-Toggle FAB + bottom sheet
   ══════════════════════════════════════════════════ */
.quick-fab {
  position: fixed; bottom: 22px; right: 16px; z-index: 1500;
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; border: none; border-radius: 50px;
  padding: 11px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99,102,241,.5);
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s ease, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.quick-fab:active { box-shadow: 0 2px 8px rgba(99,102,241,.4); }
.quick-fab.fab-hidden { transform: translateY(90px); opacity: 0; pointer-events: none; }
.quick-fab-icon { font-size: 16px; line-height: 1; }
.quick-fab-label { letter-spacing: .2px; }

/* Sheet backdrop */
.quick-bg {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.52); display: flex;
  align-items: flex-end; justify-content: center;
  animation: qs-fade .2s ease-out;
}
@keyframes qs-fade { from { opacity: 0; } to { opacity: 1; } }

/* Sheet card */
.quick-sheet {
  background: var(--tg-bg, #17212b); width: 100%; max-width: 480px;
  max-height: 82vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  border-radius: 18px 18px 0 0;
  padding: 0 0 32px; box-shadow: 0 -8px 32px rgba(0,0,0,.4);
  animation: qs-up .25s cubic-bezier(.4,0,.2,1);
}
@keyframes qs-up { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Handle + header */
.qs-handle { width: 36px; height: 4px; background: rgba(255,255,255,.18); border-radius: 2px; margin: 12px auto 0; }
.qs-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.qs-title { font-size: 15px; font-weight: 700; }
.qs-close { background: rgba(255,255,255,.1); border: none; color: inherit; width: 28px; height: 28px; border-radius: 8px; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Section label */
.qs-section { font-size: 10px; font-weight: 700; letter-spacing: .8px; opacity: .45; text-transform: uppercase; padding: 12px 16px 4px; }

/* Feature row */
.qs-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.qs-row:last-child { border-bottom: none; }
.qs-row-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.qs-row-body { flex: 1; min-width: 0; }
.qs-row-name { font-size: 14px; font-weight: 500; }
.qs-row-sub  { font-size: 11px; opacity: .5; margin-top: 1px; }
.qs-row.danger .qs-row-name { color: var(--tg-destructive, #ec3942); }
.qs-row.saving { opacity: .5; pointer-events: none; }

/* ══════════════════════════════════════════════════
   AutoMod Hub — tab bar, panes, rule rows, audit,
   reports, settings, commands
   ══════════════════════════════════════════════════ */

/* Top-level mod tab bar */
.mod-tabs { display: flex; gap: 4px; margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mod-tab {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 10px; font-size: 13px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--tg-secondary-bg, rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.08); color: var(--tg-hint);
  transition: background .15s, color .15s;
}
.mod-tab.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; border-color: transparent;
}

/* AutoMod inner tab bar (Rules / Actions) */
.am-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.am-subt {
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; background: rgba(255,255,255,.06); color: var(--tg-hint);
  border: 1px solid rgba(255,255,255,.08);
}
.am-subt.active { background: rgba(99,102,241,.2); color: #818cf8; border-color: rgba(99,102,241,.3); }

/* Pane visibility */
.mod-pane       { display: none; }
.mod-pane.active{ display: block; }
.am-pane        { display: none; }
.am-pane.active { display: block; }

/* Pane header */
.mod-pane-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}
.mod-pane-title { font-size: 16px; font-weight: 700; }
.mod-pane-sub   { font-size: 12px; opacity: .55; margin-top: 2px; }
.mod-refresh {
  flex-shrink: 0; background: rgba(255,255,255,.08); border: none;
  color: inherit; width: 32px; height: 32px; border-radius: 10px;
  font-size: 16px; cursor: pointer; display: flex; align-items: center;
  justify-content: center;
}
.mod-refresh:active { background: rgba(255,255,255,.15); }

/* Search bar inside pane */
.mod-search-wrap { position: relative; margin-bottom: 10px; }
.mod-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .5; pointer-events: none; }
.mod-search {
  width: 100%; box-sizing: border-box;
  background: var(--tg-secondary-bg, rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: 9px 12px 9px 34px; font-size: 13px; color: inherit;
}
.mod-search::placeholder { opacity: .45; }

/* Count badge */
.mod-count { font-size: 11px; opacity: .5; text-align: right; }

/* Segment buttons (Pending / Past) */
.mod-seg { display: flex; gap: 6px; margin-bottom: 12px; }
.mod-seg-btn {
  flex: 1; text-align: center; padding: 7px 0; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: rgba(255,255,255,.06); color: var(--tg-hint);
  border: 1px solid rgba(255,255,255,.08);
}
.mod-seg-btn.active { background: rgba(99,102,241,.2); color: #818cf8; border-color: rgba(99,102,241,.3); }

/* Empty state */
.mod-empty { display: flex; flex-direction: column; align-items: center; padding: 40px 0; opacity: .45; }
.mod-empty-icon { font-size: 36px; margin-bottom: 8px; }
.mod-empty-text { font-size: 13px; }

/* ── Audit log rows ── */
.mod-log-row {
  background: var(--tg-secondary-bg, rgba(255,255,255,.04));
  border-radius: 10px; padding: 10px 12px; margin-bottom: 7px;
}
.mod-log-kind {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 5px;
  background: rgba(255,255,255,.08); letter-spacing: .4px;
}
.mod-log-kind.warn   { background: rgba(251,191,36,.18); color: #fbbf24; }
.mod-log-kind.mute,
.mod-log-kind.tmute  { background: rgba(96,165,250,.15); color: #60a5fa; }
.mod-log-kind.ban,
.mod-log-kind.tban   { background: rgba(239,68,68,.15);  color: #ef4444; }
.mod-log-kind.kick   { background: rgba(249,115,22,.15); color: #f97316; }
.mod-log-kind.delete { background: rgba(148,163,184,.12); color: #94a3b8; }
.mod-log-meta { font-size: 11px; opacity: .5; margin-top: 2px; line-height: 1.4; }

/* ── Reports ── */
.mod-report-row {
  background: var(--tg-secondary-bg, rgba(255,255,255,.04));
  border-radius: 10px; padding: 12px; margin-bottom: 8px;
}
.mod-report-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mod-report-user { font-size: 14px; font-weight: 600; }
.mod-report-time { font-size: 10px; opacity: .5; white-space: nowrap; margin-left: 8px; }
.mod-report-reason { font-size: 12px; opacity: .7; margin-bottom: 6px; }
.mod-report-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ── Settings ── */
.mod-set-card {
  background: var(--tg-secondary-bg, rgba(255,255,255,.04));
  border-radius: 12px; overflow: hidden; margin-bottom: 14px;
}
.mod-set-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.mod-set-row:last-child { border-bottom: none; }
.mod-set-icon { font-size: 18px; flex-shrink: 0; }
.mod-set-info { flex: 1; min-width: 0; }
.mod-set-name { font-size: 14px; font-weight: 600; }
.mod-set-desc { font-size: 11px; opacity: .55; margin-top: 2px; line-height: 1.4; }

/* Notify radios */
.mod-notify-radios { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mod-notify-opt {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 8px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); cursor: pointer; font-size: 12px;
}
.mod-notify-opt.on { background: rgba(99,102,241,.2); border-color: rgba(99,102,241,.3); color: #818cf8; }

/* ── Commands ── */
.mod-cmd-card {
  background: var(--tg-secondary-bg, rgba(255,255,255,.04));
  border-radius: 12px; overflow: hidden;
}
.mod-cmd-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.mod-cmd-row:last-child { border-bottom: none; }
.mod-cmd-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.mod-cmd-info { flex: 1; min-width: 0; }
.mod-cmd-key  { font-size: 13px; font-weight: 600; font-family: monospace; }
.mod-cmd-desc { font-size: 11px; opacity: .55; margin-top: 1px; }
