:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: rgba(19, 23, 32, 0.86);
  --panel-strong: #151a24;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f8fafc;
  --muted: #9ca3af;
  --orange: #f97316;
  --orange-soft: rgba(249, 115, 22, 0.16);
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(249, 115, 22, 0.13), transparent 28rem),
    radial-gradient(circle at 94% 100%, rgba(249, 115, 22, 0.08), transparent 32rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.26;
  pointer-events: none;
}

.ambient-one {
  top: -12rem;
  right: -8rem;
  width: 26rem;
  height: 26rem;
  background: #f97316;
}

.ambient-two {
  bottom: -16rem;
  left: -10rem;
  width: 30rem;
  height: 30rem;
  background: #7c2d12;
}

#app {
  min-height: 100vh;
}

.boot-card,
.auth-card {
  width: min(92vw, 520px);
  margin: 0 auto;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 18, 25, 0.88);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(22px);
}

.boot-card {
  position: absolute;
  top: 50%;
  left: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.brand-mark {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 17px;
  color: #111827;
  background: linear-gradient(145deg, #fb923c, #f97316);
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.28);
  font-size: 26px;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 8px;
  color: #fb923c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.spinner {
  width: 30px;
  height: 30px;
  margin: 26px auto 0;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--orange);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #d1d5db;
  font-size: 12px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: #0d1119;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus {
  border-color: rgba(249, 115, 22, 0.75);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.11);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.16s ease, opacity 0.16s ease, border-color 0.16s ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button-primary {
  color: #111827;
  background: linear-gradient(145deg, #fb923c, #f97316);
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.2);
}

.button-secondary {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.button-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fecaca;
  background: rgba(239, 68, 68, 0.08);
}

.error,
.success,
.notice {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.error {
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fecaca;
  background: rgba(239, 68, 68, 0.09);
}

.success {
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.09);
}

.notice {
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
}

.dashboard {
  width: min(1480px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

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

.brand-inline .brand-mark {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 13px;
  font-size: 20px;
}

.brand-inline strong {
  display: block;
  font-size: 15px;
}

.brand-inline small {
  color: var(--muted);
}

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

.owner-chip {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.hero-main {
  padding: clamp(26px, 5vw, 48px);
  background:
    linear-gradient(125deg, rgba(249, 115, 22, 0.1), transparent 55%),
    var(--panel);
}

.hero-main p {
  max-width: 720px;
}

.hero-side {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

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

.status-row span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.pill::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.pill-green {
  color: #86efac;
  background: rgba(34, 197, 94, 0.11);
}

.pill-yellow {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.11);
}

.pill-gray {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 20px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.5fr);
  gap: 18px;
}

.section-panel {
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.installation-list {
  display: grid;
  gap: 10px;
}

.installation {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.installation-domain,
.installation-meta {
  color: var(--muted);
  font-size: 12px;
}

.installation-domain {
  margin-top: 5px;
}

.empty {
  padding: 32px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  text-align: center;
  color: var(--muted);
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.code-list {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: #090c12;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .auth-card,
  .boot-card {
    padding: 30px 22px;
  }

  .dashboard {
    width: min(100% - 24px, 1480px);
    padding-top: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .owner-chip {
    display: none;
  }

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

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

  .hero-main,
  .section-panel {
    padding: 20px;
  }
}
