:root {
  --bg: #050507;
  --surface: #0c0c0f;
  --surface2: #131318;
  --surface3: #1c1c24;
  --border: #2a2a35;
  --border-light: #3a3a48;
  --text: #f4f4f5;
  --muted: #9ca3af;
  --subtle: #6b7280;
  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --accent-soft: rgba(220, 38, 38, 0.12);
  --accent-text: #fca5a5;
  --accent-glow: rgba(220, 38, 38, 0.35);
  --success: #22c55e;
  --warn: #eab308;
  --danger: #ef4444;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --sidebar: 280px;
  --admin-nav: 260px;
  --header: 60px;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(220, 38, 38, 0.15), transparent),
    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: auto, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: #fff; }

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #7f1d1d);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 0 30px var(--accent-glow);
}

.auth-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-brand p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: 0.2s;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-bottom: 16px;
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #991b1b);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover), #7f1d1d);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) { border-color: var(--border-light); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 7px 12px;
  font-size: 0.76rem;
}

.btn-ghost:hover { color: var(--text); border-color: var(--border-light); }

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 7px 12px;
  font-size: 0.76rem;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

.btn-sm {
  padding: 5px 10px !important;
  font-size: 0.72rem !important;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.84rem;
  color: var(--muted);
}

/* App Layout */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app-header {
  height: var(--header);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 12, 15, 0.9);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #7f1d1d);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
}

.brand-title { font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.brand-sub { font-size: 0.68rem; color: var(--muted); }

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.mobile-menu-btn:hover {
  background: var(--surface3);
  border-color: var(--border-light);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 30px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.72rem;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar.has-img {
  background: transparent;
  padding: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-info { line-height: 1.2; }
.user-name { font-size: 0.8rem; font-weight: 600; }
.user-role { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; }

.quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-family: var(--mono);
  white-space: nowrap;
}

.quota-item.quota-low { color: #fbbf24; }
.quota-pill.quota-empty { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }
.quota-pill.quota-empty .quota-item { color: #fca5a5; }
.quota-sep { opacity: 0.45; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.off { background: var(--danger); box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }

.health-count {
  font-weight: 800;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--success);
  letter-spacing: -0.02em;
}

#health-text.health-ok { color: var(--muted); }
#health-text.health-bad { color: var(--danger); }

.status-pill.health-up-ok {
  border-color: color-mix(in srgb, var(--success) 28%, var(--border));
  background: color-mix(in srgb, var(--success) 6%, var(--surface2));
}

.status-pill.health-up-bad {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
  background: color-mix(in srgb, var(--danger) 6%, var(--surface2));
}

.status-pill.health-up-bad .health-count { color: var(--danger); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header);
  background: rgba(0, 0, 0, 0.55);
  z-index: 150;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.show { display: block; }

body.sidebar-open { overflow: hidden; }

.app-layout {
  display: flex;
  flex: 1;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.sidebar {
  width: 300px;
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
}

.sidebar-head {
  padding: 4px 8px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.sidebar-head-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sidebar-head-sub {
  font-size: 0.68rem;
  color: var(--subtle);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-group {
  margin-bottom: 4px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.sidebar-group.open {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
}

.sidebar-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.sidebar-group-toggle:hover {
  background: var(--surface2);
  color: #fff;
}

.sidebar-group-title { flex: 1; min-width: 0; }

.sidebar-group-count {
  font-size: 0.62rem;
  font-family: var(--mono);
  color: var(--subtle);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 100px;
}

.sidebar-chevron {
  color: var(--subtle);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.sidebar-group.open .sidebar-chevron { transform: rotate(180deg); }

.sidebar-group-items {
  padding: 2px 6px 8px;
}

.sidebar-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--subtle);
  font-weight: 700;
  padding: 0 8px;
}

.cat-search {
  position: relative;
}

.cat-search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
}

.cat-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
  width: 14px;
  height: 14px;
}

.cat-list { overflow-y: auto; flex: 1; }

.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  margin-bottom: 2px;
  transition: 0.15s;
}

.cat-item:hover { background: var(--surface2); }

.cat-item.active {
  background: var(--accent-soft);
  border-color: rgba(220, 38, 38, 0.25);
  box-shadow: inset 3px 0 0 var(--cat-color, var(--accent));
}

.cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface3);
  flex-shrink: 0;
  color: var(--cat-color, var(--accent-text));
}

.cat-item.active .cat-icon { background: rgba(220, 38, 38, 0.15); }

.cat-info { flex: 1; min-width: 0; }
.cat-name { font-size: 0.84rem; font-weight: 600; }
.cat-desc { font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count { font-size: 0.65rem; font-weight: 600; font-family: var(--mono); color: var(--cat-color, var(--accent-text)); background: rgba(255,255,255,0.04); padding: 3px 7px; border-radius: 5px; }

.main-content {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
  min-width: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  --stat-color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--stat-color), transparent 80%);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--stat-color) 18%, transparent), transparent 70%);
  pointer-events: none;
}

.stat-card:hover {
  border-color: color-mix(in srgb, var(--stat-color) 35%, var(--border));
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.stat-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--stat-color) 14%, var(--surface2));
  border: 1px solid color-mix(in srgb, var(--stat-color) 28%, var(--border));
  color: var(--stat-color);
}

.stat-card-body {
  flex: 1;
  min-width: 0;
}

.stat-card-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 4px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  line-height: 1.3;
}

.home-view {
  margin-bottom: 22px;
}

.announcements-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.announcements-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.announcements-head-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface2));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  color: var(--accent-text);
}

.announcements-head h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.announcements-head p {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}

.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcement-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.announcement-card:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
}

.announcement-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.announcement-card-head h4 {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.announcement-card-head time {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.announcement-card-body {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.announcement-empty {
  text-align: center;
  padding: 18px 12px;
  font-size: 0.84rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.announcement-empty.muted { border-style: solid; background: var(--surface2); }

.announcement-form-panel h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.announcement-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.announcement-form .form-row label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.announcement-form .toolbar-input {
  width: 100%;
}

.ann-textarea {
  min-height: 110px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ann-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text);
  cursor: pointer;
}

.ann-check input { accent-color: var(--accent); }

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

.ann-preview {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.home-guide-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}

.home-guide h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.home-guide p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.home-guide p strong {
  color: var(--accent-text);
  font-weight: 600;
}

.home-steps {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.home-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.home-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: 0.15s;
}

.metric.clickable { cursor: pointer; }
.metric.clickable:hover { border-color: var(--border-light); transform: translateY(-1px); }

.metric-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.metric-value { font-size: 1.3rem; font-weight: 700; font-family: var(--mono); }
.metric-sub { font-size: 0.68rem; color: var(--subtle); margin-top: 3px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

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

.panel h2 { font-size: 1.1rem; font-weight: 700; }
.panel p { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

.panel-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.select {
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.78rem;
  font-family: inherit;
}

.field-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }

.field-tab {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 500;
  font-family: inherit;
  transition: 0.15s;
}

.field-tab:hover { color: var(--text); border-color: var(--border-light); }
.field-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Mode selector */
.mode-block { margin-bottom: 18px; }

.mode-block-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-bottom: 10px;
}

.mode-selector {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.mode-chip:hover {
  color: var(--text);
  background: var(--surface2);
}

.mode-chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--ws-color, var(--accent)), color-mix(in srgb, var(--ws-color, var(--accent)) 70%, #000));
  border-color: transparent;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ws-color, var(--accent)) 35%, transparent);
}

.mode-chip-icon {
  display: grid;
  place-items: center;
  opacity: 0.85;
}

.mode-chip.active .mode-chip-icon { opacity: 1; }

.mode-desc {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 640px;
}

.query-shell {
  --ws-color: var(--accent);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.query-shell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ws-color), transparent);
  opacity: 0.5;
}

.ws-pill-match {
  color: var(--accent-text) !important;
  border-color: rgba(220, 38, 38, 0.25) !important;
  background: var(--accent-soft) !important;
}

.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row.dual .input-wrap { flex: 1; min-width: 180px; }

.input-wrap { flex: 1; position: relative; }
.input-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--subtle); }

#query, .query-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--mono);
  outline: none;
}

#query:focus, .query-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#query.invalid { border-color: var(--danger); }

/* Workspace / Query */
.cross-search-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 6px 6px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cross-search-bar:focus-within {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.cross-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.05rem;
  min-height: 48px;
  outline: none;
}

.cross-search-bar input::placeholder { color: var(--subtle); }

.cross-search-bar .btn {
  border-radius: 10px !important;
  padding: 14px 22px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
  width: auto !important;
}

.cross-search-hint {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

.workspace-panel {
  position: relative;
  overflow: hidden;
  padding-top: 26px;
  --ws-color: var(--accent);
}

.workspace-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.workspace-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.workspace-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.workspace-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.workspace-head h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.workspace-head p { color: var(--muted); font-size: 0.84rem; margin-top: 4px; max-width: 520px; }

.workspace-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ws-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--mono);
}

.query-zone { margin-bottom: 8px; }

.query-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.query-input-lg {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 6px 4px 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 58px;
}

.query-input-lg:focus-within {
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.query-input-lg svg {
  color: var(--subtle);
  flex-shrink: 0;
  margin-right: 12px;
}

.query-input-lg input,
.query-input-lg.compact input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  font-family: var(--mono);
  padding: 14px 12px 14px 0;
  outline: none;
  width: 100%;
  min-height: 48px;
}

.query-input-lg.compact {
  padding-left: 16px;
  min-height: 54px;
}

.query-input-lg.compact input {
  padding: 12px 0;
  font-size: 1rem;
}

.query-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.query-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn-lg {
  padding: 14px 22px !important;
  font-size: 0.9rem !important;
  width: auto !important;
}

.workspace-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 24px 0 20px;
}

.results-zone { min-height: 80px; }

.export-actions { display: flex; gap: 6px; }

.profile-cards { display: flex; flex-direction: column; gap: 12px; }

.profile-card {
  --card-color: var(--accent);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.2s;
  overflow: hidden;
}

.profile-card:hover {
  border-color: color-mix(in srgb, var(--card-color) 40%, var(--border));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.profile-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-color) 12%, transparent), transparent);
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--card-color) 80%, #fff), var(--card-color));
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--card-color) 40%, transparent);
}

.profile-head-text { flex: 1; min-width: 0; }

.profile-name {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-sub {
  font-size: 0.8rem;
  color: var(--accent-text);
  font-family: var(--mono);
  margin-top: 4px;
}

.btn-copy {
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  gap: 6px !important;
}

.profile-card .profile-section {
  padding: 0 22px;
}

.profile-card .profile-section:first-of-type { padding-top: 18px; }
.profile-card .profile-section:last-of-type { padding-bottom: 20px; }

.profile-section { margin-bottom: 16px; }
.profile-section:last-child { margin-bottom: 0; }

.profile-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-bottom: 10px;
}

.hint { margin-top: 12px; font-size: 0.7rem; color: var(--subtle); display: flex; gap: 14px; flex-wrap: wrap; }
.hint kbd { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 0.66rem; font-family: var(--mono); }
.validation-msg { font-size: 0.72rem; color: var(--danger); margin-top: 8px; display: none; }

.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.view-toggle button {
  border: none; background: transparent; color: var(--muted);
  padding: 7px 12px; font-size: 0.74rem; cursor: pointer; font-family: inherit;
}
.view-toggle button.active { background: var(--accent); color: #fff; }

#results { min-height: 60px; }

.loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 48px; color: var(--muted);
}

.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 14px; opacity: 0.35; }
.empty p { font-size: 0.86rem; }
.empty small { display: block; margin-top: 6px; font-size: 0.74rem; color: var(--subtle); }

.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 0.76rem; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-text);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.meta { display: flex; gap: 10px; align-items: center; font-size: 0.76rem; color: var(--muted); flex-wrap: wrap; }
.meta code { font-family: var(--mono); font-size: 0.7rem; background: var(--surface2); padding: 2px 6px; border-radius: 4px; }

.result-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 8px;
  position: relative;
  transition: 0.15s;
}

.result-card:hover { border-color: var(--border-light); }

.card-actions { position: absolute; top: 12px; right: 12px; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-stats { grid-template-columns: 1fr; }
  .query-dual-grid { grid-template-columns: 1fr; }
  .cross-search-bar { flex-direction: column; padding: 12px; }
  .cross-search-bar .btn { width: 100% !important; }
  .query-actions .btn-lg { flex: 1; min-width: 120px; }
  .sidebar { width: var(--sidebar); }
}

.field {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.15s;
}

.field:hover { border-color: var(--border-light); }

.field label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtle);
  margin-bottom: 5px;
  font-weight: 600;
}

.field span, .field pre {
  font-size: 0.86rem;
  font-family: var(--mono);
  cursor: pointer;
  word-break: break-all;
  line-height: 1.45;
}

.field.hl {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}

.field.hl span { color: var(--accent-text); font-weight: 600; }

.field.json pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  font-size: 0.72rem;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; background: var(--surface2); }
td { cursor: pointer; }
td.mono { font-family: var(--mono); color: var(--accent-text); }

.section { margin-bottom: 20px; }
.section-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 0.84rem;
}

.recent-wrap { margin-top: 16px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.recent-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 20px;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 0.72rem; cursor: pointer; transition: 0.15s;
}

.recent-chip:hover { border-color: var(--accent); }
.recent-chip .tag { color: var(--accent-text); font-weight: 600; }
.recent-chip code { font-family: var(--mono); color: var(--muted); }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface3); border: 1px solid var(--border);
  color: var(--text); padding: 12px 18px; border-radius: var(--radius);
  font-size: 0.84rem; opacity: 0; transform: translateY(10px);
  transition: 0.3s; z-index: 999; pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* Admin */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--surface2); color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.role-badge.admin { background: rgba(220,38,38,0.15); color: var(--accent-text); }
.role-badge.user { background: rgba(59,130,246,0.15); color: #93c5fd; }

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 600;
}

.status-badge.active { background: rgba(34,197,94,0.15); color: #86efac; }
.status-badge.inactive { background: rgba(239,68,68,0.15); color: #fca5a5; }

.action-btns { display: flex; gap: 6px; }

.tabs-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: 0.15s;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent-text); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Welcome & Profile */
.welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(220,38,38,0.08), rgba(220,38,38,0.02));
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 18px;
}

.welcome-text h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.welcome-text p { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.welcome-stats { display: flex; gap: 20px; }
.w-stat { text-align: center; }
.w-val { display: block; font-size: 1.4rem; font-weight: 800; font-family: var(--mono); color: var(--accent-text); }
.w-lbl { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}

.modal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto;
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.profile-discord-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

.profile-field label {
  display: block; font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--subtle); margin-bottom: 3px;
}

.profile-field span { font-size: 0.88rem; font-weight: 600; }

/* Admin Enhanced */
.admin-main { max-width: 1440px; margin: 0 auto; width: 100%; }

.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}

.page-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.page-header p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.metric.highlight { border-color: rgba(220,38,38,0.3); background: var(--accent-soft); }

.admin-panels-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px;
}

.admin-side-panel h3 {
  font-size: 0.85rem; font-weight: 700; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}

.rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}

.rank-num {
  width: 24px; height: 24px; border-radius: 6px; background: var(--surface3);
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: var(--muted);
}

.rank-info { flex: 1; }
.rank-info small { display: block; font-size: 0.68rem; color: var(--subtle); }
.rank-val { font-family: var(--mono); font-weight: 700; color: var(--accent-text); }

.breakdown-item {
  display: grid; grid-template-columns: 90px 1fr 40px; gap: 10px;
  align-items: center; padding: 6px 0; font-size: 0.8rem;
}

.breakdown-bar {
  height: 6px; background: var(--surface3); border-radius: 3px; overflow: hidden;
}

.breakdown-bar div {
  height: 100%; background: linear-gradient(90deg, var(--accent), #f59e0b);
  border-radius: 3px; transition: width 0.4s;
}

.breakdown-count { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); text-align: right; }

.panel-toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px;
}

.toolbar-input, .toolbar-select {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font-size: 0.82rem; font-family: inherit;
}

.toolbar-input { flex: 1; min-width: 180px; }
.toolbar-meta { font-size: 0.75rem; color: var(--muted); margin-left: auto; }

.panel.flush { padding: 0; overflow: hidden; }

.cat-badge {
  font-size: 0.68rem; padding: 3px 8px; border-radius: 5px;
  background: var(--surface3); color: var(--accent-text); font-weight: 600;
}

.log-code { font-size: 0.7rem; color: var(--muted); word-break: break-all; }
.subtle-text { color: var(--subtle); font-size: 0.75rem; }
.empty-text { color: var(--muted); font-size: 0.82rem; padding: 12px 0; }
.hint-text { font-size: 0.78rem; color: var(--muted); margin-top: 14px; }

.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;
}

.setting-item label {
  display: block; font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--subtle); margin-bottom: 4px;
}

.setting-item span { font-size: 0.9rem; font-weight: 600; }

.sidebar-section { margin-bottom: 4px; }

#shield-overlay .shield-msg {
  text-align: center; color: #fff; padding: 40px;
}
#shield-overlay .shield-msg h3 { font-size: 1.4rem; color: #dc2626; margin-bottom: 10px; }
#shield-overlay .shield-msg p { color: #a1a1aa; font-size: 0.9rem; }

body { -webkit-user-select: none; user-select: none; }
input, textarea, .result-card, .log-code, pre, code, .mono { -webkit-user-select: text; user-select: text; }

/* SMS Bomber */
.sms-metrics { margin-bottom: 18px; }

.sms-form { margin-bottom: 8px; }

.sms-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.sms-form .form-group input,
.sms-form .form-group select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.sms-form .form-group input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.sms-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.sms-stat label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtle);
  margin-bottom: 4px;
}

.sms-stat span { font-size: 0.9rem; font-weight: 600; }

.sms-progress {
  height: 6px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.sms-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.sms-progress-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  text-align: right;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.68rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--surface3);
  color: var(--muted);
  font-family: var(--mono);
  border: 1px solid var(--border);
}

.cat-item[data-cat="smsbomber"] .cat-icon,
.cat-item.active[style*="f59e0b"] {
  color: #f59e0b;
}

@media (max-width: 900px) {
  :root { --header: 56px; }

  .mobile-menu-btn { display: flex; }

  .app-header {
    padding: 0 12px;
    gap: 8px;
  }

  .header-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .header-right > .btn-ghost:first-of-type { display: none; }

  .brand-sub { display: none; }

  .quota-pill { display: none !important; }

  .status-pill {
    font-size: 0.66rem;
    padding: 5px 9px;
    gap: 5px;
    max-width: min(52vw, 220px);
  }

  #health-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-chip {
    padding: 4px;
    border: none;
    background: transparent;
  }

  .user-chip .user-info { display: none; }

  .app-layout { position: relative; }

  .sidebar {
    position: fixed;
    top: var(--header);
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 200;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border);
    border-bottom: none;
    max-height: none;
    overflow-y: auto;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
    -webkit-overflow-scrolling: touch;
  }

  .sidebar.open { transform: translateX(0); }

  .main-content {
    padding: 16px 14px;
    width: 100%;
  }

  .home-guide { padding: 28px 20px; }

  .announcements-section { padding: 18px 16px; }

  .announcement-card-head { flex-direction: column; gap: 4px; }

  .announcement-card-head time { white-space: normal; }

  .form-row-inline { flex-direction: column; align-items: stretch; }

  .form-actions { width: 100%; }

  .form-actions .btn { flex: 1; }

  .workspace-top { flex-direction: column; }

  .panel-tools { width: 100%; }

  .hint { flex-wrap: wrap; gap: 8px; }

  .admin-panels-row { grid-template-columns: 1fr; }

  .welcome-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  #admin-link,
  .header-right > .btn-ghost:not(#btn-logout) { display: none !important; }

  #btn-logout {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  .status-pill { max-width: 46vw; }

  .stat-card {
    padding: 16px;
    min-height: 84px;
    gap: 12px;
  }

  .stat-card-value { font-size: 1.5rem; }

  .stat-card-icon {
    width: 44px;
    height: 44px;
  }

  .query-input-lg input { font-size: 16px; }

  .home-guide h3 { font-size: 1.1rem; }
}
/* ═══════════════════════════════════════════════════════════
   Professional Admin Control Center
   ═══════════════════════════════════════════════════════════ */

.admin-body { overflow-x: hidden; }

.admin-app .admin-header {
  background: rgba(8, 8, 10, 0.92);
  border-bottom-color: rgba(42, 42, 53, 0.9);
}

.admin-env-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid rgba(220, 38, 38, 0.28);
  margin-left: 8px;
}

.admin-shell {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--header));
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.admin-nav {
  width: var(--admin-nav);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: var(--header);
  height: calc(100vh - var(--header));
  overflow-y: auto;
}

.admin-nav-section { display: flex; flex-direction: column; gap: 4px; }

.admin-nav-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--subtle);
  padding: 0 12px 8px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.admin-nav-item svg { flex-shrink: 0; opacity: 0.75; }
.admin-nav-item span:first-of-type { flex: 1; min-width: 0; }

.admin-nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.admin-nav-item:hover svg { opacity: 1; }

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.16), rgba(220, 38, 38, 0.06));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.admin-nav-item.active svg { opacity: 1; color: var(--accent-text); }

.admin-nav-count {
  font-size: 0.68rem;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--muted);
  background: var(--surface3);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 100px;
  flex: 0 0 auto !important;
}

.admin-nav-item.active .admin-nav-count {
  color: var(--accent-text);
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.25);
}

.admin-nav-footer { margin-top: auto; padding: 12px; }

.admin-nav-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--subtle);
  line-height: 1.45;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.admin-nav-hint svg { flex-shrink: 0; margin-top: 1px; color: var(--accent-text); }

.admin-main {
  flex: 1;
  padding: 28px 32px 48px;
  overflow-y: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  width: 100%;
}

.page-kicker {
  font-size: 0.68rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-text) !important;
  margin: 0 0 6px !important;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.admin-stat-card {
  --stat-color: var(--accent);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 110px;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--stat-color), transparent 85%);
}

.admin-stat-card::after {
  content: '';
  position: absolute;
  top: -30px; right: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--stat-color) 16%, transparent), transparent 70%);
  pointer-events: none;
}

.admin-stat-card:hover {
  border-color: color-mix(in srgb, var(--stat-color) 35%, var(--border));
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.admin-stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--stat-color) 14%, var(--surface2));
  border: 1px solid color-mix(in srgb, var(--stat-color) 28%, var(--border));
  color: var(--stat-color);
  position: relative;
  z-index: 1;
}

.admin-stat-body { flex: 1; min-width: 0; position: relative; z-index: 1; }

.admin-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.admin-stat-value.status-val { font-size: 1.35rem; }

.admin-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 4px;
}

.admin-stat-sub {
  font-size: 0.74rem;
  color: var(--subtle);
  margin-top: 6px;
}

.admin-stat-sub strong { color: var(--text); font-weight: 600; }

.admin-stat-card.is-ok .admin-stat-value { color: #86efac; }
.admin-stat-card.is-bad .admin-stat-value { color: #fca5a5; }

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

.panel-title-row h3 {
  font-size: 0.82rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 !important;
}

.panel-badge {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 100px;
}

.rank-list, .breakdown-list { display: flex; flex-direction: column; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.rank-item:last-child { border-bottom: none; }

.rank-num {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface3);
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
}

.rank-num.top {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.rank-info { flex: 1; min-width: 0; }
.rank-info strong { font-size: 0.86rem; display: block; margin-bottom: 6px; }

.rank-bar {
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  overflow: hidden;
}

.rank-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f97316);
  border-radius: 2px;
  transition: width 0.5s var(--ease);
}

.rank-val {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--accent-text);
  flex-shrink: 0;
}

.breakdown-item {
  display: grid;
  grid-template-columns: 100px 1fr 48px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(42, 42, 53, 0.6);
}

.breakdown-item:last-child { border-bottom: none; }

.breakdown-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breakdown-bar {
  height: 7px;
  background: var(--surface3);
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f59e0b);
  border-radius: 4px;
  transition: width 0.5s var(--ease);
}

.breakdown-count {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.admin-quick-panel { margin-bottom: 0; }

.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.admin-quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.admin-quick-card:hover {
  border-color: rgba(220, 38, 38, 0.35);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface2));
  transform: translateY(-1px);
}

.admin-quick-card strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.admin-quick-card span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
}

.admin-quick-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.admin-quick-icon.users { background: rgba(220, 38, 38, 0.12); color: #fca5a5; border: 1px solid rgba(220, 38, 38, 0.2); }
.admin-quick-icon.ann { background: rgba(139, 92, 246, 0.12); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.2); }
.admin-quick-icon.logs { background: rgba(6, 182, 212, 0.12); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.2); }
.admin-quick-icon.settings { background: rgba(245, 158, 11, 0.12); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.2); }

.admin-ann-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: start;
}

.ann-table-panel { min-width: 0; }

.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.toolbar-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--subtle);
  pointer-events: none;
}

.toolbar-search .toolbar-input {
  width: 100%;
  padding-left: 36px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.72rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.user-cell-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.user-cell-sub {
  font-size: 0.68rem;
  color: var(--subtle);
  margin-top: 2px;
}

.mono-cell {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.muted-cell { color: var(--muted); font-size: 0.8rem; }

.duration-cell.slow { color: #fbbf24; }

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.admin-table td { vertical-align: middle; }

.settings-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), transparent);
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.settings-hero-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--accent-text);
  flex-shrink: 0;
}

.settings-hero h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.settings-hero p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.setting-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.setting-card label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtle);
  margin-bottom: 8px;
  font-weight: 600;
}

.setting-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.setting-value.mono {
  font-family: var(--mono);
  font-size: 0.84rem;
  word-break: break-all;
}

.confirm-modal-card {
  max-width: 400px;
  text-align: center;
  padding: 32px 28px;
}

.confirm-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

.confirm-modal-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.confirm-modal-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-actions .btn { min-width: 110px; }

/* Enhanced toast */
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--accent);
  font-weight: 500;
  max-width: min(420px, calc(100vw - 32px));
}

.toast.show { pointer-events: auto; }

/* Brand mark polish */
.brand-mark {
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.25);
  letter-spacing: -0.04em;
}

/* Welcome banner polish */
.welcome-banner {
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.12), transparent 70%);
  pointer-events: none;
}

/* Profile modal polish */
.modal-card {
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--border) 80%, var(--accent));
}

/* Scrollbar */
.admin-nav::-webkit-scrollbar,
.admin-table-wrap::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.admin-nav::-webkit-scrollbar-thumb,
.admin-table-wrap::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.admin-nav::-webkit-scrollbar-track,
.admin-table-wrap::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
  background: transparent;
}

/* Admin responsive */
@media (max-width: 1200px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-ann-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .admin-nav {
    position: fixed;
    top: var(--header);
    left: 0;
    bottom: 0;
    z-index: 200;
    width: min(280px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
    height: auto;
  }

  .admin-nav.open { transform: translateX(0); }

  .admin-main { padding: 18px 14px 40px; }

  .admin-stats-grid { grid-template-columns: 1fr; }

  .admin-quick-grid { grid-template-columns: 1fr; }

  .admin-env-badge { display: none; }

  #admin-live-text {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .admin-stat-value { font-size: 1.4rem; }
  .page-header h1 { font-size: 1.25rem; }
  .breakdown-item { grid-template-columns: 80px 1fr 40px; gap: 8px; }
}

/* Dashboard polish extras */
.welcome-kicker {
  font-size: 0.68rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-text) !important;
  margin: 0 0 8px !important;
}

.welcome-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.home-shortcuts {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 0.72rem;
  color: var(--subtle);
}

.home-shortcuts kbd {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.66rem;
  font-family: var(--mono);
}

.modal-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-text);
  margin-bottom: 4px;
}

.modal-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.profile-modal-card { max-width: 480px; }

.profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), transparent);
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.profile-identity-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.profile-identity-avatar.has-img { padding: 0; background: transparent; }

.profile-identity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-identity-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-identity-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}

.toast-ok { border-left-color: var(--success) !important; }
.toast-err { border-left-color: var(--danger) !important; }

/* Sidebar polish */
.sidebar {
  position: sticky;
  top: var(--header);
  height: calc(100vh - var(--header));
  overflow: hidden;
}

.cat-list {
  overflow-y: auto;
  flex: 1;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

/* Header button icons align */
.header-right .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Panel primary buttons not full width in workspace */
.query-actions .btn-primary,
.panel-tools .btn-primary,
.search-row .btn-primary,
.form-actions .btn-primary {
  width: auto;
}

.panel-toolbar .toolbar-select {
  min-width: 130px;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    height: auto;
  }

  .welcome-actions { width: 100%; }
  .welcome-actions .btn { flex: 1; justify-content: center; }
}

.sms-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.sms-panel .panel-header { margin-bottom: 16px; }
.sms-panel .btn-lg { width: auto !important; }

/* Smooth page content fade for admin tabs */
.admin-main .tab-content.active {
  animation: tabFadeIn 0.22s var(--ease);
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
