/* Control de Activos — hoja de estilos */

:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --sunken: #efefea;
  --line: #e4e4df;
  --line-2: #d3d3cc;
  --text: #1b1c1a;
  --muted: #6b6d68;
  --accent: #184d3e;
  --accent-hover: #113a2f;
  --accent-soft: #e5eee9;
  --accent-text: #184d3e;
  --ink: #1b1c1a;
  --ok: #1d7a4b;
  --warn: #9a5b06;
  --warn-soft: #fbf2df;
  --warn-line: #ecd3a3;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 8px;
  --radius-sm: 6px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sidebar: 232px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412;
    --surface: #1a1c1a;
    --sunken: #222522;
    --line: #2b2e2b;
    --line-2: #3a3e3a;
    --text: #e8e9e5;
    --muted: #9b9e98;
    --accent: #2f7a63;
    --accent-hover: #3a8d74;
    --accent-soft: #1d2f28;
    --accent-text: #7cc4a8;
    --ink: #e8e9e5;
    --ok: #5cbf8a;
    --warn: #e0a84a;
    --warn-soft: #2d2517;
    --warn-line: #54431f;
    --danger: #f07167;
    --danger-soft: #2e1a18;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 14.5px/1.5 var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
h2.mini { font-size: 14px; margin: 28px 0 10px; }
code { font-family: var(--mono); font-size: .86em; font-weight: 500; }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pre { white-space: pre-line; }
.i { width: 18px; height: 18px; flex-shrink: 0; }
.mark { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; }
[hidden] { display: none !important; }

/* ---------- Estructura ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 15px; padding: 2px 8px 18px; }
.brand:hover { text-decoration: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
  color: var(--muted); font: 500 14px var(--sans); background: none; border: 0; cursor: pointer; text-align: left;
}
.nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link:hover { background: var(--sunken); color: var(--text); text-decoration: none; }
.nav-link.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.me { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.me form { margin: 0; }

.app main { margin-left: var(--sidebar); max-width: calc(1120px + var(--sidebar)); padding: 28px 36px 48px; }
.mobilebar, .tabbar { display: none; }
.bare main { max-width: 420px; margin: 0 auto; padding: 16px; }

/* ---------- Encabezados ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 6px; color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.count-pill { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunken); border-radius: 4px; padding: 1px 7px; }
.crumb { margin: 0 0 14px; font-size: 13.5px; }
.crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.crumb .i { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* ---------- Superficies ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.narrow { max-width: 440px; }

.flash, .error {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px;
}
.flash { background: var(--accent-soft); color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.flash .i { margin-top: 2px; }
.error { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: 500 14px var(--sans); cursor: pointer; white-space: nowrap;
}
.btn .i { width: 17px; height: 17px; }
.btn:hover { background: var(--sunken); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.qr { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.qr:hover { opacity: .9; }
.btn.ok { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); background: transparent; border-color: transparent; padding: 0 6px; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; margin-top: 8px; }
.btn .n { font-size: 12px; font-weight: 600; background: rgba(127, 127, 127, .22); border-radius: 4px; padding: 0 6px; line-height: 18px; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }

/* ---------- Formularios ---------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px;
  font: 400 14.5px var(--sans); color: var(--text); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 11px; min-height: 38px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); margin: 0; font-weight: 400; font-size: 14px; }
label.check input { width: 16px; min-height: 0; height: 16px; margin: 0; accent-color: var(--accent); }

.form { padding: 0; }
.form fieldset { border: 0; margin: 0; padding: 18px 20px 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; border-bottom: 1px solid var(--line); }
.form fieldset:last-of-type { border-bottom: 0; }
.form legend { float: left; width: 100%; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 14px; padding: 0; }
.form legend small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 4px; }
.form .full { grid-column: 1 / -1; }
.form > .actions { justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--sunken); border-radius: 0 0 var(--radius) var(--radius); }
.card.form.narrow, form.form.narrow { padding: 18px 20px; }
.form.narrow > .btn, .card .form > .btn { margin-top: 4px; }
.card .form { padding: 0; }
.card .form fieldset, .card .form label { padding-left: 0; padding-right: 0; }

.photo-input {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 22px 16px; text-align: center; cursor: pointer; background: var(--bg);
}
.photo-input:hover { border-color: var(--accent); }
.photo-input .i { width: 24px; height: 24px; color: var(--accent-text); }
.photo-input span { font-weight: 600; color: var(--text); font-size: 14px; }
.photo-input input { display: none; }
.gallery { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gallery:empty { display: none; }
.ph { position: relative; margin: 0; }
.ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); display: block; border: 1px solid var(--line); }
.ph span { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ph span input { width: 14px; height: 14px; min-height: 0; margin: 0; accent-color: var(--danger); }
.ph.new span { color: var(--accent-text); font-weight: 600; }

/* ---------- Inicio ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
}
.stat { background: var(--surface); padding: 14px 18px 16px; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
a.stat:hover { background: var(--bg); text-decoration: none; }
.stat b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.warn b { color: var(--warn); }
.bar { display: grid; grid-template-columns: 150px 1fr 36px; gap: 12px; align-items: center; color: var(--text); padding: 6px 0; font-size: 14px; }
.bar:hover { text-decoration: none; }
.bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar i { display: block; height: 8px; border-radius: 2px; background: var(--accent); min-width: 3px; }
.bar b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline li:first-child { padding-top: 0; }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline small { display: block; margin-top: 1px; }
.timeline .pre { margin-top: 4px; }
.tag { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 6px; }
.tag.alta { color: var(--accent-text); }
.tag.verificacion { color: var(--ok); }
.tag.reasignacion, .tag.baja { color: var(--warn); }
.tag.qr { color: var(--ink); }

/* ---------- Estado y marcas ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status.reparacion::before { background: var(--warn); }
.status.baja { color: var(--muted); }
.status.baja::before { background: var(--line-2); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 12px; font-weight: 500; padding: 0 7px; line-height: 20px; border-radius: 4px;
  border: 1px solid var(--line-2); color: var(--muted);
}
.badge .i { width: 13px; height: 13px; }
.badge.qr-ok { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge.qr-pending { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }

/* ---------- Listas ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; }
.filters input, .filters select { margin: 0; flex: 1 1 170px; width: auto; }
.filters input[type=search] { flex: 3 1 240px; }
.find { margin: 0 0 12px; }

.table-wrap { padding: 0; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover { background: var(--bg); }
.list td code { color: var(--text); }
.list .badge { margin-left: 4px; }
tr.inactive td { opacity: .5; }
.thumb { width: 52px; padding-right: 0 !important; }
.thumb img { width: 38px; height: 38px; object-fit: cover; border-radius: 5px; display: block; }

.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.rows > * { border-bottom: 1px solid var(--line); }
.rows > *:last-child { border-bottom: 0; }
.person, .asset-card, .row-link { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--text); }
.person:hover, .asset-card:hover, .row-link:hover { background: var(--bg); text-decoration: none; }
.inactive { opacity: .55; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 13px; letter-spacing: .02em;
}
.avatar.big { width: 56px; height: 56px; font-size: 19px; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.who b { font-weight: 600; }
.who small, .who p { overflow: hidden; text-overflow: ellipsis; }
.count { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.count b { color: var(--text); font-weight: 600; }

.profile { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile .who p { margin: 2px 0 0; color: var(--muted); }
.profile h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.asset-card img, .asset-card .nophoto { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.asset-card > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.asset-card b { font-weight: 600; }
.asset-card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 2px; }
.asset-card code { color: var(--muted); font-size: 12.5px; }
.nophoto { display: grid; place-items: center; background: var(--sunken); color: var(--muted); }
.nophoto .i { width: 20px; height: 20px; }
.nophoto.big { display: flex; flex-direction: column; gap: 6px; height: 150px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; }
.nophoto.big .i { width: 26px; height: 26px; }

.row-link { width: 100%; background: none; border: 0; font: 500 14.5px var(--sans); cursor: pointer; text-align: left; }
.row-link .i { color: var(--muted); }
.account-links form { margin: 0; }

/* ---------- Duplicados y asignación ---------- */
.error.dup { flex-direction: column; align-items: stretch; gap: 12px; color: var(--text); }
.error.dup a { color: var(--danger); font-weight: 600; }
.error.dup .actions { gap: 8px; }
.assign .current { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.assign .current p { margin: 0; }
.assign details summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--accent-text); list-style: none; }
.assign details summary::-webkit-details-marker { display: none; }
.assign details[open] summary { margin-bottom: 12px; }
.assign-form label { margin-bottom: 10px; }
.assign-form .fine { margin: 10px 0 0; }
.checklist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.checklist label.check, label.check.deactivate { align-items: flex-start; }
.checklist label.check input, label.check.deactivate input { margin-top: 3px; }
.deactivate { padding: 12px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid var(--warn-line); margin-bottom: 14px !important; }

/* ---------- Ficha del bien ---------- */
.photo { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius-sm); display: block; margin-bottom: 10px; }
.photos .strip { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; }
.photos .strip img { width: 64px; height: 64px; object-fit: cover; border-radius: 5px; display: block; border: 1px solid var(--line); }
.photos > a:only-child .photo { margin-bottom: 18px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 9px 20px; margin: 0; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.details dt.group { grid-column: 1 / -1; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.details dd.group { display: none; }
.form .fine { margin: 0 0 14px; }
.qr-box { display: flex; gap: 18px; align-items: center; }
.qr-box > div:last-child { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.qr-box > div:last-child > div, .qr-box .btn { margin-right: 4px; }
.qr-box p { word-break: break-all; margin: 0 0 4px; }
.qr-img { width: 132px; flex-shrink: 0; background: #fff; padding: 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.qr-img svg { display: block; width: 100%; height: auto; }
.qr-empty p { margin: 0; font-size: 14px; }
.verify form { display: flex; flex-direction: column; gap: 8px; }
.verify input { margin: 0; }
.verify .btn.block { margin: 0; }
.public { max-width: 520px; margin: 24px auto; }
.public .login-brand { margin-bottom: 18px; }
.public h1 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 14px; }
.public h2 { font-size: 17px; }
.scan #reader { max-width: 480px; margin: 0 auto; border-radius: var(--radius-sm); overflow: hidden; }

/* ---------- Acceso ---------- */
.login { max-width: 360px; margin: 14vh auto 0; }
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin-bottom: 40px; }
.login-brand.small { margin-bottom: 16px; }
.login h1 { margin-bottom: 22px; }
.login .btn.block { height: 40px; margin-top: 4px; }
.fine { color: var(--muted); font-size: 13px; margin-top: 22px; }

/* ---------- Etiquetas imprimibles ---------- */
.labels-page, .doc-page { background: #fff; color: #000; color-scheme: light; }
.labels-page .toolbar, .doc-page .toolbar { padding: 12px 20px; border-bottom: 1px solid #ddd; margin: 0; font-size: 14px; }
.labels-page .btn, .doc-page .btn { --surface: #fff; --text: #1b1c1a; --accent: #184d3e; --accent-hover: #113a2f; }
.labels { display: grid; grid-template-columns: repeat(auto-fill, 90mm); gap: 4mm; padding: 8mm; }
.label { width: 90mm; height: 40mm; border: 1px dashed #aaa; border-radius: 2mm; padding: 3mm; display: flex; gap: 3.5mm; align-items: center; break-inside: avoid; color: #000; }
.label .qr { width: 34mm; height: 34mm; flex-shrink: 0; }
.label .qr svg { width: 100%; height: 100%; }
.label .txt { display: flex; flex-direction: column; overflow: hidden; gap: .6mm; }
.label .txt b { font: 600 14.5pt var(--mono); letter-spacing: -.01em; }
.label .txt span { font-size: 8.5pt; max-height: 3.6em; overflow: hidden; line-height: 1.25; }
.label .txt small { font-size: 6.5pt; color: #444; letter-spacing: .12em; text-transform: uppercase; }
@media print {
  .no-print { display: none !important; }
  .labels { padding: 0; }
  .label { border-color: #ccc; }
  @page { margin: 10mm; }
}

/* ---------- Resguardo imprimible ---------- */
.doc { max-width: 900px; margin: 0 auto; padding: 28px 24px; font-size: 10.5pt; }
.doc header { text-align: center; margin-bottom: 18px; }
.doc header h1 { font-size: 15pt; margin: 4px 0; text-transform: uppercase; letter-spacing: .08em; }
.doc header p { margin: 4px 0; }
.doc .org { font-weight: 700; }
.doc table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.doc th, .doc td { border: 1px solid #999; padding: 5px 7px; text-align: left; vertical-align: top; }
.doc .kv th { background: #f1f1ee; width: 16%; font-weight: 600; }
.doc .grid th { background: #184d3e; color: #fff; font-weight: 600; }
.doc .grid td:nth-child(2) { font-family: var(--mono); font-size: 9pt; white-space: nowrap; }
.legal { text-align: justify; margin: 18px 0 72px; line-height: 1.55; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; text-align: center; }
.signs span { display: block; border-top: 1px solid #000; margin-bottom: 4px; }
.signs small { display: block; color: #444; }
@media print { .doc { padding: 0; } .doc .grid th, .doc .kv th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Teléfono ---------- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobilebar {
    display: flex; align-items: center; position: sticky; top: 0; z-index: 10;
    height: 52px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .mobilebar .brand { padding: 0; font-size: 15px; }
  .mobilebar .mark { width: 24px; height: 24px; }
  .app main { margin: 0; padding: 18px 16px calc(88px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; inset: auto 0 0 0; z-index: 10;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 4px 4px env(safe-area-inset-bottom);
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; font-size: 11px; font-weight: 500; color: var(--muted); }
  .tab .i { width: 22px; height: 22px; }
  .tab:hover { text-decoration: none; }
  .tab.on { color: var(--accent-text); }

  h1 { font-size: 20px; }
  .page-head { flex-direction: column; align-items: stretch; margin-bottom: 18px; }
  .actions .btn, .actions form { flex: 1 1 auto; }
  .actions form .btn { width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .form fieldset { grid-template-columns: 1fr; padding: 16px 16px 4px; }
  .form > .actions { padding: 12px 16px; }
  .profile { flex-wrap: wrap; }
  .profile .btn { margin-left: auto; }
  .count .badge { display: none; }

  .list thead { display: none; }
  .list tbody tr { display: grid; grid-template-columns: auto 1fr; padding: 10px 6px; border-bottom: 1px solid var(--line); }
  .list tbody tr:last-child { border-bottom: 0; }
  .list td { border: 0; padding: 1px 8px; grid-column: 2; }
  .list td.thumb { grid-column: 1; grid-row: 1 / span 6; width: auto; padding: 2px 4px 0 8px !important; }
  .list td.thumb:empty { display: none; }
  .list td.thumb:empty ~ td { grid-column: 1 / -1; }
  .list td[data-label] { font-size: 13px; color: var(--muted); }
  .list td[data-label]::before { content: attr(data-label) ": "; }
  .list td:last-child { padding-top: 4px; }
  .qr-box { flex-direction: column; align-items: center; text-align: center; }
  .qr-box > div:last-child { align-items: center; }
  .bar { grid-template-columns: 110px 1fr 32px; }
}
