@font-face {
  font-family: Inter;
  src: url("./fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: Tomorrow;
  src: url("./fonts/tomorrow-bold-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0d0c0f;
  --side: #121014;
  --panel: #18161b;
  --line: #302b34;
  --muted: #a8a2ae;
  --text: #f9f5f7;
  --red: #ff475d;
  --rose: #ff8898;
  --green: #65dfaa;
  --corner: 19px;
  --inset: 12px;
  --gutter: clamp(20px, 3.2vw, 46px);
  --mono: "Cascadia Mono", Consolas, monospace;
  --display: Tomorrow, Impact, system-ui, sans-serif;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box }
body { margin: 0; min-width: 300px; font-size: 14px }
button, input, select, textarea { font: inherit }
a { color: inherit; text-decoration: none }
button { cursor: pointer }
button:disabled { cursor: wait; opacity: .62 }
h1, h2, h3, p { margin: 0 }
svg { width: 19px; height: 19px; flex: none; vertical-align: middle }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  background: radial-gradient(ellipse at 92% 1%, #2a151f 0, transparent 38rem), var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 16px;
  background: linear-gradient(165deg, #191319, transparent 50%), var(--side);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  align-self: flex-start;
  padding-inline: 6px;
  margin-bottom: 32px;
}

.brand img, .boot img { width: 44px; height: 44px }
.brand strong {
  font: italic 700 19px/.98 var(--display);
  letter-spacing: -.028em;
  text-transform: uppercase;
}

.brand strong span { display: block; color: var(--red); margin-top: 4px }
.server-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px;
  margin-bottom: 28px;
  background: #1b171d;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.tile-icon, .iconbox, .avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #3c202a, #261921);
  border: 1px solid #55303a;
  color: var(--rose);
}

.avatar { border-radius: 50%; overflow: hidden; font-weight: 800 }
.avatar img { width: 100%; height: 100%; object-fit: cover }
.server-tile > div, .profile > div { min-width: 0; overflow-wrap: anywhere }
.server-tile strong, .profile strong { display: block; font-size: 12px }
.server-tile small, .profile small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px }

.eyebrow, .nav-label, .metric-label, .time, .tag {
  font: 600 11px/1.2 var(--mono);
  letter-spacing: .085em;
}

.nav-label { color: var(--muted); margin: 0 10px 9px; text-transform: uppercase }
.nav { display: grid; gap: 4px; margin-bottom: 23px }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #beb7c3;
  font-size: 12px;
  font-weight: 600;
}

.nav a:hover { background: #221c24; color: var(--text) }
.nav a[aria-current="page"] {
  background: linear-gradient(100deg, #431e2a, #251a22);
  border-color: #5a2b38;
  color: #ff9aa8;
  font-weight: 700;
}

.profile {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 5px 0;
  border-top: 1px solid var(--line);
}

.profile > div { flex: 1 }
.icon-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1c171f;
  color: #ccc2cf;
}

.icon-button:hover { color: var(--text); background: #2b202a; border-color: #65404e }
.top {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid #2e2630;
  background: #14111696;
}

.crumb, .top-actions { display: flex; align-items: center; gap: 10px; min-width: 0 }
.crumb { font-size: 13px; line-height: 1.3 }
.crumb > span, .crumb > svg { color: var(--muted) }
.crumb > svg { width: 14px; height: 14px }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #201b22;
  padding: 7px 10px;
  color: #d0c8d3;
  white-space: nowrap;
}

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #a9a0ad }
.tag.online, .tag.enabled { color: var(--green); background: #15271f; border-color: #2d483b }
.online .dot, .enabled .dot { background: var(--green); box-shadow: 0 0 8px #65dfaa48 }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 14px;
  border-radius: 12px;
  border: 1px solid #403744;
  background: #242027;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.button:hover { background: #312731; border-color: #68414e }
.button.primary {
  border-color: #ff6e80;
  background: linear-gradient(180deg, #ff687a, var(--red));
  box-shadow: 0 5px 18px #ff345824, inset 0 1px #ffffff38;
  color: #240910;
}

.button.primary:hover { background: #ff8191 }
.button svg { width: 16px; height: 16px }
.main { max-width: 1540px; margin: auto; padding: 28px var(--gutter) 40px }

.hero {
  container-type: inline-size;
  position: relative;
  min-height: 356px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 30px clamp(23px, 4.2vw, 63px);
  border: 1px solid #66313d;
  border-radius: clamp(21px, 2.4vw, 32px);
  background: linear-gradient(90deg, #100d13 1%, #130e15da 28%, #160e175a 66%, #200a1250),
    url("./harbor.png") 62% 55% / cover;
  box-shadow: inset 0 1px #ffffff15, 0 14px 38px #07080a80;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 1% 120%, #511a2b65, transparent 62%);
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--rose);
}

.hero .eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: var(--red);
  box-shadow: 0 0 12px #ff475d80;
}

.hero h1 {
  font: italic 700 clamp(35px, 11.5cqi, 104px)/.93 var(--display);
  text-transform: uppercase;
  letter-spacing: -.036em;
  text-shadow: 0 4px 24px #0f0a10c4;
}

.hero h1 span { display: block; margin-top: .08em; color: var(--red) }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px }
.hero-secondary { background: #211a23c7; border-color: #6b424f }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 29px 0 13px;
}

.section-head h2, .panel h2, .module-section > h2 {
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 800;
  letter-spacing: -.036em;
  line-height: 1.2;
}

.section-head .time, .row .time { color: var(--muted) }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px }
.metric, .panel {
  min-width: 0;
  background: linear-gradient(145deg, #201c23, var(--panel) 70%);
  border: 1px solid var(--line);
  border-radius: var(--corner);
  box-shadow: inset 0 1px #ffffff08, 0 8px 20px #07060933;
}

.metric { padding: 15px 16px }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 12px }
.metric-label { color: #c4bbc9; text-transform: uppercase; overflow-wrap: anywhere }
.metric strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.064em;
}

.metric small { display: block; color: var(--muted); font-size: 11px; margin-top: 8px; overflow-wrap: anywhere }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 15px; margin-top: 17px }
.panel { padding: 19px }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px }
.link { color: var(--rose); font-size: 12px; font-weight: 700 }
.link svg { width: 15px; height: 15px }
.row { min-height: 52px; display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line) }
.row .iconbox { width: 32px; height: 32px }
.row .iconbox svg { width: 16px; height: 16px }
.row .detail { flex: 1; min-width: 0 }
.row strong { font-size: 12px; overflow-wrap: anywhere }
.row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere }
.row .time { text-align: right; letter-spacing: 0 }
.row:is(a):hover { color: var(--rose) }

.page-title {
  margin-bottom: 10px;
  font: italic 700 clamp(28px, 5vw, 58px)/1.02 var(--display);
  text-transform: uppercase;
  letter-spacing: -.033em;
  overflow-wrap: anywhere;
}

.lead { max-width: 720px; margin-bottom: 25px; line-height: 1.6; color: var(--muted) }
.callout {
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #603541;
  border-radius: var(--inset);
  background: #281b24;
  color: #ffc2cc;
  line-height: 1.55;
}

.settings-grid, .structure-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: start }
.structure-columns .panel > .help { margin-bottom: 9px }
.structure-controls { margin-top: 15px }
form { display: grid; gap: 13px }
.field { display: grid; gap: 7px; min-width: 0; font-size: 12px; font-weight: 650 }
.field small, .help, .empty { color: var(--muted); font-size: 12px; line-height: 1.6 }
input, textarea, select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #423847;
  border-radius: var(--inset);
  background: #131116;
  color: var(--text);
}

textarea { resize: vertical; min-height: 91px; line-height: 1.5 }
input[type="checkbox"] { width: auto; accent-color: var(--red) }
.checkbox { display: flex; align-items: center; gap: 8px }
form .button { justify-self: start }
.help code { color: #f6b4c1 }
.module { padding: 12px 0; border-top: 1px solid var(--line) }
.module:first-of-type { border-top: 0 }
.module-section + .module-section { margin-top: 24px }
.module-section > h2 { margin-bottom: 11px }
.module-section .settings-grid { align-items: stretch }
.module-card { display: flex; flex-direction: column; gap: 17px }
.module-card > a { align-self: start }
.module-head { display: flex; align-items: flex-start; gap: 11px }
.module-head .iconbox { width: 40px; height: 40px }
.module-head > div { flex: 1; min-width: 0 }
.module-head h3 { font-size: 15px; font-weight: 800; letter-spacing: -.024em; overflow-wrap: anywhere }
.module-head p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.44 }
.module-status { padding: 5px 8px; font-size: 10px; letter-spacing: .015em }
.module-card form { margin-top: auto }
.bot-controls { margin-bottom: 24px }
.bot-controls-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}
.bot-controls-actions form { display: flex; flex-wrap: wrap; gap: 8px }
.bot-controls-actions button:disabled, .bot-invite-preview button:disabled { cursor: default }
.bot-invite-preview .help { margin-top: 4px }

.boot, .login { min-height: 100vh; display: grid; place-items: center }
.boot { display: flex; justify-content: center; gap: 12px }
.login {
  padding: 22px;
  background: linear-gradient(90deg, #130f17e8, #1f0e1ab0), url("./harbor.png") center / cover;
}
.login .panel { width: min(100%, 500px); padding: clamp(22px, 4vw, 38px); border-radius: 25px }
.login .brand { padding: 0; margin-bottom: 25px }
.login .page-title { font-size: clamp(29px, 4.8vw, 46px) }
.error { color: var(--rose); line-height: 1.5; margin-bottom: 12px }
#notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 5;
  max-width: min(460px, calc(100% - 40px));
  padding: 12px 16px;
  border: 1px solid #684152;
  border-radius: var(--inset);
  background: #2a1d28;
  box-shadow: 0 10px 42px #0008;
}

#notice:empty { display: none }
.skip { position: absolute; top: -100px; left: 16px; z-index: 9 }
.skip:focus { top: 14px }
.mobile-nav { display: none }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 213px minmax(0, 1fr) }
  .sidebar { padding-inline: 13px }
  .sidebar .brand strong { font-size: 17px }
  .metric { padding: 13px }
  .metric-label { letter-spacing: .02em }
  .hero { min-height: 317px }
}

@media (max-width: 875px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .dashboard-grid, .settings-grid, .structure-columns { grid-template-columns: 1fr }
  .hero { min-height: 285px }
}

@media (max-width: 645px) {
  :root { --gutter: 14px; --corner: 16px }
  .shell { display: block }
  .sidebar { display: none }
  .sidebar.open {
    display: flex;
    position: fixed;
    z-index: 4;
    inset: 0 auto 0 0;
    width: min(250px, 82vw);
    box-shadow: 0 0 0 100vmax #000a;
  }
  .mobile-nav { display: grid }
  .top { height: 60px }
  .top .crumb > span, .top .crumb > svg { display: none }
  .top-actions { gap: 5px }
  .top .tag { padding-inline: 7px; letter-spacing: 0 }
  .hero { min-height: 252px; padding: 24px 17px; background-position: 59% center }
  .hero h1 { font-size: clamp(28px, 11cqi, 63px) }
  .hero-actions { margin-top: 17px; gap: 7px }
  .hero-actions .button { min-height: 36px; padding-inline: 9px; font-size: 11px }
  .metric-label { font-size: 10px }
  .section-head .time { display: none }
  .main { padding-top: 15px }
}

@media (max-width: 380px) {
  .top .demo-tag { display: none }
  .module-head { flex-wrap: wrap }
}
