/* SIC · Administración de Alquileres — estilo "programa de escritorio" + versión móvil */
:root {
  --navy: #04375f;
  --navy-2: #0b4c80;
  --navy-3: #12355a;
  --accent: #1f6fb2;
  --sel: #cfe3f7;
  --sel-strong: #0b4c80;
  --bg: #e9edf2;
  --panel: #ffffff;
  --chrome: #f3f4f6;
  --chrome-2: #e4e7eb;
  --line: #c7ccd3;
  --line-soft: #dde1e6;
  --text: #1c2430;
  --muted: #5d6b7c;
  --ok: #1d7a3e;   --ok-bg: #e2f4e8;
  --warn: #9a6100; --warn-bg: #fff2d6;
  --bad: #b3261e;  --bad-bg: #fde5e3;
  --info: #0b4c80; --info-bg: #e3eef9;
  --grey-bg: #eceff2;
  --font: "Segoe UI", Tahoma, "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  --radius: 3px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.35 var(--font); color: var(--text); background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.mt { margin-top: 10px; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ armazón de la ventana */
#app { display: grid; grid-template-rows: auto auto auto 1fr auto; height: 100vh; height: 100dvh; }
.titlebar { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; color: #fff;
  background: linear-gradient(#0d4b7d, var(--navy)); border-bottom: 1px solid #022540; user-select: none; }
.titlebar img { height: 24px; }
.titlebar .ttl { font-weight: 600; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar .ttl small { font-weight: 400; opacity: .8; margin-left: 6px; }
.titlebar .user { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: .95; }
.titlebar .tb-btn { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--radius); padding: 3px 9px; cursor: pointer; }
.titlebar .tb-btn:hover { background: rgba(255,255,255,.12); }
.hamb { display: none; background: none; border: 0; color: #fff; padding: 6px; margin-left: -4px; cursor: pointer; }
.hamb svg { width: 24px; height: 24px; }

.menubar { display: flex; background: var(--chrome); border-bottom: 1px solid var(--line); padding: 0 4px; user-select: none; position: relative; z-index: 30; }
.menubar > .mi { position: relative; }
.menubar > .mi > button { background: none; border: 1px solid transparent; padding: 4px 10px; cursor: default; border-radius: 2px; }
.menubar > .mi > button u { text-decoration: underline; }
.menubar > .mi.open > button, .menubar > .mi > button:hover { background: var(--sel); border-color: #9cc3e8; }
.dropdown { position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border: 1px solid #9aa3ad;
  box-shadow: 2px 3px 8px rgba(0,0,0,.18); padding: 3px 0; display: none; }
.mi.open .dropdown { display: block; }
.dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 14px 6px 10px; text-align: left; cursor: default; }
.dropdown button:hover { background: var(--sel); }
.dropdown button svg { width: 16px; height: 16px; color: var(--navy-2); flex: none; }
.dropdown button kbd { margin-left: auto; color: var(--muted); font: 11px var(--font); padding-left: 24px; }
.dropdown hr { border: 0; border-top: 1px solid var(--line-soft); margin: 3px 0; }

.toolbar { display: flex; gap: 2px; padding: 4px 6px; background: linear-gradient(#fbfbfc, #eceef1); border-bottom: 1px solid var(--line); overflow-x: auto; }
.toolbar .tbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 74px; padding: 4px 6px; background: none;
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; font-size: 12px; color: var(--text); }
.toolbar .tbtn svg { width: 24px; height: 24px; color: var(--navy-2); }
.toolbar .tbtn:hover { background: #e3eef9; border-color: #a9c9ea; }
.toolbar .tbtn:active { background: #cfe3f7; }
.toolbar .sep { width: 1px; background: var(--line); margin: 4px 6px; }

.workspace { display: grid; grid-template-columns: 210px 1fr; min-height: 0; }
.navpanel { background: #f7f8fa; border-right: 1px solid var(--line); overflow-y: auto; padding: 6px 0; user-select: none; }
.navpanel .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 10px 12px 4px; font-weight: 600; }
.navpanel button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 12px 6px 16px; background: none; border: 0; text-align: left; cursor: pointer; border-left: 3px solid transparent; }
.navpanel button svg { width: 17px; height: 17px; color: var(--navy-2); flex: none; }
.navpanel button:hover { background: #e7eef6; }
.navpanel button.active { background: var(--sel); border-left-color: var(--navy); font-weight: 600; }
.navpanel .drawer-head { display: none; }

.mdi { display: grid; grid-template-rows: auto 1fr; min-width: 0; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 4px 6px 0; background: var(--chrome-2); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; background: #dfe3e8; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 4px 4px 0 0; cursor: pointer; white-space: nowrap; max-width: 260px; }
.tab span { overflow: hidden; text-overflow: ellipsis; }
.tab.active { background: var(--panel); position: relative; top: 1px; font-weight: 600; }
.tab .x { border: 0; background: none; padding: 0 3px; line-height: 1; font-size: 15px; color: var(--muted); cursor: pointer; border-radius: 2px; }
.tab .x:hover { background: var(--bad-bg); color: var(--bad); }
.views { position: relative; min-height: 0; background: var(--panel); }
.view { position: absolute; inset: 0; overflow: auto; padding: 12px 14px 18px; }
.view.hidden-view { display: none; }

.statusbar { display: flex; gap: 0; background: var(--chrome); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); user-select: none; }
.statusbar > div { padding: 3px 12px; border-right: 1px solid var(--line-soft); white-space: nowrap; }
.statusbar .right { margin-left: auto; border-left: 1px solid var(--line-soft); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 5px; }
.dot.off { background: var(--bad); }

/* ------------------------------------------------------------ elementos de vista */
.vhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.vhead h2 { font-size: 17px; margin: 0; font-weight: 600; color: var(--navy); }
.vhead .sub { color: var(--muted); }
.vhead .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; min-height: 28px; border: 1px solid #a7b0ba; border-radius: var(--radius);
  background: linear-gradient(#fff, #eceef1); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #6f9ccc; background: linear-gradient(#f6faff, #e1edf9); }
.btn:active { background: #d6e6f6; }
.btn:focus-visible, .tbtn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #5b9bd5; outline-offset: 0; }
.btn svg { width: 16px; height: 16px; color: var(--navy-2); }
.btn.primary { background: linear-gradient(#1a5d93, var(--navy)); border-color: #02294a; color: #fff; }
.btn.primary svg { color: #fff; }
.btn.primary:hover { background: linear-gradient(#2068a2, #06416f); }
.btn.danger { color: var(--bad); }
.btn.danger svg { color: var(--bad); }
.btn.sm { padding: 2px 8px; min-height: 24px; font-size: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.icon { padding: 4px 6px; }

input[type=text], input[type=number], input[type=date], input[type=month], input[type=password], input[type=email], input[type=tel], input[type=search], select, textarea {
  border: 1px solid #a7b0ba; border-radius: 2px; padding: 4px 6px; background: #fff; min-height: 28px; width: 100%; }
textarea { min-height: 60px; resize: vertical; }
input[readonly] { background: var(--chrome); }
.inline-input { width: auto; }

.periodsel { display: inline-flex; align-items: center; gap: 2px; }
.periodsel input { width: 150px; }

.filterbox { position: relative; width: 260px; max-width: 100%; }
.filterbox input { padding-left: 26px; }
.filterbox svg { position: absolute; left: 7px; top: 7px; width: 14px; height: 14px; color: var(--muted); }

/* grillas */
.gridwrap { border: 1px solid var(--line); overflow: auto; background: #fff; max-height: calc(100vh - 290px); min-height: 120px; }
.gridwrap.tall { max-height: none; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
table.grid th { position: sticky; top: 0; z-index: 1; background: linear-gradient(#fafbfc, #e8ebef); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-soft);
  padding: 5px 8px; text-align: left; font-weight: 600; white-space: nowrap; cursor: pointer; user-select: none; }
table.grid th.num { text-align: right; }
table.grid th .arr { color: var(--muted); font-size: 10px; margin-left: 3px; }
table.grid td { white-space: nowrap; padding: 4px 8px; border-bottom: 1px solid #eef0f3; border-right: 1px solid #f2f3f5; vertical-align: middle; }
table.grid tbody tr:nth-child(even) td { background: #fafbfc; }
table.grid tbody tr:hover td { background: #eef5fc; }
table.grid tbody tr.sel td { background: var(--sel); }
table.grid tbody tr.grp td { background: #e9eef4 !important; font-weight: 600; color: var(--navy); border-top: 1px solid var(--line); }
table.grid tbody tr.dim td { color: #8a95a3; }
table.grid tfoot td { position: sticky; bottom: 0; background: #eef1f5; border-top: 1px solid var(--line); font-weight: 600; padding: 5px 8px; }
table.grid td.wrap { white-space: normal; min-width: 220px; }
table.grid td.acts { white-space: nowrap; text-align: right; }
table.grid td.acts .btn { margin-left: 3px; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; background: var(--grey-bg); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }

/* panel / tarjetas */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(#fff, #f7f9fb); padding: 10px 12px; border-top: 3px solid var(--navy); }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 20px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi.ok { border-top-color: var(--ok); } .kpi.bad { border-top-color: var(--bad); } .kpi.warn { border-top-color: #d08b00; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 4px; background: #fff; display: flex; flex-direction: column; min-width: 0; }
.card > h3 { margin: 0; font-size: 13px; padding: 7px 10px; background: linear-gradient(#f9fafb, #eceff3); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; color: var(--navy); }
.card > h3 svg { width: 16px; height: 16px; }
.card > h3 .btn { margin-left: auto; }
.card .body { padding: 8px 10px; }
.card table.grid th { position: static; }
.list-mini { margin: 0; padding: 0; list-style: none; }
.list-mini li { display: flex; gap: 8px; padding: 6px 2px; border-bottom: 1px solid #eef0f3; align-items: center; cursor: pointer; }
.list-mini li:last-child { border-bottom: 0; }
.list-mini li:hover { background: #f2f7fc; }
.list-mini .t { flex: 1; min-width: 0; }
.list-mini .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-mini .t span { color: var(--muted); font-size: 12px; }
.chart { width: 100%; height: 190px; }
.chart text { font: 10px var(--font); fill: var(--muted); }

.infobox { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; border: 1px solid var(--line); background: #f9fbfd; padding: 10px 12px; border-radius: 4px; margin-bottom: 10px; }
.infobox div { min-width: 0; }
.infobox label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.infobox span { font-weight: 600; overflow-wrap: anywhere; }
.saldo-big { font-size: 20px; font-weight: 700; }
.saldo-big.bad { color: var(--bad); } .saldo-big.ok { color: var(--ok); }

.subtabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 8px 0 8px; overflow-x: auto; }
.subtabs button { background: none; border: 1px solid transparent; border-bottom: 0; padding: 6px 14px; cursor: pointer; border-radius: 4px 4px 0 0; white-space: nowrap; }
.subtabs button.active { background: #fff; border-color: var(--line); position: relative; top: 1px; font-weight: 600; color: var(--navy); }

/* ------------------------------------------------------------ diálogos tipo ventana */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 30, 45, .35); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 6vh 12px 12px; overflow-y: auto; }
.dialog { background: var(--chrome); border: 1px solid #5f7084; box-shadow: 0 10px 30px rgba(0,0,0,.3); width: min(560px, 100%); border-radius: 4px; display: flex; flex-direction: column; max-height: 88vh; }
.dialog.wide { width: min(860px, 100%); }
.dialog.xwide { width: min(1080px, 100%); }
.dialog .dh { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; background: linear-gradient(#0d4b7d, var(--navy)); color: #fff; border-radius: 3px 3px 0 0; user-select: none; }
.dialog .dh b { font-weight: 600; }
.dialog .dh .x { margin-left: auto; background: transparent; color: #fff; border: 0; width: 28px; height: 22px; font-size: 16px; cursor: pointer; border-radius: 2px; }
.dialog .dh .x:hover { background: #c42b1c; }
.dialog .db { padding: 12px 14px; overflow-y: auto; background: var(--chrome); }
.dialog .df { display: flex; gap: 8px; justify-content: flex-end; padding: 9px 12px; border-top: 1px solid var(--line); background: #e9ecef; border-radius: 0 0 3px 3px; flex-wrap: wrap; }
.dialog .df .left { margin-right: auto; }
.form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 12px; }
.form .f { display: flex; flex-direction: column; gap: 3px; grid-column: span 2; min-width: 0; }
.form .f.s1 { grid-column: span 1; } .form .f.s4 { grid-column: span 4; } .form .f.s3 { grid-column: span 3; }
.form .f label { font-size: 12px; color: #34404e; }
.form .f label .req { color: var(--bad); }
.form .f.chk { flex-direction: row; align-items: center; gap: 6px; padding-top: 18px; }
.form .f.chk label { font-size: 13px; color: var(--text); }
.form fieldset { grid-column: span 4; border: 1px solid var(--line); border-radius: 3px; margin: 2px 0 0; padding: 8px 10px 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 12px; background: #f8f9fa; }
.form fieldset legend { font-weight: 600; color: var(--navy); padding: 0 4px; font-size: 12px; }
.msg { padding: 8px 10px; border-radius: 3px; margin-bottom: 8px; }
.msg.err { background: var(--bad-bg); color: var(--bad); border: 1px solid #f0b8b3; }
.msg.inf { background: var(--info-bg); color: var(--info); border: 1px solid #b8d3ee; }
.msg.wrn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0d49b; }

.toast { position: fixed; right: 16px; bottom: 34px; z-index: 300; display: flex; flex-direction: column; gap: 6px; }
.toast div { background: #22303f; color: #fff; padding: 9px 14px; border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: 380px; animation: tin .18s ease-out; }
.toast div.err { background: var(--bad); }
.toast div.ok { background: var(--ok); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* login */
.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 20%, #145a92, var(--navy) 55%, #021c33); padding: 16px; z-index: 200; }
.login .box { background: #fff; width: min(380px, 100%); border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.login .box .top { padding: 22px 26px 10px; text-align: center; }
.login .box .top img { width: 220px; max-width: 80%; }
.login .box .top p { color: var(--muted); margin: 8px 0 0; }
.login form { padding: 10px 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.login label { font-size: 12px; color: #34404e; display: flex; flex-direction: column; gap: 4px; }
.login .btn { justify-content: center; padding: 8px; font-size: 14px; }

.ctx { position: fixed; z-index: 150; background: #fff; border: 1px solid #9aa3ad; box-shadow: 2px 3px 8px rgba(0,0,0,.2); padding: 3px 0; min-width: 200px; }
.ctx button { display: flex; gap: 8px; align-items: center; width: 100%; background: none; border: 0; padding: 6px 14px; text-align: left; cursor: default; }
.ctx button:hover { background: var(--sel); }
.ctx button svg { width: 15px; height: 15px; color: var(--navy-2); }

/* recibo / impresión */
#print-area { display: none; }
.recibo { width: 190mm; margin: 0 auto; font: 12px/1.4 var(--font); color: #000; }
.recibo .hdr { display: flex; justify-content: space-between; align-items: flex-start; border: 1.5px solid #000; padding: 10px 14px; }
.recibo .hdr img { height: 62px; }
.recibo .hdr .nro { text-align: right; }
.recibo .hdr .nro h1 { margin: 0; font-size: 20px; letter-spacing: 1px; }
.recibo .hdr .nro .n { font-size: 16px; font-weight: 700; }
.recibo .cuerpo { border: 1.5px solid #000; border-top: 0; padding: 10px 14px; }
.recibo .cuerpo p { margin: 4px 0; }
.recibo table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.recibo th, .recibo td { border: 1px solid #555; padding: 4px 6px; }
.recibo th { background: #eee; text-align: left; }
.recibo .tot { font-size: 15px; font-weight: 700; text-align: right; }
.recibo .firma { display: flex; justify-content: flex-end; margin-top: 46px; }
.recibo .firma div { border-top: 1px solid #000; width: 220px; text-align: center; padding-top: 4px; }
.recibo .copia { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #777; }
.report { font: 11.5px/1.35 var(--font); color: #000; }
.report h1 { font-size: 16px; margin: 0 0 4px; }
.report .rh { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--navy); padding-bottom: 6px; margin-bottom: 8px; }
.report .rh img { height: 46px; }
.report table { width: 100%; border-collapse: collapse; }
.report th, .report td { border: 1px solid #999; padding: 3px 5px; }
.report th { background: #e8edf3; text-align: left; }
.report tfoot td { font-weight: 700; background: #f3f5f8; }

@media print {
  @page { size: A4; margin: 10mm; }
  body { overflow: visible; background: #fff; }
  #app, .modal-bg, .toast, .login { display: none !important; }
  #print-area { display: block !important; }
  .recibo .copia { page-break-inside: avoid; }
}

/* ------------------------------------------------------------ móvil / tablet */
@media (max-width: 900px) {
  body { font-size: 14px; }
  #app { grid-template-rows: auto 1fr; }
  .menubar, .toolbar, .tabs, .statusbar { display: none; }
  .titlebar { height: 52px; padding: 0 8px; position: sticky; top: 0; }
  .titlebar img { height: 26px; }
  .titlebar .ttl small, .titlebar .user .uname { display: none; }
  .hamb { display: block; }
  .workspace { grid-template-columns: 1fr; }
  .navpanel { position: fixed; top: 0; bottom: 0; left: 0; width: 84vw; max-width: 310px; z-index: 120; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 4px 0 20px rgba(0,0,0,.25); padding-top: 0; }
  .navpanel.open { transform: none; }
  .navpanel .drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px; background: var(--navy); color: #fff; }
  .navpanel .drawer-head img { height: 30px; }
  .navpanel .drawer-head div { font-size: 12px; opacity: .9; }
  .navpanel button { padding: 11px 16px; font-size: 15px; }
  .navpanel button svg { width: 20px; height: 20px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 110; }
  .mdi { grid-template-rows: 1fr; }
  .view { padding: 12px 12px 80px; }
  .vhead h2 { font-size: 19px; }
  .vhead .actions { margin-left: 0; width: 100%; }
  .vhead .actions .btn { flex: 1 1 auto; justify-content: center; }
  .filterbox { width: 100%; }
  .btn { min-height: 38px; }
  .btn.sm { min-height: 32px; }
  input[type=text], input[type=number], input[type=date], input[type=month], input[type=password], input[type=email], input[type=tel], input[type=search], select, textarea { min-height: 40px; font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 17px; }

  /* grillas → tarjetas */
  .gridwrap { border: 0; max-height: none; overflow: visible; background: transparent; }
  table.grid.cardify thead { display: none; }
  table.grid.cardify, table.grid.cardify tbody, table.grid.cardify tfoot { display: block; }
  table.grid.cardify tr { display: block; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; background: #fff; padding: 6px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
  table.grid.cardify tbody tr:nth-child(even) td, table.grid.cardify tbody tr:hover td { background: transparent; }
  table.grid.cardify tbody tr.sel { border-color: var(--navy-2); }
  table.grid.cardify tbody tr.sel td { background: transparent; }
  table.grid.cardify td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  table.grid.cardify td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; }
  table.grid.cardify td:first-child { font-weight: 600; font-size: 15px; color: var(--navy); text-align: left; }
  table.grid.cardify td:first-child::before { display: none; }
  table.grid.cardify td.empty-cell { display: none; }
  table.grid.cardify td.acts { justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
  table.grid.cardify td.acts::before { display: none; }
  table.grid.cardify tr.grp { background: var(--sel); }
  table.grid.cardify tr.grp td { background: transparent !important; border: 0; }
  table.grid.cardify tfoot tr { background: #eef1f5; }
  table.grid.cardify tfoot td { position: static; }
  .dialog { max-height: none; }
  .modal-bg { padding: 0; align-items: stretch; }
  .dialog, .dialog.wide, .dialog.xwide { width: 100%; min-height: 100%; border-radius: 0; }
  .dialog .dh { border-radius: 0; padding: 12px; position: sticky; top: 0; z-index: 2; }
  .dialog .db { flex: 1; }
  .dialog .df { position: sticky; bottom: 0; }
  .dialog .df .btn { flex: 1; justify-content: center; }
  .form, .form fieldset { grid-template-columns: 1fr 1fr; }
  .form .f, .form .f.s3, .form .f.s4, .form fieldset { grid-column: span 2; }
  .form .f.s1 { grid-column: span 1; }
  .toast { left: 12px; right: 12px; bottom: 16px; }
}
@media (min-width: 901px) { .scrim { display: none; } }
