/* Layout: barra lateral fija + área de trabajo. En el detalle, la secuencia de 7 fases a la izquierda y el expediente de la fase a la derecha. */
:root {
  --bg: #f2f4f2;
  --surface: #ffffff;
  --sunken: #e9edea;
  --ink: #16201b;
  --muted: #5a6761;
  --line: #d8dfdb;
  --accent: #1b6953;
  --accent-ink: #ffffff;
  --accent-soft: #dbebe4;
  --ok: #2c7a3a;
  --ok-soft: #e0efe2;
  --warn: #9c5c00;
  --warn-soft: #faedd6;
  --bad: #ad261d;
  --bad-soft: #f7e0dd;
  --shadow: 0 1px 2px rgba(22, 32, 27, .06), 0 8px 24px rgba(22, 32, 27, .06);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 10px;
}
/* Siempre en modo claro. El tema oscuro queda disponible solo si se pone data-theme="dark" en <html>. */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #101513; --surface: #171e1b; --sunken: #1d2622; --ink: #e5ebe8; --muted: #9aa8a1; --line: #2a3530;
  --accent: #5dbd99; --accent-ink: #0c1512; --accent-soft: #1b3029;
  --ok: #6cc47a; --ok-soft: #1a2e1e; --warn: #e2a645; --warn-soft: #33270f; --bad: #ef7d73; --bad-soft: #381c19;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 650; }
h2 { font-size: 20px; font-weight: 620; }
h3 { font-size: 16px; font-weight: 620; }
p { margin: 0; }
small, .muted { color: var(--muted); }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Controles */
button { font: inherit; color: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.wide { width: 100%; justify-content: center; padding: 11px; }
.btn svg { width: 16px; height: 16px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--bad); }
label.f { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0;
}
input:disabled, select:disabled, textarea:disabled { background: var(--sunken); color: var(--muted); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }

/* Estados */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-active { background: var(--accent-soft); color: var(--accent); }
.s-late { background: var(--bad-soft); color: var(--bad); }
.s-done, .s-closed { background: var(--ok-soft); color: var(--ok); }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 5px; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.bar { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.segs { display: flex; gap: 3px; }
.segs i { width: 14px; height: 5px; border-radius: 2px; background: var(--line); }
.segs i.done { background: var(--ok); }
.segs i.active { background: var(--accent); }
.segs i.late { background: var(--bad); }
.av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }

/* Login */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-main { display: grid; place-items: center; padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 22px; }
.login-card form { display: grid; gap: 14px; }
.login-card .note { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 14px; }
.login-side { background: var(--accent); color: var(--accent-ink); padding: 56px 48px; display: grid; align-content: center; gap: 22px; }
.login-side h2 { font-size: 30px; max-width: 16ch; }
.login-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: f; }
.login-side li { counter-increment: f; display: flex; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid color-mix(in srgb, var(--accent-ink) 22%, transparent); font-weight: 500; }
.login-side li::before { content: counter(f); font-family: var(--f-mono); font-size: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent-ink) 50%, transparent); flex: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.brand b { display: block; font-family: var(--f-display); font-size: 16px; line-height: 1.1; }
.brand small { font-size: 12px; }

/* Shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; }
.side nav { display: grid; gap: 4px; }
.nav { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); text-align: left; }
.nav svg { width: 18px; height: 18px; }
.nav:hover { background: var(--sunken); color: var(--ink); }
.nav.on { background: var(--accent-soft); color: var(--accent); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.me-t { min-width: 0; flex: 1; }
.me-t b, .me-t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-t b { font-size: 13px; }
.me-t small { font-size: 11px; }
.main { padding: 28px 32px 48px; min-width: 0; display: grid; gap: 20px; align-content: start; }

/* Lista */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; }
.toolbar .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { width: 240px; max-width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fchip b { font-family: var(--f-mono); font-weight: 500; margin-left: 4px; }
.fchip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td small { display: block; font-size: 12px; margin-top: 2px; }
.r { text-align: right; }
tbody tr[data-act] { cursor: pointer; }
tbody tr[data-act]:hover { background: var(--sunken); }
.cell-phase { display: grid; gap: 6px; justify-items: start; }
.cell-prog { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.cell-prog .bar { flex: 1; }
.cell-prog small { margin: 0; width: 36px; text-align: right; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* Detalle */
.crumbs { font-size: 13px; }
.phead { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: start; }
.phead .meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.phead .meta b { color: var(--ink); font-weight: 600; }
.phead .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis > div { padding: 14px 18px; display: grid; gap: 4px; align-content: start; }
.kpis > div + div { border-left: 1px solid var(--line); }
.kpis small { font-size: 12px; }
.kpis b { font-size: 19px; font-weight: 500; }
.kpis b.bad { color: var(--bad); }
.kpis .bar { margin-top: 4px; }
.work { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 8px; display: grid; gap: 0; position: sticky; top: 16px; }
.step { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 0; background: none; padding: 10px; border-radius: 8px; position: relative; }
.step:hover { background: var(--sunken); }
.step.sel { background: var(--accent-soft); }
.steps li { position: relative; }
.steps li + li::before { content: ""; position: absolute; left: 23px; top: -8px; height: 16px; width: 2px; background: var(--line); }
.dot { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; font-weight: 500; border: 2px solid var(--line); background: var(--surface); color: var(--muted); }
.dot svg { width: 14px; height: 14px; }
.st-done .dot { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.st-active .dot { border-color: var(--accent); color: var(--accent); }
.st-late .dot { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.st-t { min-width: 0; display: grid; gap: 1px; padding-top: 3px; }
.st-t b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.st-t small { font-size: 12px; }
.st-todo .st-t b { color: var(--muted); }
.panel { padding: 22px 24px; display: grid; gap: 22px; }
.ph-head { display: flex; gap: 12px; justify-content: space-between; align-items: start; }
.ph-head p { margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sect { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.sect-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row output { font-family: var(--f-mono); font-size: 13px; width: 42px; text-align: right; color: var(--ink); }
.files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); font-size: 13px; max-width: 100%; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.file button { border: 0; background: none; color: var(--muted); padding: 0 2px; font-size: 16px; line-height: 1; }
.file button:hover { color: var(--bad); }
.upload { position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mini td, .mini th { padding: 9px 10px; }
.mini tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
.addrow { display: grid; grid-template-columns: 1.1fr 1.4fr .9fr auto auto; gap: 8px; align-items: center; }
.addrow.three { grid-template-columns: 2fr 1fr 1fr auto; }
.ct-form { display: grid; gap: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--sunken); }
.ct-form .grid { grid-template-columns: 1.2fr 1.6fr 1fr; }
.drop { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1.5px dashed var(--line); border-radius: 8px; background: var(--surface); position: relative; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .pv { width: 56px; height: 56px; flex: none; border-radius: 6px; background: var(--sunken); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.drop .pv img { width: 100%; height: 100%; object-fit: cover; }
.drop .pv svg { width: 22px; height: 22px; }
.drop b { display: block; font-size: 13px; }
.thumb { width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; display: block; }
.thumb-btn { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 8px; text-align: left; font-size: 13px; color: var(--accent); font-weight: 600; }
.lightbox { position: fixed; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px; }
.lightbox img { width: 100%; max-height: calc(100dvh - 160px); object-fit: contain; border-radius: 8px; background: var(--sunken); }
.lightbox .sect-h { align-items: center; }
.approvals { display: grid; gap: 0; }
.appr { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.appr:last-child { border-bottom: 0; }
.appr .who { flex: 1; min-width: 0; }
.appr .who b { display: block; font-size: 13px; }
.stamp { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ok); border: 1.5px solid var(--ok); padding: 2px 8px; border-radius: 4px; transform: rotate(-2deg); white-space: nowrap; }
.tally { font-family: var(--f-mono); font-size: 13px; }
.ph-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); }
.err { color: var(--bad); font-weight: 600; font-size: 13px; }
.lockmsg { padding: 12px 14px; border-radius: 8px; background: var(--sunken); color: var(--muted); font-size: 13px; }
.radios { display: flex; gap: 18px; flex-wrap: wrap; }
.radios label { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.log { padding: 20px 24px; display: grid; gap: 14px; }
.log-add { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 8px; }
.log ul { list-style: none; margin: 0; padding: 0; display: grid; }
.log li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.log li > div { min-width: 0; }
.log li small { margin-left: 6px; }
.log li p { margin-top: 2px; overflow-wrap: anywhere; }

/* Configuración */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.cfg { padding: 22px 24px; display: grid; gap: 18px; max-width: 760px; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; border: 0; background: var(--line); padding: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 19px; }
.hint { font-size: 13px; color: var(--muted); }
.form-end { display: flex; justify-content: flex-end; gap: 8px; }

/* Modal y aviso */
.scrim { position: fixed; inset: 0; background: rgba(10, 16, 13, .45); z-index: 20; }
.modal { position: fixed; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 18px; }
.modal form { display: grid; gap: 14px; }
.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.tag-mock { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 2px 8px; border-radius: 4px; }

/* Responsive */
@media (max-width: 1100px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .steps { position: static; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
  .steps li + li::before { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > div:nth-child(3) { border-left: 0; }
  .kpis > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-side { padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { grid-auto-flow: column; }
  .me { margin: 0 0 0 auto; border: 0; padding: 0; }
  .me-t { display: none; }
  .main { padding-block: 20px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .addrow, .addrow.three, .log-add, .ct-form .grid { grid-template-columns: minmax(0, 1fr); }
  .panel, .log, .cfg { padding: 18px 16px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpis > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .brand small { display: none; }
}

/* ---- Ajustes de la aplicación (además de la maqueta) ---- */
html, body { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: inherit; }
a.nav, a.step, a.fchip, a.tab, a.btn, a.rowlink { text-decoration: none; }
a.link { text-decoration: none; }
a.link:hover { text-decoration: underline; }
.rowlink:hover b { text-decoration: underline; }
.file a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file a:hover { text-decoration: underline; }
.searchform { display: contents; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.login-side .eyebrow { color: inherit; opacity: .8; }
.flashes { display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 8px; font-weight: 600; background: var(--ok-soft); color: var(--ok); margin: 0; }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.cfg.wide { max-width: none; }
.cfg-inner { display: grid; gap: 14px; padding-top: 14px; }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--bad); }
.user-cell { display: flex; gap: 10px; align-items: center; }
.inline-state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.reset { display: inline-block; text-align: left; }
details.reset summary { list-style: none; cursor: pointer; }
details.reset summary::-webkit-details-marker { display: none; }
.reset-form { display: grid; gap: 6px; margin-top: 8px; min-width: 200px; }
.narrow { max-width: 240px; }
.picked { font-size: 12px; }
.phase-form { display: grid; gap: 22px; }
.ph-foot { justify-content: flex-end; }
.ph-foot .muted, .ph-foot .lockmsg { margin-right: auto; }
dialog.lightbox { border: 0; padding: 16px; color: var(--ink); position: fixed; }
dialog.lightbox::backdrop { background: rgba(10, 16, 13, .55); }
.thumb-btn { cursor: zoom-in; }
.err { margin: 0; }dialog.lightbox { inset: 0; left: auto; top: auto; transform: none; margin: auto; height: fit-content; }
dialog.lightbox:not([open]) { display: none; }.via { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.via-consorcio { background: var(--warn-soft); color: var(--warn); }
.addrow.person-add { grid-template-columns: minmax(0, 1fr) auto; max-width: 520px; }

td form { display: inline; }
form.busy { opacity: .6; pointer-events: none; }
