:root {
  color-scheme: dark;
  --bg-0: #040a1f;
  --bg-1: #081434;
  --bg-2: #0e1d49;
  --panel: rgba(9, 18, 45, 0.82);
  --panel-strong: rgba(8, 16, 39, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f0f6ff;
  --text-soft: #cfddff;
  --text-muted: #8da0cc;
  --accent: #3e74ff;
  --accent-strong: #8f5cff;
  --accent-warm: #ff5d8f;
  --success: #79f0c9;
  --danger: #ff7ca3;
  --warning: #ffd77d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

html {
  background: var(--bg-0);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 14%, rgba(62, 116, 255, 0.3), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(143, 92, 255, 0.24), transparent 28%),
    radial-gradient(circle at 84% 88%, rgba(255, 93, 143, 0.18), transparent 22%),
    linear-gradient(180deg, #030818 0%, #061129 42%, #040a1f 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 26%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.02), transparent 18%);
}

body::after {
  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: 64px 64px;
  opacity: 0.17;
  mix-blend-mode: soft-light;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

code,
pre {
  font-family: "SFMono-Regular", ui-monospace, monospace;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Unbounded", "Manrope", sans-serif;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.shell-auth {
  grid-template-columns: 1fr;
}

.mobile-bar,
.mobile-overlay {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(7, 14, 35, 0.95) 0%, rgba(4, 10, 26, 0.92) 100%);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff7ff;
  font-size: 1.4rem;
  font-weight: 800;
  background:
    linear-gradient(135deg, rgba(47, 152, 255, 0.95), rgba(89, 96, 255, 0.96) 50%, rgba(173, 86, 255, 0.94));
  box-shadow: 0 18px 44px rgba(84, 108, 255, 0.32);
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 14px;
  font-size: 1rem;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(189, 210, 255, 0.72);
}

.sidebar-copy {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.nav {
  display: grid;
  gap: 9px;
}

.nav a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background: transparent;
  border: 1px solid transparent;
  transition: 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(62, 116, 255, 0.24), rgba(143, 92, 255, 0.18));
  transform: translateY(-1px);
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  border: 1px solid rgba(135, 170, 255, 0.26);
  background: rgba(31, 52, 102, 0.42);
  color: #d9e7ff;
}

.nav-label {
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 14px;
}

.user-chip {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.user-chip span {
  font-weight: 700;
}

.user-chip small {
  color: var(--text-muted);
}

.content {
  padding: clamp(22px, 3.2vw, 40px);
  display: grid;
  align-content: start;
  gap: 22px;
}

.auth-content {
  min-height: 100vh;
  place-items: center;
}

.flash {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  font-weight: 700;
  backdrop-filter: blur(18px);
}

.flash-ok {
  background: rgba(40, 201, 149, 0.14);
  color: #c9ffe7;
}

.flash-error {
  background: rgba(255, 93, 129, 0.12);
  color: #ffd3dd;
}

.panel,
.project-card,
.stat-card,
.empty-state,
.auth-showcase,
.auth-card,
.callout,
.op-card,
.domain-list li {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(12, 24, 58, 0.9) 0%, rgba(9, 18, 45, 0.84) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.hero p {
  max-width: 820px;
  line-height: 1.65;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-grid,
.cards-grid,
.detail-grid,
.preview-grid,
.grid-two {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 24px;
}

.stat-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.stat-card strong {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: #cfe0ff;
}

.toolbar {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 18px;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
  padding: 22px;
  display: grid;
  gap: 16px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 158, 255, 0.34);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.45);
}

.project-head,
.op-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-head small,
.op-card small {
  color: var(--text-muted);
}

.project-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-meta dt {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-meta dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-ready,
.badge-success {
  background: rgba(110, 247, 195, 0.16);
  color: var(--success);
}

.badge-provisioning,
.badge-pending,
.badge-reconciling {
  background: rgba(62, 116, 255, 0.22);
  color: #cfddff;
}

.badge-error {
  background: rgba(255, 93, 129, 0.14);
  color: #ffd2db;
}

.badge-waiting_dns,
.badge-blocked,
.badge-archived {
  background: rgba(255, 211, 107, 0.14);
  color: #ffeab6;
}

.panel {
  padding: 24px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-list,
.domain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.domain-list li,
.op-card,
.callout {
  padding: 16px 18px;
}

.domain-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.domain-list small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
}

.inline-form {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.top-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
}

.top-strip h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
}

.top-strip-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.threat-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 20px;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

.threat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(57, 101, 255, 0.14), transparent 50%);
  pointer-events: none;
}

.threat-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.threat-hero-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.9rem);
}

.threat-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.threat-mini-grid article {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(142, 174, 255, 0.24);
  background: rgba(18, 31, 72, 0.52);
}

.threat-mini-grid small {
  color: var(--text-muted);
}

.threat-mini-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.24rem;
  color: #d9e7ff;
}

.threat-cta {
  width: fit-content;
}

.threat-hero-media {
  position: relative;
  z-index: 1;
}

.threat-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(141, 172, 255, 0.22);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.46);
  filter: saturate(1.03) contrast(1.04);
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.th-table {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(127, 162, 255, 0.2);
}

.th-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(10, 20, 49, 0.5);
}

.th-row:last-child {
  border-bottom: 0;
}

.th-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.th-head {
  background: rgba(31, 52, 102, 0.52);
  color: #d9e8ff;
  font-weight: 700;
}

.landscape-panel {
  overflow: hidden;
}

.landscape-wrap {
  position: relative;
  margin-top: 12px;
}

.landscape-wrap img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(129, 163, 255, 0.24);
  filter: saturate(1.03) contrast(1.03);
}

.landscape-overlay {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
  width: min(260px, calc(100% - 28px));
}

.landscape-overlay article {
  border-radius: 12px;
  border: 1px solid rgba(145, 178, 255, 0.26);
  background: rgba(8, 15, 39, 0.78);
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}

.landscape-overlay small {
  color: var(--text-muted);
}

.landscape-overlay strong {
  display: block;
  margin-top: 6px;
  color: #e4eeff;
}

.preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

pre {
  margin: 0;
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(6, 2, 11, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fbefff;
  font-size: 0.88rem;
  line-height: 1.6;
}

.callout strong {
  display: block;
  margin-bottom: 10px;
}

.callout p + p {
  margin-top: 10px;
}

.empty-state {
  padding: 30px;
  text-align: center;
}

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

.wide-form {
  max-width: 1080px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(5, 2, 10, 0.76);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(198, 176, 221, 0.52);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 73, 198, 0.44);
  box-shadow: 0 0 0 4px rgba(177, 77, 255, 0.18);
  background: rgba(8, 3, 14, 0.88);
}

textarea {
  resize: vertical;
  min-height: 112px;
}

button {
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.primary-button {
  color: #fff7ff;
  background:
    linear-gradient(135deg, rgba(177, 77, 255, 1), rgba(255, 73, 198, 0.96) 52%, rgba(255, 140, 106, 0.96));
  box-shadow: 0 16px 40px rgba(177, 77, 255, 0.28);
}

.primary-button-wide {
  width: 100%;
}

.secondary-button {
  color: #f7ecff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.ghost-button {
  color: var(--text-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.ghost-button.danger {
  color: #ffd3db;
  border-color: rgba(255, 93, 129, 0.22);
  background: rgba(255, 93, 129, 0.08);
}

.error-copy {
  color: #ffc7d2;
  line-height: 1.6;
}

.muted-copy {
  color: var(--text-muted);
  line-height: 1.65;
}

.auth-layout {
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.auth-showcase,
.auth-card {
  padding: clamp(26px, 3vw, 38px);
}

.auth-showcase {
  position: relative;
  display: grid;
  align-content: start;
  gap: 22px;
  min-height: 620px;
  overflow: hidden;
}

.auth-showcase::before {
  content: "";
  position: absolute;
  inset: auto -10% -22% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 73, 198, 0.34), transparent 68%);
  filter: blur(12px);
}

.auth-showcase::after {
  content: "";
  position: absolute;
  inset: -18% auto auto -12%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(177, 77, 255, 0.3), transparent 68%);
  filter: blur(12px);
}

.auth-showcase > * {
  position: relative;
  z-index: 1;
}

.auth-showcase h1 {
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 0.96;
  max-width: 12ch;
}

.auth-lead {
  max-width: 60ch;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 1.02rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f4e6ff;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: auto;
}

.auth-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-shot {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(140, 172, 255, 0.24);
  background: rgba(8, 14, 35, 0.75);
  min-height: 142px;
}

.auth-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04) contrast(1.03);
}

.feature-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.feature-card strong {
  display: block;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.65;
}

.auth-panel {
  display: grid;
  align-items: center;
}

.auth-card {
  display: grid;
  gap: 22px;
}

.auth-intro p {
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.7;
}

.auth-note {
  padding-top: 6px;
}

.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.mobile-brand-copy {
  display: grid;
}

.mobile-brand-copy strong {
  font-size: 0.96rem;
}

.mobile-brand-copy small {
  color: var(--text-muted);
}

.menu-toggle {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .detail-grid,
  .preview-grid,
  .grid-two,
  .intel-grid,
  .threat-hero {
    grid-template-columns: 1fr;
  }

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

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px 0;
    backdrop-filter: blur(18px);
  }

  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.52);
  }

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(88vw, 360px);
    height: 100vh;
    transform: translateX(-110%);
    transition: transform 180ms ease;
    border-right: 1px solid var(--line);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .content {
    padding-top: 10px;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 18px;
    gap: 18px;
  }

  .hero,
  .hero-actions,
  .project-head,
  .op-head,
  .domain-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid,
  .project-meta,
  .threat-mini-grid,
  .th-row {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .auth-showcase,
  .auth-card,
  .panel,
  .project-card,
  .stat-card,
  .empty-state {
    padding: 20px;
  }

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

  .soft-pill,
  .badge {
    width: fit-content;
  }

  .auth-shot-grid {
    grid-template-columns: 1fr;
  }

  .landscape-overlay {
    position: static;
    margin-top: 10px;
    width: 100%;
  }
}
