:root {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #1d2b43;
  background: #f2f5fa;
  font-synthesis: none;
  --accent: #3155dd;
  --muted: #627188;
  --line: #e1e7f0;
  --nav: #15233b;
  --success: #167756;
  --danger: #b83243;
  --panel: #fff;
}
.profile-label {
  font-size: 12px;
  color: var(--muted);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-layout.personal {
  grid-template-columns: minmax(0, 1fr);
}
.users-intro {
  padding: 22px;
  margin-bottom: 20px;
}
.users-intro p:last-child {
  margin-bottom: 0;
}
.users-list {
  display: grid;
  gap: 12px;
}
.user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
}
.user-card h2 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.user-card p {
  font-size: 13px;
  margin: 6px 0;
}
.user-card code {
  font-size: 13px;
}
.user-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 700px) {
  .profile-label {
    display: none;
  }
  .sidebar .nav-button {
    min-width: 0;
    flex: 1;
    font-size: 9px;
    overflow-wrap: anywhere;
  }
  .user-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .user-actions {
    justify-content: flex-start;
  }
  .main-shell {
    padding-bottom: 90px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d6dfec;
  border-radius: 9px;
  padding: 10px 15px;
  background: #fff;
  color: #263851;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  min-height: 42px;
}
button:hover,
.button:hover {
  background: #edf2fa;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.primary:hover {
  background: #2445c1;
}
.danger {
  background: #b83243;
  color: #fff;
  border-color: #b83243;
}
.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.text-button {
  padding: 4px;
  color: var(--accent);
  border: 0;
  background: none;
  min-height: 32px;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid #5e8ce4;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  line-height: 1.15;
}
h2 {
  font-size: 17px;
  margin-bottom: 20px;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.55;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #42516a;
}
input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  border: 1px solid #cdd7e5;
  border-radius: 8px;
  background: #fff;
  color: #1d2b43;
  padding: 11px 12px;
  min-height: 43px;
  font-size: 14px;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  line-height: 1.5;
}
.hint,
.muted {
  color: var(--muted);
  font-size: 13px;
}
.hint {
  line-height: 1.6;
  margin: 8px 0 18px;
}
.error {
  color: var(--danger);
  font-size: 14px;
  min-height: 20px;
  margin: 10px 0;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #99a7ba;
}
.dot.green {
  background: #39bf93;
  box-shadow: 0 0 0 4px #39bf9318;
}
.dot.amber {
  background: #d8a33c;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 216px;
  background: var(--nav);
  padding: 30px 18px;
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  padding: 0 8px 36px;
  letter-spacing: -0.5px;
}
.brand b {
  font-weight: 700;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-button {
  border: 0;
  background: transparent;
  color: #b9c8df;
  justify-content: flex-start;
  padding: 13px 14px;
  font-size: 14px;
  gap: 13px;
  min-height: 47px;
}
.nav-button span {
  width: 22px;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  font-weight: 400;
}
.nav-button:hover {
  background: #ffffff0a;
}
.nav-button.active {
  background: #ffffff13;
  color: #fff;
  box-shadow: inset 3px 0 #8aa9ff;
}
.sidebar-foot {
  margin-top: auto;
  padding: 22px 10px 0;
  border-top: 1px solid #ffffff16;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: #c4d0e3;
}
.sidebar-foot small {
  display: block;
  color: #8d9eb8;
  font-size: 11px;
  line-height: 1.6;
  margin-top: 7px;
}
.main-shell {
  margin-left: 216px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 80px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 12px;
}
.run-state {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
main {
  width: 100%;
  max-width: 1700px;
  margin: auto;
  padding: 28px 36px 38px;
  flex: 1;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 36px;
  padding: 23px 0;
}
.stats > div {
  padding: 0 25px;
  border-right: 1px solid var(--line);
}
.stats > div:last-child {
  border: 0;
}
.stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 11px;
}
.stats strong {
  font-weight: 650;
  font-size: 28px;
  letter-spacing: -1px;
}
.stats small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
  display: inline-block;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.page-heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.page-heading > button,
.page-heading > a {
  flex-shrink: 0;
}
.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 295px;
  gap: 24px;
  align-items: start;
}
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
#ads-filter {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 340px;
  background: #fff;
}
#ads-auto[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.search-field {
  max-width: 380px;
  width: 100%;
}
.search-field input {
  background: #fff;
}
.search-list {
  display: grid;
  gap: 12px;
}
.search-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
}
.search-card.off {
  background: #fafbfd;
}
.search-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.search-card h2 {
  margin-bottom: 6px;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.search-url {
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
  font-size: 12px;
  text-decoration: none;
  color: #6b7fa2;
}
.search-main {
  min-width: 0;
}
.pill {
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 11px;
  background: #e7f5ee;
  color: #176247;
  font-weight: 600;
  white-space: nowrap;
}
.pill.off {
  background: #edf0f5;
  color: #66758c;
}
.pill.warn {
  background: #fff0d5;
  color: #885619;
}
.search-meta {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin: 21px 0 16px;
}
.search-meta b {
  color: #334860;
  font-weight: 600;
}
.search-card-bottom {
  border-top: 1px solid #edf1f7;
  padding-top: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.search-card-bottom .last-run {
  font-size: 11px;
  color: var(--muted);
}
.row-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.row-actions button {
  font-size: 12px;
  padding: 6px 9px;
  min-height: 34px;
}
.row-actions .delete {
  color: var(--danger);
}
.search-card-error {
  font-size: 12px;
  color: var(--danger);
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.activity {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.panel-heading h2 {
  font-size: 14px;
  margin: 0;
}
.activity-entry {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #edf1f7;
}
.activity-entry:last-child {
  border-bottom: 0;
}
.activity-entry .dot {
  margin-top: 5px;
  width: 6px;
  height: 6px;
  background: #7e97cf;
}
.activity-entry p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}
.activity-entry time {
  color: #8190a7;
  font-size: 11px;
}
.surface {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.form-panel {
  padding: 28px;
  display: grid;
  gap: 17px;
}
.form-panel h2 {
  margin-bottom: 5px;
}
.form-panel .hint {
  margin: -8px 0 0;
}
.form-panel > button {
  justify-self: start;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.inline-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-actions span {
  font-size: 12px;
  color: var(--muted);
}
.settings-info {
  background: #f2f5fb;
  border-radius: 8px;
  padding: 20px;
  margin: 10px 0;
}
.settings-info p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.proxy-list {
  font:
    12px/1.8 Consolas,
    monospace;
  overflow-wrap: anywhere;
  max-height: 300px;
  overflow: auto;
}
.complaints-list {
  display: grid;
  gap: 10px;
  max-height: 440px;
  overflow: auto;
  margin-top: 12px;
}
.complaint-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafd;
  padding: 10px 12px;
}
.complaint-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.complaint-main a {
  color: var(--accent);
  font:
    13px Consolas,
    monospace;
}
.complaint-main small {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}
.complaint-comment {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.complaint-row .poll-warn {
  margin: 8px 0 0;
  font-size: 12px;
}
.complaint-row .text-button {
  margin-top: 8px;
}
dl {
  margin: 0;
  font-size: 13px;
}
dt {
  color: var(--muted);
  margin-bottom: 5px;
}
dd {
  margin: 0 0 15px;
  overflow-wrap: anywhere;
}
.ads-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ad-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
}
.badge-fresh {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 1;
  background: #12a150;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.badge-search {
  align-self: flex-start;
  margin-top: 7px;
  background: #eef2fb;
  border: 1px solid #d8e1f3;
  color: #46536e;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.ad-gal {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  aspect-ratio: 1.5;
  background: #e8edf6;
}
.ad-gal::-webkit-scrollbar { display: none; }
.ad-gal img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}
.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(20, 26, 38, 0.45);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.ad-card:hover .gal-nav { opacity: 1; }
.gal-nav { left: 6px; }
.gal-nav-next { left: auto; right: 6px; }
.gal-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(20, 26, 38, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}
.gal-extra {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(20, 26, 38, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}
.ad-place {
  color: #46536e;
  font-size: 12.5px;
  margin-top: 2px;
}
.metro-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 1px;
}
.stars { color: #f5a623; letter-spacing: 1px; }
.ad-seller { font-size: 12.5px; color: #46536e; }
.ad-desc {
  font-size: 12.5px;
  color: #5a657d;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-time { font-size: 11.5px; color: #8a93a8; margin-top: 4px; }
.poll-ok {
  color: #12a150;
}
.poll-warn {
  color: #c0392b;
  grid-column: 1 / -1;
}
.ad-card img {
  aspect-ratio: 1.5;
  object-fit: cover;
  width: 100%;
  background: #e8edf6;
}
.ad-noimg {
  aspect-ratio: 1.5;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #eef2f9, #eef2f9 12px, #e6ecf6 12px, #e6ecf6 24px);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.3px;
}
.ad-content {
  padding: 17px;
}
.ad-content h2 {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 9px;
}
.ad-content strong {
  font-size: 19px;
}
.ad-content p {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}
.console {
  border-radius: 12px;
  overflow: hidden;
  background: #142139;
  color: #c5d1e5;
  border: 1px solid #243654;
}
.console-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid #2b3951;
  flex-wrap: wrap;
}
.console-toolbar input,
.console-toolbar select,
.console-toolbar button {
  background: #1d2d47;
  border-color: #3a4b64;
  color: #dae4f4;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}
.console-toolbar select {
  width: 150px;
}
.stream-state {
  font-size: 12px;
  color: #90c9b6;
  margin-right: auto;
}
.log-search {
  flex: 1;
  min-width: 150px;
  max-width: 250px;
}
.log-output {
  height: 440px;
  overflow: auto;
  padding: 14px;
  font:
    12px/1.8 Consolas,
    "Courier New",
    monospace;
  overscroll-behavior: contain;
}
.log-row {
  display: grid;
  grid-template-columns: 74px 63px minmax(0, 1fr);
  gap: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 3px 0;
}
.log-time {
  color: #7c90b0;
}
.log-level {
  color: #9aaede;
}
.log-row[data-level="ERROR"] .log-level {
  color: #ff8c99;
}
.log-row[data-level="WARNING"] .log-level {
  color: #f0c27b;
}
.log-row[data-level="DEBUG"] {
  color: #9eafcb;
}
.console-footer {
  border-top: 1px solid #2b3951;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #a2b1ca;
}
.console-footer label {
  font-size: 12px;
  color: inherit;
}
.event-history {
  padding: 25px;
  margin-top: 22px;
}
.event-row {
  display: grid;
  grid-template-columns: 125px 130px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.event-row time,
.event-row .event-kind {
  color: var(--muted);
}
.empty {
  padding: 42px 25px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  background: #ffffff7a;
  border: 1px dashed #ced8e7;
  border-radius: 10px;
}
.empty strong {
  display: block;
  font-size: 16px;
  color: #334860;
  margin-bottom: 8px;
}
.notice {
  background: #e8f0ff;
  color: #224a89;
  border: 1px solid #cbdcfa;
  border-radius: 9px;
  padding: 12px 17px;
  font-size: 13px;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}
.notice.failure {
  background: #fff0f1;
  color: #a72c3c;
  border-color: #edc6cb;
}
.page-footer {
  padding: 0 36px 20px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #7b8ba2;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 24px 90px #15233b40;
  padding: 28px;
  width: min(560px, calc(100% - 28px));
  max-height: calc(100dvh - 40px);
  color: #1d2b43;
}
dialog:modal {
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #10223d70;
  overflow: hidden;
  overscroll-behavior: contain;
}
dialog form {
  display: grid;
  gap: 17px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 21px;
}
.dialog-heading button {
  border: 0;
  font-size: 26px;
  padding: 0;
  min-width: 36px;
  min-height: 36px;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(145deg, #e9effb, #f5f7fb 55%, #e5edf9);
}
.login-box {
  background: #fff;
  border: 1px solid #dce4f1;
  border-radius: 20px;
  padding: 42px;
  width: min(430px, 100%);
  box-shadow: 0 20px 70px #223d7210;
  display: grid;
  gap: 18px;
}
.login-box h1 {
  margin: 3px 0 0;
  font-size: 32px;
}
.login-box p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 3px;
}
.login-box .error {
  color: var(--danger);
}
.login-box small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.search-layout > div,
.search-list,
.search-card {
  min-width: 0;
}
.search-list {
  grid-template-columns: minmax(0, 1fr);
}
.activity-entry b {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}
.activity-entry p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-toolbar .muted {
  white-space: nowrap;
}
.activity-entry time,
.page-footer {
  color: #627188;
}
.search-url {
  color: #546b90;
}
.pill.off {
  color: #53627b;
}
@media (min-width: 1500px) {
  .search-layout {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .ads-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 185px;
    padding: 27px 12px;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
  }
  .main-shell {
    margin-left: 185px;
  }
  main {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .search-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .activity {
    margin-top: 5px;
  }
  .activity > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 22px;
  }
  .stats > div {
    padding: 0 17px;
  }
  .stats small {
    display: block;
    margin: 6px 0 0;
  }
  .settings-layout {
    gap: 16px;
  }
  .form-panel {
    padding: 23px;
  }
  .ads-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    padding: 0 6px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid #ffffff20;
  }
  .sidebar .brand,
  .sidebar-foot {
    display: none;
  }
  .sidebar nav {
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  .nav-button {
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    padding: 9px 4px 6px;
    min-height: 58px;
    min-width: 54px;
    border-radius: 0;
  }
  .nav-button span {
    font-size: 23px;
  }
  .nav-button.active {
    box-shadow: inset 0 3px #8aa9ff;
    background: #ffffff0a;
  }
  .main-shell {
    margin: 0;
    padding-bottom: 78px;
  }
  .topbar {
    height: 72px;
    padding: 0 17px;
    padding-top: env(safe-area-inset-top);
    gap: 8px;
  }
  .run-state {
    font-size: 11px;
    gap: 8px;
    max-width: 48%;
  }
  .run-state > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .top-actions {
    gap: 0;
  }
  .top-actions button {
    font-size: 12px;
    padding: 9px 11px;
  }
  main {
    padding: 20px 16px 28px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    margin-bottom: 27px;
  }
  .stats > div {
    padding: 17px 18px;
    border: 0;
  }
  .stats > div:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .stats > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stats strong {
    font-size: 26px;
  }
  .stats span {
    margin-bottom: 7px;
  }
  .stats small {
    display: inline-block;
    margin: 0 0 0 5px;
    font-size: 10px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 13px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading p {
    font-size: 12px;
    line-height: 1.6;
  }
  .page-heading > button,
  .page-heading > a {
    padding: 9px 12px;
    font-size: 12px;
    min-height: 39px;
  }
  .search-card {
    padding: 17px;
  }
  .search-card-bottom {
    flex-wrap: wrap;
    gap: 12px;
  }
  .row-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .search-meta {
    gap: 10px 15px;
  }
  .search-card h2 {
    font-size: 16px;
  }
  .activity > div:last-child {
    display: block;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .form-panel {
    padding: 22px;
  }
  .form-grid {
    gap: 12px;
  }
  .ads-grid {
    gap: 12px;
  }
  .ad-content {
    padding: 12px;
  }
  .ad-content h2 {
    font-size: 12px;
  }
  .ad-content strong {
    font-size: 16px;
  }
  .ads-grid .ad-card img {
    aspect-ratio: 1.1;
  }
  .console-toolbar {
    padding: 12px;
    gap: 8px;
  }
  .console-toolbar select {
    width: 135px;
  }
  .stream-state {
    width: 100%;
  }
  .log-output {
    height: 380px;
    padding: 12px 9px;
    font-size: 11px;
  }
  .log-row {
    grid-template-columns: 60px 51px minmax(0, 1fr);
    gap: 6px;
  }
  .event-history {
    padding: 18px;
  }
  .event-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .event-row > span:last-child {
    grid-column: 1/-1;
  }
  .page-footer {
    padding: 0 17px 15px;
    font-size: 10px;
  }
  .login-box {
    padding: 29px;
  }
  dialog {
    padding: 22px;
  }
  .list-toolbar {
    gap: 10px;
  }
  .hint {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
