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

body {
  font-family: 'Syne', sans-serif;
  background: #0a0c0f;
  color: #e8edf5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── LOGIN ── */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,229,160,0.07) 0%, transparent 60%);
}
.login-logo { font-size: 2.5rem; font-weight: 800; color: #00e5a0; letter-spacing: -1px; margin-bottom: 0.25rem; }
.login-logo span { color: #e8edf5; }
.login-sub { color: #6b7585; font-size: 0.85rem; margin-bottom: 1.5rem; }
.login-box {
  width: min(420px, 100%);
  background: #111417;
  border: 1px solid #252a33;
  border-radius: 16px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.login-error {
  background: rgba(255,59,92,0.1);
  border: 1px solid rgba(255,59,92,0.3);
  color: #ff3b5c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}
.field label {
  display: block;
  font-size: 0.7rem;
  color: #6b7585;
  margin-bottom: 0.4rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.field input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #0a0c0f;
  border: 1px solid #252a33;
  border-radius: 8px;
  color: #e8edf5;
  font-family: 'Space Mono', monospace;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus { border-color: #00e5a0; }
.btn-primary {
  width: 100%;
  background: #00e5a0;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.login-note { text-align: center; font-size: 0.72rem; color: #6b7585; }

/* ── TOP NAV ── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,12,15,0.95);
  border-bottom: 1px solid #252a33;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1.25rem; gap: 1rem;
}
.nav-logo { font-size: 1.3rem; font-weight: 800; color: #00e5a0; white-space: nowrap; }
.nav-logo span { color: #e8edf5; }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; }
.badge { background: #00e5a0; color: #000; font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 20px; font-family: 'Space Mono', monospace; white-space: nowrap; }
.icon-btn {
  background: #111417; border: 1px solid #252a33; border-radius: 8px;
  padding: 0.5rem 0.75rem; color: #e8edf5; cursor: pointer;
  font-family: 'Syne', sans-serif; font-size: 0.8rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem;
}
.icon-btn:hover { border-color: #00e5a0; }
.desktop-nav { display: none; align-items: center; gap: 0.25rem; }
.dnav-item { padding: 0.5rem 0.875rem; border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600; color: #6b7585; }
.dnav-item.active { color: #00e5a0; background: rgba(0,229,160,0.1); }
.dnav-item:hover { color: #e8edf5; }

/* ── PAGES ── */
.page { display: none; padding: 1rem 1rem 5.5rem; max-width: 900px; margin: 0 auto; }
.page.active { display: block; }
.page-header { margin-bottom: 1rem; margin-top: 0.5rem; }
h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.2rem; }
.muted { color: #6b7585; font-size: 0.8rem; }

/* ── SCAN BANNER ── */
.scan-banner {
  background: linear-gradient(135deg, rgba(0,229,160,0.08), rgba(0,153,255,0.08));
  border: 1px solid rgba(0,229,160,0.2);
  border-radius: 12px; padding: 1rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.875rem;
}
.scan-pulse { width: 12px; height: 12px; border-radius: 50%; background: #00e5a0; flex-shrink: 0; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(0,229,160,0.4); }
  50% { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(0,229,160,0); }
}
.scan-text { font-size: 0.8rem; }
.scan-text strong { color: #00e5a0; }

/* ── STATS ── */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.stat-card { background: #13171e; border: 1px solid #252a33; border-radius: 12px; padding: 1rem 0.75rem; }
.stat-card.ac { border-color: #00e5a0; }
.stat-card.wn { border-color: #ff6b35; }
.stat-val { font-size: 1.5rem; font-weight: 800; font-family: 'Space Mono', monospace; }
.stat-val.g { color: #00e5a0; }
.stat-val.o { color: #ff6b35; }
.stat-val.b { color: #0099ff; }
.stat-lbl { font-size: 0.65rem; color: #6b7585; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.25rem; }

/* ── SECTION HEAD ── */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; margin-top: 0.5rem; }
.section-title { font-size: 0.7rem; font-weight: 700; color: #6b7585; text-transform: uppercase; letter-spacing: 2px; }
.link-more { font-size: 0.75rem; color: #00e5a0; cursor: pointer; }

/* ── JOB CARDS ── */
.job-card {
  background: #13171e; border: 1px solid #252a33;
  border-radius: 12px; padding: 1rem; margin-bottom: 0.75rem;
  position: relative; overflow: hidden; cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
}
.job-card:active { transform: scale(0.99); }
.job-card:hover { border-color: #2d3545; }
.job-card.heli { border-left: 3px solid #00e5a0; }
.job-card.ghost { border-left: 3px solid #ff3b5c; }
.job-card.nw::after {
  content: 'NEW'; position: absolute; top: 0.75rem; right: 0.75rem;
  background: #00e5a0; color: #000; font-size: 0.55rem; font-weight: 700;
  letter-spacing: 1px; padding: 0.15rem 0.4rem; border-radius: 4px;
  font-family: 'Space Mono', monospace;
}
.job-card.ghost::after {
  content: 'FANTOME?'; position: absolute; top: 0.75rem; right: 0.75rem;
  background: rgba(255,59,92,0.15); color: #ff3b5c;
  border: 1px solid #ff3b5c; font-size: 0.55rem; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 4px; font-family: 'Space Mono', monospace;
}
.job-co { font-size: 0.7rem; color: #6b7585; margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }
.job-ti { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.3; }
.job-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.tag { font-size: 0.65rem; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 600; background: #181c22; color: #6b7585; font-family: 'Space Mono', monospace; }
.tag.ti { background: rgba(0,229,160,0.1); color: #00e5a0; }
.tag.tw { background: rgba(0,153,255,0.1); color: #0099ff; }
.tag.th { background: rgba(255,107,53,0.1); color: #ff6b35; }
.tag.td { background: rgba(180,100,255,0.1); color: #c47fff; }
.tag.tl { background: rgba(0,119,181,0.1); color: #4da8d8; }
.job-meta { display: flex; justify-content: space-between; align-items: flex-end; font-size: 0.7rem; color: #6b7585; }
.job-date { font-family: 'Space Mono', monospace; }
.rel { display: flex; align-items: center; gap: 0.25rem; }
.rel-bar { width: 40px; height: 4px; background: #252a33; border-radius: 2px; }
.rel-fill { height: 100%; border-radius: 2px; background: #00e5a0; }

/* ── SEARCH & FILTER ── */
.search-box { position: relative; margin-bottom: 1rem; }
.search-box input {
  width: 100%; padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: #111417; border: 1px solid #252a33;
  border-radius: 10px; color: #e8edf5;
  font-family: 'Syne', sans-serif; font-size: 0.9rem; outline: none;
}
.search-box input:focus { border-color: #00e5a0; }
.search-ico { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #6b7585; }
.filter-bar { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 1rem; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip { flex-shrink: 0; padding: 0.4rem 0.75rem; border-radius: 20px; border: 1px solid #252a33; background: #111417; color: #6b7585; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
.filter-chip.active { background: #00e5a0; color: #000; border-color: #00e5a0; }

/* ── GHOST PANEL ── */
.ghost-panel { background: rgba(255,59,92,0.05); border: 1px solid rgba(255,59,92,0.3); border-radius: 12px; padding: 1rem; margin-bottom: 1.25rem; }
.ghost-panel h3 { font-size: 0.9rem; color: #ff3b5c; margin-bottom: 0.5rem; }
.ghost-panel p { font-size: 0.8rem; color: #6b7585; line-height: 1.6; }
.gi-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; }
.gi { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; }
.gd { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gd.r { background: #ff3b5c; }
.gd.o { background: #ff6b35; }
.gd.g { background: #00e5a0; }

/* ── CATEGORY BANNER ── */
.cat-banner { background: linear-gradient(135deg, rgba(0,229,160,0.06), rgba(0,153,255,0.04)); border: 1px solid rgba(0,229,160,0.15); border-radius: 12px; padding: 0.875rem 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.cat-ico { font-size: 1.5rem; }
.cat-lbl { font-size: 0.7rem; color: #6b7585; text-transform: uppercase; letter-spacing: 1px; }
.cat-name { font-size: 1rem; font-weight: 700; color: #00e5a0; }

/* ── SITE ROWS ── */
.site-row { background: #13171e; border: 1px solid #252a33; border-radius: 10px; padding: 0.875rem 1rem; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.si { font-size: 1.2rem; width: 32px; text-align: center; flex-shrink: 0; }
.si-info { flex: 1; min-width: 0; }
.si-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-url { font-size: 0.65rem; color: #6b7585; font-family: 'Space Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-on { width: 8px; height: 8px; border-radius: 50%; background: #00e5a0; box-shadow: 0 0 6px #00e5a0; flex-shrink: 0; }

/* ── SETTINGS ── */
.settings-section { margin-bottom: 1.75rem; }
.settings-section h3 { font-size: 0.7rem; color: #6b7585; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.75rem; }
.setting-row { background: #13171e; border: 1px solid #252a33; border-radius: 10px; padding: 0.875rem 1rem; display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; gap: 1rem; }
.s-label { font-size: 0.875rem; font-weight: 600; }
.s-desc { font-size: 0.7rem; color: #6b7585; margin-top: 0.15rem; }
.toggle { width: 44px; height: 24px; background: #252a33; border-radius: 12px; position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.toggle.on { background: #00e5a0; }
.toggle::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.2s; }
.toggle.on::after { transform: translateX(20px); }
.input-field { width: 100%; padding: 0.75rem 1rem; background: #0a0c0f; border: 1px solid #252a33; border-radius: 8px; color: #e8edf5; font-family: 'Syne', sans-serif; font-size: 0.875rem; outline: none; margin-bottom: 0.5rem; }
.input-field:focus { border-color: #00e5a0; }
.sel { background: #0a0c0f; border: 1px solid #252a33; color: #e8edf5; padding: 0.4rem 0.5rem; border-radius: 6px; font-size: 0.8rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.pill { padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.7rem; font-weight: 600; border: 1px solid #252a33; color: #6b7585; cursor: pointer; display: flex; align-items: center; gap: 0.3rem; }
.pill.on { border-color: #00e5a0; color: #00e5a0; background: rgba(0,229,160,0.08); }

/* ── REPORTS ── */
.report-card { background: #13171e; border: 1px solid #252a33; border-radius: 12px; padding: 1.25rem; margin-bottom: 0.75rem; }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.report-date { font-size: 0.7rem; color: #6b7585; font-family: 'Space Mono', monospace; }
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.75rem; text-align: center; }
.rs-val { font-size: 1.2rem; font-weight: 800; font-family: 'Space Mono', monospace; color: #00e5a0; }
.rs-lbl { font-size: 0.6rem; color: #6b7585; text-transform: uppercase; }
.btn-sm { padding: 0.4rem 0.875rem; border-radius: 6px; font-size: 0.75rem; font-weight: 700; cursor: pointer; border: none; font-family: 'Syne', sans-serif; }
.btn-sm.out { background: transparent; border: 1px solid #252a33; color: #e8edf5; }
.btn-sm.ac { background: #00e5a0; color: #000; }
.btn-danger { background: #ff3b5c; color: #fff; border: none; }
.divider { border: none; border-top: 1px solid #252a33; margin: 1rem 0; }

/* ── BOTTOM NAV ── */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: rgba(10,12,15,0.97); border-top: 1px solid #252a33; display: flex; padding: 0.5rem 0; }
.bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0.5rem 0.25rem; gap: 0.25rem; cursor: pointer; color: #6b7585; font-size: 0.6rem; letter-spacing: 0.5px; text-transform: uppercase; font-weight: 700; position: relative; }
.bnav-item.active { color: #00e5a0; }
.bnav-item .ico { font-size: 1.3rem; }
.bnav-item .dot { position: absolute; top: 0.3rem; right: calc(50% - 1rem); width: 6px; height: 6px; border-radius: 50%; background: #ff3b5c; }
.fab { position: fixed; bottom: 4.5rem; right: 1rem; z-index: 99; width: 52px; height: 52px; border-radius: 50%; background: #00e5a0; color: #000; border: none; font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(0,229,160,0.3); }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; display: none; align-items: flex-end; }
.modal-overlay.open { display: flex; }
.modal { background: #111417; border-top: 1px solid #252a33; border-radius: 20px 20px 0 0; padding: 1.5rem 1.25rem 2rem; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; }
.modal h2 { margin-bottom: 1rem; }
.modal-close { position: absolute; top: 1rem; right: 1.25rem; background: none; border: none; color: #6b7585; font-size: 1.5rem; cursor: pointer; }

/* ── RESPONSIVE ── */
@media (min-width: 640px) {
  .modal-overlay { align-items: center; justify-content: center; }
  .modal { border-radius: 16px; max-width: 560px; padding: 2rem; }
  .stats-row { grid-template-columns: repeat(4, 1fr); }
  .bottom-nav { display: none; }
  .desktop-nav { display: flex; }
  .page { padding-bottom: 2rem; }
}
