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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: #06060b;
  color: #c9cdd4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: #ffa726; text-decoration: none; transition: color 0.2s; }
a:hover { color: #ffb74d; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,167,38,0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,167,38,0.7); }

/* ===== ANIMATED BACKGROUND ===== */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: #06060b;
}
.bg-mesh::before, .bg-mesh::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.15;
  animation: blobFloat 20s ease-in-out infinite alternate;
}
.bg-mesh::before {
  width: 600px; height: 600px; top: -10%; left: -5%;
  background: radial-gradient(circle, #ffa726, transparent 70%);
}
.bg-mesh::after {
  width: 500px; height: 500px; bottom: -10%; right: -5%;
  background: radial-gradient(circle, #ffb74d, transparent 70%);
  animation-delay: -10s; animation-direction: alternate-reverse;
}
@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(10px, -10px) scale(1.05); }
}

/* ===== LAYOUT UTILS ===== */
.h-screen { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; min-height: 0; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-1-5 { gap: 6px; } .gap-2 { gap: 8px; }
.gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.shrink-0 { flex-shrink: 0; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-6xl { max-width: 76rem; margin-left: auto; margin-right: auto; width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.hidden { display: none; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; align-items: center; }
.relative { position: relative; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.whitespace-nowrap { white-space: nowrap; }
.col-span-2 { grid-column: span 2; }

/* Grid */
.grid { display: grid; gap: 10px; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ===== SPACING ===== */
.p-2 { padding: 8px; } .p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-16 { padding-top: 64px; padding-bottom: 64px; }
.mb-1 { margin-bottom: 4px; } .mb-1-5 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-8 { margin-bottom: 32px; }
.mt-0-5 { margin-top: 2px; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }

/* ===== TYPOGRAPHY ===== */
.text-2xl { font-size: 1.5rem; } .text-xl { font-size: 1.25rem; } .text-lg { font-size: 1.125rem; }
.text-base { font-size: 1rem; } .text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; }
.text-xxs { font-size: 0.625rem; } .text-11 { font-size: 11px; }
.text-10 { font-size: 10px; } .text-9 { font-size: 9px; } .text-8 { font-size: 8px; }
.font-black { font-weight: 900; } .font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; } .font-medium { font-weight: 500; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-tight { line-height: 1.25; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; }

/* ===== COLORS ===== */
.text-white { color: #f0f2f5; }
.text-gray-300 { color: #c9cdd4; } .text-gray-400 { color: #8b919a; }
.text-gray-500 { color: #5f6672; } .text-gray-600 { color: #3e4450; }
.text-gray-700 { color: #2a2f3a; }
.text-red-400 { color: #f87171; } .text-red-500 { color: #ef4444; }
.text-emerald-400 { color: #34d399; } .text-amber-400 { color: #fbbf24; }
.text-blue-400 { color: #60a5fa; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(255,167,38,0.2); }
  50% { box-shadow: 0 0 30px rgba(255,167,38,0.4); }
}

.animate-in { animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-slide { animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }

.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255,167,38,0.15);
  border-top-color: #ffa726;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.spinner-white { border-color: rgba(255,255,255,0.15); border-top-color: #fff; }
.spinner-lg { width: 28px; height: 28px; border-width: 3px; }

/* ===== GLASS CARD ===== */
.card {
  background: rgba(14, 16, 24, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.card-hover {
  background: rgba(14, 16, 24, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}
.card-hover:hover {
  border-color: rgba(255, 167, 38, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 167, 38, 0.08);
}

.card-inner {
  background: rgba(8, 10, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.25s;
}
.card-inner:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  margin: 4px 0;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
  color: #fff;
  font-weight: 600;
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: inherit;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(255, 167, 38, 0.45);
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #c9cdd4;
  font-weight: 500;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  font-size: inherit;
  font-family: inherit;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f0f2f5;
}
.btn-secondary:disabled { opacity: 0.2; }

.btn-sm { padding: 6px 14px; font-size: 0.75rem; border-radius: 8px; }
.btn-xs { padding: 3px 8px; font-size: 10px; border-radius: 6px; }

/* ===== INPUT ===== */
.input-field {
  width: 100%;
  background: rgba(8, 10, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 16px;
  color: #f0f2f5;
  font-size: inherit;
  font-family: inherit;
  outline: none;
  transition: all 0.3s;
}
.input-field::placeholder { color: #3e4450; }
.input-field:focus {
  border-color: rgba(255, 167, 38, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 167, 38, 0.08), inset 0 1px 4px rgba(0,0,0,0.2);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 6px;
}
.badge-red {
  background: rgba(255, 167, 38, 0.12);
  color: #ffa726;
  border: 1px solid rgba(255, 167, 38, 0.2);
}
.badge-green {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}
.badge-blue {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}
.badge-gold {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ===== STATS ===== */
.stat-value {
  font-size: 1.1rem; font-weight: 700; color: #f0f2f5;
  line-height: 1.25; word-break: break-all;
}
.stat-label {
  font-size: 0.7rem; color: #5f6672; margin-top: 6px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
}

/* ===== NAV ===== */
.nav {
  background: rgba(8, 10, 16, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  z-index: 50;
}
.nav-inner {
  max-width: 76rem; margin: 0 auto;
  padding: 0 20px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #ffa726, #ff9800);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(255, 167, 38, 0.3);
}
.nav-logo span {
  color: #fff; font-weight: 800; font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ===== TABLE ===== */
table { width: 100%; border-collapse: collapse; }
th {
  font-weight: 600; font-size: 10px; color: #5f6672;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 8px 10px 8px 0; text-align: left;
}
td {
  padding: 8px 10px 8px 0; color: #8b919a;
  max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.table-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s;
}
.table-row:hover { background: rgba(255, 167, 38, 0.03); }
thead.sticky-top {
  position: sticky; top: 0;
  background: rgba(14, 16, 24, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
}

/* ===== TABS ===== */
.tab-bar { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; flex-shrink: 0; }
.tab-btn {
  padding: 6px 14px; font-size: 0.75rem; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: all 0.25s;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  background: rgba(14, 16, 24, 0.5);
  color: #5f6672;
  flex-shrink: 0;
  font-family: inherit;
}
.tab-btn:hover { color: #c9cdd4; background: rgba(255, 255, 255, 0.04); }
.tab-btn.active {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(255, 167, 38, 0.3);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.page-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  cursor: pointer;
  background: rgba(14, 16, 24, 0.5);
  color: #5f6672;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  transition: all 0.2s;
  font-family: inherit;
}
.page-btn:hover { color: #f0f2f5; background: rgba(255, 255, 255, 0.06); }
.page-btn.active {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  color: #fff; border-color: transparent;
}
.page-btn:disabled { opacity: 0.2; cursor: not-allowed; }

/* ===== ALERTS ===== */
.alert { padding: 10px 14px; font-size: 0.85rem; border-radius: 10px; }
.alert-error {
  background: rgba(255, 87, 34, 0.08);
  border: 1px solid rgba(255, 87, 34, 0.15);
  color: #ff7043;
}
.alert-success {
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.15);
  color: #34d399;
}
.alert-warn {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

/* Report */
.report-response {
  background: rgba(8, 10, 16, 0.5);
  padding: 10px; margin-top: 6px;
  border-left: 2px solid rgba(255, 167, 38, 0.4);
  border-radius: 0 8px 8px 0;
}

/* ===== FIRE PARTICLES ===== */
.fire-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; opacity: 0.7;
}

/* ===== LOGIN ===== */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
}
.login-box { width: 100%; max-width: 400px; position: relative; z-index: 1; }

.login-card {
  background: rgba(14, 16, 24, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute; top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffa726, #ffb74d, transparent);
  border-radius: 20px 20px 0 0;
}

.login-logo {
  width: 80px; height: 80px;
  background: rgba(255, 167, 38, 0.1);
  border: 2px solid rgba(255, 167, 38, 0.2);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(255, 167, 38, 0.2);
  animation: pulseGlow 3s ease-in-out infinite;
}
.login-logo img {
  filter: drop-shadow(0 2px 8px rgba(255, 167, 38, 0.3));
}
.login-logo span {
  color: #fff; font-weight: 900; font-size: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ===== HERO CARD (character header) ===== */
.hero-card {
  background: linear-gradient(135deg, rgba(255, 167, 38, 0.1), rgba(255, 183, 77, 0.05));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 167, 38, 0.12);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,167,38,0.08), transparent 70%);
  pointer-events: none;
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #5f6672;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06), transparent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .login-card { padding: 28px 20px; }
  .nav-inner { padding: 0 12px; }
}
@media (min-width: 640px) {
  .sm-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .sm-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 768px) {
  .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1024px) {
  .lg-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}
