/* ═══════════════════════════════════════════════════
   AGT CONSOLE — Premium Stylesheet
   Scope: CSS only. Zero HTML changes.
   Focus: Transitions · Shadows · Micro-interactions
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Reset & Base ──────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #EEF0F6;
  color: #0D1117;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; transition: background .2s; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  background: linear-gradient(175deg, #07090F 0%, #0D1117 55%, #111d2e 100%);
  box-shadow: 4px 0 32px rgba(0,0,0,.28);
  position: relative;
}
.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 220px; height: 220px;
  background: radial-gradient(ellipse at 0% 100%, rgba(204,27,27,.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Hero panel (login sidebar) ────────────────────── */
.hero-panel {
  background: linear-gradient(145deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 100%);
  border: 1px solid rgba(255,255,255,.10);
  transition: background .25s ease, border-color .25s ease;
}
.hero-panel:hover {
  background: linear-gradient(145deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%);
  border-color: rgba(255,255,255,.16);
}

/* ── Sidebar section title ─────────────────────────── */
.sidebar-section-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.20);
  padding: 0 12px;
  margin: 20px 0 4px;
}

/* ── Nav items ─────────────────────────────────────── */
.nav-item {
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92) !important;
}
.nav-item:active { transform: scale(.97); }
.nav-item.active {
  background: rgba(204,27,27,.15);
  color: #fff !important;
  box-shadow: inset 3px 0 0 #CC1B1B, inset 0 0 18px rgba(204,27,27,.07);
}
.nav-item.active .nav-icon { color: #ff7272; }

/* ── Card ──────────────────────────────────────────── */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.05);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.card:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.09);
  border-color: #d4dcea;
}

/* ── Input ─────────────────────────────────────────── */
.input {
  width: 100%;
  border: 1.5px solid #dde3ee;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  color: #0D1117;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  line-height: 1.4;
}
.input::placeholder { color: #9ca3af; }
.input:hover:not(:focus) { border-color: #c4cdde; }
.input:focus {
  border-color: #CC1B1B;
  box-shadow: 0 0 0 3.5px rgba(204,27,27,.12);
  background: #fffbfb;
}
select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 110px; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  line-height: 1;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: background .18s ease, box-shadow .18s ease, transform .14s ease, border-color .18s ease;
}
/* shine sweep */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.2), transparent);
  transform: skewX(-18deg);
  transition: left .45s ease;
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: #CC1B1B;
  color: #fff;
  box-shadow: 0 2px 8px rgba(204,27,27,.3), 0 1px 2px rgba(204,27,27,.18);
}
.btn-primary:hover {
  background: #b01515;
  box-shadow: 0 6px 22px rgba(204,27,27,.4), 0 2px 6px rgba(204,27,27,.22);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0) scale(.97); }

.btn-secondary {
  background: #ffffff;
  color: #374151;
  border: 1.5px solid #dde3ee;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #c4cdde;
  box-shadow: 0 4px 12px rgba(0,0,0,.09);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: #6b7280;
  padding: 8px 10px;
}
.btn-ghost:hover { background: #f3f4f6; color: #111827; }

.btn-danger {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 2px 8px rgba(220,38,38,.28);
}
.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 6px 18px rgba(220,38,38,.38);
  transform: translateY(-1px);
}

/* ── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-post    { background: #dcfce7; color: #166534; }
.badge-get     { background: #dbeafe; color: #1e40af; }
.badge-info    { background: #f1f5f9; color: #475569; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-error   { background: #fee2e2; color: #991b1b; }

/* ── Sections ──────────────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

/* ── Response panel ────────────────────────────────── */
.response-panel {
  background: #080C14;
  border-radius: 12px;
  color: #8fa8c8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  overflow: auto;
  max-height: 460px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.055);
  transition: border-color .22s ease;
}
.response-panel:hover { border-color: rgba(255,255,255,.10); }

/* ── Table ─────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
table { width: 100%; border-collapse: collapse; }
th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-bottom: 1px solid #e8edf5;
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #374151;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s ease; }
tbody tr:hover td { background: #f5f7fc; }

/* ── Toast ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 36px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.12);
  transform: translateY(20px) scale(.95);
  opacity: 0;
  transition: transform .32s cubic-bezier(.34,1.56,.64,1), opacity .28s ease;
  max-width: 360px;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.toast-success { background: #064e3b; color: #a7f3d0; border: 1px solid rgba(167,243,208,.14); }
.toast-error   { background: #7f1d1d; color: #fecaca; border: 1px solid rgba(254,202,202,.14); }
.toast-info    { background: #1e3a8a; color: #bfdbfe; border: 1px solid rgba(191,219,254,.14); }

/* ── Fade-in ───────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn .28s cubic-bezier(.22,1,.36,1) both;
}

/* ── Status dots ───────────────────────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.dot-green {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.16);
  animation: pulseGreen 2.4s ease-in-out infinite;
}
.dot-red  { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.14); }
.dot-gray { background: #9ca3af; }

@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
  50%       { box-shadow: 0 0 0 7px rgba(16,185,129,.05); }
}

/* ── Small muted ───────────────────────────────────── */
.small-muted { font-size: 12px; color: #6b7280; }
