/* ===== Transcriptor Pro — estilos (temas claro/escuro, responsivo) ===== */
:root {
  --bg: #f4f6fa; --bg2: #ffffff; --bg3: #eef1f7; --ink: #16213a; --ink2: #4b5875;
  --ink3: #7c88a3; --line: #dde3ee; --brand: #1d4ed8; --brand2: #3b82f6; --brand-ink: #fff;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7;
  --err: #b91c1c; --err-bg: #fee2e2; --info: #1e40af; --info-bg: #dbeafe;
  --hl: #fde68a; --hl2: #fbbf24; --add: #16a34a; --add-bg: #dcfce7; --del: #dc2626;
  --del-bg: #fee2e2; --chg: #d97706; --chg-bg: #ffedd5;
  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 4px 14px rgb(16 24 40 / .07);
  --radius: 10px; --radius-sm: 7px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #0f1420; --bg2: #171e2e; --bg3: #1f2940; --ink: #e6ebf5; --ink2: #aab6cd; --ink3: #7e8aa5;
  --line: #2a3450; --brand: #3b82f6; --brand2: #60a5fa; --brand-ink: #fff;
  --ok: #4ade80; --ok-bg: #14361f; --warn: #fbbf24; --warn-bg: #3a2c10;
  --err: #f87171; --err-bg: #3b1517; --info: #93c5fd; --info-bg: #14263f;
  --hl: #78561a; --hl2: #a97a1d; --add: #4ade80; --add-bg: #14361f; --del: #f87171;
  --del-bg: #3b1517; --chg: #fbbf24; --chg-bg: #3a2c10;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 18px rgb(0 0 0 / .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.app-root { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.view { flex: 1; overflow: auto; outline: none; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 200; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--brand2); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--hl2); color: #1b1b1b; }

/* ===== topbar ===== */
.topbar { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 52px;
  background: var(--bg2); border-bottom: 1px solid var(--line); flex: none; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
.brand svg { color: var(--brand); }
.nav { display: flex; gap: 2px; margin-left: 10px; flex-wrap: wrap; }
.nav a { padding: 6px 11px; border-radius: 999px; text-decoration: none; color: var(--ink2); font-weight: 500; }
.nav a:hover { background: var(--bg3); color: var(--ink); }
.nav a.active { background: var(--info-bg); color: var(--info); }
.topbar .spacer { flex: 1; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink2);
  cursor: pointer; }
.iconbtn:hover { background: var(--bg3); color: var(--ink); }

/* ===== botões e inputs ===== */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font-weight: 600; font-size: 13.5px;
  cursor: pointer; text-decoration: none; transition: filter .12s; font-family: var(--sans); }
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.btn.ghost:hover { background: var(--bg3); color: var(--ink); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn svg { flex: none; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  font-family: var(--sans); font-size: 14px; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg2); color: var(--ink); width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand2); outline-offset: 0; border-color: var(--brand2); }
label.field { display: block; margin-bottom: 10px; font-size: 13px; color: var(--ink2); font-weight: 600; }
label.field > * { margin-top: 4px; font-weight: 400; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; color: var(--ink); }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.hint { font-size: 12.5px; color: var(--ink3); }
.formrow { display: flex; gap: 10px; } .formrow > * { flex: 1; }

/* ===== cards, listas, tabelas ===== */
.page { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }
.page-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-header h1 { margin: 0; } .page-header .spacer { flex: 1; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.stat { display: inline-flex; align-items: baseline; gap: 6px; background: var(--bg3); border-radius: 999px;
  padding: 3px 10px; font-size: 12.5px; color: var(--ink2); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink3); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.clickable { cursor: pointer; } .tbl tr.clickable:hover td { background: var(--bg3); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.gray { background: var(--bg3); color: var(--ink2); }
.badge.demo { background: #f3e8ff; color: #7e22ce; }
[data-theme="dark"] .badge.demo { background: #2e1a47; color: #d8b4fe; }
.progress { height: 6px; background: var(--bg3); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand2); border-radius: 999px; transition: width .4s; }
.empty { text-align: center; padding: 44px 16px; color: var(--ink3); }
.empty svg { opacity: .4; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); color: var(--ink2);
  border: 1px solid transparent; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; }
.chip.active { background: var(--info-bg); color: var(--info); border-color: var(--info); font-weight: 600; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 12px;
  color: var(--ink2); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; font-family: var(--sans); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center;
  color: var(--ink3); transition: .15s; }
.dropzone.over { border-color: var(--brand); background: var(--info-bg); color: var(--brand); }

/* ===== toasts / modais ===== */
.toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 300; max-width: 380px; }
.toast { background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  box-shadow: var(--shadow); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13.5px; animation: slidein .18s ease-out; }
.toast.ok { border-left-color: var(--ok); } .toast.err { border-left-color: var(--err); } .toast.warn { border-left-color: var(--warn); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgb(9 13 22 / .55); display: flex; align-items: center;
  justify-content: center; z-index: 250; padding: 20px; }
.modal { background: var(--bg2); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%;
  max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; animation: slidein .15s ease-out; }
.modal.wide { max-width: 880px; }
.modal header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal header h2 { margin: 0; font-size: 16px; flex: 1; }
.modal .modal-body { padding: 16px 18px; overflow: auto; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }

/* ===== login ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(1200px 600px at 20% -10%, var(--info-bg), transparent), var(--bg); }
.login-card { width: 100%; max-width: 380px; }

/* ===== tela de revisão ===== */
.review { display: grid; grid-template-columns: minmax(340px, 34%) minmax(300px, 1fr) minmax(280px, 30%);
  gap: 12px; height: 100%; padding: 12px; overflow: hidden; }
.review .col { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.review-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); }
.review-toolbar .title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.savestate { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink3); min-width: 92px; }
.savestate.saving { color: var(--warn); } .savestate.saved { color: var(--ok); } .savestate.error { color: var(--err); }

.player-box { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.player-box .media-wrap { position: relative; background: #000; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.player-box video, .player-box audio { width: 100%; height: 100%; background: #000; }
.player-box .audio-poster { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center; color: #cbd5f5; background: linear-gradient(160deg, #101828, #1d2939); }
.player-controls { display: flex; align-items: center; gap: 6px; padding: 8px 10px; flex-wrap: wrap; }
.player-controls .time { font-family: var(--mono); font-size: 12px; color: var(--ink2); white-space: nowrap; }
.seek { position: relative; height: 18px; display: flex; align-items: center; padding: 0 10px; cursor: pointer; }
.seek .track { position: relative; height: 5px; width: 100%; background: var(--bg3); border-radius: 999px; }
.seek .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand2); border-radius: 999px; }
.seek .knob { position: absolute; width: 13px; height: 13px; background: var(--brand); border-radius: 50%;
  transform: translate(-50%, -50%); top: 50%; box-shadow: 0 1px 3px rgb(0 0 0 / .4); }
.seek .pin { position: absolute; top: -3px; width: 3px; height: 11px; border-radius: 2px; transform: translateX(-50%); }
.seek .range-sel { position: absolute; top: 0; bottom: 0; background: var(--hl2); opacity: .55; border-radius: 2px; }
.wave-box { padding: 6px 8px 10px; }
.wave-box canvas { width: 100%; height: 84px; display: block; border-radius: 6px; background: var(--bg3); cursor: crosshair; touch-action: none; }
.wave-tools { display: flex; gap: 6px; align-items: center; margin-top: 6px; }

.transcript-box { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; min-height: 0; flex: 1; }
.transcript-head { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.transcript-scroll { flex: 1; overflow-y: auto; padding: 10px 12px 40vh; scroll-behavior: smooth; }
.seg { padding: 6px 8px; border-radius: var(--radius-sm); margin-bottom: 2px; position: relative; border: 1px solid transparent; }
.seg:hover { background: var(--bg3); }
.seg.active { background: var(--info-bg); border-color: var(--info); }
.seg .seg-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.seg .seg-time { font-family: var(--mono); font-size: 11px; color: var(--ink3); cursor: pointer; background: none; border: none; padding: 0; }
.seg .seg-time:hover { color: var(--brand); text-decoration: underline; }
.seg select.speaker-sel { font-size: 11.5px; padding: 1px 4px; width: auto; max-width: 150px; border-radius: 5px; }
.seg .seg-actions { margin-left: auto; display: none; gap: 2px; }
.seg:hover .seg-actions, .seg.editing .seg-actions { display: flex; }
.seg .seg-actions .iconbtn { width: 26px; height: 26px; }
.seg .seg-text { font-size: 15.5px; line-height: 1.65; cursor: text; }
.seg .w { border-radius: 3px; padding: 0 1px; }
.seg .w.clickable { cursor: pointer; }
.seg .w.active { background: var(--hl2); color: #1b1b1b; font-weight: 600; }
.seg .w.hit { background: var(--hl); }
.seg .w.hit.current { background: var(--hl2); outline: 1px solid var(--chg); }
.seg .w.corr { text-decoration: underline dotted var(--brand2); text-underline-offset: 3px; }
.seg .w.suspect { text-decoration: underline wavy var(--err); text-underline-offset: 3px; }
.seg .w.edited-input:focus { background: var(--hl); outline: none; }
.seg.editing .seg-text { outline: 2px solid var(--brand2); border-radius: 4px; padding: 2px 4px; background: var(--bg2); }
.seg.paragraph-start { margin-top: 14px; }
.seg .qa-badge { font-size: 10px; font-weight: 800; border-radius: 4px; padding: 0 4px; }
.seg .qa-badge.q { background: var(--info-bg); color: var(--info); }
.seg .qa-badge.a { background: var(--ok-bg); color: var(--ok); }
.seg .conf-low { color: var(--err); font-size: 11px; }
.seg .seg-tools-row { display: flex; gap: 6px; margin-top: 4px; }
.seg.paragraph-break::after { content: ""; display: block; height: 10px; }

.panel-box { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; min-height: 0; flex: 1; }
.review-item { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; }
.review-item:hover { border-color: var(--brand2); }
.review-item.current { border-color: var(--brand); background: var(--info-bg); }
.review-item .ri-top { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink3); }
.review-item .ri-suspect { font-weight: 700; color: var(--err); }
.review-item .ri-reason { font-size: 12px; color: var(--ink2); margin-top: 2px; }
.review-item .ri-context { font-size: 12.5px; color: var(--ink3); margin-top: 3px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reviewmode-bar { position: sticky; top: 0; z-index: 5; background: var(--info-bg); border: 1px solid var(--info);
  color: var(--info); border-radius: var(--radius-sm); padding: 8px 12px; display: flex; align-items: center;
  gap: 10px; margin-bottom: 10px; flex-wrap: wrap; font-size: 13px; }

.diff-wrap { font-family: var(--mono); font-size: 12.5px; }
.diff-line { padding: 3px 6px; border-radius: 4px; margin-bottom: 2px; white-space: pre-wrap; }
.diff-line .del { background: var(--del-bg); color: var(--del); text-decoration: line-through; }
.diff-line .ins { background: var(--add-bg); color: var(--add); font-weight: 700; }
.diff-line .sub-o { background: var(--del-bg); color: var(--del); text-decoration: line-through; }
.diff-line .sub-n { background: var(--chg-bg); color: var(--chg); font-weight: 700; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--ink2); margin: 8px 0; flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }

.marker-row { display: flex; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.marker-row:last-child { border-bottom: none; }
.marker-row .m-time { font-family: var(--mono); font-size: 11.5px; color: var(--brand); cursor: pointer; white-space: nowrap; }
.marker-row .m-cat { font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.cat-Importante { background: var(--info-bg); color: var(--info); }
.cat-Revisar { background: var(--err-bg); color: var(--err); }
.cat-Confirmado { background: var(--ok-bg); color: var(--ok); }
.cat-CitarNaMatéria, .cat-Citar { background: #f3e8ff; color: #7e22ce; }
[data-theme="dark"] .cat-CitarNaMatéria, [data-theme="dark"] .cat-Citar { background: #2e1a47; color: #d8b4fe; }
.note-row { padding: 8px; border-bottom: 1px solid var(--line); }
.note-row .n-time { font-family: var(--mono); font-size: 11.5px; color: var(--brand); cursor: pointer; }
.entity-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--bg3); color: var(--ink);
  border-radius: 999px; padding: 3px 10px; font-size: 12.5px; margin: 3px 3px 0 0; cursor: pointer; border: 1px solid transparent; }
.entity-chip:hover { border-color: var(--brand2); }
.entity-chip .cnt { font-size: 10.5px; color: var(--ink3); }
.frame-preview { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.frame-preview img, .frame-preview canvas { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }

/* processamento */
.task-row td { font-size: 13px; }
.task-note { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; }

/* config */
.provider-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.provider-card .p-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cap { font-size: 11px; background: var(--bg3); color: var(--ink2); border-radius: 4px; padding: 2px 6px; }
.cap.on { background: var(--ok-bg); color: var(--ok); }
.cap.off { background: var(--bg3); color: var(--ink3); text-decoration: line-through; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.on { background: var(--ok); } .status-dot.off { background: var(--ink3); }

.kbd { font-family: var(--mono); font-size: 11px; background: var(--bg3); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--ink2); }

/* responsivo */
@media (max-width: 1150px) {
  .review { grid-template-columns: minmax(320px, 44%) 1fr; grid-template-rows: 1fr; }
  .review .col.right { position: fixed; top: 52px; right: 0; bottom: 0; width: min(360px, 92vw);
    transform: translateX(105%); transition: transform .2s; z-index: 40; padding: 10px; background: var(--bg); }
  .review .col.right.open { transform: translateX(0); box-shadow: var(--shadow); }
}
@media (max-width: 860px) {
  .review { display: flex; flex-direction: column; overflow: visible; height: auto; }
  .review .col { max-height: none; }
  .player-box .media-wrap { aspect-ratio: auto; max-height: 34vh; }
  .transcript-scroll { max-height: 60vh; }
  .review .col.right { position: static; width: auto; transform: none; }
  .nav { display: none; }
  .topbar { overflow-x: auto; }
  .mobile-nav { display: flex; }
}
.mobile-tabbar { display: none; }
@media (max-width: 860px) {
  .view { padding-bottom: 54px; }
  .mobile-tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg2);
    border-top: 1px solid var(--line); z-index: 30; justify-content: space-around; }
  .mobile-tabbar a { padding: 8px 12px; color: var(--ink2); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; }
  .mobile-tabbar a.active { color: var(--brand); font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Stable route containers, keyboard controls and bounded transcript rendering. */
.mounted-view { height: 100%; min-height: 0; overflow: auto; }
[hidden] { display: none !important; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; padding: 8px; border-radius: 8px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-body { position: absolute; right: 0; top: 42px; z-index: 60; display: grid; gap: 8px;
  min-width: 210px; padding: 16px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.review { min-height: 0; flex: 1; }
.review .col { min-width: 0; }
.seg .seg-text { font-size: inherit; overflow-wrap: anywhere; }
.seg:focus-within .seg-actions { display: flex; }
.seg .seg-meta { flex-wrap: wrap; }
.transcript-scroll { overflow-anchor: none; scroll-behavior: auto; font-size: 15.5px; }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.modal footer { flex-wrap: wrap; }
.admin-access { display: grid; gap: 16px; }
.admin-access .card { margin: 0; }
.admin-table { overflow: auto; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-status { min-height: 1.5em; }
@media(max-width:860px) {
  .review { overflow: visible; flex: none; }
  .mounted-view:has(.review) { overflow: auto !important; }
  .mounted-view:has(.review) > div { height: auto !important; }
  .transcript-scroll { height: 55vh; min-height: 280px; }
  .mobile-tabbar { overflow-x: auto; justify-content: flex-start; }
  .mobile-tabbar a { flex: 1 0 auto; padding: 8px 10px; }
  .formrow { flex-wrap: wrap; }
  .formrow > * { min-width: 180px; }
}
