/* ============================================
   🏯 Bot Công Đức — Glassmorphism UI
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --glass-blur: 20px;
  --glass-blur-strong: 30px;

  --bg-body: #050510;
  --text: #f0f0ff;
  --text-dim: #a0a0c0;
  --text-muted: #606080;

  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);
  --cyan: #06b6d4;
  --cyan-dim: rgba(6, 182, 212, 0.15);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.15);
  --pink: #ec4899;

  --glow-purple: 0 0 30px rgba(168, 85, 247, 0.25);
  --glow-blue: 0 0 30px rgba(59, 130, 246, 0.2);
  --glow-green: 0 0 30px rgba(34, 197, 94, 0.2);
  --glow-red: 0 0 30px rgba(239, 68, 68, 0.2);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --nav-h: 64px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Animated Gradient Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(168, 85, 247, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 70% 10%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
  animation: bgShift 20s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

@keyframes bgShift {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(2deg); }
}

a { color: var(--purple); text-decoration: none; transition: 0.2s var(--ease); }
a:hover { color: #c084fc; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 10px; }

/* ── Glass Mixin (via classes) ── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  border: 1px solid var(--glass-border-strong);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(5, 5, 16, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  white-space: nowrap;
}

.nav-brand .brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.nav-brand span {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e0e0ff, var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
}

.nav-links a.active {
  color: #c084fc;
  background: var(--purple-dim);
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

.nav-links a .nav-icon { font-size: 1rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Layout ── */
.main-content {
  margin-top: var(--nav-h);
  padding: 28px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  min-height: calc(100vh - var(--nav-h));
}

/* ── Page Header ── */
.page-header { margin-bottom: 28px; }

.page-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.page-header p {
  font-size: 0.87rem;
  color: var(--text-dim);
}

/* ── Glass Card ── */
.card {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.card:hover {
  border-color: var(--glass-border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 100%; height: 100%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::after { opacity: 1; }

.stat-card.blue::before { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.stat-card.blue:hover::after { background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%); }
.stat-card.green::before { background: linear-gradient(90deg, var(--green), #4ade80); }
.stat-card.green:hover::after { background: radial-gradient(circle, rgba(34, 197, 94, 0.08), transparent 70%); }
.stat-card.red::before { background: linear-gradient(90deg, var(--red), #f87171); }
.stat-card.red:hover::after { background: radial-gradient(circle, rgba(239, 68, 68, 0.08), transparent 70%); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--yellow), #facc15); }
.stat-card.yellow:hover::after { background: radial-gradient(circle, rgba(234, 179, 8, 0.08), transparent 70%); }

.stat-label {
  font-size: 0.73rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat-card.blue .stat-value { color: var(--blue); text-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
.stat-card.green .stat-value { color: var(--green); text-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }
.stat-card.red .stat-value { color: var(--red); text-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
.stat-card.yellow .stat-value { color: var(--yellow); text-shadow: 0 0 20px rgba(234, 179, 8, 0.4); }

.stat-icon {
  position: absolute;
  top: 16px; right: 18px;
  font-size: 1.6rem;
  opacity: 0.2;
  transition: opacity 0.3s;
}

.stat-card:hover .stat-icon { opacity: 0.4; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  position: relative;
}

.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 25px rgba(168, 85, 247, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a, var(--green));
  color: #fff;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-success:hover:not(:disabled) {
  box-shadow: 0 6px 25px rgba(34, 197, 94, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, var(--red));
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-danger:hover:not(:disabled) {
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--glass);
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--glass-strong);
  color: var(--text);
  border-color: var(--glass-border-strong);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(10px);
}

.badge-success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.25); box-shadow: 0 0 15px rgba(34, 197, 94, 0.1); }
.badge-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.25); box-shadow: 0 0 15px rgba(239, 68, 68, 0.1); }
.badge-warning { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.25); box-shadow: 0 0 15px rgba(234, 179, 8, 0.1); }
.badge-info { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.25); box-shadow: 0 0 15px rgba(59, 130, 246, 0.1); }

.badge .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.badge-success .pulse { background: var(--green); box-shadow: 0 0 6px var(--green); }
.badge-danger .pulse { background: var(--red); box-shadow: 0 0 6px var(--red); }
.badge-warning .pulse { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.badge-info .pulse { background: var(--blue); box-shadow: 0 0 6px var(--blue); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ── Form Elements ── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-input, .form-select {
  width: 100%;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.93rem;
  outline: none;
  transition: all 0.25s var(--ease);
}

.form-input:focus, .form-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim), 0 0 20px rgba(168, 85, 247, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.form-input::placeholder { color: var(--text-muted); }
.form-select option { background: #1a1a2e; color: var(--text); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Console ── */
.console-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.console {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 300px;
  max-height: calc(100vh - 360px);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
  color: #c0c0e0;
}

/* ── Table ── */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: rgba(255, 255, 255, 0.03);
  padding: 13px 18px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(10px);
}

tbody td {
  padding: 12px 18px;
  font-size: 0.87rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s;
}

tbody tr:hover td { background: rgba(168, 85, 247, 0.04); }
tbody tr:last-child td { border-bottom: none; }

.td-mono { font-family: var(--mono); font-size: 0.82rem; }
.td-card { color: var(--yellow); font-weight: 600; text-shadow: 0 0 10px rgba(234, 179, 8, 0.3); }
.td-code { color: var(--green); text-shadow: 0 0 10px rgba(34, 197, 94, 0.2); }

.copy-btn {
  padding: 5px 14px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.copy-btn:hover {
  background: var(--purple-dim);
  color: var(--purple);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

.copy-btn.copied {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

/* ── Search Bar ── */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-bar .form-input { flex: 1; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 0.93rem; }

/* ── Controls Bar ── */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.controls-bar .spacer { flex: 1; }

/* ── Alerts ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  margin-bottom: 18px;
  display: none;
  animation: slideIn 0.35s var(--ease);
  backdrop-filter: blur(10px);
}

.alert-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.08);
}

.alert-error {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.08);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 22px;
  background: rgba(10, 10, 30, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(168, 85, 247, 0.1);
  animation: toastIn 0.35s var(--ease);
  max-width: 380px;
  color: var(--text);
}

.toast.toast-out { animation: toastOut 0.3s var(--ease) forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateX(50px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(50px) scale(0.95); } }

/* ── Spinner ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  html { font-size: 14px; }

  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0; bottom: 0;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    z-index: 999;
    border-left: 1px solid var(--glass-border);
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links a {
    padding: 16px 20px;
    font-size: 1rem;
    border-radius: var(--radius);
  }

  .main-content { padding: 16px; }

  .stats-grid { gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 1.5rem; }

  .controls-bar { gap: 8px; }
  .btn { padding: 9px 16px; font-size: 0.82rem; }

  .console { min-height: 240px; max-height: calc(100vh - 400px); font-size: 0.73rem; padding: 14px; }

  .form-row { grid-template-columns: 1fr; }

  .page-header h1 { font-size: 1.3rem; }

  thead th { padding: 10px 14px; }
  tbody td { padding: 10px 14px; }

  .search-bar { flex-direction: column; }

  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.3rem; }
  .stat-label { font-size: 0.68rem; }
  .stat-icon { display: none; }

  .navbar { padding: 0 16px; }
  .nav-brand span { font-size: 0.95rem; }
  .nav-brand .brand-icon { width: 32px; height: 32px; font-size: 0.95rem; }

  .main-content { padding: 12px; }
  .card { padding: 18px; border-radius: var(--radius-sm); }

  .console { min-height: 200px; font-size: 0.7rem; border-radius: var(--radius-sm); }

  .hide-mobile { display: none; }
}

/* ── Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mb-md { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.82rem; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.hidden { display: none; }

/* ── Page Enter Animation ── */
.page-enter { animation: pageEnter 0.5s var(--ease); }

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Floating Orbs (decorative) ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  animation: orbFloat 15s ease-in-out infinite alternate;
}

.orb-1 {
  width: 400px; height: 400px;
  background: rgba(168, 85, 247, 0.12);
  top: -100px; left: -100px;
}

.orb-2 {
  width: 350px; height: 350px;
  background: rgba(59, 130, 246, 0.1);
  bottom: -80px; right: -80px;
  animation-delay: -5s;
}

.orb-3 {
  width: 250px; height: 250px;
  background: rgba(6, 182, 212, 0.08);
  top: 50%; left: 60%;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
  100% { transform: translate(10px, -10px) scale(1.02); }
}
