/* ------------------------------------------------------------------ *
 *  Bot Dashboard styles
 *  Dark, calm, functional. Discord-adjacent palette without copying it.
 * ------------------------------------------------------------------ */

:root {
  --bg:        #0f1115;
  --bg-elev:   #161922;
  --bg-elev-2: #1d212c;
  --line:      #262b39;
  --text:      #e6e8ee;
  --muted:     #8b91a3;
  --accent:    #6366f1;     /* indigo */
  --accent-2:  #818cf8;
  --success:   #22c55e;
  --danger:    #ef4444;
  --radius:    10px;
  --font-ui:   ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background:
    radial-gradient(800px 400px at 10% -10%, rgba(99,102,241,.18), transparent 60%),
    radial-gradient(600px 300px at 100% 0%, rgba(129,140,248,.10), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 15px;
}

code { font-family: var(--font-mono); font-size: 0.85em; color: var(--muted); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(15, 17, 21, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--text); font-weight: 600; letter-spacing: 0.2px; }
.navlinks { display: flex; gap: 16px; align-items: center; }

/* ---------- layout ---------- */
.container { max-width: 960px; margin: 0 auto; padding: 32px 24px 80px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { margin: 4px 0 6px; font-size: 28px; }
.muted { color: var(--muted); }
.back { display: inline-block; margin-bottom: 8px; font-size: 14px; }

/* ---------- panel ---------- */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.panel h2 { margin: 0 0 8px; font-size: 18px; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tab {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--muted);
  border-radius: 8px 8px 0 0;
  font-weight: 500;
}
.tab:hover { color: var(--text); text-decoration: none; background: var(--bg-elev); }
.tab.active {
  color: var(--text);
  background: var(--bg-elev);
  border-color: var(--line);
}

/* ---------- forms ---------- */
input[type="text"], input[type="password"], input:not([type]) {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .12s ease;
}
input:focus { border-color: var(--accent); }

label { display: block; margin-bottom: 14px; }
label > span:first-child, label > .cat-label {
  display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font: 500 14px/1 var(--font-ui);
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .12s ease, transform .04s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: white; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }

.sticky-actions {
  position: sticky; bottom: 12px;
  margin-top: 16px;
  padding: 12px;
  background: rgba(22, 25, 34, .85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: right;
}

/* ---------- login ---------- */
.login-card {
  max-width: 360px;
  margin: 80px auto 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card .btn { width: 100%; margin-top: 8px; }

/* ---------- flash ---------- */
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.flash-error   { border-color: rgba(239,68,68,.4);  background: rgba(239,68,68,.08);  color: #fecaca; }
.flash-success { border-color: rgba(34,197,94,.4);  background: rgba(34,197,94,.08);  color: #bbf7d0; }

/* ---------- server grid ---------- */
.server-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.server-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  transition: border-color .15s ease, transform .08s ease;
}
.server-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.server-card h3 { margin: 0 0 6px; font-size: 16px; }

/* ---------- toggle list ---------- */
.toggle-list { display: grid; gap: 4px; }
.toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px; align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .1s ease;
  margin-bottom: 0;
}
.toggle:hover { background: var(--bg-elev-2); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  width: 38px; height: 22px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background .15s ease;
}
.switch::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform .15s ease, background .15s ease;
}
.toggle input:checked ~ .switch { background: var(--accent); border-color: var(--accent); }
.toggle input:checked ~ .switch::after { transform: translateX(16px); background: white; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; }
.toggle-text code { font-size: 11px; opacity: .7; }

/* ---------- form-grid for log channels ---------- */
.form-grid { display: grid; gap: 10px; }

/* ---------- empty state ---------- */
.empty {
  padding: 40px;
  text-align: center;
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- select dropdown ---------- */
select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238b91a3' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select:focus { border-color: var(--accent); }

/* ---------- threshold table ---------- */
.threshold-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  margin-bottom: 12px;
}
.threshold-table th,
.threshold-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.threshold-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.threshold-table input,
.threshold-table select { margin: 0; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- status pill ---------- */
.status-pill {
  display: inline-block;
  margin-left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  vertical-align: middle;
}
.status-on  { background: rgba(34,197,94,.14);  color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.status-off { background: rgba(239,68,68,.14);  color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

/* ===================== LANDING PAGE ===================== */
.landing-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}
.landing-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 20% 10%,  rgba(99,102,241,.25), transparent 60%),
    radial-gradient(700px 400px at 80% 90%,  rgba(129,140,248,.18), transparent 60%),
    radial-gradient(500px 300px at 50% 50%,  rgba(56,189,248,.08),  transparent 70%),
    var(--bg);
  z-index: -1;
}
.landing-wrap {
  max-width: 720px;
  width: 100%;
  padding: 60px 24px;
  text-align: center;
}
.landing-header { margin-bottom: 40px; }
.landing-logo {
  font-size: 64px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 20px rgba(99,102,241,.5));
}
.landing-header h1 {
  font-size: 56px;
  margin: 0 0 12px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #e6e8ee 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-tagline {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}
.landing-actions {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 24px;
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--bg-elev-2); }
.btn-danger { background: var(--danger); color: white; }
.landing-status {
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 14px;
}
.landing-features {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 10px;
  text-align: left;
  max-width: 540px;
  margin: 0 auto;
}
.landing-features li {
  padding: 14px 18px;
  background: rgba(22, 25, 34, .6);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

/* The hidden owner login link — invisible 50x50 box in bottom-left corner. */
.hidden-owner-link {
  position: fixed;
  bottom: 0; left: 0;
  width: 50px; height: 50px;
  z-index: 100;
  background: transparent;
}
.hidden-owner-link:hover { background: rgba(99,102,241,.05); }

/* ===================== TOP BAR EXTRAS ===================== */
.brand-mark { font-size: 18px; margin-right: 4px; }
.navlink {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
}
.navlink:hover { color: var(--text); background: var(--bg-elev); text-decoration: none; }

/* ===================== SERVER CARDS (with icons) ===================== */
.server-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.server-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.server-card-icon-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  font-size: 22px;
  font-weight: 600;
  color: var(--muted);
}
.server-card-body { min-width: 0; }
.server-card-body h3 {
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===================== OWNER PANEL TABLE ===================== */
.row-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.row-icon-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.row-actions { white-space: nowrap; }
.row-actions form { display: inline-block; margin-right: 4px; }
.status-ghost { background: rgba(139,145,163,.14); color: var(--muted); border: 1px solid var(--line); }

/* ===================== MESSAGES TAB ===================== */
textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: 14px var(--font-ui);
  outline: none;
  resize: vertical;
  min-height: 80px;
}
textarea:focus { border-color: var(--accent); }
.dm-block {
  padding: 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
}
.dm-block .toggle { margin-bottom: 8px; }
.code-block {
  margin: 8px 0 0;
  padding: 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  color: var(--muted);
}

/* ===================== PERMISSIONS / TIERS ===================== */
.tab-owner { color: var(--accent-2); }
.tier-create {
  display: grid;
  grid-template-columns: 1fr 100px 100px auto;
  gap: 12px;
  align-items: end;
}
.tier-create label { margin: 0; }
.tier-create input[type="color"] {
  height: 38px;
  padding: 4px;
  cursor: pointer;
}
input[type="color"] {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tier-card { padding-left: 20px; }
.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.tier-header h3 { display: flex; align-items: center; gap: 10px; margin: 0; }
.tier-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06);
}

.role-grid, .command-grid {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.role-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.command-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.role-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev-2);
  cursor: pointer;
  margin: 0;
  font-size: 13px;
}
.role-pill:hover { border-color: var(--accent); }
.role-pill input { position: absolute; opacity: 0; pointer-events: none; }
.role-pill .role-pill-swatch {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--role-color, var(--muted));
  flex-shrink: 0;
}
.role-pill:has(input:checked) {
  background: rgba(99,102,241,.15);
  border-color: var(--accent);
}

.toggle.compact { padding: 4px 8px; }
.toggle.compact .switch { transform: scale(0.85); }

/* ============================================================ SIDEBAR */
.server-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 6px;
}
@media (max-width: 960px) {
  .server-shell { grid-template-columns: 1fr; }
}

.sidebar {
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 0 8px;
  position: sticky;
  top: 78px;
}

.sidebar-server {
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.sidebar-server-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.sidebar-server-name {
  font-weight: 700;
  font-size: 16px;
  word-break: break-word;
}
.sidebar-server-id {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.sidebar-item,
.sidebar-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}
.sidebar-item:hover,
.sidebar-sub:hover {
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-item.active,
.sidebar-sub.active {
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
}

.sidebar-icon {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.sidebar-group {
  margin: 4px 0;
}
.sidebar-group > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  color: var(--text);
  user-select: none;
}
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-group > summary::after {
  content: "▾";
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.sidebar-group[open] > summary::after { transform: rotate(180deg); }
.sidebar-group > summary:hover { background: rgba(255,255,255,0.04); }
.sidebar-group .sidebar-sub {
  margin-left: 28px;
  font-size: 13.5px;
  padding: 7px 10px;
}

.sidebar-item-owner {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px !important;
  color: #fbbf24;
}
.sidebar-back {
  color: var(--muted);
  margin-top: 8px;
  font-size: 13px;
}

.server-main { min-width: 0; }

/* Fade-in animation when content swaps */
.tab-fade-in {
  animation: tab-fade 0.22s ease-out;
}
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================ SECURITY GAUGE */
.security-panel { padding: 22px; }
.security-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
}
@media (max-width: 700px) {
  .security-grid { grid-template-columns: 1fr; text-align: center; }
}
.security-gauge-wrap { text-align: center; }
.security-gauge {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}
.gauge-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 10;
}
.gauge-bar {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease-out, stroke 0.3s ease;
}
.gauge-text {
  font-size: 28px;
  font-weight: 700;
  fill: var(--text);
  text-anchor: middle;
  dominant-baseline: middle;
  transform: rotate(90deg);
  transform-origin: 60px 60px;
}
.gauge-sub {
  font-size: 10px;
  fill: var(--muted);
  text-anchor: middle;
  transform: rotate(90deg);
  transform-origin: 60px 60px;
}
.security-label {
  margin: 8px 0 0;
  font-weight: 600;
  font-size: 15px;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 4px;
}
.check-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13.5px;
}
.check-row:hover { background: rgba(255,255,255,0.03); }
.check-icon { color: #ef4444; font-weight: 700; }
.check-row.passed .check-icon { color: #22c55e; }
.check-points {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.check-row.passed { opacity: 0.85; }
.check-row.passed .check-label { color: var(--muted); text-decoration: line-through; }

/* ====================== COLLAPSIBLE SECTIONS (permissions tab) */
.collapsible-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.collapsible-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  user-select: none;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.collapsible-section > summary::-webkit-details-marker { display: none; }
.collapsible-section > summary:hover { background: rgba(255,255,255,0.04); }
.collapsible-section > summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.15s ease;
  margin-left: 4px;
}
.collapsible-section[open] > summary::after { transform: rotate(180deg); }
.collapsible-section[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  margin-bottom: 10px;
}
.collapsible-section > *:not(summary) {
  padding: 0 14px 12px;
}
.collapse-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}
.collapse-title { flex: 1; }

/* ============================================================ ANIMATIONS */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.08); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fade-up { animation: fade-up 0.5s ease-out both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* button hover lift */
.btn { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(99,102,241,.25); }
.btn:active { transform: translateY(0); }

/* panel hover glow */
.panel { transition: border-color 0.2s ease; }
.panel:hover { border-color: rgba(99,102,241,.25); }

/* sidebar item hover pulse */
.sidebar-item, .sidebar-sub {
  transition: background 0.12s ease, color 0.12s ease, transform 0.1s ease;
}
.sidebar-item:hover, .sidebar-sub:hover { transform: translateX(3px); }

/* ============================================================ LANDING */
.landing { max-width: 1100px; margin: 0 auto; padding: 0 24px 80px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  padding: 80px 0 60px;
  position: relative;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
}

.hero-glow {
  position: absolute;
  inset: -60px -80px;
  background: radial-gradient(ellipse at 30% 50%, rgba(99,102,241,.18) 0%, transparent 60%);
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite;
}

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -1px;
}

.hero-accent {
  background: linear-gradient(135deg, #6366f1, #a78bfa, #6366f1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 36px;
  max-width: 520px;
}

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

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99,102,241,.4);
}
.btn-hero:hover { box-shadow: 0 6px 28px rgba(99,102,241,.55); }
.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--line);
  text-decoration: none;
}
.btn-hero-ghost:hover { border-color: var(--accent); color: #a5b4fc; }

/* Hero visual card */
.hero-visual { animation: float 4s ease-in-out infinite; }
.hero-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.hcard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 14px;
  font-weight: 500;
}
.hcard-row:last-of-type { border-bottom: none; }
.hcard-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hcard-dot.green  { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.hcard-dot.yellow { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.hcard-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.hcard-badge.green  { background: rgba(34,197,94,.15); color: #4ade80; }
.hcard-badge.yellow { background: rgba(245,158,11,.15); color: #fbbf24; }
.hcard-sep { height: 1px; background: var(--line); margin: 12px 0; }
.hcard-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.hcard-score-val {
  font-size: 26px;
  font-weight: 800;
  color: #4ade80;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0 60px;
}
.feature-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  border-color: rgba(99,102,241,.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.feature-icon { font-size: 32px; margin-bottom: 14px; }
.feature-card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.feature-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* CTA */
.cta {
  text-align: center;
  padding: 60px 0;
  border-top: 1px solid var(--line);
}
.cta h2 { font-size: 28px; font-weight: 700; margin: 0 0 28px; }

/* ============================================================ BACKUP LIST */
.backup-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-wrap: wrap;
  transition: border-color 0.15s ease;
}
.backup-row:hover { border-color: rgba(99,102,241,.3); }
.backup-meta { display: flex; flex-direction: column; gap: 3px; }
.backup-name { font-weight: 600; font-size: 15px; }
.backup-date, .backup-creator { font-size: 12px; }
.backup-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.backup-id {
  font-size: 12px;
  background: rgba(255,255,255,.06);
  padding: 3px 8px;
  border-radius: 5px;
}

.restore-steps { padding-left: 20px; color: var(--muted); line-height: 2; }

/* ============================================================ TICKET REASONS */
.reason-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.reason-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.reason-emoji { font-size: 20px; flex-shrink: 0; }
.reason-info { flex: 1; }

/* ============================================================ DASHBOARD ACCESS */
.active-access { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.4) !important; }
.access-level-select { height: 28px; cursor: pointer; }

/* ====================== STAT CARDS (overview) */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-elev-1, #1a1a24);
  border: 1px solid var(--line, #2a2a38);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.stat-card.stat-warn { border-color: rgba(245,158,11,.4); }
.stat-card.stat-warn .stat-value { color: #fbbf24; }
.stat-icon { font-size: 26px; margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted, #9ca3af); margin-top: 4px;
}

/* ====================== SETTINGS SUBHEADINGS (consolidated panels) */
.settings-subhead {
  font-size: 15px;
  font-weight: 700;
  margin: 22px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #2a2a38);
  color: var(--text, #e5e7eb);
}
.settings-subhead:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}

/* ====================== OVERVIEW HERO BANNER (Wick-style gradient) */
.overview-hero {
  position: relative;
  border-radius: 18px;
  padding: 40px 32px;
  margin-bottom: 22px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(236,72,153,.55) 0%, transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(59,130,246,.45) 0%, transparent 55%),
    linear-gradient(135deg, #7c2d6e 0%, #3b1d6e 50%, #1e2a78 100%);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.overview-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.08), transparent 40%);
  pointer-events: none;
}
.overview-hero-inner { position: relative; z-index: 1; text-align: center; }
.overview-hero .page-eyebrow {
  color: rgba(255,255,255,.7);
  font-size: 12px; letter-spacing: 0.18em; margin: 0 0 6px;
}
.overview-hero-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  margin: 0; color: #fff; letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.overview-hero-id code {
  color: rgba(255,255,255,.65); font-size: 13px; background: transparent;
}

/* ====================== SECTION TITLE */
.section-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 16px;
  color: var(--text);
}

/* ====================== QUICK SYSTEMS CARDS */
.quick-systems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.qs-card {
  display: flex;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none !important;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.qs-card:hover {
  transform: translateY(-4px);
  border-color: rgba(236,72,153,.4);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.qs-accent {
  width: 6px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #ec4899, #8b5cf6);
}
.qs-body { padding: 18px 20px; flex: 1; }
.qs-icon { font-size: 26px; margin-bottom: 8px; }
.qs-body h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.qs-body p { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.qs-status { font-size: 13px; font-weight: 600; }
.qs-status.on { color: #4ade80; }
.qs-status.off { color: #6b7280; }
.qs-status.neutral { color: var(--accent-2); }

/* ====================== EXTRA ANIMATIONS (Wick-style polish) */

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.4; }
  50%  { transform: scale(1.05); opacity: 0.6; }
  100% { transform: scale(1); opacity: 0.4; }
}
@keyframes count-up {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
  50%      { box-shadow: 0 0 24px 4px rgba(236, 72, 153, 0.3); }
}

/* Hero banner: subtle floating shine */
.overview-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255,255,255,0.06) 50%,
    transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* Hero title: gentle vertical float */
.overview-hero-title {
  animation: float-soft 5s ease-in-out infinite;
}

/* Stat cards: stagger in on load + count-up effect */
.stat-cards .stat-card {
  animation: count-up 0.5s ease-out backwards;
}
.stat-cards .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-cards .stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-cards .stat-card:nth-child(3) { animation-delay: 0.25s; }
.stat-cards .stat-card:nth-child(4) { animation-delay: 0.35s; }
.stat-cards .stat-card .stat-value {
  background-image: linear-gradient(120deg, var(--text) 0%, #ec4899 50%, var(--text) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

/* Quick-systems cards: stagger entrance + accent bar shimmer on hover */
.quick-systems .qs-card {
  animation: slide-up 0.45s ease-out backwards;
}
.quick-systems .qs-card:nth-child(1) { animation-delay: 0.05s; }
.quick-systems .qs-card:nth-child(2) { animation-delay: 0.10s; }
.quick-systems .qs-card:nth-child(3) { animation-delay: 0.15s; }
.quick-systems .qs-card:nth-child(4) { animation-delay: 0.20s; }
.quick-systems .qs-card:nth-child(5) { animation-delay: 0.25s; }
.quick-systems .qs-card:nth-child(6) { animation-delay: 0.30s; }

.qs-card .qs-accent {
  background: linear-gradient(180deg, #ec4899, #8b5cf6, #ec4899);
  background-size: 100% 200%;
  transition: background-position 0.4s ease;
}
.qs-card:hover .qs-accent {
  background-position: 0 100%;
}
.qs-card:hover .qs-icon {
  animation: float-soft 1.2s ease-in-out infinite;
}

/* Active toggle switches: gentle glow pulse */
.toggle input:checked ~ .switch {
  animation: glow-pulse 2.5s ease-in-out infinite;
}

/* Security gauge: subtle ring pulse — apply to wrapper not SVG so rotation stays intact */
.gauge-ring, .security-panel svg circle {
  transition: stroke-dashoffset 0.8s ease-out;
}
.security-gauge-wrap {
  animation: pulse-ring 3.5s ease-in-out infinite;
}

/* Buttons: ripple-like glow on press */
.btn:active {
  transform: scale(0.97);
}
.btn-primary, .btn-hero {
  background-size: 200% auto;
  transition: background-position 0.3s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.btn-primary:hover, .btn-hero:hover {
  background-position: right center;
}

/* Sidebar items: smooth icon scale on hover */
.sidebar-item:hover .sidebar-icon,
.sidebar-sub:hover {
  transition: transform 0.18s ease;
}

/* Panels: subtle fade-in cascade */
.panel.tab-fade-in {
  animation: slide-up 0.5s ease-out backwards;
}

/* Flash messages: slide down from top */
.flash {
  animation: slide-up 0.3s ease-out;
}

/* Section titles: underline grow on hover */
.section-title {
  position: relative;
  display: inline-block;
  width: 100%;
}
.section-title::after {
  content: "";
  display: block;
  height: 2px;
  width: 60px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ====================== EXPANDABLE TICKET REASON ROWS */
.reason-expandable {
  background: var(--bg-elev-1, #1a1a24);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}
.reason-expandable[open] {
  border-color: rgba(236, 72, 153, 0.4);
}
.reason-expandable summary {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}
.reason-expandable summary::-webkit-details-marker { display: none; }
.reason-toggle-hint {
  margin-left: auto;
  font-size: 12px;
  flex-shrink: 0;
}
.reason-expandable[open] .reason-toggle-hint {
  opacity: 0;
}

/* ============================================================
   DYNO-STYLE MODULES GRID
   ============================================================ */

.modules-toolbar {
  margin: 0 0 18px;
}
.module-search {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-elev, #1a1a24);
  border: 1px solid var(--line, #2a2a38);
  border-radius: 12px;
  color: var(--text, #e5e7eb);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.module-search:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.module-card {
  background: var(--bg-elev, #1a1a24);
  border: 1px solid var(--line, #2a2a38);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1.2),
              border-color 0.18s ease,
              box-shadow 0.22s ease;
  animation: module-pop-in 0.45s ease-out backwards;
}

/* staggered entrance — each card a bit later */
.modules-grid .module-card:nth-child(1)  { animation-delay: 0.04s; }
.modules-grid .module-card:nth-child(2)  { animation-delay: 0.08s; }
.modules-grid .module-card:nth-child(3)  { animation-delay: 0.12s; }
.modules-grid .module-card:nth-child(4)  { animation-delay: 0.16s; }
.modules-grid .module-card:nth-child(5)  { animation-delay: 0.20s; }
.modules-grid .module-card:nth-child(6)  { animation-delay: 0.24s; }
.modules-grid .module-card:nth-child(7)  { animation-delay: 0.28s; }
.modules-grid .module-card:nth-child(8)  { animation-delay: 0.32s; }
.modules-grid .module-card:nth-child(9)  { animation-delay: 0.36s; }
.modules-grid .module-card:nth-child(10) { animation-delay: 0.40s; }
.modules-grid .module-card:nth-child(11) { animation-delay: 0.44s; }
.modules-grid .module-card:nth-child(12) { animation-delay: 0.48s; }
.modules-grid .module-card:nth-child(n+13) { animation-delay: 0.52s; }

@keyframes module-pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* hover sheen sweep */
.module-card::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(115deg,
    transparent 0%,
    rgba(236, 72, 153, 0.06) 30%,
    rgba(99, 102, 241, 0.06) 50%,
    transparent 70%);
  transition: left 0.6s ease;
  pointer-events: none;
}
.module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(236, 72, 153, 0.18) inset;
}
.module-card:hover::before {
  left: 100%;
}

/* head row: title + toggle pill */
.module-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.module-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}
.module-badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  animation: badge-pulse 2.5s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* status pill */
.module-toggle-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}
.module-toggle-pill.is-on {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}
.module-toggle-pill.is-off {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
  border-color: rgba(107, 114, 128, 0.30);
}
.module-toggle-pill.is-neutral {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.30);
}
.module-card:hover .module-toggle-pill.is-on {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.module-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #9ca3af);
  line-height: 1.5;
  flex-grow: 1;
}

.module-settings-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(239, 68, 68, 0.10);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.30);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.18s ease;
}
.module-settings-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.55);
  transform: translateX(2px);
  color: #fca5a5;
}

/* ============================================================
   AUDIT LOG PAGE
   ============================================================ */
.audit-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.audit-filters select,
.audit-filters input[type=search] {
  padding: 9px 14px;
  background: var(--bg-elev, #1a1a24);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-size: 13px;
}
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.audit-entry {
  background: var(--bg-elev, #1a1a24);
  border: 1px solid var(--line);
  border-left: 3px solid var(--audit-accent, #6366f1);
  border-radius: 10px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  animation: module-pop-in 0.3s ease-out backwards;
}
.audit-entry:hover {
  background: rgba(255, 255, 255, 0.02);
}
.audit-entry.audit-dashboard { --audit-accent: #6366f1; }
.audit-entry.audit-bot       { --audit-accent: #ec4899; }
.audit-entry.audit-security  { --audit-accent: #f59e0b; }
.audit-entry.audit-danger    { --audit-accent: #ef4444; }
.audit-time {
  color: var(--muted);
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", monospace;
  white-space: nowrap;
}
.audit-actor {
  font-weight: 600;
  color: var(--text);
}
.audit-action {
  color: var(--text);
}
.audit-action .audit-verb {
  color: #818cf8;
  font-weight: 600;
}
.audit-details {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.audit-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.audit-pagination a, .audit-pagination span {
  padding: 7px 13px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.audit-pagination a:hover { border-color: rgba(99, 102, 241, 0.5); }
.audit-pagination .audit-current {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
}
.audit-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

/* ===========================================================================
   NG-SHELL — Dyno-style dashboard layout
   (left sidebar + content w/ topbar)
   =========================================================================== */

.ng-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: start;     /* critical: lets sticky sidebar work */
  min-height: 100vh;
  background: #0a0a10;
}

/* ─── SIDEBAR ──────────────────────────────────────────────── */
.ng-sidebar {
  background: #0c0c14;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;          /* exactly viewport height, scrolls internally */
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.ng-sidebar::-webkit-scrollbar { width: 6px; }
.ng-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.ng-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 16px;
}
.ng-brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ec4899, #6366f1);
  border-radius: 9px;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.25);
}
.ng-brand-text {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* current server pill */
.ng-sidebar-server {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 18px;
}
.ng-server-icon-img,
.ng-server-icon-fallback {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}
.ng-server-icon-fallback {
  background: linear-gradient(135deg, #ec4899, #6366f1);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
}
.ng-server-meta { min-width: 0; flex: 1; }
.ng-server-name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}
.ng-server-id {
  font-size: 10px;
  color: rgba(229, 231, 235, 0.4);
  background: none;
  padding: 0;
}

/* nav */
.ng-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ng-nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.ng-nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(229, 231, 235, 0.35);
  padding: 10px 12px 4px;
}
.ng-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(229, 231, 235, 0.72);
  text-decoration: none;
  transition: all 0.18s cubic-bezier(.2,.9,.3,1);
  position: relative;
}
.ng-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transform: translateX(2px);
}
.ng-nav-item.is-active {
  background: linear-gradient(135deg,
              rgba(236, 72, 153, 0.16),
              rgba(99, 102, 241, 0.10));
  color: #f9a8d4;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.20);
}
.ng-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -14px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: linear-gradient(180deg, #ec4899, #6366f1);
  border-radius: 0 3px 3px 0;
}
.ng-nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.ng-nav-label { flex: 1; }
.ng-nav-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.30);
}

.ng-sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 8px;
}
.ng-back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(229, 231, 235, 0.55);
  text-decoration: none;
  transition: all 0.18s ease;
}
.ng-back-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

/* ─── CONTENT AREA ─────────────────────────────────────────── */
.ng-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  width: 100%;
}

/* topbar inside content */
.ng-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: rgba(10, 10, 16, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.ng-content-inner {
  flex: 1;
  padding: 32px 36px 60px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  animation: ng-content-rise 0.5s cubic-bezier(.2,.9,.3,1);
}
.ng-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ng-topbar-server-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}
.ng-topbar-server-fallback {
  background: linear-gradient(135deg, #ec4899, #6366f1);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
}
.ng-topbar-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.ng-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ng-topbar-link {
  font-size: 12px;
  font-weight: 600;
  color: rgba(229, 231, 235, 0.65);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  transition: all 0.15s ease;
}
.ng-topbar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.ng-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
.ng-user-avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: white;
}
.ng-user-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(229, 231, 235, 0.8);
}
.ng-logout {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.20);
  border-radius: 8px;
  color: #fca5a5;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.18s ease;
}
.ng-logout:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
}

/* responsive: collapse sidebar to icon-only on narrower screens */
@media (max-width: 1100px) {
  .ng-shell { grid-template-columns: 64px 1fr; }
  .ng-brand-text,
  .ng-server-meta,
  .ng-nav-section-label,
  .ng-nav-label,
  .ng-nav-pill { display: none; }
  .ng-sidebar-brand { justify-content: center; padding: 6px 0 18px; }
  .ng-sidebar-server { justify-content: center; padding: 8px; }
  .ng-nav-item { justify-content: center; padding: 10px; }
  .ng-back-link span:nth-child(2) { display: none; }
}
@media (max-width: 700px) {
  .ng-shell { grid-template-columns: 1fr; }
  .ng-sidebar { display: none; }
  .ng-topbar { padding: 12px 16px; }
  .ng-content > main,
  .ng-content > .server-main { padding: 20px 16px 40px; }
}

@keyframes ng-content-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* full-width main for shells that manage their own layout (server pages, landing) */
main.full-width {
  max-width: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* ============================================================
   GLOBAL ANIMATION LAYER — added everywhere on the dashboard
   ============================================================ */

/* ─── Page enter animation ─────────────────────────────────── */
.ng-content-inner > *:not(:first-child) {
  animation: ng-fade-up 0.45s cubic-bezier(.2,.9,.3,1) backwards;
}
.ng-content-inner > *:nth-child(2)  { animation-delay: 0.05s; }
.ng-content-inner > *:nth-child(3)  { animation-delay: 0.10s; }
.ng-content-inner > *:nth-child(4)  { animation-delay: 0.15s; }
.ng-content-inner > *:nth-child(5)  { animation-delay: 0.20s; }
.ng-content-inner > *:nth-child(6)  { animation-delay: 0.25s; }
.ng-content-inner > *:nth-child(7)  { animation-delay: 0.30s; }
.ng-content-inner > *:nth-child(8)  { animation-delay: 0.35s; }
.ng-content-inner > *:nth-child(n+9) { animation-delay: 0.40s; }
@keyframes ng-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Generic button hover lift ────────────────────────────── */
.btn, button.btn, input[type="submit"].btn {
  transition: transform 0.18s cubic-bezier(.2,.9,.3,1),
              box-shadow 0.18s ease,
              filter 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary, button.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(100%); }

/* ─── Input focus glow ─────────────────────────────────────── */
input:focus, select:focus, textarea:focus {
  animation: input-glow-pulse 1.6s ease-in-out infinite alternate;
}
@keyframes input-glow-pulse {
  from { box-shadow: 0 0 0 3px rgba(99,102,241,0.10); }
  to   { box-shadow: 0 0 0 4px rgba(99,102,241,0.22); }
}

/* ─── Card hover effect (all .card, .panel) ────────────────── */
.card, .panel {
  transition: transform 0.3s cubic-bezier(.2,.9,.3,1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}
.card:hover, .panel:hover {
  transform: translateY(-2px);
}

/* ─── Sidebar nav item ripple ──────────────────────────────── */
.ng-nav-item {
  position: relative;
  overflow: hidden;
}
.ng-nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%),
                                rgba(236,72,153,0.20), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.ng-nav-item:hover::after { opacity: 1; }

/* ─── Toggle switches: pulse-glow when checked ────────────── */
input[type="checkbox"]:checked + .switch,
input[type="checkbox"]:checked + label .switch,
.toggle input:checked + .slider,
.oc-toggle input:checked + .switch {
  animation: switch-glow 1.8s ease-in-out infinite alternate;
}
@keyframes switch-glow {
  from { box-shadow: 0 0 0 0 rgba(236,72,153,0.40); }
  to   { box-shadow: 0 0 0 8px rgba(236,72,153,0); }
}

/* ─── Flash messages slide in ──────────────────────────────── */
.flash {
  animation: flash-slide 0.4s cubic-bezier(.2,.9,.3,1);
}
@keyframes flash-slide {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Sidebar item active accent bar grows ────────────────── */
.ng-nav-item.is-active::before {
  animation: accent-grow 0.35s cubic-bezier(.2,.9,.3,1);
}
@keyframes accent-grow {
  from { height: 0; }
  to   { height: 18px; }
}

/* ─── Top bar fade-in ──────────────────────────────────────── */
.ng-topbar {
  animation: ng-fade-down 0.35s cubic-bezier(.2,.9,.3,1) backwards;
}
@keyframes ng-fade-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Module cards & generic grids: stagger pop-in ────────── */
.modules-grid > .module-card,
.cards-grid > .card,
.panel-grid > .panel {
  animation: card-pop-in 0.5s cubic-bezier(.2,.9,.3,1) backwards;
}
.modules-grid > .module-card:nth-child(1) { animation-delay: 0.05s; }
.modules-grid > .module-card:nth-child(2) { animation-delay: 0.08s; }
.modules-grid > .module-card:nth-child(3) { animation-delay: 0.11s; }
.modules-grid > .module-card:nth-child(4) { animation-delay: 0.14s; }
.modules-grid > .module-card:nth-child(5) { animation-delay: 0.17s; }
.modules-grid > .module-card:nth-child(6) { animation-delay: 0.20s; }
.modules-grid > .module-card:nth-child(7) { animation-delay: 0.23s; }
.modules-grid > .module-card:nth-child(8) { animation-delay: 0.26s; }
.modules-grid > .module-card:nth-child(9) { animation-delay: 0.29s; }
.modules-grid > .module-card:nth-child(n+10) { animation-delay: 0.32s; }
@keyframes card-pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Section title underline grow ─────────────────────────── */
h2, h3 {
  position: relative;
}
.page-header h1::after,
.page-header h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 8px;
  background: linear-gradient(90deg, #ec4899, #6366f1);
  border-radius: 2px;
  animation: line-grow 0.6s cubic-bezier(.2,.9,.3,1) backwards;
  animation-delay: 0.2s;
}
@keyframes line-grow {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

/* ─── Spinner for IPC-loading states ───────────────────────── */
.ng-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.10);
  border-top-color: #ec4899;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Stat cards: subtle constant pulse on the value ──────── */
.stat-value,
.dyno-stat-num,
.modules-stat-value {
  background-size: 200% auto;
  animation: gradient-pan 6s ease-in-out infinite;
}
@keyframes gradient-pan {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* ─── 3D tilt on cards based on cursor (JS hook) ──────────── */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1);
  will-change: transform;
}

/* ─── Backdrop ambient orbs (subtle pink/purple glow) ─────── */
.ng-shell::before,
.ng-shell::after {
  content: "";
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  animation: orb-drift-slow 30s ease-in-out infinite alternate;
}
.ng-shell::before {
  background: radial-gradient(circle, #ec4899, transparent);
  top: -200px; right: -200px;
}
.ng-shell::after {
  background: radial-gradient(circle, #6366f1, transparent);
  bottom: -200px; left: 200px;
  animation-delay: -15s;
}
@keyframes orb-drift-slow {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(60px, -40px); }
}
/* content needs stacking context above ambient orbs, but the sidebar
   must keep position:sticky — so only set z-index on it, not position */
.ng-content { position: relative; z-index: 1; }
.ng-sidebar { z-index: 2; }

/* ─── Click ripple effect on buttons ───────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
}
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  pointer-events: none;
  animation: ripple-out 0.6s ease-out;
}
@keyframes ripple-out {
  from { transform: scale(0); opacity: 0.6; }
  to   { transform: scale(4); opacity: 0; }
}

/* ─── Smooth scroll for everyone ───────────────────────────── */
html { scroll-behavior: smooth; }

/* ─── Number count-up baseline (stat numbers in dashboard) ── */
[data-count-up] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ─── Audit log entries: stagger fade-in ──────────────────── */
.audit-entry, .audit-log-row {
  animation: audit-in 0.4s cubic-bezier(.2,.9,.3,1) backwards;
}
.audit-entry:nth-child(1) { animation-delay: 0.02s; }
.audit-entry:nth-child(2) { animation-delay: 0.04s; }
.audit-entry:nth-child(3) { animation-delay: 0.06s; }
.audit-entry:nth-child(4) { animation-delay: 0.08s; }
.audit-entry:nth-child(5) { animation-delay: 0.10s; }
.audit-entry:nth-child(6) { animation-delay: 0.12s; }
.audit-entry:nth-child(7) { animation-delay: 0.14s; }
.audit-entry:nth-child(n+8) { animation-delay: 0.16s; }
@keyframes audit-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Sidebar brand icon: gentle bob ───────────────────────── */
.ng-brand-mark {
  animation: brand-bob 4s ease-in-out infinite;
}
@keyframes brand-bob {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-3px) rotate(-2deg); }
}

/* ─── Hover-glow border on inputs ──────────────────────────── */
input[type="text"], input[type="number"], input[type="url"],
input[type="search"], select, textarea {
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
input[type="text"]:hover, input[type="number"]:hover,
input[type="url"]:hover, input[type="search"]:hover,
select:hover, textarea:hover {
  border-color: rgba(99,102,241,0.30) !important;
}

/* ─── Save button: success pulse animation ─────────────────── */
.btn-primary.is-saving::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: inherit;
  animation: save-flash 0.6s ease-out;
}
@keyframes save-flash {
  0%   { opacity: 0.85; }
  100% { opacity: 0; }
}

/* ============================================================
   🎆 PREMIUM ANIMATION OVERHAUL — 20+ new animations
   ============================================================ */

/* ─── 1. Aurora background gradient that breathes ─────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(at 15% 10%, rgba(236, 72, 153, 0.10), transparent 40%),
    radial-gradient(at 85% 80%, rgba(99, 102, 241, 0.10), transparent 40%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.06), transparent 50%);
  background-size: 200% 200%;
  animation: aurora-breathe 24s ease-in-out infinite;
  pointer-events: none;
}
@keyframes aurora-breathe {
  0%, 100% { background-position: 0% 50%; opacity: 0.85; }
  50%      { background-position: 100% 50%; opacity: 1; }
}

/* ─── 2. Mesh-grid scan line ──────────────────────────────── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  animation: grid-drift 60s linear infinite;
}
@keyframes grid-drift {
  from { background-position: 0 0; }
  to   { background-position: 40px 40px; }
}

/* ─── 3. Sidebar nav item — wipe-fill on hover ─────────────── */
.ng-nav-item {
  background-image: linear-gradient(90deg,
    rgba(236, 72, 153, 0.12),
    rgba(99, 102, 241, 0.10));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(.2,.9,.3,1),
              color 0.2s ease, transform 0.18s ease;
}
.ng-nav-item:hover:not(.is-active) {
  background-size: 100% 100%;
}

/* ─── 4. Card 3D tilt on cursor ────────────────────────────── */
.module-card, .server-card, .oc-panel, .feature-card {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(.2,.9,.3,1),
              box-shadow 0.3s ease;
}

/* ─── 5. Gradient border traveling around active items ─────── */
.ng-nav-item.is-active {
  position: relative;
  background-clip: padding-box;
}
.ng-nav-item.is-active::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(236, 72, 153, 0.7) 50%,
    transparent 70%);
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box,
                linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: border-shine 3s linear infinite;
  pointer-events: none;
}
@keyframes border-shine {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* ─── 6. Number count-up tick ──────────────────────────────── */
.stat-num, .stat-value, .bento-stat {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(.2,.9,.3,1);
}
.stat-num:hover, .stat-value:hover, .bento-stat:hover {
  transform: scale(1.05);
}

/* ─── 7. Logo / brand-mark — pulse halo ───────────────────── */
.ng-brand-mark {
  position: relative;
}
.ng-brand-mark::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, #ec4899, #6366f1);
  filter: blur(8px);
  opacity: 0.4;
  z-index: -1;
  animation: brand-halo 2.5s ease-in-out infinite;
}
@keyframes brand-halo {
  0%, 100% { opacity: 0.30; transform: scale(1); }
  50%      { opacity: 0.60; transform: scale(1.08); }
}

/* ─── 8. Page-transition swipe (between server-tabs) ──────── */
.ng-content-inner {
  animation: page-slide 0.45s cubic-bezier(.2,.9,.3,1);
}
@keyframes page-slide {
  from { opacity: 0; transform: translateX(20px); filter: blur(4px); }
  to   { opacity: 1; transform: translateX(0); filter: blur(0); }
}

/* ─── 9. Buttons: 3D press effect on click ─────────────────── */
.btn, .hero-btn, button {
  transform-style: preserve-3d;
}
.btn:active, .hero-btn:active, button:active {
  transform: scale(0.96) translateY(2px) !important;
  transition: transform 0.08s ease;
}

/* ─── 10. Toggle switches: bouncy slider ──────────────────── */
.switch::after,
.slider::before,
.oc-toggle .switch::after {
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1) !important;
}

/* ─── 11. Hero title typewriter cursor ────────────────────── */
.hero-title > span:last-child::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.85em;
  margin-left: 0.08em;
  vertical-align: -0.05em;
  background: linear-gradient(180deg, #ec4899, #6366f1);
  border-radius: 2px;
  animation: cursor-blink 1.2s ease-in-out infinite;
}
@keyframes cursor-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ─── 12. Mock embeds: slide-in stacked ───────────────────── */
.mock-embed {
  animation: mock-in 0.5s cubic-bezier(.2,.9,.3,1) backwards;
}
.feature-card .mock-embed:nth-child(1) { animation-delay: 0.10s; }
.feature-card .mock-embed:nth-child(2) { animation-delay: 0.25s; }
.feature-card .mock-embed:nth-child(3) { animation-delay: 0.40s; }
@keyframes mock-in {
  from { opacity: 0; transform: translateX(-30px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ─── 13. Section eyebrows fade in with letter-spacing ────── */
.section-eyebrow {
  animation: eyebrow-in 0.7s cubic-bezier(.2,.9,.3,1) backwards;
}
@keyframes eyebrow-in {
  from {
    opacity: 0;
    letter-spacing: 0.5em;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    letter-spacing: 0.20em;
    filter: blur(0);
  }
}

/* ─── 14. Bento cells: float when in view ─────────────────── */
.bento-cell {
  animation: bento-float 6s ease-in-out infinite;
}
.bento-cell:nth-child(odd)  { animation-delay: -2s; }
.bento-cell:nth-child(even) { animation-delay: -4s; }
@keyframes bento-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.bento-cell:hover {
  animation-play-state: paused;
}

/* ─── 15. Module cards — magnetic glow that follows cursor ─ */
.module-card {
  position: relative;
}
.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(236, 72, 153, 0.16),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.module-card:hover::before { opacity: 1; }

/* ─── 16. Form inputs: liquid focus underline ─────────────── */
.oc-panel input,
.oc-panel select,
.oc-panel textarea,
.modal input,
form input[type="text"],
form input[type="url"],
form select,
form textarea {
  position: relative;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(236,72,153,0.5) !important;
  background-image: linear-gradient(90deg,
    transparent 0%,
    rgba(236, 72, 153, 0.10) 50%,
    transparent 100%) !important;
  background-size: 200% 100%;
  animation: liquid-shine 2.4s linear infinite;
}
@keyframes liquid-shine {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* ─── 17. Stat icons — slow rotate ────────────────────────── */
.stat-icon, .modules-stat-icon, .bento-icon {
  display: inline-block;
  transition: transform 0.6s cubic-bezier(.2,.9,.3,1);
}
.card:hover .stat-icon,
.modules-stat:hover .modules-stat-icon,
.bento-cell:hover .bento-icon {
  transform: rotate(-12deg) scale(1.18);
}

/* ─── 18. Server-card icon — rainbow border on hover ──────── */
.server-card-icon {
  position: relative;
  transition: transform 0.3s ease;
}
.server-card:hover .server-card-icon {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.4),
              0 0 24px rgba(236, 72, 153, 0.3);
}

/* ─── 19. Sidebar — gentle breathing on the background ────── */
.ng-sidebar {
  background-image: linear-gradient(180deg,
    rgba(236, 72, 153, 0.025) 0%,
    transparent 50%,
    rgba(99, 102, 241, 0.025) 100%);
  background-size: 100% 200%;
  animation: sidebar-breathe 12s ease-in-out infinite;
}
@keyframes sidebar-breathe {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 0% 100%; }
}

/* ─── 20. Topbar — sticky shadow that grows on scroll ─────── */
.ng-topbar {
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.ng-topbar.scrolled,
.ng-topbar:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25),
              0 1px 0 rgba(236, 72, 153, 0.15);
}

/* ─── 21. Audit log rows — colored dot pulses ─────────────── */
.audit-row,
tr.audit-entry {
  position: relative;
}
.audit-row::before,
tr.audit-entry::before {
  content: "";
  position: absolute;
  left: -4px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.5);
  box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.6);
  animation: dot-pulse 2s ease-out infinite;
}
.audit-row.cat-danger::before { background: #ef4444; box-shadow-color: rgba(239,68,68,0.6); }
.audit-row.cat-security::before { background: #f59e0b; box-shadow-color: rgba(245,158,11,0.6); }
.audit-row.cat-bot::before { background: #6366f1; box-shadow-color: rgba(99,102,241,0.6); }
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  100% { box-shadow: 0 0 0 8px transparent; }
}

/* ─── 22. Module pill (ON/OFF status) — slide on toggle ───── */
.module-toggle-pill {
  position: relative;
  overflow: hidden;
  transition: background 0.4s cubic-bezier(.2,.9,.3,1),
              color 0.3s ease, transform 0.2s ease;
}
.module-toggle-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
}
.module-card:hover .module-toggle-pill::before {
  animation: pill-shine 0.8s ease-out;
}
@keyframes pill-shine {
  to { transform: translateX(100%); }
}

/* ─── 23. Hero CTA — glow that breathes ───────────────────── */
.hero-btn.primary {
  position: relative;
  isolation: isolate;
}
.hero-btn.primary::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, #ec4899, #6366f1, #06b6d4, #ec4899);
  background-size: 300% 300%;
  filter: blur(14px);
  opacity: 0.45;
  z-index: -1;
  animation: hero-glow-breathe 4s ease-in-out infinite;
}
@keyframes hero-glow-breathe {
  0%, 100% {
    opacity: 0.35;
    background-position: 0% 50%;
  }
  50% {
    opacity: 0.65;
    background-position: 100% 50%;
  }
}

/* ─── 24. Server-card grid — wave reveal ─────────────────── */
.server-grid .server-card {
  animation: wave-reveal 0.6s cubic-bezier(.2,.9,.3,1) backwards;
}
.server-grid .server-card:nth-child(1) { animation-delay: 0.05s; }
.server-grid .server-card:nth-child(2) { animation-delay: 0.10s; }
.server-grid .server-card:nth-child(3) { animation-delay: 0.15s; }
.server-grid .server-card:nth-child(4) { animation-delay: 0.20s; }
.server-grid .server-card:nth-child(5) { animation-delay: 0.25s; }
.server-grid .server-card:nth-child(6) { animation-delay: 0.30s; }
.server-grid .server-card:nth-child(n+7) { animation-delay: 0.35s; }
@keyframes wave-reveal {
  from {
    opacity: 0;
    transform: translateY(30px) rotateX(-10deg);
    transform-origin: bottom center;
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* ─── 25. Feature row alternating slide-in ────────────────── */
.feature-row.is-visible .feature-text,
.feature-row.is-visible .feature-visual,
.feature-row .feature-text[data-reveal].is-visible,
.feature-row .feature-visual[data-reveal].is-visible {
  animation: feature-slide 0.8s cubic-bezier(.2,.9,.3,1) both;
}
.feature-row:not(.reverse) .feature-text  { animation-name: feature-slide-l; }
.feature-row:not(.reverse) .feature-visual{ animation-name: feature-slide-r; }
.feature-row.reverse .feature-text         { animation-name: feature-slide-r; }
.feature-row.reverse .feature-visual       { animation-name: feature-slide-l; }
@keyframes feature-slide-l {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes feature-slide-r {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── 26. Reduced motion respect ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   GRADIENT-TEXT SAFETY NET (dashboard-wide)
   Forces a solid colour when background-clip:text isn't
   supported so gradient headings never render invisible.
   ═══════════════════════════════════════════════════════════ */
.dash-hero h1, .stat-num, .stat-value, .bento-stat,
.section-title, .oc-hero h1, .ng-brand-text,
.dyno-stat-num, .modules-stat-value {
  color: #f5f5f7;  /* always-visible fallback */
}
/* Force solid fill where clip:text is unsupported (the real fix) */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .dash-hero h1, .stat-num, .stat-value, .bento-stat,
  .section-title, .oc-hero h1, .dyno-stat-num, .modules-stat-value {
    -webkit-text-fill-color: #f5f5f7 !important;
    color: #f5f5f7 !important;
    background: none !important;
  }
}
@media (forced-colors: active) {
  .dash-hero h1, .stat-num, .stat-value, .bento-stat,
  .section-title, .dyno-stat-num, .modules-stat-value {
    -webkit-text-fill-color: CanvasText !important;
    color: CanvasText !important;
    background: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   🎨 DASHBOARD MEGA-POLISH — 15+ new effects
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. Stat cards: glass + animated top accent ──────────── */
.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08) !important;
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1),
              border-color 0.3s ease, box-shadow 0.3s ease !important;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #ec4899, #6366f1, transparent);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: stat-accent-pan 3s linear infinite;
}
.stat-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
  border-color: rgba(236,72,153,0.4) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4),
              0 0 0 1px rgba(236,72,153,0.15) inset !important;
}
.stat-card:hover::after { opacity: 1; }
@keyframes stat-accent-pan {
  from { background-position: -200% 0; } to { background-position: 200% 0; }
}

/* ─── 2. Stat icon: bouncy float ──────────────────────────── */
.stat-card .stat-icon {
  display: inline-block;
  animation: stat-icon-float 4s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.stat-card:nth-child(2) .stat-icon { animation-delay: -1s; }
.stat-card:nth-child(3) .stat-icon { animation-delay: -2s; }
.stat-card:nth-child(4) .stat-icon { animation-delay: -3s; }
.stat-card:hover .stat-icon { transform: scale(1.3) rotate(-8deg); }
@keyframes stat-icon-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ─── 3. Security gauge: glow ring pulse ──────────────────── */
.security-gauge-wrap {
  position: relative;
}
.security-gauge-wrap::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.12), transparent 70%);
  animation: gauge-glow 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gauge-glow {
  0%, 100% { opacity: 0.5; transform: scale(0.95); }
  50%      { opacity: 1; transform: scale(1.05); }
}
.gauge-bar {
  transition: stroke-dashoffset 1.4s cubic-bezier(.2,.9,.3,1);
}

/* ─── 4. Checklist rows: slide + check pop ────────────────── */
.check-row {
  transition: background 0.2s ease, transform 0.2s ease, padding-left 0.2s ease;
  border-radius: 8px;
}
.check-row:hover {
  background: rgba(255,255,255,0.04);
  transform: translateX(4px);
  padding-left: 8px;
}
.check-row .check-icon {
  display: inline-grid;
  place-items: center;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.check-row.passed .check-icon {
  animation: check-pop 0.5s cubic-bezier(.34,1.56,.64,1) backwards;
}
@keyframes check-pop {
  0%   { transform: scale(0) rotate(-45deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ─── 5. Module cards: premium hover with depth ───────────── */
.module-card {
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1),
              border-color 0.3s ease, box-shadow 0.35s ease !important;
  will-change: transform;
}
.module-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,0.4),
              0 0 0 1px rgba(236,72,153,0.18) inset !important;
}
.module-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%),
              rgba(236,72,153,0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.module-card:hover::after { opacity: 1; }

/* ─── 6. Module toggle pill: status glow ──────────────────── */
.module-toggle-pill.is-on {
  box-shadow: 0 0 12px rgba(34,197,94,0.4);
  animation: pill-glow-on 2s ease-in-out infinite;
}
@keyframes pill-glow-on {
  0%,100% { box-shadow: 0 0 8px rgba(34,197,94,0.3); }
  50%     { box-shadow: 0 0 16px rgba(34,197,94,0.55); }
}

/* ─── 7. Settings buttons: arrow slide ────────────────────── */
.module-settings-btn {
  position: relative;
  transition: all 0.25s cubic-bezier(.2,.9,.3,1);
}
.module-settings-btn::after {
  content: "→";
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.25s ease;
}
.module-settings-btn:hover::after { transform: translateX(4px); }

/* ─── 8. Overview hero: animated gradient mesh ────────────── */
.overview-hero {
  position: relative;
  overflow: hidden;
}
.overview-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(at 20% 30%, rgba(236,72,153,0.25), transparent 50%),
    radial-gradient(at 80% 70%, rgba(99,102,241,0.25), transparent 50%);
  background-size: 200% 200%;
  animation: hero-mesh 12s ease-in-out infinite;
}
@keyframes hero-mesh {
  0%,100% { background-position: 0% 0%; }
  50%     { background-position: 100% 100%; }
}
.overview-hero-inner { position: relative; z-index: 1; }
.overview-hero-title {
  animation: hero-title-in 0.7s cubic-bezier(.2,.9,.3,1);
}
@keyframes hero-title-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── 9. Section title: animated underline on appear ──────── */
.section-title {
  position: relative;
}

/* ─── 10. Module search: expand focus ─────────────────────── */
.module-search {
  transition: all 0.3s cubic-bezier(.2,.9,.3,1);
}
.module-search:focus {
  transform: scale(1.01);
  box-shadow: 0 8px 30px rgba(99,102,241,0.2),
              0 0 0 3px rgba(99,102,241,0.18);
}

/* ─── 11. Form panels (server settings): lift on hover ────── */
.settings-panel, .form-section, .config-card {
  transition: transform 0.3s cubic-bezier(.2,.9,.3,1),
              border-color 0.3s ease, box-shadow 0.3s ease;
}
.settings-panel:hover, .form-section:hover, .config-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,0.3);
}

/* ─── 12. Save buttons: shimmer sweep ─────────────────────── */
button[type="submit"], .save-btn, .btn-save {
  position: relative;
  overflow: hidden;
}
button[type="submit"]::before, .save-btn::before, .btn-save::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
button[type="submit"]:hover::before, .save-btn:hover::before, .btn-save:hover::before {
  transform: translateX(100%);
}

/* ─── 13. Checkboxes & selects: smooth accent ─────────────── */
input[type="checkbox"], input[type="radio"] {
  accent-color: #ec4899;
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type="checkbox"]:hover, input[type="radio"]:hover {
  transform: scale(1.15);
}

/* ─── 14. Table rows: hover highlight slide ───────────────── */
table tbody tr {
  transition: background 0.2s ease, transform 0.2s ease;
}
table tbody tr:hover {
  background: rgba(236,72,153,0.06) !important;
  transform: scale(1.005);
}

/* ─── 15. Empty-state CTA: breathing glow ─────────────────── */
.empty-state-cta {
  position: relative;
  animation: cta-breathe 3s ease-in-out infinite;
}
@keyframes cta-breathe {
  0%,100% { box-shadow: 0 8px 30px rgba(88,101,242,0.35); }
  50%     { box-shadow: 0 12px 44px rgba(88,101,242,0.6); }
}

/* ─── 16. Badge "NEW" pulse ───────────────────────────────── */
.module-badge-new, .badge-new {
  animation: badge-new-pulse 2s ease-in-out infinite;
}
@keyframes badge-new-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(236,72,153,0.5); transform: scale(1); }
  50%     { box-shadow: 0 0 0 6px rgba(236,72,153,0); transform: scale(1.05); }
}

/* ─── 17. Scroll-driven section reveals on dashboard ──────── */
.modules-grid { perspective: 1000px; }

/* ─── 18. Loading shimmer skeleton ────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s linear infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  from { background-position: 200% 0; } to { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════
   💎 FORM CONTROLS — premium redesign (1000-dev polish)
   ═══════════════════════════════════════════════════════════ */

/* ─── Avatar image in user pill ───────────────────────────── */
.ng-user-avatar-img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(236,72,153,0.3);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.ng-user-pill:hover .ng-user-avatar-img {
  box-shadow: 0 0 0 2px rgba(236,72,153,0.6);
  transform: scale(1.08);
}
.ng-user-pill {
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.ng-user-pill:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(236,72,153,0.35);
}

/* ─── All text-style inputs: unified premium look ─────────── */
input[type="text"], input[type="url"], input[type="number"],
input[type="search"], input[type="password"], input[type="email"],
select, textarea {
  background: rgba(0,0,0,0.28) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 10px !important;
  color: #e5e7eb !important;
  font-size: 14px;
  font-family: inherit;
  padding: 11px 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, transform 0.15s ease !important;
  -webkit-appearance: none;
  appearance: none;
}
input[type="text"]:hover, input[type="url"]:hover, input[type="number"]:hover,
input[type="search"]:hover, select:hover, textarea:hover {
  border-color: rgba(99,102,241,0.40) !important;
  background: rgba(0,0,0,0.35) !important;
}
input[type="text"]:focus, input[type="url"]:focus, input[type="number"]:focus,
input[type="search"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: rgba(236,72,153,0.6) !important;
  box-shadow: 0 0 0 3px rgba(236,72,153,0.15),
              0 4px 20px rgba(236,72,153,0.10) !important;
  background: rgba(0,0,0,0.4) !important;
}

/* ─── Custom number spinner (replaces ugly default) ───────── */
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Wrap number inputs in .number-field for custom +/- buttons */
.number-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 140px;
}
.number-field input[type="number"] {
  padding-right: 38px;
  width: 100%;
}
.number-field .num-controls {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.number-field .num-btn {
  width: 22px; height: 15px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: rgba(229,231,235,0.7);
  font-size: 9px; cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.number-field .num-btn:hover {
  background: linear-gradient(135deg, #ec4899, #6366f1);
  color: white;
  border-color: transparent;
  transform: scale(1.1);
}
.number-field .num-btn:active { transform: scale(0.92); }

/* ─── Custom select with arrow ────────────────────────────── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 38px !important;
  cursor: pointer;
}
select option {
  background: #14141c;
  color: #e5e7eb;
}

/* ─── Premium labels ──────────────────────────────────────── */
label {
  font-weight: 600;
  font-size: 13px;
  color: rgba(229,231,235,0.78);
  letter-spacing: 0.01em;
}

/* ─── Toggle switch: the gold-standard pill ───────────────── */
.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.switch-field input { display: none; }
.switch-track {
  width: 46px; height: 26px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  position: relative;
  transition: background 0.3s cubic-bezier(.2,.9,.3,1);
  flex-shrink: 0;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.switch-field input:checked + .switch-track {
  background: linear-gradient(135deg, #ec4899, #6366f1);
  box-shadow: 0 0 14px rgba(236,72,153,0.45);
}
.switch-field input:checked + .switch-track::after {
  transform: translateX(20px);
}

/* ─── Radio cards (pretty radio groups) ───────────────────── */
.radio-card-group {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.radio-card {
  flex: 1; min-width: 100px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.2,.9,.3,1);
  text-align: center;
  position: relative;
}
.radio-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-2px);
}
.radio-card.selected {
  border-color: rgba(236,72,153,0.6);
  background: linear-gradient(135deg, rgba(236,72,153,0.10), rgba(99,102,241,0.08));
  box-shadow: 0 0 0 1px rgba(236,72,153,0.3) inset;
}

/* ─── Form rows with descriptions ─────────────────────────── */
.field-row {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.field-row:last-child { border-bottom: none; }
.field-row-info h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.field-row-info p {
  margin: 0;
  font-size: 12px;
  color: rgba(229,231,235,0.5);
  line-height: 1.5;
}

/* ─── Sliders (range inputs) ──────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.10);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #6366f1);
  box-shadow: 0 2px 8px rgba(236,72,153,0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #6366f1);
  cursor: pointer;
}

/* ─── Buttons: the definitive set ─────────────────────────── */
.btn-primary, button.btn-primary, input[type="submit"] {
  background: linear-gradient(135deg, #ec4899, #6366f1) !important;
  color: white !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 11px 22px !important;
  font-weight: 700 !important;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(236,72,153,0.3) !important;
}
.btn-primary:hover, button.btn-primary:hover, input[type="submit"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 30px rgba(236,72,153,0.45) !important;
}

/* ─── Code/kbd styling ────────────────────────────────────── */
code, kbd {
  background: rgba(236,72,153,0.10);
  border: 1px solid rgba(236,72,153,0.20);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.88em;
  color: #f9a8d4;
  font-family: ui-monospace, "SF Mono", monospace;
}

/* ─── Global announcement banner ──────────────────────────── */
.global-announce {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(99,102,241,0.15));
  border-bottom: 1px solid rgba(236,72,153,0.3);
  backdrop-filter: blur(10px);
  font-size: 14px;
  color: #f5f5f7;
  position: relative;
  z-index: 200;
  animation: announce-slide 0.5s cubic-bezier(.2,.9,.3,1);
}
@keyframes announce-slide {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.global-announce .ga-icon {
  font-size: 16px;
  animation: announce-bob 2s ease-in-out infinite;
}
@keyframes announce-bob {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.15); }
}
.global-announce .ga-text { flex: 1; font-weight: 500; }
.global-announce .ga-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 26px; height: 26px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}
.global-announce .ga-close:hover {
  background: rgba(255,255,255,0.2);
  color: white;
  transform: rotate(90deg);
}

/* ═══════════════════════════════════════════════════════════
   🎫 TICKETS + 🔐 PERMISSIONS — maximum polish
   ═══════════════════════════════════════════════════════════ */

/* ─── Staff-role checkbox chips (the grid of @roles) ──────── */
.role-chip, .staff-role-option, label.role-checkbox {
  position: relative;
  transition: all 0.25s cubic-bezier(.2,.9,.3,1) !important;
  border-radius: 10px !important;
  overflow: hidden;
}
.role-chip::before, .staff-role-option::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(236,72,153,0.12), rgba(99,102,241,0.10));
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.role-chip:hover, .staff-role-option:hover, label.role-checkbox:hover {
  transform: translateY(-2px) scale(1.02) !important;
  border-color: rgba(99,102,241,0.4) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3) !important;
}
.role-chip:hover::before, .staff-role-option:hover::before { opacity: 1; }
/* Selected/checked role chip */
.role-chip.selected, .role-chip:has(input:checked),
.staff-role-option:has(input:checked),
label.role-checkbox:has(input:checked) {
  border-color: rgba(236,72,153,0.6) !important;
  box-shadow: 0 0 0 1px rgba(236,72,153,0.4) inset,
              0 4px 16px rgba(236,72,153,0.2) !important;
  animation: chip-select 0.4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes chip-select {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* The little colored role dot pulses when selected */
.role-chip:has(input:checked) .role-dot,
.staff-role-option:has(input:checked) .role-dot {
  animation: role-dot-pulse 1.5s ease-in-out infinite;
}
@keyframes role-dot-pulse {
  0%,100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50%     { box-shadow: 0 0 0 4px transparent; opacity: 0.7; }
}

/* ─── Ticket reason rows (expandable details) ─────────────── */
details.reason-row, .ticket-reason, .reason-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}
details.reason-row[open], .ticket-reason[open] {
  border-color: rgba(236,72,153,0.4) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3),
              0 0 0 1px rgba(236,72,153,0.2) inset !important;
}
details.reason-row summary:hover {
  background: rgba(255,255,255,0.03);
}
/* Content fades in when opened (the existing ▾ hint handles the chevron) */
details.reason-row[open] > *:not(summary) {
  animation: reason-expand 0.4s cubic-bezier(.2,.9,.3,1);
}
@keyframes reason-expand {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Permission tier cards ───────────────────────────────── */
.tier-card, .mod-tier {
  transition: transform 0.3s cubic-bezier(.2,.9,.3,1),
              box-shadow 0.3s ease, border-color 0.3s ease;
}
.tier-card:hover, .mod-tier:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
/* The colored left accent bar on tier cards */
.tier-card[style*="border-left"], .mod-tier[style*="border-left"] {
  position: relative;
  overflow: hidden;
}
.tier-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: inherit;
  animation: tier-bar-glow 2.5s ease-in-out infinite;
}
@keyframes tier-bar-glow {
  0%,100% { opacity: 0.7; }
  50%     { opacity: 1; box-shadow: 0 0 12px currentColor; }
}

/* Tier color dot pulse */
.tier-dot, .tier-color-dot {
  animation: tier-dot-breathe 3s ease-in-out infinite;
}
@keyframes tier-dot-breathe {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.2); }
}

/* ─── Multi-select dropdowns (roles/commands) ─────────────── */
.multiselect-toggle, [class*="select-toggle"], summary.ms-summary {
  transition: all 0.25s ease;
}
.multiselect-toggle:hover {
  border-color: rgba(99,102,241,0.4) !important;
  background: rgba(99,102,241,0.06) !important;
}
.multiselect-count, .ms-count {
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.multiselect-toggle:hover .multiselect-count {
  transform: scale(1.1);
}

/* ─── Create-tier / Create button: extra pop ─────────────── */
.create-tier-btn, .btn-create {
  position: relative;
  overflow: hidden;
}
.create-tier-btn::after {
  content: "+";
  display: inline-block;
  margin-left: 6px;
  font-weight: 800;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.create-tier-btn:hover::after {
  transform: rotate(90deg) scale(1.2);
}

/* ─── Save/Delete tier buttons ────────────────────────────── */
.delete-tier-btn, .btn-danger {
  transition: all 0.25s ease;
}
.delete-tier-btn:hover, .btn-danger:hover {
  background: #ef4444 !important;
  box-shadow: 0 6px 20px rgba(239,68,68,0.4) !important;
  transform: translateY(-2px);
}

/* ─── Color swatch inputs (tier colors) ───────────────────── */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid rgba(255,255,255,0.12) !important;
  border-radius: 10px !important;
  cursor: pointer;
  padding: 2px !important;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), border-color 0.2s ease;
  overflow: hidden;
}
input[type="color"]:hover {
  transform: scale(1.1) rotate(-3deg);
  border-color: rgba(236,72,153,0.5) !important;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 7px; }

/* ─── Mock ticket preview (left side of ticket page) ──────── */
.ticket-preview, .reason-preview {
  animation: preview-float 5s ease-in-out infinite;
}
@keyframes preview-float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}

/* ─── Staggered reveal for role chips on load ─────────────── */
.role-grid .role-chip,
.staff-roles-grid > * {
  animation: chip-in 0.4s cubic-bezier(.2,.9,.3,1) backwards;
}
.role-grid .role-chip:nth-child(1) { animation-delay: 0.02s; }
.role-grid .role-chip:nth-child(2) { animation-delay: 0.04s; }
.role-grid .role-chip:nth-child(3) { animation-delay: 0.06s; }
.role-grid .role-chip:nth-child(4) { animation-delay: 0.08s; }
.role-grid .role-chip:nth-child(5) { animation-delay: 0.10s; }
.role-grid .role-chip:nth-child(6) { animation-delay: 0.12s; }
.role-grid .role-chip:nth-child(n+7) { animation-delay: 0.14s; }
@keyframes chip-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   📱 COMPREHENSIVE MOBILE — make it gorgeous on phones too
   ═══════════════════════════════════════════════════════════ */

/* ─── Tablet & below (≤900px) ─────────────────────────────── */
@media (max-width: 900px) {
  /* Dashboard shell: sidebar becomes a slide-over, content full width */
  .ng-shell {
    grid-template-columns: 1fr !important;
  }
  .ng-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 270px;
    height: 100vh; max-height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(.2,.9,.3,1);
    z-index: 1000;
    box-shadow: 8px 0 40px rgba(0,0,0,0.5);
  }
  .ng-sidebar.open { transform: translateX(0); }
  /* Restore full labels on mobile drawer (override the icon-only collapse) */
  .ng-brand-text, .ng-server-meta, .ng-nav-section-label,
  .ng-nav-label, .ng-nav-pill { display: revert !important; }
  .ng-sidebar-brand { justify-content: flex-start !important; padding: 6px 10px 18px !important; }
  .ng-sidebar-server { justify-content: flex-start !important; }
  .ng-nav-item { justify-content: flex-start !important; padding: 10px 12px !important; }

  /* Hamburger button (injected by JS) */
  .ng-hamburger {
    display: inline-grid !important;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    margin-right: 4px;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .ng-hamburger:hover { background: rgba(236,72,153,0.15); }
  .ng-hamburger:active { transform: scale(0.92); }

  /* Backdrop when drawer open */
  .ng-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .ng-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

  .ng-content-inner { padding: 20px 16px 50px !important; }
  .ng-topbar { padding: 12px 14px !important; }
  .ng-topbar-title { font-size: 15px !important; }
  /* Hide owner-panel links on small topbar to save space */
  .ng-topbar-link { display: none; }

  /* Stat cards: 2-col grid */
  .stat-cards { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  /* Security panel: stack gauge above checklist */
  .security-grid { grid-template-columns: 1fr !important; }
  .security-gauge-wrap { margin: 0 auto 20px; }
  /* Modules: single column */
  .modules-grid { grid-template-columns: 1fr !important; }
}

/* ─── Phones (≤600px) ─────────────────────────────────────── */
@media (max-width: 600px) {
  body { font-size: 14px; }

  /* Landing hero: tighter */
  .hero { min-height: 90vh; padding: 80px 18px 50px; }
  .hero-title { font-size: clamp(40px, 13vw, 60px) !important; }
  .hero-subtitle { font-size: 16px !important; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .hero-btn { width: 100%; justify-content: center; }
  .hero-ticker { max-width: 100%; }

  /* Landing nav: hide center links, keep brand + CTA */
  .landing-nav { padding: 12px 16px; }
  .landing-nav .nav-link:not(.nav-cta) { display: none; }
  .landing-nav .nav-cta { padding: 8px 14px; font-size: 12px; }

  /* Sections: less padding */
  .section { padding: 70px 18px !important; }
  .section-title { font-size: clamp(28px, 8vw, 40px) !important; }
  .feature-row { gap: 28px !important; margin: 50px 0 !important; }

  /* Spotlight: stack, kill the order swaps */
  .spotlight { padding: 70px 18px !important; min-height: auto; }
  .spotlight-inner { grid-template-columns: 1fr !important; }
  .spotlight-visual { order: 2 !important; }
  .spotlight-inner > div[style*="order"] { order: unset !important; }

  /* Bento: single column */
  .bento { grid-template-columns: 1fr !important; grid-auto-rows: auto !important; }
  .bento-cell.w2, .bento-cell.h2 { grid-column: auto !important; grid-row: auto !important; min-height: 140px; }

  /* Stats strip & spec grid: 2 cols */
  .stats-strip { grid-template-columns: repeat(2, 1fr) !important; }
  .spec-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 30px 16px !important; }
  .proof-banner { grid-template-columns: repeat(2, 1fr) !important; }

  /* Pin scene: shorter on mobile so it's not endless scrolling */
  .pin-scene { height: 180vh !important; }
  .pin-phone { width: 240px; }

  /* Word reveal smaller */
  .word-reveal { font-size: clamp(26px, 8vw, 40px) !important; }

  /* Comparison: single col */
  .compare-grid { grid-template-columns: 1fr !important; }

  /* How-it-works single col */
  .how-it-works { grid-template-columns: 1fr !important; }

  /* FAQ tighter */
  .faq-item summary { font-size: 14px; padding: 16px 18px; }

  /* CTA section */
  .cta-section { padding: 90px 18px !important; }
  .cta-section h2 { font-size: clamp(34px, 10vw, 56px) !important; }

  /* Stat cards: single col on tiny screens */
  .stat-cards { grid-template-columns: 1fr 1fr !important; }
  .stat-value { font-size: 28px !important; }

  /* Dashboard home server grid: single col */
  .server-grid { grid-template-columns: 1fr !important; }

  /* Owner config: single col panels */
  .oc-grid { grid-template-columns: 1fr !important; }

  /* Trust items wrap nicely */
  .trust-items { gap: 18px 24px; font-size: 13px; }

  /* Marquee smaller */
  .marquee-item { font-size: clamp(24px, 7vw, 36px) !important; }
  .hscroll-word { font-size: clamp(44px, 16vw, 90px) !important; }

  /* Reason rows / ticket forms: single col grids */
  .form-grid { grid-template-columns: 1fr !important; }
  .staff-roles-grid, .role-grid { grid-template-columns: 1fr 1fr !important; }

  /* Tier cards: stack name/color/position */
  .tier-edit-row { flex-direction: column !important; align-items: stretch !important; }

  /* Disable heavy 3D tilts on touch (they need a mouse) */
  .server-card, .feature-card, .dash-preview, .how-step {
    transform: none !important;
  }

  /* Cursor glow off on mobile */
  #cursor-glow { display: none !important; }

  /* Floating badges already hidden <900, keep that */
  .hero-float { display: none !important; }
}

/* ─── Touch devices: bigger tap targets ───────────────────── */
@media (hover: none) and (pointer: coarse) {
  .ng-nav-item { padding: 12px 14px; }
  .btn, .hero-btn, button { min-height: 44px; }
  input, select, textarea { font-size: 16px !important; } /* prevents iOS zoom */
  .module-settings-btn { padding: 10px 16px; }
  .role-chip, .staff-role-option { padding: 12px !important; }
}

/* ─── Landscape phone: keep hero usable ───────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 120vh; }
  .scroll-hint { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   ⚡ MOBILE PERFORMANCE — kill the expensive stuff on phones
   backdrop-filter, infinite background animations, and heavy
   blur are the main causes of scroll jank on mobile GPUs.
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Disable the animated ambient backgrounds (biggest jank source) */
  body::before, body::after,
  .ng-shell::before, .ng-shell::after {
    animation: none !important;
  }
  /* backdrop-filter is very expensive on mobile — replace with solid bg */
  .ng-topbar, .stat-card, .oc-panel, .legal-card,
  .hero-ticker, .hero-float, .mock-embed, .glass,
  .global-announce, .module-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .ng-topbar { background: rgba(10,10,16,0.95) !important; }
  .stat-card, .oc-panel, .module-card { background: #14141c !important; }

  /* Stop infinite decorative animations that repaint constantly */
  .stat-card::after, .ng-brand-mark::before, .ng-sidebar,
  .hero-btn.primary::before, .bento-cell, .tier-card::before,
  .module-toggle-pill.is-on, .audit-row::before, .dash-hero::before,
  .overview-hero::before, .security-gauge-wrap::before, .stat-icon {
    animation: none !important;
  }
  /* Reduce blur radii everywhere (blur is GPU-costly) */
  .spotlight-glow { filter: blur(60px) !important; }

  /* Disable parallax-y transforms set by JS would-be heavy;
     reveal animations still run once via IntersectionObserver. */
  .bento-cell { transform: none !important; }
}

/* Honour users who ask for reduced motion — full stop */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Global announcement banner — style variants ─────────── */
.global-announce.ga-success {
  background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(16,185,129,0.15));
  border-bottom-color: rgba(34,197,94,0.35);
}
.global-announce.ga-warning {
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(234,179,8,0.15));
  border-bottom-color: rgba(245,158,11,0.35);
}
.global-announce.ga-danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.20), rgba(220,38,38,0.16));
  border-bottom-color: rgba(239,68,68,0.4);
}

/* ═══════════════════════════════════════════════════════════
   ✨ MORE ANIMATIONS — round N (desktop, mobile-safe)
   All gated so mobile perf layer can disable via animation:none
   ═══════════════════════════════════════════════════════════ */

/* 1. Nav items get a sliding accent dot on hover */
@media (hover: hover) {
  .ng-nav-item { position: relative; }
  .ng-nav-item::before {
    content: "";
    position: absolute;
    left: 6px; top: 50%;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: #ec4899;
    transform: translateY(-50%) scale(0);
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
  }
  .ng-nav-item:hover::before { transform: translateY(-50%) scale(1); }
}

/* 2. Section headings get an animated gradient underline */
.section-title { position: relative; }

/* 3. Page content fades+slides in on load */
.ng-content-inner > *:first-child {
  animation: content-enter 0.6s cubic-bezier(.2,.9,.3,1);
}
@keyframes content-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 4. Buttons get a subtle scale breathing when primary/important */
@media (hover: hover) {
  .btn-primary, .announce-send {
    transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
  }
  .btn-primary:hover { transform: translateY(-2px) scale(1.02); }
}

/* 5. Stat numbers pop slightly when their card is hovered */
@media (hover: hover) {
  .stat-card:hover .stat-value,
  .stat-card:hover .stat-num {
    animation: num-pop 0.4s cubic-bezier(.34,1.56,.64,1);
  }
}
@keyframes num-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* 6. Toggle switches get a satisfying ripple when flipped */
.switch-field input:checked + .switch-track::before,
.oc-toggle input:checked + .switch::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(236,72,153,0.5);
  animation: toggle-ripple 0.5s ease-out;
  pointer-events: none;
}
@keyframes toggle-ripple {
  from { opacity: 1; transform: scale(0.8); }
  to   { opacity: 0; transform: scale(1.4); }
}

/* 7. Cards get a soft glow pulse when they first appear (desktop) */
@media (hover: hover) {
  .oc-panel, .stat-card, .module-card {
    animation: card-appear 0.5s cubic-bezier(.2,.9,.3,1) backwards;
  }
}
@keyframes card-appear {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 8. Dropdown selects rotate their arrow on focus */
select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='3'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E") !important;
}

/* 9. Links get an animated underline sweep */
@media (hover: hover) {
  .oc-panel-desc a, .legal-card a {
    background-image: linear-gradient(90deg, currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
  }
  .oc-panel-desc a:hover, .legal-card a:hover {
    background-size: 100% 1px;
  }
}

/* 10. Save bar pulses gently to draw the eye after edits */
@media (hover: hover) {
  .sticky-save .btn-primary {
    animation: save-bob 3s ease-in-out infinite;
  }
}
@keyframes save-bob {
  0%,100% { box-shadow: 0 6px 20px rgba(236,72,153,0.3); }
  50%     { box-shadow: 0 10px 32px rgba(236,72,153,0.5); }
}

/* ═══════════════════════════════════════════════════════════
   🚀 MAXIMUM MODE — big animation + UI batch (desktop-gated)
   Everything here is wrapped in @media (hover:hover) so it never
   runs on touch / mobile (keeps phones smooth).
   ═══════════════════════════════════════════════════════════ */
@media (hover: hover) and (min-width: 769px) {

  /* 1. Sidebar nav — icon springs + label slides on hover */
  .ng-nav-item { overflow: hidden; }
  .ng-nav-item svg, .ng-nav-item .ng-nav-icon {
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  }
  .ng-nav-item:hover svg, .ng-nav-item:hover .ng-nav-icon {
    transform: scale(1.2) rotate(-6deg);
  }
  .ng-nav-item .ng-nav-label { transition: transform 0.25s cubic-bezier(.2,.9,.3,1); }
  .ng-nav-item:hover .ng-nav-label { transform: translateX(3px); }

  /* 2. Active nav item — animated left accent bar that breathes */
  .ng-nav-item.is-active {
    position: relative;
  }
  .ng-nav-item.is-active::after {
    content: "";
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #ec4899, #6366f1);
    box-shadow: 0 0 10px rgba(236,72,153,0.6);
    animation: nav-bar-pulse 2s ease-in-out infinite;
  }
  @keyframes nav-bar-pulse {
    0%,100% { opacity: 0.7; transform: scaleY(0.85); }
    50%     { opacity: 1; transform: scaleY(1); }
  }

  /* 3. Cards — shine sweep across on hover */
  .stat-card, .module-card, .oc-panel {
    position: relative;
    overflow: hidden;
  }
  .stat-card::before, .module-card::before {
    content: "";
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s cubic-bezier(.2,.9,.3,1);
    pointer-events: none;
    z-index: 1;
  }
  .stat-card:hover::before, .module-card:hover::before {
    left: 130%;
  }

  /* 4. Server icons / avatars — gentle continuous float */
  .server-card-icon, .ng-server-icon, .dash-server-icon {
    animation: avatar-float 5s ease-in-out infinite;
  }
  @keyframes avatar-float {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50%     { transform: translateY(-4px) rotate(1deg); }
  }

  /* 5. Buttons — gradient that shifts on hover */
  .btn-primary, .hero-btn.primary {
    background-size: 200% 200% !important;
    transition: background-position 0.5s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
  }
  .btn-primary:hover, .hero-btn.primary:hover {
    background-position: 100% 50% !important;
  }

  /* 6. Headings — gradient underline that draws in on scroll-into-view */
  .section-title::after, .dash-hero h1::after {
    content: "";
    display: block;
    width: 0;
    height: 3px;
    margin-top: 10px;
    border-radius: 3px;
    background: linear-gradient(90deg, #ec4899, #6366f1);
    transition: width 0.8s cubic-bezier(.2,.9,.3,1);
  }
  .section-title.is-visible::after, .dash-hero:hover h1::after { width: 80px; }

  /* 7. Inputs — glow ring that breathes when focused */
  input:focus, select:focus, textarea:focus {
    animation: input-focus-glow 2s ease-in-out infinite;
  }
  @keyframes input-focus-glow {
    0%,100% { box-shadow: 0 0 0 3px rgba(236,72,153,0.15); }
    50%     { box-shadow: 0 0 0 4px rgba(236,72,153,0.28), 0 4px 20px rgba(236,72,153,0.15); }
  }

  /* 8. Toggle switch — knob squashes then pops (juicy) */
  .switch-track::after, .oc-toggle .switch::after {
    transition: transform 0.4s cubic-bezier(.34,1.56,.64,1), width 0.2s ease !important;
  }
  .switch-field:active .switch-track::after,
  .oc-toggle:active .switch::after {
    width: 26px !important;
  }

  /* 9. Pills / badges — shimmer */
  .module-toggle-pill, .badge, .tier-badge, .owner-pill {
    background-size: 200% 100%;
    animation: pill-shimmer 4s linear infinite;
  }
  @keyframes pill-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* 10. Table rows — slide + colored left border grows on hover */
  table tbody tr {
    position: relative;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }
  table tbody tr:hover {
    box-shadow: inset 3px 0 0 #ec4899;
  }

  /* 11. Icons everywhere — wiggle on hover */
  .stat-icon, .oc-panel-icon, .module-icon {
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
    display: inline-block;
  }
  .stat-card:hover .stat-icon,
  .oc-panel:hover .oc-panel-icon,
  .module-card:hover .module-icon {
    transform: scale(1.15) rotate(-8deg);
  }

  /* 12. Links — animated arrow that slides */
  a.with-arrow::after {
    content: "→";
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
  }
  a.with-arrow:hover::after { transform: translateX(5px); }

  /* 13. Dropdowns — options cascade (visual only via transition) */
  select { transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
  select:hover { transform: translateY(-1px); }

  /* 14. Card grids — stagger reveal when scrolled into view */
  .modules-grid .module-card,
  .stat-cards .stat-card,
  .oc-grid .oc-panel {
    animation: card-cascade 0.55s cubic-bezier(.2,.9,.3,1) backwards;
  }
  .modules-grid .module-card:nth-child(1),
  .stat-cards .stat-card:nth-child(1),
  .oc-grid .oc-panel:nth-child(1) { animation-delay: 0.04s; }
  .modules-grid .module-card:nth-child(2),
  .stat-cards .stat-card:nth-child(2),
  .oc-grid .oc-panel:nth-child(2) { animation-delay: 0.08s; }
  .modules-grid .module-card:nth-child(3),
  .stat-cards .stat-card:nth-child(3),
  .oc-grid .oc-panel:nth-child(3) { animation-delay: 0.12s; }
  .modules-grid .module-card:nth-child(4),
  .stat-cards .stat-card:nth-child(4),
  .oc-grid .oc-panel:nth-child(4) { animation-delay: 0.16s; }
  .modules-grid .module-card:nth-child(n+5),
  .oc-grid .oc-panel:nth-child(n+5) { animation-delay: 0.20s; }
  @keyframes card-cascade {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* 15. Brand mark — subtle 3D float + glow */
  .ng-brand-mark, .ng-brand-icon {
    animation: brand-3d-float 6s ease-in-out infinite;
  }
  @keyframes brand-3d-float {
    0%,100% { transform: translateY(0) rotateZ(0deg); }
    50%     { transform: translateY(-3px) rotateZ(2deg); }
  }
}

/* ───────────────────────────────────────────────────────────────────────
   FIX — .oc-toggle (AI config, owner config, verify pages)
   Bug: only `.toggle` hid the native checkbox and animated the slider, so
   `.oc-toggle` rendered a raw checkbox AND a dead slider, and the knob never
   moved. This makes `.oc-toggle` behave exactly like `.toggle`.
   ─────────────────────────────────────────────────────────────────────── */
.oc-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .1s ease;
  margin-bottom: 0;
}
.oc-toggle:hover { background: var(--bg-elev-2); }

/* Hide the native checkbox (also removes it from the grid flow) — the key fix. */
.oc-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

/* Checked state — the ONLY job left is to colour the track and slide the knob.
   Colour matches the rest of the toggle styling (the pink glow/ripple/checkbox
   that were always here, #ec4899). The knob keeps its base colour, exactly as
   before — we only restore the slide that the bug was suppressing. */
.oc-toggle input:checked + .switch {
  background: #ec4899;
  border-color: #ec4899;
}
.oc-toggle input:checked + .switch::after {
  transform: translateX(16px);
}

/* ───────────────────────────────────────────────────────────────────────
   THEME — lila → pink accent gradient
   One shared purple→pink identity for toggles, primary buttons and heading
   accents. Change --grad-lp to restyle all of them at once.
   ─────────────────────────────────────────────────────────────────────── */
:root {
  --grad-lp: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
}

/* All toggle switches: gradient track + white knob — consistent everywhere. */
.toggle input:checked ~ .switch,
.oc-toggle input:checked + .switch,
input[type="checkbox"]:checked + .switch {
  background: var(--grad-lp);
  border-color: transparent;
}
.toggle input:checked ~ .switch::after,
.oc-toggle input:checked + .switch::after {
  background: #fff;
}

/* Primary buttons pick up the same lila→pink gradient. */
.btn-primary {
  background: var(--grad-lp);
  border-color: transparent;
  color: #fff;
}

/* ───────────────────────────────────────────────────────────────────────
   FIX PASS — clean dark selects + a non-buggy toggle
   These live last so they win over the decorative rules above.
   ─────────────────────────────────────────────────────────────────────── */

/* Native UI (dropdown lists, scrollbars, pickers) render dark site-wide.
   This is what makes the open <select> list dark instead of light. */
html { color-scheme: dark; }

/* Clean select: solid dark fill + a single small chevron (no tiling/pattern). */
select {
  color-scheme: dark;
  background-color: var(--bg-elev-2) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23a855f7' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px 8px !important;
  padding-right: 38px !important;
}
select option,
select optgroup {
  background-color: #14141c;
  color: #e6e8ee;
}

/* ── Toggle switches — ONE source of truth (both .toggle and .oc-toggle) ── */

/* Smooth, snappy knob slide. */
.toggle .switch::after,
.oc-toggle .switch::after {
  transition: transform .25s cubic-bezier(.34, 1.4, .5, 1) !important;
}

/* ON: angled lila→pink track, transparent edge, soft STATIC glow (no pulsing). */
.toggle input:checked ~ .switch,
.oc-toggle input:checked + .switch,
input[type="checkbox"]:checked + .switch {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  animation: none !important;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.35) !important;
}

/* ON: white knob slides across — guaranteed to move, never squashes. */
.toggle input:checked ~ .switch::after,
.oc-toggle input:checked + .switch::after {
  transform: translateX(16px) !important;
  width: 16px !important;
  background: #fff !important;
}

/* Kill the press-squash (knob was stretching to 26px → looked buggy). */
.oc-toggle:active .switch::after,
.switch-field:active .switch-track::after,
.toggle:active .switch::after {
  width: 16px !important;
}
