/* ==========================================================================
   Skynet Research — minimal dark interface
   ========================================================================== */

:root {
  --bg: #050505;
  --bg-soft: #0a0c0b;
  --surface: #101310;
  --surface-2: #151815;
  --border: #1f231f;
  --border-strong: #2a302a;

  --text: #e8ebe8;
  --text-muted: #8f9690;
  --text-faint: #5b625c;

  --accent: #00e07f;
  --accent-hover: #33e69a;
  --accent-ink: #04120b;
  --accent-dim: rgba(0, 224, 127, 0.10);
  --accent-glow: rgba(0, 224, 127, 0.22);

  --danger: #ff5d5d;
  --danger-dim: rgba(255, 93, 93, 0.10);

  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;

  --container: 1080px;
  --radius: 4px;
  --ring: 0 0 0 3px var(--accent-glow);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(0, 224, 127, 0.06), transparent 60%),
    radial-gradient(1400px 900px at 50% 110%, rgba(0, 224, 127, 0.03), transparent 60%);
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--text);
}

.brand-name em {
  font-style: normal;
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.header-link:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.05s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0 96px;
}

.hero--center {
  align-items: center;
  text-align: center;
}

.hero--center .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: 310px;
  height: auto;
  max-width: 100%;
  margin-bottom: 44px;
}

.hero-title {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 760px;
}

.hero-copy {
  max-width: 620px;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-copy--sub {
  margin-top: 14px;
  color: var(--text-faint);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer .legal {
  font-size: 13px;
  color: var(--text-faint);
}

.site-footer .bin {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Auth layout
   -------------------------------------------------------------------------- */

.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.auth-heading h1 {
  font-size: 26px;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: -0.01em;
}

.auth-heading p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.field input {
  height: 46px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: var(--text-faint);
}

.field input:hover {
  border-color: #343b34;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.alert {
  display: none;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: var(--danger-dim);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.alert.visible {
  display: block;
}

.auth-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
}

.auth-footer a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-main {
  flex: 1;
  padding: 64px 0 96px;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-dim);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.dashboard-main h1 {
  margin-top: 22px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dashboard-main .welcome {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 17px;
}

.dashboard-main .welcome strong {
  color: var(--text);
  font-weight: 600;
}

.panel {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.panel-body {
  padding: 56px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: var(--text-faint);
}

.panel-body .glyph {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--border-strong);
}

.panel-body p {
  font-size: 14px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.user-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .site-header .container {
    height: 58px;
  }

  .hero {
    padding: 48px 0 72px;
  }

  .hero-copy {
    font-size: 16px;
  }

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

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

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-main {
    padding: 40px 0 64px;
  }
}
