.app-body {
  min-width: 320px;
  overflow: hidden;
  background: #0a0f0c;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  border-right: 1px solid rgba(81, 105, 89, .42);
  background: linear-gradient(180deg, #141b17 0%, #0f1512 58%, #0c110e 100%);
  box-shadow: 18px 0 60px rgba(0, 0, 0, .18);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 7px 8px 15px;
  border-bottom: 1px solid rgba(81, 105, 89, .28);
}

.sidebar-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border: 1px solid #759643;
  border-radius: 12px;
  color: #11170e;
  background: linear-gradient(145deg, #c3fb68, #83bd31 62%, #f2a640);
  box-shadow: 0 0 24px rgba(167, 237, 69, .13);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.sidebar-logo::after {
  content: "";
  position: absolute;
  inset: -18px -6px auto auto;
  width: 34px;
  height: 50px;
  background: rgba(255, 255, 255, .23);
  transform: rotate(35deg);
}

.sidebar-brand b,
.sidebar-brand small { display: block; }
.sidebar-brand b { font-size: 15px; letter-spacing: -.02em; }
.sidebar-brand small { margin-top: 2px; color: var(--lime); font-size: 9px; font-weight: 900; letter-spacing: .17em; }

.sidebar-nav {
  display: grid;
  gap: 5px;
  margin-top: 18px;
}

.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 13px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #9ead9f;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.nav-item svg,
.icon-button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.nav-item:hover { color: var(--text); background: rgba(167, 237, 69, .055); }
.nav-item.active {
  color: #f6faef;
  border-color: rgba(167, 237, 69, .18);
  background: linear-gradient(90deg, rgba(167, 237, 69, .13), rgba(242, 166, 64, .055));
  box-shadow: inset 3px 0 0 var(--lime);
}
.nav-item.active svg { color: var(--lime); filter: drop-shadow(0 0 7px rgba(167, 237, 69, .26)); }

.sidebar-bottom { margin-top: auto; display: grid; gap: 9px; }
.live-plan {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(242, 166, 64, .22);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(67, 52, 29, .8), rgba(27, 38, 29, .93));
}
.live-plan::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -60px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 237, 69, .18), transparent 67%);
}
.plan-orbit { position: absolute; top: -24px; right: -25px; width: 90px; height: 90px; border: 1px solid rgba(242, 166, 64, .18); border-radius: 50%; }
.plan-orbit::after { content: ""; position: absolute; inset: 15px; border: 1px solid rgba(167, 237, 69, .17); border-radius: 50%; }
.live-plan small { display: block; color: var(--amber); font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.live-plan strong { display: block; margin-top: 8px; font-size: 14px; }
.live-plan p { margin: 6px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.plan-state { display: flex; align-items: center; gap: 7px; color: #dce9d9; font-size: 10px; font-weight: 800; }
.plan-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }

.sidebar-user {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(81, 105, 89, .34);
  border-radius: 11px;
  background: rgba(25, 36, 28, .76);
}
.user-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #15200f; background: linear-gradient(145deg, var(--amber), var(--lime)); font-weight: 950; }
.sidebar-user #account-line { overflow: hidden; color: #d9e2d8; font-size: 10px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; }
.sidebar-user a { color: var(--muted); font-size: 22px; text-align: center; }

.sidebar-scrim { display: none; }
.workspace { grid-column: 2; min-width: 0; min-height: 100vh; }
.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 70px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(380px, 650px) minmax(100px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(81, 105, 89, .38);
  background: rgba(14, 20, 16, .9);
  backdrop-filter: blur(18px);
}
.topbar-leading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.workspace-heading small,
.workspace-heading strong { display: block; }
.workspace-heading small { color: #7f9184; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.workspace-heading strong { margin-top: 3px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-toggle { display: none !important; }

.server-command-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: 8px minmax(130px, 1fr) auto auto 38px;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(81, 105, 89, .4);
  border-radius: 12px;
  background: rgba(25, 36, 28, .72);
}
.connection-dot { width: 8px; height: 8px; margin-left: 3px; border-radius: 50%; background: #758078; box-shadow: 0 0 0 4px rgba(117, 128, 120, .08); }
.connection-dot.connected { background: var(--lime); box-shadow: 0 0 0 4px rgba(167, 237, 69, .09), 0 0 12px rgba(167, 237, 69, .7); }
.server-command-bar select,
.inline-form input, .inline-form select,
.stack-form input, .stack-form select,
.event-tools select {
  min-width: 0;
  border: 1px solid #334239;
  border-radius: 9px;
  color: var(--text);
  background: #0e1511;
  font: inherit;
  outline: none;
}
.server-command-bar select { height: 36px; padding: 0 9px; border-color: transparent; background: transparent; font-size: 12px; font-weight: 750; }
.server-command-bar select:focus,
.inline-form input:focus, .inline-form select:focus,
.stack-form input:focus, .stack-form select:focus,
.event-tools select:focus { border-color: #78a73f; box-shadow: 0 0 0 3px rgba(167, 237, 69, .08); }
.button.compact { min-height: 34px; padding: 8px 11px; border-radius: 8px; font-size: 11px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(81, 105, 89, .42);
  border-radius: 9px;
  color: #b6c2b8;
  background: rgba(25, 36, 28, .72);
  cursor: pointer;
}
.icon-button:hover { color: var(--lime); border-color: rgba(167, 237, 69, .35); }
.topbar-actions { display: flex; justify-content: flex-end; gap: 8px; }

.workspace-main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px clamp(20px, 2.7vw, 44px) 50px;
}
.workspace-view { display: none; animation: view-in .22s ease both; }
.workspace-view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.app-notice {
  position: relative;
  margin-bottom: 16px;
  padding: 12px 16px 12px 40px;
  border: 1px solid rgba(242, 166, 64, .33);
  border-radius: 10px;
  color: #f2d5a9;
  background: rgba(77, 51, 23, .42);
  font-size: 12px;
  line-height: 1.45;
}
.app-notice::before { content: "!"; position: absolute; left: 15px; top: 11px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: #161208; background: var(--amber); font-size: 10px; font-weight: 950; }
.app-notice.good { color: #d9f6c3; border-color: rgba(167, 237, 69, .28); background: rgba(50, 79, 28, .28); }
.app-notice.good::before { content: "✓"; background: var(--lime); }

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.view-heading h1 { margin: 9px 0 7px; font-size: clamp(26px, 3vw, 39px); line-height: 1.04; letter-spacing: -.04em; }
.view-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.compact-heading { margin-bottom: 20px; }
.compact-heading h1 { font-size: clamp(25px, 2.6vw, 34px); }
.eyebrow { color: var(--lime); font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.pulse { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 13px var(--lime); }

.panel {
  padding: 19px;
  border: 1px solid rgba(74, 96, 81, .52);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(23, 32, 26, .96), rgba(15, 22, 18, .97));
  box-shadow: 0 17px 45px rgba(0, 0, 0, .15);
}
.panel:hover { border-color: rgba(91, 117, 98, .58); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-title h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.02em; }
.panel-kicker { color: var(--amber); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.panel-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 1px solid rgba(242, 166, 64, .24); border-radius: 999px; color: #e5bb7c; background: rgba(242, 166, 64, .06); font-size: 9px; font-weight: 850; }
.panel-badge.online { color: #caf39c; border-color: rgba(167, 237, 69, .25); background: rgba(167, 237, 69, .07); }

.live-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { position: relative; min-height: 118px; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -25px; bottom: -38px; width: 100px; height: 100px; border: 1px solid rgba(167, 237, 69, .1); border-radius: 50%; }
.stat-card > span { color: var(--amber); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.stat-card strong { position: relative; z-index: 1; display: block; margin: 15px 0 5px; overflow: hidden; font-size: clamp(18px, 2vw, 24px); line-height: 1; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { position: relative; z-index: 1; display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.overview-grid { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(360px, 1.18fr); gap: 12px; margin-top: 12px; }
.dashboard-panel { min-height: 330px; display: flex; flex-direction: column; }
.chat-compose { margin-top: auto; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.quick-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(74, 96, 81, .52);
  border-radius: 12px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(23, 32, 26, .96), rgba(15, 22, 18, .97));
  text-align: left;
  cursor: pointer;
}
.quick-card:hover { border-color: rgba(167, 237, 69, .3); transform: translateY(-1px); }
.quick-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(167, 237, 69, .2); border-radius: 11px; color: var(--lime); background: rgba(167, 237, 69, .07); font-size: 20px; }
.quick-card b, .quick-card small { display: block; }
.quick-card b { font-size: 12px; }
.quick-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.quick-card i { color: var(--amber); font-size: 22px; font-style: normal; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 12px; }
.content-grid.equal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-two { min-width: 0; }
.notification-panel { margin-top: 12px; }

.pairing-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 12px; }
.pairing-main { min-height: 570px; }
.pairing-steps { display: grid; gap: 9px; margin: 23px 0; }
.pair-step { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px; border: 1px solid rgba(67, 88, 73, .42); border-radius: 11px; background: rgba(10, 16, 12, .38); opacity: .58; }
.pair-step > b { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(81, 105, 89, .55); border-radius: 10px; color: var(--muted); font-size: 13px; }
.pair-step strong, .pair-step small { display: block; }
.pair-step strong { font-size: 12px; }
.pair-step small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.pair-step.active { border-color: rgba(167, 237, 69, .29); background: linear-gradient(90deg, rgba(167, 237, 69, .08), rgba(242, 166, 64, .03)); opacity: 1; }
.pair-step.active > b { color: #11170e; border-color: var(--lime); background: var(--lime); box-shadow: 0 0 20px rgba(167, 237, 69, .13); }
.pair-step.done { opacity: .82; }
.pair-step.done > b { color: #10160d; border-color: rgba(167, 237, 69, .7); background: rgba(167, 237, 69, .72); }
.pairing-code-box { padding: 18px; border: 1px dashed rgba(242, 166, 64, .36); border-radius: 12px; background: rgba(69, 48, 23, .18); text-align: center; }
.pairing-code-box > span, .pairing-code-box > strong, .pairing-code-box > small { display: block; }
.pairing-code-box > span { color: var(--amber); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.pairing-code-box > strong { margin: 10px 0 7px; color: var(--text); font-size: clamp(22px, 3vw, 33px); letter-spacing: .12em; }
.pairing-code-box > small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.pairing-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pairing-progress { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 12px 14px; border: 1px solid rgba(67, 88, 73, .4); border-radius: 10px; color: var(--muted); background: rgba(10, 16, 12, .4); font-size: 10px; line-height: 1.45; }
.pairing-progress i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #77847a; }
.pairing-progress.working i { background: var(--amber); box-shadow: 0 0 12px rgba(242, 166, 64, .75); animation: pair-pulse 1.2s ease infinite; }
.pairing-progress.success i { background: var(--lime); box-shadow: 0 0 12px rgba(167, 237, 69, .75); }
.pairing-progress.error { color: #ffb39f; border-color: rgba(201, 79, 45, .35); }
.pairing-progress.error i { background: #e96747; }
@keyframes pair-pulse { 50% { opacity: .38; transform: scale(.78); } }
.pairing-side { display: grid; align-content: start; gap: 12px; }
.extension-card h2 { margin: 8px 0; font-size: 16px; }
.extension-card p, .manual-pairing p { color: var(--muted); font-size: 10px; line-height: 1.55; }
.extension-card .button { display: block; margin-top: 14px; text-align: center; }
.manual-pairing summary { color: #dce5dc; font-size: 12px; font-weight: 800; cursor: pointer; }
.manual-pairing .stack-form { margin: 12px 0 0; }
.pairing-tip { padding: 14px 16px; border-left: 3px solid var(--amber); border-radius: 0 10px 10px 0; color: #decba9; background: rgba(83, 56, 25, .25); }
.pairing-tip b { color: var(--amber); font-size: 10px; }
.pairing-tip p { margin: 6px 0 0; font-size: 9px; line-height: 1.5; }

.scroll-list { min-height: 105px; max-height: 310px; overflow: auto; scrollbar-width: thin; scrollbar-color: #485b4e transparent; }
.scroll-list > div { position: relative; padding: 11px 3px; border-bottom: 1px solid rgba(67, 88, 73, .38); }
.scroll-list > div:last-child { border-bottom: 0; }
.scroll-list b { font-size: 12px; }
.scroll-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.empty-copy { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.events-list { max-height: calc(100vh - 260px); min-height: 440px; }

.inline-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.inline-form input, .inline-form select, .stack-form input, .stack-form select { flex: 1; padding: 11px 12px; }
.stack-form { display: grid; gap: 9px; margin-bottom: 13px; }
.button-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button.danger { color: #ff9a80; border-color: rgba(255, 120, 90, .28); background: rgba(201, 79, 45, .07); }
.mini-delete { margin-top: 7px; padding: 0; border: 0; color: #ff8e72; background: transparent; cursor: pointer; }
.device-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.device-actions select { min-width: 150px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #0e1511; }
.device-actions button { padding: 7px 10px; }
.tracker-sessions { display: grid; gap: 6px; width: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

.map-panel { min-height: calc(100vh - 185px); }
.map-box { min-height: 470px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(67, 88, 73, .45); border-radius: 11px; color: var(--muted); background: radial-gradient(circle at 50% 45%, rgba(167, 237, 69, .055), transparent 35%), repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(75, 97, 81, .1) 40px), repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(75, 97, 81, .1) 40px), #0c120f; }
.map-empty { display: grid; place-items: center; gap: 8px; text-align: center; }
.map-empty > span { display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid rgba(167, 237, 69, .22); border-radius: 17px; color: var(--lime); background: rgba(167, 237, 69, .07); font-size: 29px; box-shadow: 0 20px 55px rgba(0, 0, 0, .25); }
.map-empty b { color: #e5ebe3; font-size: 13px; }
.map-empty small { font-size: 10px; }
.map-box img { display: block; width: 100%; max-height: 680px; object-fit: contain; }
.map-box canvas { display: block; max-width: 100%; height: auto; transform-origin: center; transition: transform .2s ease; }
.map-controls { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.map-caption { margin-top: 10px; color: var(--muted); font-size: 10px; }

pre { overflow: auto; margin-bottom: 0; padding: 12px; border: 1px solid rgba(67, 88, 73, .35); border-radius: 9px; color: #bdd0c2; background: #0c120f; font-size: 10px; white-space: pre-wrap; }
.toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.toggle-grid label { display: flex; align-items: center; gap: 9px; min-height: 58px; padding: 10px 12px; border: 1px solid rgba(67, 88, 73, .48); border-radius: 10px; background: rgba(12, 18, 15, .5); cursor: pointer; }
.toggle-grid input[type="checkbox"] { accent-color: var(--lime); }
.toggle-grid label > span { font-size: 11px; font-weight: 800; }
.toggle-grid label small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.toggle-grid .quiet-hours { justify-content: center; color: var(--muted); font-size: 10px; }
.quiet-hours input { width: 76px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #0e1511; }
.setting-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.setting-note code { color: var(--lime); }
.event-tools { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.event-tools select { padding: 9px 10px; }
.good { color: var(--lime); }

@media (max-width: 1180px) {
  .workspace-topbar { grid-template-columns: auto minmax(360px, 1fr) auto; }
  .workspace-heading small { display: none; }
  .live-plan { display: none; }
  .toggle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .app-shell { display: block; }
  .workspace { min-height: 100vh; }
  .app-sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; display: block; visibility: hidden; opacity: 0; background: rgba(3, 6, 4, .7); backdrop-filter: blur(3px); transition: opacity .2s ease, visibility .2s ease; }
  .sidebar-scrim.open { visibility: visible; opacity: 1; }
  .sidebar-toggle { display: inline-grid !important; }
  .sidebar-toggle span { display: block; width: 16px; height: 1.5px; border-radius: 5px; background: currentColor; }
  .sidebar-toggle span + span { margin-top: 3px; }
  .workspace-topbar { grid-template-columns: auto minmax(300px, 1fr) auto; padding: 0 14px; }
  .overview-grid, .content-grid, .pairing-layout { grid-template-columns: 1fr; }
  .dashboard-panel { min-height: 300px; }
}

@media (max-width: 720px) {
  .workspace-topbar { height: auto; min-height: 68px; grid-template-columns: 1fr auto; gap: 9px; padding: 9px 12px; }
  .topbar-leading { grid-column: 1; grid-row: 1; }
  .server-command-bar { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 8px minmax(120px, 1fr) auto auto 38px; }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .workspace-main { padding: 22px 14px 40px; }
  .view-heading { align-items: flex-start; }
  .view-heading > .button { display: none; }
  .live-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: 1fr; }
  .content-grid.equal-grid { grid-template-columns: 1fr; }
  .toggle-grid { grid-template-columns: 1fr; }
  .map-panel { min-height: auto; }
  .map-box { min-height: 360px; }
  .panel-title { align-items: flex-start; }
}

@media (max-width: 520px) {
  .workspace-heading { max-width: 150px; }
  .account-button { display: none; }
  .server-command-bar { grid-template-columns: 8px minmax(0, 1fr) auto 38px; }
  .server-command-bar #disconnect { display: none; }
  .view-heading h1 { font-size: 27px; }
  .live-stats { gap: 8px; }
  .stat-card { min-height: 106px; padding: 15px; }
  .overview-grid { gap: 8px; margin-top: 8px; }
  .panel { padding: 15px; border-radius: 11px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form input, .inline-form select { flex-basis: 100%; }
  .chat-compose input { flex-basis: 0; }
  .map-controls { justify-content: flex-start; }
  .event-tools { width: 100%; justify-content: flex-start; }
  .event-tools select { width: 100%; }
}

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