:root {
  --accent: #53b7ff;
  --accent-soft: #78cbff;
  --glass: #ffffff08;
}

body {
  background:
    radial-gradient(ellipse at 83% -8%, #16477a55 0, transparent 38%),
    radial-gradient(ellipse at 0% 100%, #10315a44 0, transparent 34%),
    var(--bg);
}

.shell { grid-template-columns: 248px minmax(0, 1fr); }
.side {
  background: linear-gradient(180deg, #0a1c38 0%, #08162d 100%);
  box-shadow: 8px 0 30px #02081725;
}
.brand { border-color: #ffffff12; }
.brand .logo {
  border: 1px solid #ffffff28;
  box-shadow: 0 5px 18px #02081755;
}
.brand strong { font-size: 15px; }
.label { color: #91a9c8; font-weight: 800; }
.nav button {
  min-height: 43px;
  font-size: 13px;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}
.nav button:hover { transform: translateX(2px); }
.nav button.active {
  background: linear-gradient(100deg, #1a365d, #112744);
  box-shadow: inset 3px 0 0 var(--yellow), 0 5px 14px #02081722;
}

.top {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #091a36eF;
  backdrop-filter: blur(14px);
  border-color: #ffffff12;
}
.topright { gap: 8px; }
.topright #who { font-weight: 700; }
.pill { font-weight: 800; }
.wrap { max-width: 1450px; padding-top: 30px; }
.page.on { animation: page-in .24s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.head { margin-bottom: 23px; }
.head h1 { letter-spacing: -.035em; }
.head p { line-height: 1.6; }

.stats { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; }
.card, .panel, .tile {
  border-color: #8dbaff20;
  box-shadow: 0 10px 28px #02081716;
}
.card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, #102747 0%, var(--panel) 75%);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card::after {
  position: absolute;
  top: -38px;
  right: -34px;
  width: 105px;
  height: 105px;
  border: 1px solid #78cbff14;
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 14px #78cbff08, 0 0 0 29px #78cbff05;
  pointer-events: none;
}
.card:hover { transform: translateY(-2px); border-color: #53b7ff55; box-shadow: 0 14px 34px #02081733; }
.card small { position: relative; z-index: 1; font-weight: 600; }
.card .value { position: relative; z-index: 1; font-size: clamp(20px, 2vw, 25px); }
.panel { border-radius: 16px; }
.ph { min-height: 68px; padding: 16px 19px; }
.ph strong { font-size: 13px; }
.pad { padding: 19px; }
.tile { border-radius: 13px; background: #ffffff04; transition: border-color .18s ease, background .18s ease; }
.tile:hover { border-color: #53b7ff55; background: #ffffff08; }

.btn {
  min-height: 38px;
  border-radius: 10px;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px #02081724; }
.btn:active { transform: translateY(0); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #53b7ff70;
  outline-offset: 2px;
}
.btn.primary { box-shadow: 0 5px 15px #f4c54222; }
.field label { letter-spacing: .01em; }
.field input, .field select, .field textarea { min-height: 42px; border-radius: 10px; }
.calc div { border-radius: 11px; }
table thead { background: #ffffff03; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #53b7ff0a; }
.badge { font-weight: 750; letter-spacing: .01em; }

.install-btn { border-color: #53b7ff50; color: #b8e3ff; }
.install-btn .install-glyph { display: none; }
.install-cta { display: flex; width: 100%; justify-content: center; gap: 8px; margin-top: 12px; border-color: #53b7ff55; color: #b8e3ff; }
.loginbox { border-color: #91baff25; }

.dialog { border-radius: 17px; }
.dialog-head { align-items: center; }
.confirm-dialog { max-width: 450px; }
.confirm-body { display: grid; gap: 20px; padding: 19px; }
.confirm-body p { margin: 0; line-height: 1.65; color: var(--text); }
.confirm-body .row { justify-content: flex-end; }
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  width: min(520px, calc(100vw - 32px));
  padding: 14px 17px;
  border: 1px solid #8dbaff36;
  border-left: 4px solid var(--green);
  border-radius: 13px;
  background: #0c1e3bf2;
  color: #f3f6fb;
  box-shadow: 0 18px 55px #02081788;
  backdrop-filter: blur(16px);
  font-weight: 650;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--accent); }
body.light .side { background: linear-gradient(180deg, #e9f0f8, #e3ebf5); }
body.light .top { background: #edf3f8ed; }
body.light .card { background: linear-gradient(145deg, #fff, #f4f8fd); }
body.light .toast { background: #fff; color: #172b46; border-color: #cbd8e8; }
body.light .install-btn, body.light .install-cta { color: #20588e; border-color: #9bb8d8; }

@media (max-width: 850px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .wrap { padding-top: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .shell { display: block; }
  .top { min-height: 58px; height: auto; padding: 7px 11px; gap: 7px; }
  .topright { gap: 5px; flex-wrap: nowrap; }
  .topright #who { display: none; }
  .topright .pill { padding: 5px 8px; }
  .topright .btn { min-height: 34px; padding: 6px 8px; font-size: 10px; }
  .install-btn .install-label { display: none; }
  .install-btn .install-glyph { display: inline; font-size: 15px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 120px; padding: 13px; }
  .card .value { font-size: 20px; }
  .ph { padding: 13px 14px; }
  .pad { padding: 14px; }
  .toast { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
