body.account-body {
  --bg: #fafafa;
  --card: #fff;
  --raised: #f4f4f5;
  --ink: #171717;
  --secondary: #525252;
  --muted: #737373;
  --line: rgba(23, 23, 23, 0.08);
  --red: #d93a32;
  --red-deep: #b42318;
  --red-soft: #f4f4f5;
  --navy: #171717;
  --ok: #16a34a;
  --bar: #e4e4e7;
  --sans: Manrope, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.account-body {
  font: 500 17px/1.55 var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@keyframes auth-pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .auth-bubble.is-fresh { animation: none; }
}
.auth { background: #fff; }
.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 8px;
  min-height: calc(100vh - 74px);
  padding: 16px;
  align-items: stretch;
}
.auth-scene {
  border-radius: 28px;
  display: grid;
  place-items: center;
  min-height: 560px;
  background:
    linear-gradient(rgba(18, 21, 28, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 21, 28, 0.05) 1px, transparent 1px),
    radial-gradient(640px 380px at 50% 22%, rgba(170, 205, 255, 0.72), transparent 64%),
    radial-gradient(420px 260px at 78% 78%, rgba(217, 58, 50, 0.08), transparent 70%),
    linear-gradient(180deg, #e7f1fb 0%, #f4f7fb 100%);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
}
.auth-figure { width: min(460px, 86%); display: grid; justify-items: center; }
#sentinel { width: min(380px, 78%); height: min(380px, 46vh); }
#sentinel .bs-avatar, #sentinel svg { width: 100%; height: 100%; max-width: none; filter: drop-shadow(0 18px 28px rgba(80, 140, 210, 0.28)); }
.auth-bubble {
  position: relative; margin: 4px 0 0; max-width: 260px;
  padding: 10px 16px; border-radius: 18px;
  background: #fff; color: var(--navy);
  font-weight: 800; font-size: 0.95rem; text-align: center;
  box-shadow: 0 12px 28px rgba(26, 32, 48, 0.1);
}
.auth-bubble::after {
  content: ""; position: absolute; top: -7px; left: 36px;
  border: 8px solid transparent; border-top: 0; border-bottom-color: #fff;
}
.auth-bubble.is-fresh { animation: auth-pop 0.35s ease; }
.auth-panel { display: grid; place-items: center; padding: 28px 18px; background: #fff; }
.auth-card { width: min(420px, 100%); background: transparent; padding: 8px 0 12px; box-shadow: none; }
.auth-card h1 { margin: 0; font-size: 2rem; letter-spacing: -0.045em; }
.auth-switch { margin: 10px 0 22px; color: var(--muted); }
.auth-switch button {
  border: 0; background: none; padding: 0; margin-left: 6px;
  color: var(--red); font-weight: 800;
}
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.auth-form input, .cab-device-form input, .cab-device-form select {
  width: 100%; height: 46px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  padding: 0 12px; color: var(--ink);
}
.auth-pass { position: relative; }
.auth-pass-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.auth-forgot { border: 0; background: none; padding: 0; color: var(--red); font-weight: 800; font-size: 0.86rem; }
.auth-eye {
  position: absolute; right: 8px; bottom: 7px;
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  display: grid; place-items: center;
}
.auth-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.auth-remember {
  display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 8px;
  font-weight: 700; font-size: 0.92rem;
}
.auth-remember span { line-height: 1.35; }
.auth-remember input { margin-top: 2px; }
.auth-remember[hidden] { display: none !important; }
.auth-remember input { width: 18px; height: 18px; accent-color: var(--red); }
.auth-go, .cab-device-form button, .cab-plans button {
  height: 46px; border: 0; border-radius: 10px;
  background: var(--red); color: #fff; font-weight: 800;
}
.auth-go { width: 100%; }
.auth-go:hover, .cab-device-form button:hover, .cab-plans button:hover { background: var(--red-deep); }
.auth-status, .cab-status { min-height: 1.2em; margin: 0; font-weight: 700; color: var(--red); }
.auth-remember a { color: var(--red); font-weight: 800; }
.auth-or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px; color: var(--muted); font-size: 0.86rem;
}
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-social { display: flex; justify-content: center; gap: 12px; }
.social {
  width: 46px; height: 46px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; padding: 0;
}
.social svg { width: 22px; height: 22px; }
.auth-policies {
  margin: 0; padding: 0; border: 0; display: grid; gap: 8px;
}
.auth-policies[hidden] { display: none !important; }
.auth-policies legend { font-weight: 800; font-size: 0.86rem; margin-bottom: 2px; }
.pw-meter { display: grid; gap: 6px; }
.pw-meter[hidden] { display: none !important; }
.pw-bar { height: 6px; border-radius: 999px; background: #e7edf4; overflow: hidden; }
.pw-bar i { display: block; height: 100%; width: 0; background: #c5ceda; }
.pw-meter.is-1 i { width: 24%; background: var(--red); }
.pw-meter.is-2 i { width: 48%; background: #e07a3d; }
.pw-meter.is-3 i { width: 74%; background: #d9a441; }
.pw-meter.is-4 i { width: 100%; background: var(--ok); }
.pw-meter [data-pw-label] { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
[data-register-only][hidden] { display: none !important; }
body.is-in [data-site-chrome] { display: none !important; }

.cab { min-height: 100vh; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); background: var(--bg); font-size: 15px; line-height: 22px; font-weight: 400; }
.cab-side {
  position: sticky; top: 0; height: 100vh; overflow: auto;
  display: flex; flex-direction: column;
  padding: 16px 12px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.cab-brand { display: block; padding: 4px 8px 16px; }
.cab-nav { display: grid; gap: 2px; }
.cab-nav-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 36px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--secondary); font-weight: 500; font-size: 14px; text-align: left;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.cab-nav-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; flex: none; }
.cab-nav-item:hover { background: var(--raised); color: var(--ink); }
.cab-nav-item.is-active { background: var(--raised); color: var(--ink); box-shadow: inset 2px 0 0 var(--red); }
.cab-count {
  margin-left: auto; min-width: 0; height: auto; padding: 0;
  border-radius: 0; background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
  display: inline;
}
.cab-side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 16px; }
.cab-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cab-user { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 8px; }
.cab-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 500; font-size: 13px;
}
.cab-mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 13px; }
.cab-admin { font-weight: 500; color: var(--red); padding: 0 4px 4px; font-size: 13px; }
.cab-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff;
  font: 500 13px/16px var(--sans); color: var(--ink);
  transition: background-color 160ms var(--ease);
}
.cab-foot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.cab-foot-site { background: #fff; }
.cab-foot-out { background: transparent; color: var(--secondary); border-color: transparent; }
.cab-foot:hover { background: var(--raised); }

.cab-main { min-width: 0; padding: 0 32px 48px; }
.cab-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; margin: 0 -32px 24px; padding: 0 32px;
  background: rgba(250, 250, 250, 0.92);
  border-bottom: 1px solid var(--line);
}
.cab-top h1 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: 0; line-height: 1.15; }
.cab-kicker { margin: 0 0 2px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.cab-pill {
  margin-left: auto; min-height: 0; padding: 0;
  display: inline-flex; align-items: center; gap: 8px; border-radius: 0;
  background: transparent; color: var(--secondary); font-weight: 500; font-size: 13px;
}
.cab-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none;
}
.cab-burger {
  display: none; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; place-items: center;
}
.cab-burger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cab-page { display: none; }
.cab-page.is-visible { display: block; }
.cab-lead h2, .cab-charts h3, .cab-plans h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: 0; line-height: 1.2; }
.cab-lead p, .cab-now p, .cab-metrics p, .cab-plan-note { margin: 8px 0 0; color: var(--muted); font-weight: 400; }
.cab-lead-row { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.cab-metrics, .cab-charts, .cab-plans { display: grid; gap: 16px; margin-top: 24px; }
.cab-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cab-charts { grid-template-columns: 1.4fr 0.8fr; }
.cab-plans { grid-template-columns: 1fr 1fr; }
.cab-metrics article, .cab-charts article, .cab-plans article, .cab-now,
.cab .order-list li, .cab .note-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: none;
}
.cab-metrics article, .cab-charts article, .cab-now, .cab-plans article { padding: 20px; min-width: 0; }
.cab-metrics span, .cab-now span { color: var(--muted); font-weight: 400; font-size: 13px; }
.cab-metrics strong, .cab-now strong {
  display: block; margin-top: 12px; font-size: 32px; line-height: 1; font-weight: 500;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.cab-metrics article:first-child strong { color: var(--red); }
.cab-currency { margin: 16px 0 0; }
.cab-price { margin: 8px 0 0; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cab-price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.cab-plans { align-items: stretch; }
.cab-plans article { display: flex; flex-direction: column; gap: 8px; }
.cab-plans button, .cab-plans .is-quiet { width: 100%; border-radius: 8px; font-weight: 500; }
.cab-plans .is-quiet, .cab-quiet {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
}
.cab-plans .is-quiet:hover, .cab-quiet:hover { background: var(--raised); color: var(--ink); }
.cab-quiet { height: 36px; padding: 0 16px; border-radius: 8px; font-weight: 500; }
.cab-now { display: flex; align-items: center; margin-top: 24px; }
.cab .vbars { display: flex; align-items: flex-end; gap: 16px; height: 160px; margin-top: 20px; }
.cab .vbars div { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.cab .vbars i { display: block; width: min(100%, 28px); border-radius: 4px 4px 2px 2px; background: var(--bar); }
.cab .vbars .is-lead i { background: var(--red); }
.cab .vbars span { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--muted); text-align: center; }
.cab .hbar { display: grid; gap: 12px; margin-top: 20px; }
.cab .hbar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-weight: 400; font-size: 14px; }
.cab .hbar-row span:last-child { font-variant-numeric: tabular-nums; color: var(--secondary); min-width: 24px; text-align: right; }
.cab .hbar-track { height: 4px; background: var(--raised); border-radius: 2px; overflow: hidden; }
.cab .hbar-track span { display: block; height: 100%; border-radius: 2px; background: var(--bar); }
.cab .hbar-row.is-lead .hbar-track span { background: var(--red); }
.cab-device-form {
  margin-top: 24px;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(140px, 0.7fr) auto;
  gap: 12px; align-items: end;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: none; padding: 16px;
}
.cab-device-form label { display: grid; gap: 8px; font-weight: 500; font-size: 13px; min-width: 0; }
.cab-device-form button { padding: 0 16px; white-space: nowrap; border-radius: 8px; font-weight: 500; }
.cab .device-list, .cab .order-list, .cab .note-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.cab .device-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: none;
}
.cab .device-list li > div { flex: 1 1 160px; min-width: 0; }
.cab .device-list strong, .cab .order-list strong, .cab .note-list strong { display: block; font-weight: 500; }
.cab .device-list li > div span, .cab .order-list span, .cab .note-list span { color: var(--muted); font-size: 13px; }
.cab .device-mark { width: 36px; height: 36px; border-radius: 8px; background: var(--raised); display: grid; place-items: center; flex: none; }
.cab .device-mark svg { width: 16px; height: 16px; fill: var(--ink); }
.cab .device-list code { font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.cab .device-list button {
  margin-left: auto; border: 0; background: transparent; color: var(--red);
  border-radius: 8px; min-height: 32px; padding: 0 8px; font-weight: 500;
}
.cab .order-list li, .cab .note-list li { padding: 16px; }
.cab .note-list li.is-new { box-shadow: inset 2px 0 0 var(--red); }
.cab .empty { color: var(--muted); background: transparent !important; box-shadow: none !important; border: 0 !important; padding-left: 0 !important; }

@media (max-width: 980px) {
  .cab { grid-template-columns: 1fr; }
  .cab-side {
    position: fixed; z-index: 30; width: min(300px, 88vw);
    transform: translateX(-105%); transition: transform 0.2s ease;
    border-radius: 0 24px 24px 0; box-shadow: var(--shadow);
  }
  .cab.drawer-open .cab-side { transform: none; }
  .cab-burger { display: grid; }
  .cab-backdrop { display: none; }
  .cab.drawer-open .cab-backdrop { display: block; position: fixed; inset: 0; background: rgba(26, 32, 48, 0.35); z-index: 20; }
  .cab-main { padding: 0 16px 40px; }
  .cab-top { margin: 0 -16px 24px; padding: 0 16px; }
  .cab-metrics, .cab-charts, .cab-plans, .cab-device-form { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .auth-split { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr); }
  .auth-scene { min-height: 100%; }
  #sentinel { width: min(260px, 78%); height: min(260px, 40vh); }
}
@media (max-width: 760px) {
  .auth-split { grid-template-columns: 1fr; min-height: 0; padding: 12px; }
  .auth-scene { min-height: 280px; }
  .auth-panel { padding: 8px 4px 20px; }
}
body.admin-body:not(.is-in) { font: 400 17px/1.55 var(--sans); }
body.admin-body.is-in { font: 400 15px/22px var(--sans); }
@media (min-width: 981px) {
  .cab-backdrop { display: none !important; }
}
