:root {
  --bg: #0d0f17;
  --bg-elev: #161824;
  --bg-elev-2: #1c1f2e;
  --border: #262a3d;
  --text: #e6e8f0;
  --text-muted: #8c92a6;
  --accent: #ff9211;
  --accent-soft: rgba(255, 146, 17, 0.12);
  --danger: #ef4444;
  --success: #22c55e;
  --warn: #f59e0b;
  --info: #38bdf8;
  --radius: 10px;
  --radius-sm: 6px;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

.boot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100vh; gap: 14px; color: var(--text-muted);
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-elev); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.sidebar-brand {
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-brand .logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #c8650b);
  display: grid; place-items: center; font-weight: 700; color: #1a0e00;
}
.sidebar-brand h1 { margin: 0; font-size: 15px; letter-spacing: 0.2px; line-height: 1.2; }
.sidebar-brand small {
  display: block; color: var(--text-muted); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px;
}
.sidebar-brand > div:last-child { min-width: 0; flex: 1; }

.guild-picker {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.guild-picker label { display:block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.guild-picker select {
  width: 100%; padding: 9px 10px; background: var(--bg-elev-2);
  color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
}

.nav { flex: 1; overflow: auto; padding: 8px 6px; }
.nav-section { padding: 8px 12px 4px; font-size: 11px; color: var(--text-muted); letter-spacing: .5px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 1px 6px; border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer; user-select: none;
  font-size: 14px;
}
.nav-item:hover { background: var(--bg-elev-2); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item .ico { width: 18px; text-align: center; opacity: .85; }

.sidebar-footer {
  border-top: 1px solid var(--border); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted);
}
.sidebar-footer button {
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 10px; font-size: 12px;
}
.sidebar-footer button:hover { color: var(--text); border-color: var(--text-muted); }

.main { padding: 28px 32px; max-width: 1100px; width: 100%; min-width: 0; }
.page-title { font-size: 22px; margin: 0 0 6px; line-height: 1.25; }
.page-sub { color: var(--text-muted); margin: 0 0 22px; line-height: 1.45; }

.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .desc { color: var(--text-muted); font-size: 13px; margin: 0 0 14px; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.toggle-box {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; min-height: 52px;
}
.toggle {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; user-select: none; width: 100%;
}
.toggle input { display: none; }
.toggle .track {
  width: 38px; height: 22px; flex-shrink: 0; margin-top: 1px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 12px; position: relative; transition: background .15s;
}
.toggle .track::after {
  content: ""; width: 16px; height: 16px; background: var(--text-muted);
  border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: all .15s;
}
.toggle input:checked + .track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .track::after { left: 18px; background: #1a0e00; }
.toggle .label {
  flex: 1; min-width: 0; font-size: 14px; line-height: 1.35;
  display: flex; flex-direction: column; gap: 4px;
}
.toggle .label-text { display: block; }
.toggle small { display: block; color: var(--text-muted); font-size: 11px; line-height: 1.4; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--text-muted); }
.field input[type=text], .field input[type=number], .field input[type=url], .field select, .field textarea {
  background: var(--bg-elev-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 10px; font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}
.field textarea { min-height: 80px; resize: vertical; }
.field select optgroup {
  color: var(--text-muted);
  font-weight: 600;
  font-style: normal;
}
.field .hint { font-size: 11px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }

.app-q {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 10px 0 0;
  background: var(--bg-elev-2);
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  padding-top: 22px;
}

.row.wrap { flex-wrap: wrap; }

.btn {
  background: var(--accent); color: #1a0e00; border: 0; border-radius: var(--radius-sm);
  padding: 9px 14px; font-weight: 600; font-size: 14px;
}
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
}
.chip .x {
  width: 16px; height: 16px; border-radius: 50%; background: transparent;
  color: var(--text-muted); display: grid; place-items: center;
  cursor: pointer; font-size: 12px;
}
.chip .x:hover { color: var(--danger); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }

.stat {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.stat .label { color: var(--text-muted); font-size: 12px; line-height: 1.3; }
.stat .value { font-size: 22px; font-weight: 600; margin: 6px 0 4px; line-height: 1.1; }
.stat .sub { color: var(--text-muted); font-size: 11px; margin-top: 2px; line-height: 1.3; }

.mode-card {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 0;
}
.mode-card.active { border-color: var(--accent); background: var(--accent-soft); }
.mode-card h3 { margin: 0 0 6px; font-size: 14px; }
.mode-card .desc { margin-bottom: 12px; }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.table th, .table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
  word-break: break-word; vertical-align: top;
}
.table th { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.muted { color: var(--text-muted); font-size: 12px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px;
  background: var(--bg-elev-2); color: var(--text-muted); border: 1px solid var(--border);
}
.badge.ad { color: var(--accent); border-color: var(--accent); }
.badge.spam { color: var(--info); border-color: var(--info); }
.badge.raid { color: var(--danger); border-color: var(--danger); }
.badge.link { color: var(--warn); border-color: var(--warn); }
.badge.paid-ok { color: var(--success); border-color: var(--success); }
.badge.status-active { color: var(--success); border-color: var(--success); }
.badge.status-paused { color: var(--warn); border-color: var(--warn); }
.badge.status-draft { color: var(--text-muted); }
.badge.status-completed { color: var(--info); border-color: var(--info); }
.badge.status-expired { color: var(--danger); border-color: var(--danger); }
.badge.status-priority { color: var(--warn); border-color: var(--warn); }
.badge.status-instant { color: var(--info); border-color: var(--info); }
.badge.status-normal { color: var(--text-muted); }
.perm-list { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chip {
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted);
}
.perm-chip.key { color: var(--warn); border-color: var(--warn); }
.discord-embed {
  background: #2b2d31; border-radius: 8px; padding: 12px 16px;
  border-left: 4px solid #FF9211; min-height: 80px;
}
.discord-embed strong { display: block; margin-bottom: 6px; }
.discord-embed p { margin: 0 0 8px; color: #dbdee1; white-space: pre-wrap; }
.discord-embed .emb-author { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.discord-embed .emb-footer { font-size: 12px; color: #949ba4; margin-top: 8px; }
.discord-embed .emb-image { max-width: 100%; border-radius: 6px; margin-top: 8px; }
.discord-embed .emb-fields { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.discord-embed .emb-field { width: 100%; min-width: 0; }
.discord-embed .emb-field.inline { width: calc(33.333% - 6px); }
.field-list { margin: 8px 0 16px; }
.discord-embed .emb-select {
  margin-top: 10px; background: #1e1f22; border: 1px solid #3f4147;
  border-radius: 4px; padding: 10px 12px; color: #b5bac1; font-size: 14px;
}
.discord-embed .emb-select-ph { color: #dbdee1; margin-bottom: 6px; }
.discord-embed .emb-select-opt { padding: 8px 0; border-top: 1px solid #3f4147; }
.discord-embed .emb-select-opt strong { display: block; margin: 0; font-size: 14px; }
.discord-embed .emb-select-opt p { margin: 2px 0 0; font-size: 12px; color: #949ba4; }
.discord-embed .emb-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.discord-embed .emb-btn {
  background: #4e5058; color: #fff; border-radius: 3px;
  padding: 6px 12px; font-size: 13px; font-weight: 500;
}
.comp-card {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; margin: 10px 0; background: var(--bg);
}
.comp-option {
  border: 1px dashed var(--border); border-radius: 8px;
  padding: 10px; margin: 8px 0;
}
.access-list { display: flex; flex-direction: column; gap: 8px; }
.access-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
}
.check-line {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0; font-size: 13px; color: var(--text);
}

.toast-host {
  position: fixed; top: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px;
  z-index: 100;
}
.toast {
  background: var(--bg-elev-2); border: 1px solid var(--border); padding: 10px 14px;
  border-radius: var(--radius-sm); min-width: 240px; font-size: 13px;
  border-left: 3px solid var(--accent);
  animation: pop .15s ease-out;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.login-wrap {
  display: grid; place-items: center; min-height: 100vh;
}
.login-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; max-width: 460px; text-align: center;
}
.login-card .logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #c8650b);
  display: grid; place-items: center; font-weight: 700; color: #1a0e00; font-size: 22px;
  margin: 0 auto 14px;
}
.login-card h2 { margin: 0 0 8px; }
.login-card p { color: var(--text-muted); margin: 0 0 18px; }
.login-card code {
  background: var(--bg-elev-2); padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--border); font-size: 13px;
}
.login-card .err {
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5; padding: 10px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 14px;
}

.divider { height: 1px; background: var(--border); margin: 18px 0; }

.empty { color: var(--text-muted); font-size: 13px; text-align: center; padding: 30px 10px; }

/* ----- Audit ----- */
.audit-list { display: flex; flex-direction: column; gap: 10px; }
.audit-entry {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.audit-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; font-size: 13px;
}
.audit-cat { font-weight: 600; color: var(--text); }
.audit-time { color: var(--text-muted); font-size: 11px; }
.audit-actors { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-muted); }
.audit-actor { display: inline-flex; align-items: center; gap: 6px; }
.audit-actor-label { color: var(--text-muted); }
.audit-data { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.audit-data .kv {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
  padding: 4px 8px; background: var(--bg-elev); border-radius: 4px;
}
.audit-data .kv .k { color: var(--text-muted); font-size: 12px; min-width: 130px; }
.audit-data .kv .k.success { color: var(--success); }
.audit-data .kv .k.danger { color: var(--danger); }
.audit-data .muted { color: var(--text-muted); }
.audit-data .small { font-size: 11px; margin-bottom: 4px; }
.audit-data code { background: var(--bg); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

.pill {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 12px;
}
.pill.on { color: var(--success); border-color: var(--success); }
.pill.off { color: var(--text-muted); }

.avatar {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  vertical-align: middle; margin-right: 4px; object-fit: cover;
}
.avatar-fallback {
  background: var(--bg-elev-2); color: var(--text-muted); text-align: center;
  font-size: 10px; line-height: 18px; font-weight: 600;
}

/* ----- Simulator ----- */
.sim-result {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; min-height: 60px;
  font-size: 13px;
}
.sim-result.empty { color: var(--text-muted); }
.sim-verdict {
  padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600;
  margin-bottom: 12px; font-size: 14px;
}
.sim-verdict.ok { background: rgba(34,197,94,.08); color: var(--success); border: 1px solid rgba(34,197,94,.3); }
.sim-verdict.bad { background: rgba(239,68,68,.08); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.sim-checks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sim-check {
  display: grid; grid-template-columns: 24px 160px 1fr;
  gap: 8px; align-items: center; font-size: 12px;
  padding: 6px 10px; background: var(--bg-elev); border-radius: 4px;
}
.sim-check.hit { color: #fca5a5; }
.sim-check.miss { color: var(--text-muted); }
.sim-check.miss .sim-check-icon { color: var(--success); }
.sim-check-name { color: var(--text); font-weight: 500; }
.sim-check-desc { font-size: 11px; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 10; }
  .main { padding: 18px; }
}

/* ----- Torrance management theme ----- */
body.theme-torrance {
  --bg: #09090b;
  --bg-elev: #111113;
  --bg-elev-2: #18181c;
  --border: #27272a;
  --text: #f4f4f5;
  --text-muted: #8b8b96;
  --accent: #f4f4f5;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --success: #2dd4bf;
  --radius: 18px;
  --radius-sm: 14px;
}
body.theme-torrance .layout { grid-template-columns: 280px 1fr; }
body.theme-torrance .sidebar {
  background: #0c0c0e;
  border-right-color: #1f1f23;
}
body.theme-torrance .sidebar-brand {
  padding: 22px 20px 16px;
  border-bottom-color: #1f1f23;
  align-items: flex-start;
}
body.theme-torrance .sidebar-brand .logo { display: none; }
body.theme-torrance .sidebar-brand h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
body.theme-torrance .sidebar-brand small {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  color: #6b6b75;
  margin-top: 4px;
  max-width: 220px;
}
body.theme-torrance .guild-picker { border-bottom-color: #1f1f23; }
body.theme-torrance .nav-search { padding: 10px 16px 6px; }
body.theme-torrance .nav-search input {
  width: 100%;
  background: #18181c;
  border: 1px solid #27272a;
  color: var(--text);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
}
body.theme-torrance .nav { padding: 6px 10px 16px; }
body.theme-torrance .nav-section {
  padding: 16px 12px 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #6b6b75;
}
body.theme-torrance .nav-item {
  margin: 2px 4px;
  padding: 9px 12px;
  border-radius: 12px;
  color: #c4c4cc;
  font-size: 13.5px;
}
body.theme-torrance .nav-item .ico { display: none; }
body.theme-torrance .nav-item:hover { background: #18181c; color: #fff; }
body.theme-torrance .nav-item.active {
  background: #232328;
  color: #fff;
  font-weight: 550;
}
body.theme-torrance .sidebar-footer { border-top-color: #1f1f23; }
body.theme-torrance .sidebar-footer button {
  border-radius: 10px;
  border-color: #27272a;
}
body.theme-torrance .main {
  max-width: 1180px;
  padding: 36px 40px;
}
body.theme-torrance .page-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
body.theme-torrance .page-sub { margin-bottom: 28px; color: #8b8b96; }
body.theme-torrance .card {
  background: #111113;
  border-color: #1f1f23;
  border-radius: 18px;
  padding: 22px;
}
body.theme-torrance .btn {
  background: #f4f4f5;
  color: #111113;
  border-radius: 12px;
  font-weight: 600;
}
body.theme-torrance .btn.secondary,
body.theme-torrance .btn.ghost {
  background: transparent;
  color: #f4f4f5;
  border: 1px solid #27272a;
}
body.theme-torrance .btn.secondary:hover,
body.theme-torrance .btn.ghost:hover {
  border-color: #f4f4f5;
  color: #fff;
}
body.theme-torrance .field input,
body.theme-torrance .field select,
body.theme-torrance .field textarea {
  background: #18181c;
  border-color: #27272a;
  border-radius: 12px;
}
body.theme-torrance .mode-card {
  background: #141416;
  border-color: #27272a;
  border-radius: 16px;
}
body.theme-torrance .mode-card.active {
  border-color: #3f3f46;
  background: #1a1a1e;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.dash-card {
  background: #111113;
  border: 1px solid #1f1f23;
  border-radius: 20px;
  padding: 22px 24px 20px;
  min-height: 128px;
}
.dash-card.clickable {
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.dash-card.clickable:hover,
.dash-card.clickable:focus-visible {
  border-color: #3f3f46;
  background: #161618;
  outline: none;
}
.dash-card.clickable:hover .action,
.dash-card.clickable:focus-visible .action { color: #e4e4e7; }
.dash-card .action {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 500;
  color: #6f6f78;
  letter-spacing: 0.02em;
}
.dash-card .kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a7a84;
  margin-bottom: 18px;
}
.dash-card .value {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 10px;
}
.dash-card .sub { color: #8b8b96; font-size: 13px; }
.app-detail {
  border: 1px solid #27272a;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0 16px;
  background: #161618;
}
.app-qa { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.app-qa-item .q { font-size: 12px; color: #8b8b96; margin-bottom: 4px; }
.app-qa-item .a { font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.table tr.is-open td { background: #18181c; }
.dash-card.status .value { font-size: 26px; color: var(--success); margin-top: 8px; }
.attn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.attn-card {
  background: #141416;
  border: 1px solid #1f1f23;
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.attn-card:hover { border-color: #3f3f46; background: #18181c; }
.attn-card h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.attn-card p { margin: 0; color: #8b8b96; font-size: 12px; }
.attn-card .action {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #6f6f78;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.module-card {
  background: #141416;
  border: 1px solid #1f1f23;
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  text-align: left;
}
.module-card:hover { border-color: #3f3f46; background: #18181c; }
.module-card h4 { margin: 0 0 6px; font-size: 15px; }
.module-card p { margin: 0; color: #8b8b96; font-size: 13px; line-height: 1.4; }
.section-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7a7a84;
  margin: 8px 0 12px;
}
.member-picker { position: relative; z-index: 2; }
.member-wrap { position: relative; }
.member-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 8;
  background: #18181c;
  border: 1px solid #27272a;
  border-radius: 12px;
  max-height: 240px;
  overflow: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.member-results[hidden] { display: none; }
.member-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: 0; color: inherit;
  padding: 8px 12px; cursor: pointer;
}
.member-option:hover { background: #232328; }
.member-option img, .member-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover;
}
.member-av {
  display: grid; place-items: center;
  background: #27272a; font-size: 12px; font-weight: 600;
}
.member-meta { display: flex; flex-direction: column; min-width: 0; }
.member-meta strong { font-size: 13px; }
.member-meta small { color: #8b8b96; font-size: 11px; }
.member-empty { padding: 10px 12px; color: #8b8b96; font-size: 12px; }
.card:has(.member-picker) { overflow: visible; }
.embed-preview strong { display: block; margin-bottom: 6px; }
.embed-preview p { margin: 0; color: #8b8b96; font-size: 13px; }
body.theme-torrance input[type="color"] {
  width: 52px;
  height: 38px;
  padding: 4px;
  background: #18181c;
  border: 1px solid #27272a;
  border-radius: 10px;
}
body.theme-torrance .status-line {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  color: var(--success);
}
body.theme-torrance .sidebar-user {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
body.theme-torrance .sidebar-user strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
body.theme-torrance .sidebar-user span {
  color: #6b6b75;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.theme-torrance .menu-btn {
  display: none;
  margin-bottom: 16px;
  background: #18181c;
  color: #fff;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}
body.theme-torrance .nav-backdrop {
  display: none;
}
@media (max-width: 860px) {
  .dash-grid, .attn-grid, .module-grid { grid-template-columns: 1fr; }
  body.theme-torrance .layout { grid-template-columns: 1fr; }
  body.theme-torrance .main { padding: 20px; }
  body.theme-torrance .menu-btn { display: inline-flex; }
  body.theme-torrance .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform .18s ease;
  }
  body.theme-torrance.nav-open .sidebar { transform: translateX(0); }
  body.theme-torrance.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 30;
  }
}
