/* ═══════════════════════════════════════════════════════
   CYBER COMMAND CENTER // AAA-GAME HUD DESIGN SYSTEM
   ═══════════════════════════════════════════════════════ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&display=swap');

:root {
  --cyber-bg: #030712;
  --cyan: #00f0ff;
  --rose: #ff0055;
  --amber: #ffb800;
  --green: #00ff66;
  --violet: #7c3aed;
  --cyan-glow: rgba(0,240,255,.15);
  --rose-glow: rgba(255,0,85,.15);
  --amber-glow: rgba(255,184,0,.12);
  --green-glow: rgba(0,255,102,.12);
}

body {
  background: var(--cyber-bg);
  color: #e4e4e7;
  font-family: 'Zen Kaku Gothic New', 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: .02em;
}

/* Ambient glow bg */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 35% at 50% -5%, rgba(0,240,255,.045), transparent),
    radial-gradient(circle at 85% 90%, rgba(255,0,85,.025), transparent),
    radial-gradient(circle at 10% 70%, rgba(124,58,237,.02), transparent);
}

/* ── Typography Classes ── */
.font-cyber { font-family: 'Orbitron', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-jp { font-family: 'Zen Kaku Gothic New', sans-serif; }

/* Aurora gradient text */
.text-gradient-cyan {
  background: linear-gradient(135deg, #00f0ff, #3b82f6, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-rose {
  background: linear-gradient(135deg, #ff0055, #ff6b35, #ff0055);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-glow-cyan { text-shadow: 0 0 12px rgba(0,240,255,.35), 0 0 40px rgba(0,240,255,.1); }
.text-glow-rose { text-shadow: 0 0 12px rgba(255,0,85,.35), 0 0 40px rgba(255,0,85,.1); }
.text-glow-amber { text-shadow: 0 0 10px rgba(255,184,0,.3), 0 0 30px rgba(255,184,0,.08); }

/* ── Neon Icon Badge ── */
.icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  position: relative;
  flex-shrink: 0;
}
.icon-badge::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: .3;
}
.icon-badge-cyan {
  background: rgba(0,240,255,.08);
  border: 1px solid rgba(0,240,255,.15);
  color: var(--cyan);
  box-shadow: inset 0 0 12px rgba(0,240,255,.06), 0 0 8px rgba(0,240,255,.08);
}
.icon-badge-rose {
  background: rgba(255,0,85,.08);
  border: 1px solid rgba(255,0,85,.15);
  color: var(--rose);
  box-shadow: inset 0 0 12px rgba(255,0,85,.06), 0 0 8px rgba(255,0,85,.08);
}
.icon-badge-amber {
  background: rgba(255,184,0,.08);
  border: 1px solid rgba(255,184,0,.15);
  color: var(--amber);
  box-shadow: inset 0 0 12px rgba(255,184,0,.06), 0 0 8px rgba(255,184,0,.08);
}
.icon-badge-green {
  background: rgba(0,255,102,.08);
  border: 1px solid rgba(0,255,102,.15);
  color: var(--green);
  box-shadow: inset 0 0 12px rgba(0,255,102,.06), 0 0 8px rgba(0,255,102,.08);
}
.icon-badge-violet {
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.15);
  color: var(--violet);
  box-shadow: inset 0 0 12px rgba(124,58,237,.06), 0 0 8px rgba(124,58,237,.08);
}
.icon-badge-sm { width: 32px; height: 32px; border-radius: 8px; font-size: 12px; }

/* ── Cyber Glass Panel ── */
.glass-panel {
  background: rgba(24,24,32,.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(63,63,80,.35);
  border-radius: 12px;
  transition: all .25s;
}
.glass-panel:hover {
  border-color: rgba(0,240,255,.12);
  box-shadow: 0 0 24px rgba(0,240,255,.04), 0 8px 32px rgba(0,0,0,.2);
}

/* ── Cyber Cut Button ── */
.btn-cyber-cut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn-cyber-cut::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .2s;
}
.btn-cyber-cut:hover::before { opacity: 1; }
.btn-cyber-cut:active { transform: scale(.97); }

.btn-cyan {
  border: 1px solid rgba(0,240,255,.15);
  background: rgba(0,240,255,.05);
  color: var(--cyan);
}
.btn-cyan::before { background: linear-gradient(135deg, rgba(0,240,255,.12), rgba(0,240,255,.03)); }
.btn-cyan:hover { box-shadow: 0 0 20px rgba(0,240,255,.1); border-color: rgba(0,240,255,.25); }

.btn-rose {
  border: 1px solid rgba(255,0,85,.15);
  background: rgba(255,0,85,.05);
  color: #ff4477;
}
.btn-rose::before { background: linear-gradient(135deg, rgba(255,0,85,.12), rgba(255,0,85,.03)); }
.btn-rose:hover { box-shadow: 0 0 20px rgba(255,0,85,.1); border-color: rgba(255,0,85,.25); }

.btn-amber {
  border: 1px solid rgba(255,184,0,.15);
  background: rgba(255,184,0,.05);
  color: var(--amber);
}
.btn-amber::before { background: linear-gradient(135deg, rgba(255,184,0,.12), rgba(255,184,0,.03)); }
.btn-amber:hover { box-shadow: 0 0 20px rgba(255,184,0,.1); border-color: rgba(255,184,0,.25); }

.btn-violet {
  border: 1px solid rgba(124,58,237,.15);
  background: rgba(124,58,237,.05);
  color: #a78bfa;
}
.btn-violet::before { background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(124,58,237,.03)); }
.btn-violet:hover { box-shadow: 0 0 20px rgba(124,58,237,.1); border-color: rgba(124,58,237,.25); }

/* ── LED Dot ── */
.led { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.led-green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.led-red { background: var(--rose); box-shadow: 0 0 10px var(--rose); animation: led-pulse 1.2s infinite; }
.led-amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: led-pulse 1.8s infinite; }
.led-cyan { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.led-violet { background: var(--violet); box-shadow: 0 0 6px var(--violet); }
@keyframes led-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Status Badge ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 11px;
  font-weight: 700;
}
.badge-urgent { background: rgba(255,0,85,.1); border: 1px solid rgba(255,0,85,.2); color: #ff4477; }
.badge-waiting { background: rgba(255,184,0,.08); border: 1px solid rgba(255,184,0,.15); color: var(--amber); }
.badge-ok { background: rgba(0,255,102,.06); border: 1px solid rgba(0,255,102,.12); color: var(--green); }
.badge-dev { background: rgba(0,240,255,.06); border: 1px solid rgba(0,240,255,.12); color: var(--cyan); }
.badge-low { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.35); }

/* ── Emergency Banner ── */
.emergency-banner {
  background: linear-gradient(135deg, rgba(255,0,85,.08), rgba(255,0,85,.02));
  border: 1px solid rgba(255,0,85,.18);
  border-left: 4px solid var(--rose);
  border-radius: 10px;
  animation: emg-glow 2.5s infinite;
}
@keyframes emg-glow {
  0%,100% { box-shadow: 0 0 15px rgba(255,0,85,.06); }
  50% { box-shadow: 0 0 25px rgba(255,0,85,.12); }
}
.waiting-banner {
  background: rgba(255,184,0,.03);
  border: 1px solid rgba(255,184,0,.1);
  border-left: 4px solid var(--amber);
  border-radius: 10px;
}

/* ── KPI Metric Card ── */
.kpi-card {
  border-radius: 12px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all .25s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.kpi-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
}

/* ── Progress Bar ── */
.progress-bar {
  height: 5px;
  background: rgba(63,63,80,.3);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 8px rgba(0,240,255,.25);
  transition: width .8s ease-out;
}

/* ── Heatmap Dot ── */
.hm-dot {
  width: 44px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  border: 1px solid;
}
.hm-dot:hover { transform: scale(1.15); z-index: 10; }
.hm-green { background: rgba(0,255,102,.04); border-color: rgba(0,255,102,.1); color: rgba(0,255,102,.4); }
.hm-green:hover { background: rgba(0,255,102,.1); box-shadow: 0 0 14px rgba(0,255,102,.12); }
.hm-red { background: rgba(255,0,85,.06); border-color: rgba(255,0,85,.15); color: rgba(255,0,85,.5); animation: led-pulse 1.5s infinite; }
.hm-red:hover { background: rgba(255,0,85,.12); box-shadow: 0 0 14px rgba(255,0,85,.18); }
.hm-amber { background: rgba(255,184,0,.05); border-color: rgba(255,184,0,.12); color: rgba(255,184,0,.4); animation: led-pulse 2s infinite; }
.hm-amber:hover { background: rgba(255,184,0,.1); box-shadow: 0 0 14px rgba(255,184,0,.12); }
.hm-cyan { background: rgba(0,240,255,.04); border-color: rgba(0,240,255,.1); color: rgba(0,240,255,.4); }
.hm-cyan:hover { background: rgba(0,240,255,.1); box-shadow: 0 0 14px rgba(0,240,255,.12); }

/* Heatmap Tooltip */
.hm-tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8,8,16,.98);
  border: 1px solid rgba(0,240,255,.12);
  border-radius: 10px;
  padding: 14px 18px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all .15s;
  z-index: 100;
  pointer-events: none;
  min-width: 240px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6), 0 0 30px rgba(0,240,255,.04);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 13px;
}
.hm-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0,240,255,.12);
}
.hm-dot:hover .hm-tip { opacity: 1; visibility: visible; }

/* ── Site Card ── */
.site-card {
  border-radius: 12px;
  padding: 22px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.site-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.site-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}
.card-ok::before { background: linear-gradient(90deg, rgba(0,255,102,.5), rgba(0,255,102,.05)); }
.card-ok:hover { border-color: rgba(0,255,102,.12); }
.card-dev::before { background: linear-gradient(90deg, rgba(0,240,255,.5), rgba(0,240,255,.05)); }
.card-dev:hover { border-color: rgba(0,240,255,.12); }
.card-err::before { background: linear-gradient(90deg, rgba(255,0,85,.6), rgba(255,0,85,.05)); }
.card-err:hover { border-color: rgba(255,0,85,.15); }

/* ── Form Inputs ── */
.cyber-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(15,15,25,.6);
  border: 1px solid rgba(63,63,80,.35);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all .2s;
}
.cyber-input:focus {
  border-color: rgba(0,240,255,.25);
  box-shadow: 0 0 16px rgba(0,240,255,.06), inset 0 0 20px rgba(0,240,255,.02);
}
.cyber-input::placeholder { color: rgba(255,255,255,.2); }
.cyber-select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300f0ff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.cyber-textarea { height: 80px; padding: 12px 14px; resize: vertical; }
.cyber-input option { background: #0f0f1a; color: #fff; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(3,7,18,.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: rgba(12,12,22,.98);
  border: 1px solid rgba(0,240,255,.08);
  border-radius: 14px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 26px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.5), 0 0 60px rgba(0,240,255,.03);
}

/* ── Search Modal ── */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(3,7,18,.65);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-modal.open { display: flex; }
.search-box {
  width: min(580px, 92%);
  background: rgba(10,10,20,.98);
  border: 1px solid rgba(0,240,255,.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0,0,0,.5), 0 0 40px rgba(0,240,255,.03);
}
.search-box input {
  width: 100%;
  height: 54px;
  padding: 0 18px 0 50px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(63,63,80,.3);
  color: #fff;
  font-size: 16px;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  outline: none;
}

/* ── Filter Tabs ── */
.filter-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  border: 1px solid rgba(63,63,80,.2);
  background: transparent;
  color: rgba(255,255,255,.35);
  font-family: 'Zen Kaku Gothic New', sans-serif;
}
.filter-tab:hover { background: rgba(255,255,255,.04); color: rgba(255,255,255,.65); }
.filter-tab.active { background: rgba(0,240,255,.06); color: var(--cyan); border-color: rgba(0,240,255,.15); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(0,240,255,.08);
  border: 1px solid rgba(0,240,255,.15);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0,240,255,.08);
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s;
  z-index: 9999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: rgba(0,240,255,.12); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .card-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .card-grid-3 { grid-template-columns: 1fr !important; }
}

/* ── Toast Error ── */
.toast-error {
  background: rgba(255,0,85,.1);
  border-color: rgba(255,0,85,.2);
  color: #ff4477;
  box-shadow: 0 0 20px rgba(255,0,85,.08);
}

/* ── Debug pulse ── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ═══ Tab Bar ═══ */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(63,63,80,.25);
  background: rgba(8,8,16,.6);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.3);
}
.tab-btn:hover {
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6);
}
.tab-btn.tab-active {
  background: rgba(0,240,255,.06);
  color: var(--cyan);
  border-color: rgba(0,240,255,.12);
  box-shadow: 0 0 10px rgba(0,240,255,.05);
}
.tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1;
  color: rgba(255,255,255,.2);
  transition: all .15s;
}
.tab-close:hover {
  background: rgba(255,0,85,.15);
  color: #ff4477;
}

/* ═══ Section Highlight Animation ═══ */
.section-highlight {
  animation: sectionGlow 2.5s ease-out forwards;
}
@keyframes sectionGlow {
  0% {
    box-shadow: 0 0 0 2px rgba(0,240,255,.6), 0 0 30px rgba(0,240,255,.2);
  }
  60% {
    box-shadow: 0 0 0 2px rgba(0,240,255,.4), 0 0 20px rgba(0,240,255,.1);
  }
  100% {
    box-shadow: none;
  }
}

/* ── Action buttons (used in site_detail) ── */
.act-btn { display:inline-flex;align-items:center;gap:3px;padding:2px 6px;border-radius:4px;font-size:10px;font-family:'JetBrains Mono',monospace;cursor:pointer;transition:all .2s;border:1px solid transparent;background:transparent; }
.act-btn:hover { background:rgba(255,255,255,.05); }
.act-edit { color:rgba(0,240,255,.5); } .act-edit:hover { color:#00f0ff;border-color:rgba(0,240,255,.2); }
.act-del { color:rgba(255,0,85,.4); } .act-del:hover { color:#ff0055;border-color:rgba(255,0,85,.2); }
.act-rose { color:rgba(255,0,85,.6);border:1px solid rgba(255,0,85,.15); } .act-rose:hover { color:#ff0055;background:rgba(255,0,85,.08); }
.act-amber { color:rgba(255,184,0,.6);border:1px solid rgba(255,184,0,.15); } .act-amber:hover { color:#ffb800;background:rgba(255,184,0,.08); }
