/* hidden 必须压过后来的 display:flex，否则登录层和两页会叠在一起 */
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
/*
 * 钉钉 PC 工作台用 iframe 嵌本页。不要写死 height:100%：
 * 父级高度为 0 时整页折叠成白屏；100vh 再垂直居中时，卡片可能被顶到可视区外。
 * 用可撑开的 min-height（含像素兜底），让加载闸贴顶显示。
 */
html {
  height: auto;
  min-height: 100%;
  min-height: 100vh;
  min-height: 640px;
  width: 100%;
  color-scheme: light;
  background: #e8f3ff;
}
body {
  height: auto;
  min-height: 100%;
  min-height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: auto;
  background: #f3f5f8;
  font-family: "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2329;
  -webkit-font-smoothing: antialiased;
  min-width: 0;
}
@media (min-width: 901px) {
  /* 宽屏大盘仍按 1280 设计，但只约束登录后的 .shell，避免加载闸被撑出可视区 */
  .shell { min-width: 1280px; }
}
button, input, select { font-family: inherit; }
button { cursor: pointer; border: 0; background: none; }
.shell { min-height: 100%; display: flex; flex-direction: column; background: #f3f5f8; }

.titlebar {
  height: 52px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; border-bottom: 1px solid #e8ebf0; flex-shrink: 0;
}
.app-name { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #0089ff; display: inline-block; }
.tabs { display: flex; gap: 6px; }
.tab {
  font-size: 13px; padding: 6px 14px; border-radius: 6px;
  background: #f3f5f8; color: #3c434b; border: 1px solid #e5e8ee;
}
.tab.on { background: #0089ff; color: #fff; border-color: #0089ff; }
.actions { min-width: 160px; text-align: right; }
.who { font-size: 12px; color: #8a9199; }

.filterbar {
  background: #f8fafc; border-bottom: 1px solid #e8ebf0;
  padding: 9px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
}
.filterbar .flabel { font-size: 13px; font-weight: 650; color: #5b6573; white-space: nowrap; flex-shrink: 0; }
.filterbar .dates { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.datefield {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #e5e8ee; background: #fff; border-radius: 6px;
  padding: 4px 10px 4px 8px; white-space: nowrap;
}
.datefield .meta { display: flex; flex-direction: column; line-height: 1.15; }
.datefield .k { font-size: 11px; color: #8a9199; }
.datefield input[type="date"] {
  border: 0; background: transparent; font-size: 13px; color: #1f2329;
  font-variant-numeric: tabular-nums; padding: 0; width: 132px;
}
.dates .sep { color: #b0b6be; font-size: 12px; }
.seg { display: inline-flex; border: 1px solid #e5e8ee; border-radius: 6px; overflow: hidden; background: #f3f5f8; flex-shrink: 0; }
.seg .s { font-size: 12px; padding: 6px 12px; color: #3c434b; white-space: nowrap; }
.seg .s.on { background: #0089ff; color: #fff; font-weight: 650; }
.chip-quick {
  font-size: 12px; padding: 5px 10px; border-radius: 14px;
  border: 1px solid #cfe6ff; background: #e8f4ff; color: #0089ff;
  font-weight: 650; white-space: nowrap; flex-shrink: 0;
}
.chip-quick.off { background: #fff; color: #3c434b; border-color: #e5e8ee; font-weight: 500; }
.filter-note { font-size: 12px; color: #8a9199; line-height: 1.45; flex: 1; min-width: 0; }

.page-dash { padding-bottom: 24px; }
.complaints {
  margin: 16px 16px 0; border-radius: 10px; overflow: hidden;
  border: 1px solid #f0c7c7; background: #fff; box-shadow: 0 8px 20px rgba(227,73,73,.08);
}
.alertbar { background: #e34949; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.alertbar .left { display: flex; align-items: center; gap: 12px; }
.alertbar .ico {
  width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700;
}
.alertbar .ttl { font-size: 15px; font-weight: 650; }
.alertbar .sub { font-size: 12px; opacity: .9; margin-top: 2px; }
.alertbar .cnt { font-size: 28px; font-weight: 700; line-height: 1; }
.alertbar .cnt em { font-style: normal; font-size: 14px; font-weight: 500; margin-left: 4px; opacity: .92; }
.alertbar .meta { font-size: 12px; opacity: .9; text-align: right; line-height: 1.5; }
.qhead { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 16px 6px; background: #fff8f8; }
.qhead h2 { font-size: 13px; font-weight: 650; }
.qhead .ex { font-size: 12px; color: #8a9199; }
.qtable { width: 100%; border-collapse: collapse; }
.qtable th {
  text-align: left; font-size: 12px; font-weight: 500; color: #8a9199;
  padding: 6px 12px; background: #fff8f8; border-bottom: 1px solid #f3e0e0; white-space: nowrap;
}
.qtable td { font-size: 13px; padding: 11px 12px; border-bottom: 1px solid #f6ecec; vertical-align: middle; }
.qtable tr:last-child td { border-bottom: 0; }
.qtable tr { cursor: pointer; }
.qtable tr:hover td { background: #fff4f4; }
.urg { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 4px; }
.urg.high { background: #ffecec; color: #e34949; }
.urg.mid { background: #fff4e5; color: #d9822b; }
.urg.low { background: #f3f5f8; color: #5b6573; }
.sum { color: #3c434b; line-height: 1.45; }
.st { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.st.wait { background: #ffecec; color: #e34949; }
.st.done { background: #e9f8ef; color: #2f9e62; }
.mono { font-variant-numeric: tabular-nums; }
.empty-row { padding: 22px 16px; text-align: center; color: #8a9199; font-size: 13px; background: #fff; }

.metrics { display: grid; grid-template-columns: 1fr 1fr 1fr 1.5fr; gap: 12px; padding: 16px 16px 0; }
.metric { background: #fff; border-radius: 10px; padding: 16px 18px 14px; border: 1px solid #e8ebf0; }
.metric .k { font-size: 13px; color: #8a9199; }
.metric .n { font-size: 28px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.metric .n.danger { color: #e34949; }
.metric .n.mid { font-size: 22px; padding-top: 4px; }
.metric .s { font-size: 12px; color: #b0b6be; margin-top: 4px; }
.metric.report { padding: 12px 18px; }
.daily-line { font-size: 13px; line-height: 1.55; color: #3c434b; }
.daily-red { color: #e34949; font-weight: 600; }

.empty-banner {
  margin: 16px 16px 0; background: #fff; border: 1px dashed #d5dbe3; border-radius: 10px;
  padding: 48px 24px; text-align: center; font-size: 16px; font-weight: 650; color: #5b6573;
}

.charts { display: grid; grid-template-columns: 1.05fr .95fr; gap: 12px; padding: 12px 16px 0; }
.ops { display: grid; grid-template-columns: 1.05fr .95fr; gap: 12px; padding: 12px 16px 0; }
.card { background: #fff; border-radius: 10px; border: 1px solid #e8ebf0; padding: 14px 16px 12px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.card-h h2 { font-size: 14px; font-weight: 650; }
.card-h .ex { font-size: 11px; color: #b0b6be; }
.example-badge { color: #d9822b !important; }
.hint { font-size: 12px; color: #8a9199; margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: #6b7280; margin-top: 4px; }
.legend b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.chart-box { width: 100%; min-height: 80px; }
.chart-box svg { display: block; width: 100%; height: auto; }

.intents { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.intent { display: grid; grid-template-columns: 72px 1fr 40px; gap: 8px; align-items: center; font-size: 12px; }
.ibar { height: 8px; background: #eef0f4; border-radius: 4px; overflow: hidden; }
.ibar i { display: block; height: 100%; border-radius: 4px; }
.intent .cnt { text-align: right; font-variant-numeric: tabular-nums; color: #5b6573; font-weight: 650; }

.wait-wrap { display: flex; align-items: stretch; gap: 16px; margin-top: 6px; }
.wait-bars { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.wrow { display: grid; grid-template-columns: 72px 1fr 48px; gap: 8px; align-items: center; font-size: 12px; }
.wbar { height: 10px; background: #eef0f4; border-radius: 5px; overflow: hidden; }
.wbar i { display: block; height: 100%; border-radius: 5px; background: #0089ff; min-width: 3px; }
.wrow .pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; color: #5b6573; }
.median {
  width: 136px; flex-shrink: 0; background: #f8fafc; border: 1px solid #e8ebf0; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 10px; text-align: center;
}
.median .n { font-size: 34px; font-weight: 700; letter-spacing: -.03em; color: #0089ff; line-height: 1; }
.median .u { font-size: 13px; color: #5b6573; font-weight: 650; margin-top: 4px; }
.median .k { font-size: 12px; color: #8a9199; margin-top: 8px; }
.median .sub { font-size: 11px; color: #b0b6be; margin-top: 2px; }

.score-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 10px; }
.score-avg { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.score-avg em { font-style: normal; font-size: 13px; color: #8a9199; font-weight: 500; margin-left: 4px; }
.score-avg .lbl { display: block; font-size: 12px; color: #d9822b; font-weight: 400; margin-top: 4px; letter-spacing: 0; }
.tiers { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.tier { border-radius: 8px; padding: 10px 6px 8px; text-align: center; }
.tier.excel { background: #e9f8ef; color: #2f9e62; }
.tier.good { background: #e8f4ff; color: #0089ff; }
.tier.mid { background: #fff4e5; color: #d9822b; }
.tier.bad { background: #ffecec; color: #e34949; }
.tier .tl { font-size: 13px; font-weight: 700; }
.tier .tr { font-size: 11px; margin-top: 2px; opacity: .9; }
.tier .tn { font-size: 18px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tier .tc { font-size: 11px; margin-top: 1px; font-variant-numeric: tabular-nums; opacity: .9; }
.score-legend { font-size: 11px; color: #8a9199; margin-top: 8px; line-height: 1.5; }
.extra-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.hot { margin: 12px 16px 16px; }
.hot-grid { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: stretch; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.qchip {
  font-size: 12px; padding: 5px 10px; border-radius: 14px;
  background: #f3f5f8; color: #3c434b; border: 1px solid #e5e8ee;
}
.qchip.on { background: #e8f4ff; color: #0089ff; border-color: #cfe6ff; font-weight: 650; }
.cloud {
  min-height: 168px; background: #f8fafc; border: 1px dashed #e5e8ee; border-radius: 10px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-content: center;
  gap: 10px 18px; padding: 16px 20px;
}
.cloud span { white-space: nowrap; line-height: 1.15; font-weight: 650; cursor: pointer; }
.cloud .empty, .muted { color: #8a9199; font-weight: 400; }

.page-details { flex: 1; display: flex; min-height: 0; }
.workspace {
  display: grid; grid-template-columns: 216px minmax(0,1fr) 340px;
  gap: 12px; padding: 16px; align-items: stretch; flex: 1; min-height: 0;
}
.side, .main, .detail { background: #fff; border-radius: 10px; border: 1px solid #e8ebf0; min-height: 640px; }
.side { padding: 16px 14px 18px; overflow: auto; }
.side h2, .main-h, .detail-h { font-size: 13px; font-weight: 650; color: #5b6573; margin-bottom: 12px; }
.field-label { font-size: 12px; color: #8a9199; margin: 12px 0 6px; }
.field-label:first-of-type { margin-top: 0; }
.datebox { border: 1px solid #e5e8ee; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #1f2329; background: #f8fafc; }
.datebox .r { color: #8a9199; font-size: 11px; margin-top: 2px; }
.taglist { display: flex; flex-direction: column; gap: 4px; }
.tagitem {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; border-radius: 8px; font-size: 13px; color: #3c434b; width: 100%; text-align: left;
}
.tagitem:hover { background: #f8fafc; }
.tagitem.on { background: #e8f4ff; color: #0089ff; font-weight: 600; }
.tagitem .c { font-size: 11px; color: #8a9199; font-weight: 500; }
.tagitem.on .c { color: #4aa3ff; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3c434b; }
.search {
  width: 100%; border: 1px solid #e5e8ee; border-radius: 8px; padding: 7px 10px;
  font-size: 12px; color: #1f2329; background: #fff;
}
.tiny-note { font-size: 11px; color: #b0b6be; margin-top: 6px; }

.main { display: flex; flex-direction: column; overflow: hidden; }
.main-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; margin-bottom: 8px; }
.main-h .hint { font-size: 12px; font-weight: 400; color: #8a9199; }
.table-scroll { overflow: auto; flex: 1; }
table.grid { width: 100%; border-collapse: collapse; }
.grid thead th {
  text-align: left; font-size: 12px; font-weight: 500; color: #8a9199;
  padding: 8px 12px; border-bottom: 1px solid #eef0f4; background: #fafbfc; white-space: nowrap; position: sticky; top: 0;
}
.grid tbody td { font-size: 13px; padding: 11px 12px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.grid tbody tr { cursor: pointer; }
.grid tbody tr:hover { background: #f8fafc; }
.grid tbody tr.selected { background: #f0f7ff; }
.grid tbody tr.alert { background: #fff8f8; }
.grid tbody tr.alert.selected { background: #fff1f0; }
th.sortable { color: #3c434b; font-weight: 650; cursor: pointer; }
th.sortable .arrow { color: #0089ff; font-size: 10px; margin-left: 2px; }
th.sortable .unit { color: #b0b6be; font-weight: 400; margin-left: 2px; }
.pill { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 4px; background: #f3f5f8; color: #5b6573; white-space: nowrap; }
.pill.blue { background: #e8f4ff; color: #0089ff; }
.pill.orange { background: #fff4e5; color: #d9822b; }
.pill.red { background: #ffecec; color: #e34949; }
.pill.green { background: #e9f8ef; color: #2f9e62; }
.pill.purple { background: #f3effc; color: #7b6ad6; }
.pill.teal { background: #e8f7f5; color: #1a9b8e; }
.pill.gray { background: #eef0f4; color: #5b6573; }
.flag { color: #e34949; font-size: 12px; font-weight: 650; }
.score { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score b { display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 5px; border-radius: 3px; }
.score.excel { color: #2f9e62; } .score.excel b { background: #e9f8ef; color: #2f9e62; }
.score.good { color: #0089ff; } .score.good b { background: #e8f4ff; color: #0089ff; }
.score.mid { color: #d9822b; } .score.mid b { background: #fff4e5; color: #d9822b; }
.score.bad { color: #e34949; } .score.bad b { background: #ffecec; color: #e34949; }
.sf-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sf { font-size: 12px; padding: 4px 8px; border-radius: 14px; border: 1px solid #e5e8ee; background: #f3f5f8; color: #3c434b; white-space: nowrap; }
.sf.on { background: #e8f4ff; color: #0089ff; border-color: #cfe6ff; font-weight: 650; }
.sf.excel { background: #e9f8ef; color: #2f9e62; border-color: #cfe9d8; }
.sf.excel.on { background: #2f9e62; color: #fff; border-color: #2f9e62; }
.sf.good { background: #e8f4ff; color: #0089ff; border-color: #cfe6ff; }
.sf.good.on { background: #0089ff; color: #fff; border-color: #0089ff; }
.sf.mid { background: #fff4e5; color: #d9822b; border-color: #f3e0c0; }
.sf.mid.on { background: #d9822b; color: #fff; border-color: #d9822b; }
.sf.bad { background: #ffecec; color: #e34949; border-color: #f0c7c7; }
.sf.bad.on { background: #e34949; color: #fff; border-color: #e34949; }

.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 14px; }
.foot-note { font-size: 11px; color: #b0b6be; line-height: 1.5; flex: 1; }
.pager { display: flex; gap: 6px; flex-shrink: 0; }
.pager button {
  font-size: 12px; padding: 4px 8px; border-radius: 6px; border: 1px solid #e5e8ee;
  background: #fff; color: #3c434b;
}
.pager button.on { background: #0089ff; color: #fff; border-color: #0089ff; }
.pager button:disabled { opacity: .45; cursor: default; background: #fff; color: #8a9199; }

.detail { padding: 16px 16px 18px; display: flex; flex-direction: column; overflow: auto; }
.alert-banner { background: #fff1f0; color: #e34949; border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 650; margin-bottom: 12px; }
.who-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.who-row .no { font-size: 20px; font-weight: 700; letter-spacing: 0.02em; }
.prop { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid #f0f2f5; font-size: 13px; gap: 12px; }
.prop:first-of-type { border-top: 0; }
.prop .k { color: #8a9199; flex-shrink: 0; }
.prop span:last-child { text-align: right; }
.block { margin-top: 14px; }
.block h3 { font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.block p { font-size: 13px; line-height: 1.7; color: #3c434b; white-space: pre-wrap; }
.no-audio { font-size: 11px; color: #b0b6be; margin-bottom: 10px; }
.audio-box {
  margin-bottom: 12px;
  background: #f6f8fb;
  border: 1px solid #e8ebf0;
  border-radius: 10px;
  padding: 10px 12px;
}
.audio-box audio { width: 100%; display: block; }
.audio-note { font-size: 11px; color: #b0b6be; margin-top: 6px; line-height: 1.5; }

.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #e8f3ff;
  padding: 0 16px 32px;
  min-height: 640px;
  min-height: 100%;
  min-height: 100vh;
  width: 100%;
}
.gate-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
  background: #0089ff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 14px 16px;
}
.gate.is-error .gate-banner { background: #c2410c; }
.gate-card {
  background: #fff; border: 1px solid #cfe6ff; border-radius: 12px; padding: 28px 32px; text-align: center;
  box-shadow: 0 12px 32px rgba(31,40,54,.08);
  margin-top: 36px;
  width: min(420px, 100%);
}
.gate.is-error .gate-card { border-color: #f0c7c7; }
.gate-card .dot { margin: 0 auto 12px; width: 10px; height: 10px; }
.gate-card h1 { font-size: 20px; margin-bottom: 10px; color: #1f2329; }
.gate-card p { font-size: 14px; color: #1f2329; line-height: 1.65; max-width: 360px; margin: 0 auto; }
.gate-diag { margin-top: 14px; font-size: 12px; color: #5b6573; line-height: 1.6; text-align: left; word-break: break-word; max-width: 360px; }

@media (max-width: 1400px) {
  .hot-grid { grid-template-columns: 220px 1fr; }
  .workspace { grid-template-columns: 200px minmax(0,1fr) 300px; }
}

/* ==== mobile-webview-fix ==== */
@media (max-width: 900px) {
  html, body {
    height: auto;
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 0;
  }
  body { min-width: 0; }
  .shell { min-height: 100vh; min-height: 100dvh; min-width: 0; }
  .titlebar {
    height: auto; min-height: 48px; flex-wrap: wrap; gap: 8px 12px;
    padding: 8px 12px; padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .app-name { font-size: 15px; }
  .tabs { order: 3; width: 100%; }
  .tab { flex: 1; text-align: center; }
  .actions { min-width: 0; text-align: left; margin-left: auto; }
  .filterbar {
    flex-wrap: wrap; align-items: flex-start; gap: 8px 10px;
    padding: 10px 12px;
  }
  .filterbar .dates { flex-wrap: wrap; width: 100%; }
  .datefield { flex: 1; min-width: 140px; }
  .datefield input[type="date"] { width: 100%; min-width: 0; font-size: 16px; }
  .filter-note { display: none; }
  .alertbar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .alertbar .meta { text-align: left; }
  .metrics, .charts, .ops, .hot-grid {
    grid-template-columns: 1fr;
    padding-left: 12px; padding-right: 12px;
  }
  .metrics { grid-template-columns: 1fr 1fr; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .complaints { margin: 12px; }
  #majorTableWrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .qtable { min-width: 620px; }
  .page-dash { padding-bottom: 32px; }
  .hot { margin-left: 12px; margin-right: 12px; }
  .page-details { display: block; min-height: 0; flex: none; }
  .workspace {
    display: flex; flex-direction: column; gap: 12px;
    padding: 12px; min-height: 0;
  }
  .side, .main, .detail { min-height: 0; }
  .main { order: 1; overflow: visible; }
  .detail { order: 2; }
  .side { order: 3; }
  .taglist { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .tagitem { width: auto; padding: 5px 8px; background: #f3f5f8; }
  .sf-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .side h2 { margin-bottom: 8px; }
  .table-scroll { max-height: none; overflow: auto; -webkit-overflow-scrolling: touch; }
  table.grid { min-width: 720px; }
  .gate-card { width: 100%; max-width: 360px; padding: 28px 20px; }
  input, select, button { max-width: 100%; }
  .search { font-size: 16px; }
}

@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
}
