:root {
  color-scheme: dark;
  font-family: "Cash Sans", "CashSans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f2f2f2;
  background: #161616;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden]{display:none!important}
html { min-width: 0; background: #161616; }
body { margin: 0; min-width: 0; min-height: 100vh; overflow-x: hidden; background: #161616; }
button, input { font: inherit; }
button, input, dialog { max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.app-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid #333;
}

.app-header h1 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.status { display: inline-flex; align-items: center; color: #aaa; font-size: 13px; white-space: nowrap; }
.status i { width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #b99a56; }
.status.online i { background: #5ea878; }
.status.error i { background: #c76b6b; }

.login-shell {
  min-height: calc(100vh - 73px);
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.login-card {
  width: min(100%, 420px);
  padding: 32px;
  border: 1px solid #333;
  border-radius: 16px;
  background: #242424;
  box-shadow: 0 18px 48px rgb(0 0 0 / 24%);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 12px;
  color: #161616;
  background: #f2f2f2;
  font-weight: 700;
}

.login-card h2, dialog h2 { font-size: 28px; font-weight: 400; letter-spacing: -.03em; }
.login-card > p:not(.form-result), dialog form > p:not(.form-result) { margin: 10px 0 24px; color: #aaa; font-size: 14px; line-height: 1.5; }
label { display: block; margin-bottom: 8px; color: #d2d2d2; font-size: 13px; font-weight: 600; }
input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  color: #f2f2f2;
  background: #161616;
  border: 1px solid #474747;
  border-radius: 8px;
}
.login-card input { margin-bottom: 16px; }
button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #f2f2f2;
  border-radius: 8px;
  color: #161616;
  background: #f2f2f2;
  font-weight: 600;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #fff; }
button:disabled { cursor: not-allowed; opacity: .42; }
.login-card button { width: 100%; }
.form-result { min-height: 20px; margin-top: 14px; color: #cfcfcf; font-size: 13px; line-height: 1.45; }

main {
  min-height: calc(100vh - 73px);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding: 24px 32px 32px;
}

.sidebar {
  width: 240px;
  align-self: start;
  min-height: calc(100vh - 129px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 16px;
  border: 1px solid #333;
  border-radius: 16px;
  background: #242424;
}
nav { display: grid; gap: 4px; }
nav button {
  width: 100%;
  justify-content: space-between;
  display: flex;
  border-color: transparent;
  color: #bdbdbd;
  background: transparent;
  text-align: left;
  font-weight: 500;
}
nav button:hover:not(:disabled) { color: #f2f2f2; background: #2e2e2e; }
nav button.active { color: #161616; background: #f2f2f2; }
nav button span { min-width: 24px; padding: 1px 7px; border-radius: 999px; color: inherit; background: rgb(128 128 128 / 20%); font-size: 12px; text-align: center; }
.safety { padding: 14px; border: 1px solid #474747; border-radius: 12px; background: #2e2e2e; }
.safety h2 { margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.safety p, .empty p { color: #aaa; font-size: 13px; line-height: 1.55; }

.content { min-width: 0; width: 100%; max-width: 1120px; padding: 24px 24px 56px 0; }
.panel { display: none; }
.panel.active { display: block; }
.heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.section-label { margin-bottom: 8px; color: #aaa; font-size: 13px; }
.panel h2 { font-size: 36px; font-weight: 300; line-height: 1.12; letter-spacing: -.04em; }
.empty {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  padding: 32px;
  border: 1px solid #333;
  border-radius: 16px;
  background: #242424;
  text-align: center;
}
.empty.compact { min-height: 240px; }
.empty h3 { margin: 12px 0 7px; font-size: 16px; font-weight: 600; }
.empty p { max-width: 470px; }
.icon { color: #d8d8d8; font-size: 34px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; margin: 28px 0; }
.cards article { display: grid; gap: 7px; padding: 18px; border: 1px solid #333; border-radius: 16px; background: #242424; }
.cards strong { font-size: 22px; font-weight: 500; }
.cards span { color: #aaa; font-size: 13px; }
.notice { margin-top: 28px; padding: 16px; border: 1px solid #474747; border-radius: 12px; color: #c9c9c9; background: #242424; font-size: 13px; line-height: 1.5; }
.toolbar { display: flex; gap: 10px; margin-top: 28px; }
.toolbar input { flex: 1 1 auto; min-width: 0; }
.secondary { border-color: #474747; color: #f2f2f2; background: #2e2e2e; }
.secondary:hover:not(:disabled) { background: #383838; }

dialog { width: min(calc(100% - 32px), 440px); padding: 0; color: #f2f2f2; background: #242424; border: 1px solid #474747; border-radius: 16px; box-shadow: 0 24px 80px rgb(0 0 0 / 55%); }
dialog::backdrop { background: rgb(0 0 0 / 72%); }
dialog form { padding: 28px; }
dialog input { font-size: 20px; letter-spacing: .22em; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

:focus-visible { outline: 2px solid #f2f2f2; outline-offset: 3px; }

@media (max-width: 930px) {
  main { grid-template-columns: 1fr; gap: 24px; padding: 20px 24px 32px; }
  .sidebar { width: 100%; min-height: auto; padding: 12px; }
  nav { display: flex; flex-wrap: wrap; gap: 6px; }
  nav button { width: auto; flex: 1 1 140px; }
  .safety { display: none; }
  .content { max-width: none; padding: 8px 0 48px; }
}

@media (max-width: 640px) {
  .app-header { min-height: 64px; padding: 14px 16px; }
  .app-header h1 { font-size: 18px; }
  .status { font-size: 12px; }
  .login-shell { min-height: calc(100vh - 65px); padding: 24px 16px; }
  .login-card { padding: 24px 20px; }
  .login-card h2, dialog h2 { font-size: 26px; }
  main { padding: 16px; }
  .sidebar { border-radius: 12px; }
  nav button { flex-basis: calc(50% - 3px); }
  .heading { flex-direction: column; }
  .heading > button { width: 100%; }
  .panel h2 { font-size: 32px; }
  .empty { min-height: 280px; margin-top: 24px; padding: 24px 18px; border-radius: 12px; }
  .cards { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; }
  .toolbar button { width: 100%; }
  input { font-size: 16px; }
  dialog form { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  * { forced-color-adjust: auto; }
  .status i, .brand-mark { border: 1px solid ButtonText; }
  nav button.active { border-color: ButtonText; }
}
