/* ============================================================
   NebulaBot Dashboard
   ============================================================ */
:root {
  --bg: #070911;
  --bg-2: #0b0e1b;
  --panel: #111528;
  --panel-2: #161b30;
  --panel-3: #1c2240;
  --line: #242b49;
  --line-soft: #1b2138;
  --text: #e9ecf8;
  --muted: #8b93b3;
  --muted-2: #626a8a;
  --brand: #8b5cf6;
  --brand-2: #22d3ee;
  --brand-soft: rgba(139, 92, 246, 0.14);
  --success: #3fb950;
  --success-soft: rgba(63, 185, 80, 0.14);
  --danger: #f85149;
  --danger-soft: rgba(248, 81, 73, 0.14);
  --warning: #d29922;
  --warning-soft: rgba(210, 153, 34, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  --sidebar: 272px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }

/* ---------- Hintergrund ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(700px 500px at 92% 8%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(800px 700px at 60% 110%, rgba(139, 92, 246, 0.10), transparent 60%),
    var(--bg);
}
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
}

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px 18px;
}
.login-card {
  width: min(440px, 100%);
  padding: 38px 34px 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(23, 28, 51, 0.92), rgba(13, 16, 30, 0.96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  text-align: center;
}
.logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #080a12;
  font-weight: 900;
  font-size: 20px;
  flex: none;
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.35);
}
.logo.big {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 34px;
  margin: 0 auto 18px;
}
.login-card h1 { font-size: 30px; letter-spacing: -0.5px; }
.login-card h1 span { color: var(--brand); }
.login-card .lead { color: var(--muted); margin: 8px 0 26px; }
.login-card .hint { color: var(--muted-2); font-size: 12px; margin-top: 22px; }
.login-footer { color: var(--muted-2); font-size: 12px; }

.discord-mark { font-size: 16px; }
.dev-login { margin-top: 4px; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 12px;
  margin: 22px 0 14px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.dev-login form { display: flex; gap: 8px; }
.dev-login input { flex: 1; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex: none;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 14px 14px;
  background: linear-gradient(180deg, rgba(13, 16, 30, 0.96), rgba(8, 10, 19, 0.98));
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; letter-spacing: 0.2px; }
.brand-text span { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 1.4px; }

.guild-area { position: relative; }
.guild-switch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, background 0.18s;
}
.guild-switch:hover { border-color: #34406e; background: var(--panel-2); }
.guild-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #4c3a8f, #22305c);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.guild-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.guild-meta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-meta small { color: var(--muted-2); font-size: 11px; }
.chev { color: var(--muted-2); font-size: 14px; }

.guild-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #121629;
  box-shadow: var(--shadow);
  z-index: 50;
}
.guild-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.guild-option:hover, .guild-option.active { background: var(--panel-3); }
.guild-option .guild-icon { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.guild-option .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.guild-option .missing {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--warning);
  border: 1px solid rgba(210, 153, 34, 0.4);
  border-radius: 5px;
  padding: 1px 4px;
}

.nav { flex: 1; overflow-y: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; }
.nav-section {
  margin: 13px 10px 5px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted-2);
  font-weight: 700;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  margin: 2px 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: 0.16s;
}
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.06));
  border-color: rgba(139, 92, 246, 0.32);
}
.nav-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  margin-left: auto;
}
.nav-item .dot.on { background: var(--success); box-shadow: 0 0 8px var(--success); }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-top: 1px solid var(--line-soft);
}
.user-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #2b3a72, #4a2d76);
  background-size: cover;
  background-position: center;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-meta strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 10.5px; color: var(--muted-2); }
.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: 0.16s;
}
.icon-btn:hover { color: var(--text); border-color: #3a4574; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 30px;
  background: rgba(8, 10, 19, 0.74);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(16px);
}
.page-heading { flex: 1; min-width: 0; }
.page-heading h1 { font-size: 19px; letter-spacing: -0.3px; }
.page-heading p { color: var(--muted-2); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.save-state { color: var(--muted-2); font-size: 12px; }
.save-state.dirty { color: var(--warning); }
.menu-toggle { display: none; }

.view { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 30px 60px; }

/* ---------- Basics ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: #3b477a; background: var(--panel-3); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), #6d3fe0);
  color: #fff;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.24);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { width: 100%; padding: 13px 18px; font-size: 14px; border-radius: 12px; }
.btn.ghost { background: transparent; }
.btn.danger { color: #ffb4b0; border-color: rgba(248, 81, 73, 0.4); background: var(--danger-soft); }
.btn.danger:hover { background: rgba(248, 81, 73, 0.22); }
.btn.success { color: #b6f2c0; border-color: rgba(63, 185, 80, 0.4); background: var(--success-soft); }
.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 25, 45, 0.9), rgba(14, 18, 33, 0.94));
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  padding: 22px;
  margin-bottom: 18px;
}
.card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.card-head .card-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-soft);
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-size: 19px;
}
.card-head h2 { font-size: 16px; }
.card-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: #c3c9e2; }
.field > small { color: var(--muted-2); font-size: 11.5px; }
.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.field select[multiple] { min-height: 132px; padding: 5px; }
.field select[multiple] option { padding: 5px 7px; border-radius: 5px; }
.field-row { display: flex; gap: 8px; }
.field-row > .field { flex: 1; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type="color"] {
  width: 42px;
  height: 39px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-2);
  cursor: pointer;
}
.color-row input[type="text"] { flex: 1; font-family: ui-monospace, Consolas, monospace; }

/* Switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #2a3150;
  border: 1px solid #343d63;
  transition: 0.2s;
  cursor: pointer;
}
.switch span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #aab1cf;
  transition: 0.2s;
}
.switch input:checked + span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(20px); background: #fff; }

.switch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row .text { flex: 1; min-width: 0; }
.switch-row strong { display: block; font-size: 13px; }
.switch-row small { color: var(--muted-2); font-size: 11.5px; }

/* ---------- Übersicht ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(500px 180px at 15% 0%, rgba(139, 92, 246, 0.22), transparent 70%),
    linear-gradient(120deg, rgba(25, 22, 54, 0.9), rgba(12, 16, 32, 0.94));
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%);
}
.hero-icon {
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, #4c3a8f, #22305c);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1;
}
.hero-body { flex: 1; min-width: 0; z-index: 1; }
.hero-body h2 { font-size: 24px; letter-spacing: -0.4px; }
.hero-body p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.hero-actions { display: flex; gap: 8px; z-index: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.badge.on { color: #b6f2c0; border-color: rgba(63, 185, 80, 0.35); background: var(--success-soft); }
.badge.off { color: var(--muted-2); }
.badge.warn { color: #f0cc7a; border-color: rgba(210, 153, 34, 0.35); background: var(--warning-soft); }
.badge.brand { color: #cfc0ff; border-color: rgba(139, 92, 246, 0.4); background: var(--brand-soft); }
.badge.danger { color: #ffb4b0; border-color: rgba(248, 81, 73, 0.4); background: var(--danger-soft); }

.stat {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.stat .label { color: var(--muted-2); font-size: 11.5px; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; margin-top: 3px; }
.stat .sub { color: var(--muted-2); font-size: 11px; }
.stat.accent { background: linear-gradient(145deg, rgba(139, 92, 246, 0.18), var(--panel)); border-color: rgba(139, 92, 246, 0.3); }

/* ---------- Modul-Karten ---------- */
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 0.18s, background 0.18s;
}
.module-card:hover { border-color: #35406b; background: var(--panel-2); }
.module-card.on { border-color: rgba(139, 92, 246, 0.3); background: linear-gradient(135deg, rgba(139, 92, 246, 0.09), var(--panel)); }
.module-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--panel-3);
  font-size: 18px;
}
.module-body { flex: 1; min-width: 0; }
.module-body h3 { font-size: 13.5px; }
.module-body p { color: var(--muted-2); font-size: 11.5px; }
.module-card .btn { flex: none; }

/* ---------- Tabellen / Listen ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
td .muted { color: var(--muted-2); }
td .truncate { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.row-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  margin-bottom: 10px;
}
.row-card .row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.row-card .row-head strong { font-size: 12.5px; }
.row-card .row-head .spacer { flex: 1; }
.row-grid { display: grid; grid-template-columns: 1fr 90px 1fr 1.3fr auto; gap: 10px; align-items: end; }
.row-grid .field { margin-bottom: 0; }
.row-grid .btn { margin-bottom: 0; }

.empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 12.5px;
}
.empty strong { display: block; color: var(--muted); margin-bottom: 3px; }

.empty-state {
  max-width: 560px;
  margin: 70px auto;
  text-align: center;
  padding: 34px;
}
.empty-state .big-icon { font-size: 46px; margin-bottom: 12px; }
.empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

.notice {
  padding: 11px 13px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: var(--brand-soft);
  border-radius: 10px;
  color: #cfc0ff;
  font-size: 12.5px;
  margin-top: 16px;
  text-align: left;
}
.notice.error { border-color: rgba(248, 81, 73, 0.4); background: var(--danger-soft); color: #ffb4b0; }
.notice.warn { border-color: rgba(210, 153, 34, 0.4); background: var(--warning-soft); color: #f0cc7a; }
.notice code { background: rgba(0, 0, 0, 0.25); padding: 1px 5px; border-radius: 4px; }

/* ---------- Sonstiges ---------- */
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { font-size: 14px; }
.section-title .line { flex: 1; height: 1px; background: var(--line-soft); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--muted); }
.muted { color: var(--muted); }
.small-text { font-size: 11.5px; color: var(--muted-2); }
.inline-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
}
.checklist { display: grid; gap: 8px; }
.checklist li { color: var(--muted); font-size: 12.5px; }
ul { margin: 0; padding-left: 18px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: 380px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #171d33;
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.22s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: rgba(63, 185, 80, 0.45); }
.toast.error { border-color: rgba(248, 81, 73, 0.45); }

.scrim { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim.show { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0.55); }
  .menu-toggle { display: grid; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .view { padding: 20px 16px 50px; }
  .topbar { padding: 12px 16px; }
  .page-heading h1 { font-size: 16px; }
  .grid.two, .grid.three, .module-grid { grid-template-columns: 1fr; }
  .hero { flex-wrap: wrap; padding: 18px; }
  .hero-body h2 { font-size: 20px; }
  .hero-icon { width: 60px; height: 60px; border-radius: 16px; }
  .row-grid { grid-template-columns: 1fr; }
  .save-state { display: none; }
  .login-card { padding: 30px 22px 24px; }
}
@media (max-width: 520px) {
  .grid.four { grid-template-columns: 1fr 1fr; }
  .stat .value { font-size: 21px; }
  .topbar-actions .btn { padding: 8px 11px; font-size: 12px; }
}
