:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #141a21;
  --panel-2: #19222b;
  --text: #edf2f7;
  --muted: #91a0ae;
  --line: #2a3643;
  --accent: #4da3ff;
  --accent-2: #3ecf8e;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { color: var(--text); font-weight: 800; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 16px; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 56px; }

.hero, .auth {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 24px;
}
.auth { align-items: center; min-height: calc(100vh - 180px); }
.auth > div { max-width: 520px; }
.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 8px;
}
h1 { font-size: 32px; line-height: 1.1; margin: 0 0 10px; letter-spacing: 0; }
h2 { font-size: 17px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { color: var(--muted); font-size: 12px; line-height: 1.5; }

.notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
}
.notice.ok { border-color: rgba(62, 207, 142, .45); background: rgba(62, 207, 142, .08); }
.notice.error { border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .09); }

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card { padding: 16px; }
.card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.card strong { font-size: 28px; color: var(--text); }
.panel { padding: 18px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.lower { align-items: start; }

form { margin: 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
input {
  width: 100%;
  height: 40px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #0e141a;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}
input:focus { border-color: var(--accent); }
.check { display: flex; grid-template-columns: none; align-items: center; gap: 8px; }
.check input { width: 16px; height: 16px; }
.stack { display: grid; gap: 12px; }
.row-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 14px; }
.inline-form { margin-top: 10px; }

button {
  border: 0;
  border-radius: 7px;
  height: 40px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: wait; }
.primary { background: var(--accent); color: #06111d; }
.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.linkbtn { background: transparent; color: var(--danger); height: auto; padding: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 700;
}
.chip span { color: var(--danger); margin-left: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.meta { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin: 0 0 12px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.auth-form { width: min(420px, 100%); display: grid; gap: 14px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.org-list { display: grid; gap: 8px; }
.org-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10161d;
  overflow: hidden;
}
.org-details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
}
.org-details summary::-webkit-details-marker { display: none; }
.org-details summary:hover { background: var(--panel-2); }
.org-title { font-weight: 800; margin-right: auto; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--text);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 700;
}
.muted-pill { color: var(--muted); font-weight: 600; }
.domain-columns {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(280px, 1.25fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 14px;
}
.domain-columns h3 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.domain-chips, .fqdn-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.fqdn-groups { display: grid; gap: 8px; }
.fqdn-group {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b1117;
  overflow: hidden;
}
.fqdn-group summary {
  min-height: 34px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.fqdn-group summary::-webkit-details-marker { display: none; }
.fqdn-group summary span { font-weight: 800; color: var(--accent); }
.fqdn-group summary b {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.fqdn-group .fqdn-list {
  border-top: 1px solid var(--line);
  padding: 9px;
}
.domain-chips span, .fqdn-list code {
  border: 1px solid var(--line);
  background: #0b1117;
  border-radius: 6px;
  padding: 5px 7px;
  color: var(--text);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px;
}
.domain-with-dns, .fqdn-with-dns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.domain-with-dns b {
  font-weight: 800;
}
.fqdn-with-dns span {
  overflow-wrap: anywhere;
}
.dns {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  min-height: 20px;
  border-radius: 999px;
  padding: 1px 7px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dns.ok {
  color: #06111d;
  background: var(--accent-2);
}
.dns.warn {
  color: #10161d;
  background: #ffcf66;
}
.muted-dns {
  color: var(--muted);
  background: var(--panel-2);
}
.domain-chips em, .fqdn-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

@media (max-width: 860px) {
  .hero, .auth { display: grid; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .row-form { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .domain-columns { grid-template-columns: 1fr; }
}
