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

:root {
  --bg: #090b0f;
  --bg-soft: #11151c;
  --card: rgba(16, 21, 29, 0.88);
  --card-2: rgba(20, 28, 38, 0.92);
  --text: #edf4ff;
  --muted: #94a8bf;
  --line: rgba(120, 152, 188, 0.2);
  --accent: #00d2a8;
  --accent-2: #3bc7ff;
  --danger: #ff5c7c;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(59, 199, 255, 0.14), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(0, 210, 168, 0.14), transparent 24%),
    linear-gradient(180deg, #05070a 0%, #0a0e13 100%);
  color: var(--text);
}
a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, button, select {
  font: inherit;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 17, 0.85);
  color: var(--text);
}
label { display: grid; gap: 8px; color: var(--muted); }
textarea { resize: vertical; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(59, 199, 255, 0.28);
  background: rgba(13, 20, 28, 0.96);
  color: var(--text);
  cursor: pointer;
}
.button.glow {
  background: linear-gradient(135deg, rgba(0, 210, 168, 0.28), rgba(59, 199, 255, 0.26));
  box-shadow: 0 0 0 1px rgba(59, 199, 255, 0.15), 0 18px 36px rgba(0, 210, 168, 0.18);
}
.button:hover {
  transform: translateY(-1px);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}
.button.ghost {
  border-color: var(--line);
}
.button.small {
  padding: 8px 10px;
  font-size: 14px;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card, .panel, .stat-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.auth-card {
  width: min(520px, 100%);
  padding: 32px;
  border-radius: 28px;
}
.brand-mark {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 210, 168, 0.22), rgba(59, 199, 255, 0.18));
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.brand-mark.large { margin-bottom: 28px; }
.auth-copy, .panel-head p, .hero p, small, .eyebrow { color: var(--muted); }
.stack { display: grid; gap: 16px; }
.mono {
  font-family: "Consolas", "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
}
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 199, 255, 0.18);
  background: rgba(59, 199, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.flash {
  margin: 18px 0;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(59, 199, 255, 0.28);
  background: rgba(24, 37, 49, 0.72);
}
.flash.wide { margin-bottom: 24px; }
.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}
.background-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  pointer-events: none;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.82);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sidebar-copy {
  color: var(--muted);
  line-height: 1.5;
}
.sidebar-meta {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.nav {
  display: grid;
  gap: 10px;
}
.nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.nav a.active {
  background: linear-gradient(135deg, rgba(59, 199, 255, 0.2), rgba(0, 210, 168, 0.18));
  box-shadow: inset 0 0 0 1px rgba(59, 199, 255, 0.18);
}
.content {
  padding: 28px;
  display: grid;
  gap: 24px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(59, 199, 255, 0.15), rgba(0, 210, 168, 0.12)),
    rgba(10, 14, 20, 0.82);
  border: 1px solid rgba(59, 199, 255, 0.18);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 199, 255, 0.22), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}
.hero h1 { margin: 6px 0 8px; font-size: clamp(32px, 5vw, 56px); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; }
.hero-stack {
  display: grid;
  gap: 14px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-note {
  min-width: 280px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.hero-note span, .hero-note small { display: block; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  padding: 18px;
  border-radius: 22px;
  display: grid;
  gap: 12px;
}
.stat-card span { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; }
.stat-card strong { font-size: 28px; }
.panel {
  border-radius: 28px;
  padding: 24px;
  display: grid;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(0, 210, 168, 0.07), transparent 72%);
  pointer-events: none;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.span-2 { grid-column: span 2; }
.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.toggle input { width: auto; }
.toggle.small { font-size: 14px; }
.actions { display: flex; gap: 12px; }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 10, 15, 0.6);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
thead th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.mini-form {
  display: grid;
  gap: 10px;
  min-width: 220px;
}
.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  text-transform: uppercase;
  font-size: 12px;
}
.badge.paid { background: rgba(0, 210, 168, 0.14); }
.badge.trial { background: rgba(59, 199, 255, 0.14); }
.badge.expired, .badge.blocked { background: rgba(255, 92, 124, 0.14); }
.dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.asset-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.asset-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
}
.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.signal-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(59, 199, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(20, 26, 35, 0.95), rgba(11, 15, 21, 0.92));
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.signal-card span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.signal-card strong {
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}
.info-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.info-item {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(59, 199, 255, 0.12);
  background: linear-gradient(180deg, rgba(17, 23, 31, 0.95), rgba(10, 14, 20, 0.92));
}
.info-item strong {
  font-size: 16px;
  line-height: 1.4;
}
.table-search {
  max-width: 420px;
  background: rgba(7, 11, 17, 0.9);
}
.nav a:hover {
  background: linear-gradient(135deg, rgba(59, 199, 255, 0.16), rgba(0, 210, 168, 0.14));
}
.asset-card:hover,
.stat-card:hover,
.signal-card:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease, border-color 160ms ease;
  border-color: rgba(59, 199, 255, 0.24);
}
.table-wrap tr:hover td {
  background: rgba(59, 199, 255, 0.04);
}
.system-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 1180px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stats-grid, .signal-grid, .info-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dual-grid, .grid-form { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}
@media (max-width: 720px) {
  .content { padding: 18px; }
  .hero { padding: 22px; flex-direction: column; align-items: start; }
  .stats-grid, .signal-grid, .info-list { grid-template-columns: 1fr; }
}
