:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080d19;
  color: #f4f7fb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; height: 100dvh; margin: 0; overflow: hidden; }
body { background: radial-gradient(circle at 50% -10%, #25365f 0, #0b1020 38%, #080d19 75%); }
button { font: inherit; }

.auth-card {
  width: min(92vw, 390px);
  margin: max(12vh, 80px) auto 0;
  padding: 32px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  background: rgba(16, 24, 43, .86);
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
  backdrop-filter: blur(24px);
}
.auth-card h1 { margin: 18px 0 8px; font-size: 28px; }
.auth-card p { color: #aeb8cc; line-height: 1.45; }
.mark, .mini-mark {
  display: grid; place-items: center; margin: auto; color: white; font-weight: 800;
  background: linear-gradient(145deg, #755cff, #25b8ff); box-shadow: 0 10px 30px rgba(72, 117, 255, .42);
}
.mark { width: 64px; height: 64px; border-radius: 20px; font-size: 28px; }
.mini-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; margin: 0; }
.primary {
  width: 100%; margin-top: 14px; padding: 14px 18px; border: 0; border-radius: 14px;
  background: #f5f7ff; color: #0c1220; font-weight: 700; cursor: pointer;
}
.primary:disabled { opacity: .55; }
.error { min-height: 1.4em; color: #ff8b98 !important; font-size: 13px; }

.app {
  display: grid;
  grid-template-rows: calc(52px + env(safe-area-inset-top)) minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  min-height: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px;
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left));
  background: rgba(9, 14, 26, .94); border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(18px); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 9px; align-self: center; font-weight: 700; font-size: 14px; }
.actions { display: flex; justify-content: flex-end; gap: 6px; align-self: center; }
.switcher { display: flex; align-self: center; padding: 3px; background: rgba(255,255,255,.07); border-radius: 12px; }
.switcher button {
  display: flex; min-height: 44px; align-items: center; gap: 7px; border: 0; padding: 7px 12px; border-radius: 9px;
  color: #9faac0; background: transparent; font-weight: 650; cursor: pointer;
}
.switcher button.active { color: #fff; background: rgba(255,255,255,.13); box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #586174; box-shadow: 0 0 0 3px rgba(88,97,116,.12); }
.online .dot { background: #43d48c; box-shadow: 0 0 0 3px rgba(67,212,140,.15); }
.offline .dot { background: #ff6b78; box-shadow: 0 0 0 3px rgba(255,107,120,.14); }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 10px; color: #d7deec; background: rgba(255,255,255,.07); cursor: pointer; }
iframe { width: 100%; height: 100%; min-height: 0; border: 0; background: #0b1020; }
.focus-mode { grid-template-rows: minmax(0, 1fr); }
.focus-mode .bar { display: none; }
.show-bar {
  position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; translate: -50% 0; z-index: 10;
  min-height: 44px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; padding: 7px 14px; color: #fff; background: rgba(10,16,29,.84); backdrop-filter: blur(12px);
}

@media (max-width: 620px) {
  .brand span:last-child { display: none; }
  .bar { grid-template-columns: 30px minmax(0, 1fr) 92px; gap: 4px; }
  .actions { gap: 4px; }
  .switcher { justify-self: center; }
  .switcher button { padding: 7px 9px; }
}
