:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg2: #eef1f5;
  --surface: #ffffff;
  --surface2: #f3f5f8;
  --ink: #15202b;
  --muted: #667788;
  --accent: #0f9f6e;
  --accent-2: #0b7f58;
  --accent-soft: rgba(15, 159, 110, 0.1);
  --ok: #0f9f6e;
  --warn: #c4841d;
  --danger: #d64545;
  --border: #e2e7ee;
  --border-strong: #c9d2de;
  --shadow: 0 1px 2px rgba(21, 32, 43, 0.04);
  --radius: 10px;
  --font: "Sora", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --touch: 44px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bg-grid { display: none; }

.top, .wrap { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 0.65rem;
  height: 0.65rem;
  background: var(--accent);
  transform: rotate(45deg);
}
.brand-text { color: var(--ink); }
.brand-text span { color: var(--accent); font-weight: 500; }
.nav-link { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav-link:hover { color: var(--ink); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1rem 5.5rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.page-head .muted { margin: 0.3rem 0 0; font-size: 0.9rem; }
.page-head-actions { display:flex; gap:0.6rem; align-items:center; flex-wrap:wrap; }
.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.filters {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}
.filter-row-label {
  flex: 0 0 4.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.chip:hover { border-color: var(--border-strong); }
.chip.is-active {
  background: var(--accent-soft);
  border-color: rgba(62, 207, 142, 0.55);
  color: #b8f5d4;
}
.chip-n {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
}
.chip.is-active .chip-n { color: #9be8c4; background: rgba(62, 207, 142, 0.15); }
.chip-online.is-active { background: rgba(61, 255, 154, 0.15); border-color: #3DFF9A; color: #3DFF9A; }
.chip-recent.is-active { background: rgba(255, 176, 32, 0.15); border-color: #FFB020; color: #FFB020; }
.chip-offline.is-active { background: rgba(198, 40, 40, 0.2); border-color: #ff6b6b; color: #ff8a8a; }
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.stats {
  display: none;
}
.stat {
  display: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: min(100%, 240px);
  max-width: 560px;
}
.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}
.search input[type="search"] {
  width: 100%;
  min-height: var(--touch);
  padding: 0.7rem 2.6rem 0.7rem 2.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--ink);
  font-size: 16px; /* avoid iOS zoom */
}
.search input:focus {
  outline: 2px solid rgba(62, 207, 142, 0.3);
  border-color: var(--accent);
}
.search-kbd {
  position: absolute;
  right: 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
  background: var(--surface);
}
.search-clear {
  position: absolute;
  right: 0.55rem;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  min-width: 36px;
  min-height: 36px;
}
.search-clear:hover { background: var(--bg2); color: var(--ink); }
.search:has(.search-clear:not(.is-hidden)) .search-kbd { display: none; }
.result-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

input, select, button, textarea { font: inherit; color: var(--ink); }
input, select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--ink);
  font-size: 16px;
}
select.w-auto { width: auto; }
label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 500;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { border-color: var(--border-strong); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn.small { padding: 0.4rem 0.6rem; font-size: 0.82rem; min-height: 36px; }
.btn.warn { border-color: rgba(224, 179, 74, 0.45); color: var(--warn); background: rgba(224, 179, 74, 0.1); }
.btn.danger { border-color: rgba(240, 113, 120, 0.45); color: var(--danger); background: rgba(240, 113, 120, 0.1); }

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  min-width: 40px;
  min-height: 40px;
}
.icon-btn:hover { background: var(--surface2); color: var(--ink); }

.stack { display: grid; gap: 0.9rem; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.wrap-gap { gap: 0.65rem; }
.inline { display: inline-flex; margin: 0; }

.table-wrap {
  overflow: auto;
  max-height: min(70vh, 820px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
table.clients { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.clients th, .clients td {
  padding: 0.72rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.clients th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #161d27;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.clients tbody tr { transition: background 0.12s ease; }
.clients tbody tr:hover { background: rgba(62, 207, 142, 0.05); }
.clients tbody tr.is-hidden { display: none; }
.clients tbody tr.is-clickable { cursor: pointer; }
.clients tbody tr.is-clickable:hover { background: rgba(62, 207, 142, 0.07); }
.th-actions { min-width: 280px; }

.client-name {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  word-break: break-word;
}
.client-name:hover { color: var(--accent); }
.note-line {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ip { font-family: var(--mono); font-size: 0.82rem; color: #b7c4d4; }
.date-cell { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.date-cell.is-expiring { color: #FFB020; }
.date-cell.is-expired { color: #ff6b6b; }
.meta dd.is-expiring { color: #FFB020; font-weight: 600; }
.meta dd.is-expired { color: #ff6b6b; font-weight: 600; }
.tiny { font-size: 0.8em; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.mobile-meta { display: none; }

code { font-family: var(--mono); font-size: 0.85em; }
.break { word-break: break-all; }
.muted { color: var(--muted); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.is-hidden { display: none !important; }

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem 0.28rem 0.4rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.link-mark {
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
  background: currentColor;
}
/* Shapes differ so status is clear even without color */
.link-online .link-mark { border-radius: 50%; }          /* круг */
.link-recent .link-mark { clip-path: polygon(50% 0, 100% 100%, 0 100%); } /* треугольник */
.link-offline .link-mark { border-radius: 2px; }         /* квадрат */

.link-online {
  color: #04140c;
  background: #3DFF9A;
  border-color: #1aff7a;
}
.link-recent {
  color: #1a1200;
  background: #FFB020;
  border-color: #ff9900;
}
.link-offline {
  color: #fff5f5;
  background: #C62828;
  border-color: #ff5252;
}

.link-label {
  font-size: 0.74rem;
  font-weight: 600;
}
.link-label.link-online { color: #3DFF9A; }
.link-label.link-recent { color: #FFB020; }
.link-label.link-offline { color: #ff6b6b; }

.name-with-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.mobile-only-dot { display: none; }
.th-link { width: 7.5rem; }
.td-link { width: 7.5rem; white-space: nowrap; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
}
.badge-active { background: #e7f8f0; color: #0b7f58; }
.badge-expiring { background: #fff4df; color: #9a6810; }
.badge-expired { background: #fdecec; color: #b42323; }
.badge-disabled { background: #eef1f5; color: #5b6b7c; }

.flashes { list-style: none; padding: 0; margin: 0 0 1rem; }
.flash {
  padding: 0.7rem 0.95rem;
  border-radius: 8px;
  margin-bottom: 0.4rem;
  animation: fadeUp 0.28s ease;
}
.flash-ok { background: rgba(62, 207, 142, 0.12); border: 1px solid rgba(62, 207, 142, 0.35); }
.flash-error { background: rgba(240, 113, 120, 0.12); border: 1px solid rgba(240, 113, 120, 0.35); }

.login-box {
  max-width: 400px;
  margin: 3.5rem auto;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.login-box h1 { margin: 0 0 0.35rem; letter-spacing: -0.03em; }

dialog.sheet {
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
  color: var(--ink);
  padding: 1.1rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom));
  width: min(440px, 100vw);
  max-width: 100vw;
  box-shadow: var(--shadow);
  margin: auto auto 0;
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.65); }
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.sheet-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.02em; }
.qr-sheet { text-align: center; }

.qr-box {
  margin: 0.5rem auto 1rem;
  text-align: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #222;
  width: fit-content;
  max-width: 100%;
}
.qr-box img { display: block; margin: 0 auto; border-radius: 4px; max-width: min(280px, 70vw); height: auto; }
.qr-box figcaption { margin-top: 0.55rem; font-size: 0.85rem; color: var(--muted); }

.back { margin: 0 0 1rem; }
.detail {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}
.detail-title h1 {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  letter-spacing: -0.03em;
  word-break: break-word;
}
.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.2rem 0 1.4rem;
  padding: 1rem;
  background: var(--bg2);
  border-radius: 10px;
}
.meta > div { display: grid; gap: 0.2rem; }
.meta .full { grid-column: 1 / -1; }
.meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.meta dd { margin: 0; }
.action-groups { display: grid; gap: 1rem; }
.action-group {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.group-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.detail-qr { justify-self: center; }

/* Floating create button on mobile */
.fab-create {
  display: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr 1fr; }
  .th-actions { min-width: 0; }
  .filter-row-label { flex-basis: 100%; }
}

/* Mobile card layout */
@media (max-width: 760px) {
  .wrap { padding: 0.85rem 0.75rem 6rem; }

  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
  }
  .page-head .btn.primary { display: none; } /* use FAB */

  .fab-create {
    display: flex;
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 40;
    min-width: 56px;
    min-height: 56px;
    padding: 0 1.15rem;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  }

  .filters { padding: 0.75rem; gap: 0.65rem; }
  .filter-chips { gap: 0.35rem; }
  .chip { padding: 0.35rem 0.55rem; font-size: 0.78rem; }

  .toolbar {
    position: sticky;
    top: 52px;
    z-index: 25;
    margin: 0 -0.75rem 0.75rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .search { max-width: none; width: 100%; }
  .search-kbd { display: none; }
  .result-meta { width: 100%; font-size: 0.8rem; }

  .field-grid { grid-template-columns: 1fr; }

  .table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  table.clients,
  .clients tbody {
    display: block;
    width: 100%;
  }
  .clients thead { display: none; }
  .clients tbody tr.client-row {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
    padding: 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .clients tbody tr.client-row.is-hidden { display: none; }
  .clients td {
    border: 0;
    padding: 0;
    width: 100%;
  }

  /* On mobile show name cell with meta; hide link/status/date cols (duplicated in meta) */
  .clients td:nth-child(1),
  .clients td:nth-child(3),
  .clients td:nth-child(4) {
    display: none;
  }
  .mobile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-top: 0.4rem;
  }
  .note-line {
    max-width: 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  dialog.sheet {
    width: 100vw;
    max-width: 100vw;
    border-radius: 16px 16px 0 0;
  }

  .detail { padding: 1rem; }
  .action-group .row .btn,
  .action-group form,
  .action-group a.btn {
    flex: 1 1 calc(50% - 0.4rem);
    min-height: var(--touch);
  }
  .action-group select {
    min-height: var(--touch);
    flex: 1 1 100%;
  }
}

@media (min-width: 761px) {
  dialog.sheet {
    border-radius: var(--radius);
    margin: auto;
  }
}


.admin-stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:0.75rem; margin:0 0 1rem; }
.admin-stat-card { padding:0.85rem 0.95rem; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
.admin-stat-card strong { display:block; font-size:1.5rem; margin-top:0.35rem; }
.admin-stat-card small, .admin-stat-label { display:block; color:var(--muted); }
.admin-two-col { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:0.85rem; margin-top:1rem; }
.admin-section-title { margin:0 0 0.75rem; font-size:1rem; }
.admin-list { display:grid; gap:0.55rem; }
.admin-list-row { display:grid; gap:0.15rem; padding:0.7rem 0.75rem; border:1px solid var(--border); border-radius:10px; background:var(--surface2); }
.admin-list-row strong { font-family:var(--mono); }
.detail-extra { margin-top:1rem; }

.top-nav { display:flex; gap:0.75rem; align-items:center; }
.nav-link { color:var(--muted); text-decoration:none; font-size:0.9rem; }
.nav-link:hover { color:var(--text); }

.report-table-wrap { margin-top:0.5rem; }
.report-table th:nth-child(1),
.report-table td:nth-child(1) { width:7.5rem; white-space:nowrap; }
.report-table th:nth-child(5),
.report-table td:nth-child(5) { width:6.5rem; white-space:nowrap; text-align:right; }
.report-bucket { font-weight:600; }
.report-cell { vertical-align:top; }
.report-count { display:inline-block; min-width:1.5rem; font-weight:600; font-family:var(--mono); margin-bottom:0.35rem; }
.report-names { list-style:none; margin:0; padding:0; display:grid; gap:0.35rem; }
.report-names li { display:grid; gap:0.1rem; font-size:0.88rem; }
.report-names a { color:var(--text); text-decoration:none; }
.report-names a:hover { text-decoration:underline; }
.empty-hint { margin:1rem 0; padding:1rem; border:1px dashed var(--border); border-radius:var(--radius); }

.admin-stat-card strong.is-ok { color: var(--ok); }
.admin-stat-card strong.is-bad { color: var(--danger); }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.1rem;
}
.chart-card {
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.chart-card.chart-wide { grid-column: 1 / -1; }
.chart-hint { margin: -0.35rem 0 0.75rem; font-size: 0.85rem; }
.chart-box { position: relative; height: 220px; }
.chart-box-sm { height: 210px; }
.soon-list { max-height: 420px; overflow: auto; }
.soon-list a { color: var(--ink); text-decoration: none; }
.soon-list a:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .chart-grid { grid-template-columns: 1fr; }
  .chart-card.chart-wide { grid-column: auto; }
  .chart-box { height: 200px; }
}

.pwa-bar {
  margin-top: 0.75rem;
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  max-width: 1100px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  width: calc(100% - 1.5rem);
}
.pwa-bar-text { display: grid; gap: 0.15rem; min-width: 0; }
.pwa-bar-text strong { font-size: 0.92rem; }
.pwa-bar-text .muted { font-size: 0.8rem; }
.pwa-bar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
#push-status.is-ok { color: var(--ok); }
#push-status.is-bad { color: var(--danger); }
@media (max-width: 640px) {
  .pwa-bar {
  margin-top: 0.75rem; width: calc(100% - 1rem); padding: 0.65rem 0.75rem; }
}


.expected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  margin: 0 0 1rem;
}
.expected-card {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.expected-card span { display:block; color:var(--muted); font-size:0.78rem; margin-bottom:0.25rem; }
.expected-card strong { font-size:1.35rem; letter-spacing:-0.02em; }
.expected-card small { display:block; color:var(--muted); margin-top:0.25rem; font-size:0.78rem; }
.expected-table { width:100%; border-collapse:collapse; font-size:0.9rem; }
.expected-table th, .expected-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.expected-table th { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.expected-table td:last-child, .expected-table th:last-child { text-align: right; }
.expected-note { margin: 0 0 0.85rem; font-size: 0.85rem; color: var(--muted); }
.pwa-bar {
  border-color: var(--border) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}
