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

:root {
  --bg: #08090c;
  --panel: rgba(16, 18, 24, 0.85);
  --panel-strong: rgba(20, 22, 30, 0.98);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.55);
  --accent: #ff3b30;
  --accent-2: #ff6a00;
  --accent-glow: rgba(255, 59, 48, 0.4);
  --carbon: linear-gradient(135deg, #0c0d11, #151823 40%, #0c0d11 80%);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

h1,
h2,
h3,
h4 {
  font-family: 'Orbitron', sans-serif;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 30;
  box-shadow: 0 0 12px var(--accent-glow);
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.cursor-active {
  transform: translate(-50%, -50%) scale(0.85);
  border-color: rgba(255, 255, 255, 0.8);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.3;
  z-index: -3;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.6;
  z-index: -2;
  animation: orbFloat 18s ease-in-out infinite;
}

.orb-a {
  background: rgba(255, 106, 0, 0.28);
  top: -120px;
  right: -80px;
}

.orb-b {
  background: rgba(255, 59, 48, 0.28);
  bottom: -120px;
  left: -80px;
  animation-delay: 4s;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 9, 12, 0.7);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.3s ease;
}

.topbar.scrolled {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand.compact {
  margin-bottom: 24px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 25px var(--accent-glow);
}

.brand-title {
  font-weight: 600;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 10px;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.app {
  padding: 48px 56px 80px;
}

.page {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 3vw + 1.6rem, 3.6rem);
  line-height: 1.1;
}

.hero-copy h1 .accent {
  color: var(--accent);
}

.hero-copy .muted {
  font-size: 1.05rem;
  line-height: 1.7;
}

.pill {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 59, 48, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 16px;
  letter-spacing: 0.08em;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.hero-metrics {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.hero-metrics h3 {
  font-size: 1.4rem;
}

.hero-card {
  background: var(--panel);
  border-radius: 26px;
  padding: 28px;
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.status {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 106, 0, 0.18);
  color: var(--accent-2);
  font-size: 0.8rem;
}

.hero-card-grid {
  display: grid;
  gap: 16px;
}

.metric-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--carbon);
  border: 1px solid var(--stroke);
}

.label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 36px;
}

.feature-card {
  background: var(--panel);
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
}

.testimonial {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 24px;
}

.testimonial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.testimonial-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 16px;
  overflow: hidden;
}

.testimonial-card {
  background: var(--carbon);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--stroke);
  min-height: 130px;
  display: grid;
  gap: 12px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0c10;
  font-weight: 600;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--stroke);
}

.btn.danger {
  background: var(--accent);
  color: #fff;
}

.btn:active {
  transform: scale(0.98);
}

.magnetic {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link {
  background: transparent;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
}

.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  padding: 32px;
}

.form {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.form input,
.form textarea,
.form select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.2);
  outline: none;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.sidebar {
  background: var(--panel);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  height: fit-content;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
}

.nav-button.active,
.nav-button:hover {
  color: var(--text);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-card {
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 106, 0, 0.18);
  color: var(--accent-2);
  font-size: 0.8rem;
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 24px;
}

.stat-card {
  background: var(--panel);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--stroke);
}

.chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255, 106, 0, 0.16);
  color: var(--accent-2);
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
}

.sos-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.sos-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
}

.sos-card ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.map {
  width: 100%;
  height: 240px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  margin-top: 12px;
}

.table {
  display: grid;
  gap: 12px;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.2fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
}

.table-row.header {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  background: transparent;
}

.issue-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.tracker-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.tracker-input {
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1rem;
}

.admin-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.list.compact .list-item {
  padding: 10px 12px;
  border-radius: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 12, 0.7);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 40;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--panel-strong);
  border-radius: 22px;
  border: 1px solid var(--stroke);
  padding: 26px;
  width: min(520px, 92vw);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.icon-button {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
}

.site-footer {
  padding: 36px 56px 50px;
  text-align: center;
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: min(360px, 70vw);
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(30px);
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    gap: 16px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 20px 24px;
    align-items: flex-start;
  }

  .app {
    padding: 32px 24px 64px;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-actions {
    width: 100%;
    flex-direction: column;
  }

  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-panel {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--stroke);
  }

  .nav-panel.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .table-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .auth-card {
    padding: 26px;
  }

  .dashboard-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .tracker-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tracker-actions .btn {
    width: 100%;
  }
}

@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
