/* Ruschel Gestão — estilos
   Marca: teal #02495B amostrado do logotipo (Manual da Casa 2022). Títulos em Josefin Sans
   (fonte usada nos materiais da marca; instale os arquivos em static/fonts para ativá-la),
   com Poppins como substituta geométrica. Texto corrido em Inter. */
@font-face { font-family: "Josefin Sans"; src: local("Josefin Sans"), local("JosefinSans-Regular"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: local("Josefin Sans SemiBold"), local("JosefinSans-SemiBold"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }

:root {
  --teal: #154d61; --teal-700: #0e3a4a; --teal-600: #1d5c71; --teal-100: #d7e6ea; --teal-50: #eef4f5;
  --ink: #1d2a2f; --ink-2: #3c4b51; --muted: #6b7a80; --line: #e2e8ea; --line-2: #eef2f3;
  --bg: #f6f8f8; --white: #fff;
  --ok: #3f7a52; --ok-bg: #e8f2ea; --warn: #9a6b12; --warn-bg: #fbf1dc; --danger: #a4473a; --danger-bg: #f8e7e3;
  --info: #2c6585; --info-bg: #e5eff5;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 40, 48, .05), 0 1px 1px rgba(16, 40, 48, .03);
  --font-title: "Josefin Sans", "Poppins", "Inter", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 400; color: var(--ink); margin: 0 0 .5rem; letter-spacing: .01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; font-weight: 500; }
small, .muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--white); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 1.25rem 1.25rem 1rem; color: var(--teal); }
.brand:hover { text-decoration: none; }
.brand .word { font-family: var(--font-title); letter-spacing: .32em; font-size: 1.05rem; font-weight: 500; }
.brand .sub { display: block; font-size: .58rem; letter-spacing: .3em; color: var(--muted); margin-top: 2px; }
.nav { padding: .25rem .6rem 1rem; overflow-y: auto; flex: 1; }
.nav .sec { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .9rem .7rem .35rem; }
.nav a { display: flex; align-items: center; gap: .6rem; padding: .48rem .7rem; border-radius: var(--radius-sm); color: var(--ink-2); }
.nav a:hover { background: var(--teal-50); text-decoration: none; }
.nav a.on { background: var(--teal-50); color: var(--teal); font-weight: 500; }
.nav svg, .ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-foot { padding: .8rem 1.2rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.6rem; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .search { flex: 1; max-width: 460px; position: relative; }
.top .search input { width: 100%; padding: .5rem .8rem .5rem 2.1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.top .search .ico { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top .spacer { flex: 1; }
.iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.iconbtn:hover { background: var(--teal-50); text-decoration: none; }
.dot { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .66rem; line-height: 16px; text-align: center; }
.user { display: flex; align-items: center; gap: .55rem; font-size: .85rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 600; letter-spacing: .02em; flex: none; }
.avatar.foto { object-fit: cover; background: #e6ecec; padding: 0; }
.avatar.sm { width: 24px; height: 24px; font-size: .64rem; }
.content { padding: 1.6rem; max-width: 1360px; width: 100%; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.pagehead p { margin: .15rem 0 0; color: var(--muted); }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: .35rem; }
.crumbs a { color: var(--muted); }
.demo-banner { background: var(--warn-bg); color: var(--warn); font-size: .78rem; padding: .35rem 1.6rem; border-bottom: 1px solid #f0e0bb; }
.mobile-nav, .menu-toggle { display: none; }

/* ---------- componentes ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.card > .hd h2, .card > .hd h3 { margin: 0; }
.card > .bd { padding: 1rem 1.1rem; }
.card > .bd.flush { padding: 0; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .75rem; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; display: block; color: inherit; }
a.kpi:hover { border-color: var(--teal-100); text-decoration: none; }
.kpi .lb { font-size: .74rem; color: var(--muted); }
.kpi .vl { font-family: var(--font-title); font-size: 1.75rem; line-height: 1.2; margin-top: .2rem; color: var(--ink); }
.kpi.k-alert .vl { color: var(--danger); } .kpi.k-warn .vl { color: var(--warn); }
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--teal); background: var(--teal); color: #fff; font: 500 .86rem var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--teal-700); text-decoration: none; }
.btn.ghost { background: var(--white); color: var(--teal); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--teal-100); background: var(--teal-50); }
.btn.danger { background: var(--white); color: var(--danger); border-color: #ecd0ca; }
.btn.sm { padding: .3rem .6rem; font-size: .8rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--teal); cursor: pointer; padding: 0; font: inherit; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 500; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.teal { background: var(--teal-50); color: var(--teal); }
.badge .sw { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pill-urgente { color: var(--danger); } .pill-alta { color: var(--warn); }
.progress { height: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.progress > span { display: block; height: 100%; background: var(--teal); }
.progress.over > span { background: var(--danger); }
.meter { display: flex; align-items: center; gap: .5rem; } .meter .progress { flex: 1; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.alert { padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .88rem; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok); } .alert.erro { background: var(--danger-bg); color: var(--danger); }
.alert.info { background: var(--info-bg); color: var(--info); } .alert.warn { background: var(--warn-bg); color: var(--warn); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: .65rem 1.1rem; border-top: 1px solid var(--line-2); display: flex; gap: .7rem; align-items: center; }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: .45rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .84rem; } .dl dd { margin: 0; }

/* tabelas */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: .6rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--white); }
.tbl td { padding: .62rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcfc; }
.tbl td.col-proj { min-width: 230px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot td { font-weight: 600; border-top: 1px solid var(--line); }

/* formulários */
label { display: block; font-size: .8rem; color: var(--ink-2); margin-bottom: .25rem; font-weight: 500; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], input[type=search], input[type=url], input[type=time], select, textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font: 400 .9rem var(--font); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(2, 73, 91, .1); }
textarea { min-height: 80px; resize: vertical; }
.form { display: grid; grid-template-columns: repeat(12, 1fr); gap: .85rem 1rem; }
.form .f12 { grid-column: span 12; } .form .f8 { grid-column: span 8; } .form .f6 { grid-column: span 6; }
.form .f9 { grid-column: span 9; } .form .f4 { grid-column: span 4; } .form .f3 { grid-column: span 3; } .form .f2 { grid-column: span 2; }
.form .hint { font-size: .74rem; color: var(--muted); margin-top: .2rem; }
.check { display: flex; align-items: center; gap: .45rem; font-weight: 400; font-size: .88rem; color: var(--ink); cursor: pointer; margin: 0; }
.check input { width: 16px; height: 16px; accent-color: var(--teal); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips label { margin: 0; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 400; cursor: pointer; background: var(--white); }
.chips input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }
details.sec { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
details.sec + details.sec { margin-top: .6rem; }
details.sec > summary { cursor: pointer; padding: .85rem 1.1rem; list-style: none; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-title); font-size: 1rem; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; }
details.sec[open] > summary::after { content: "–"; }
details.sec > .bd { padding: 0 1.1rem 1.1rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters > div { min-width: 140px; }
.filters select, .filters input { padding: .4rem .55rem; font-size: .84rem; }
.inline-select { width: auto; padding: .25rem .45rem; font-size: .8rem; border-radius: 999px; }

/* abas do projeto */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin: 0 0 1.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: .6rem .85rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: .9rem; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
.subtabs { display: inline-flex; background: var(--line-2); border-radius: 8px; padding: 3px; gap: 2px; }
.subtabs a { padding: .3rem .75rem; border-radius: 6px; color: var(--ink-2); font-size: .84rem; }
.subtabs a.on { background: var(--white); color: var(--teal); box-shadow: var(--shadow); }
.subtabs a:hover { text-decoration: none; }
.projhead { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }
.projhead .code { font-family: var(--font-title); color: var(--teal); font-size: .95rem; letter-spacing: .08em; }

/* checklist */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: .55rem; padding: .4rem 0; border-top: 1px dashed var(--line-2); }
.checklist li:first-child { border-top: 0; }
.checklist li.done .txt { color: var(--muted); text-decoration: line-through; }
.checklist input[type=checkbox] { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--teal); cursor: pointer; flex: none; }
.checklist .who { margin-left: auto; font-size: .72rem; color: var(--muted); white-space: nowrap; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: .5rem; }
.kcol { background: var(--line-2); border-radius: var(--radius); padding: .6rem; min-height: 200px; }
.kcol h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; margin: .2rem .3rem .6rem; font-family: var(--font); font-weight: 500; }
.kcol.drop { outline: 2px dashed var(--teal); outline-offset: -4px; }
.kcard { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .7rem; margin-bottom: .5rem; cursor: grab; box-shadow: var(--shadow); }
.kcard:active { cursor: grabbing; }
.kcard .t { font-weight: 500; margin-bottom: .3rem; display: block; color: var(--ink); }
.kcard .m { display: flex; justify-content: space-between; align-items: center; font-size: .76rem; color: var(--muted); gap: .4rem; }

/* gantt */
.gantt { overflow-x: auto; }
.gantt-grid { display: grid; grid-template-columns: 230px 1fr; min-width: 820px; }
.gantt-row { display: contents; }
.gantt-label { padding: .5rem .6rem; border-bottom: 1px solid var(--line-2); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-track { position: relative; border-bottom: 1px solid var(--line-2); height: 38px; background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px); background-size: var(--col, 40px) 100%; }
.gantt-bar { position: absolute; top: 9px; height: 20px; border-radius: 5px; background: var(--teal-100); border: 1px solid #b9d1d8; font-size: .7rem; color: var(--teal-700); padding: 0 .4rem; white-space: nowrap; overflow: hidden; line-height: 18px; }
.gantt-bar.real { background: var(--teal); border-color: var(--teal); color: #fff; top: 14px; height: 10px; }
.gantt-bar.late { background: var(--danger-bg); border-color: #e3b9b1; color: var(--danger); }
.gantt-bar.done { background: var(--ok-bg); border-color: #c4dccb; color: var(--ok); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); opacity: .55; }
.gantt-head { position: relative; height: 28px; border-bottom: 1px solid var(--line); font-size: .7rem; color: var(--muted); }
.gantt-head span { position: absolute; top: 6px; white-space: nowrap; }

/* calendário */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .wd { padding: .4rem .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.cal .day { min-height: 110px; padding: .35rem .4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.cal .day.out { background: #fbfcfc; color: #b5c0c4; }
.cal .day.today .n { background: var(--teal); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal .n { font-size: .78rem; display: inline-block; margin-bottom: .2rem; }
.ev { display: block; font-size: .72rem; padding: .1rem .35rem; border-radius: 4px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--teal-50); color: var(--teal-700); }
.ev.REUNIAO { background: var(--teal); color: #fff; } .ev.PRAZO, .ev.TAREFA { background: var(--warn-bg); color: var(--warn); }
.ev.ENTREGA, .ev.ETAPA { background: var(--info-bg); color: var(--info); } .ev.MARCO, .ev.APROVACAO { background: var(--ok-bg); color: var(--ok); }
.ev.late { background: var(--danger-bg); color: var(--danger); }

/* painel lateral (drawer) */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 30, 35, .32); z-index: 50; display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--white); z-index: 51; box-shadow: -8px 0 30px rgba(0, 0, 0, .12); transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; }
.drawer .dh { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer .db { padding: 1.2rem; overflow-y: auto; flex: 1; }
body.drawer-open .drawer-bg { display: block; } body.drawer-open .drawer { transform: none; }

/* indicadores de área */
.gauge { margin-bottom: .9rem; }
.gauge .row { justify-content: space-between; font-size: .84rem; }
.gauge .progress { height: 10px; margin-top: .3rem; }
.bignum { font-family: var(--font-title); font-size: 1.5rem; }
.rule-ref { font-size: .72rem; color: var(--muted); }
.rule { padding: .55rem 0; border-top: 1px solid var(--line-2); }
.rule:first-child { border-top: 0; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--teal); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; }
.login-art .word { font-family: var(--font-title); letter-spacing: .45em; font-size: 2rem; }
.login-art p { opacity: .8; max-width: 380px; }
.login-box { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-box form { width: 100%; max-width: 360px; }

/* utilitários */
.mt0 { margin-top: 0; } .mt1 { margin-top: 1rem; } .mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 1rem; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .hide { display: none !important; }
.danger-t { color: var(--danger); } .ok-t { color: var(--ok); } .warn-t { color: var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-side { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 8px 0 30px rgba(0, 0, 0, .15); }
  body.nav-open .drawer-bg { display: block; z-index: 55; }
  .menu-toggle { display: inline-flex; }
  .top { padding: .55rem .8rem; gap: .4rem; }
  .top .user .nm { display: none; }
  .content { padding: 1rem .85rem 5.5rem; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form .f9, .form .f8, .form .f6, .form .f4, .form .f3, .form .f2 { grid-column: span 12; }
  .dl { grid-template-columns: 1fr; gap: .1rem; } .dl dd { margin-bottom: .5rem; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav a, .mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .45rem; font-size: .66rem; color: var(--muted); background: none; border: 0; font-family: var(--font); }
  .mobile-nav a.on { color: var(--teal); }
  .mobile-nav a:hover { text-decoration: none; }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
  .tbl.cards td { border: 0; padding: .12rem 0; }
  .tbl.cards td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: .76rem; }
  .tbl.cards td.num { text-align: left; }
  .login-wrap { grid-template-columns: 1fr; } .login-art { padding: 2rem; min-height: 180px; } .login-art p { display: none; }
  .cal .day { min-height: 64px; } .cal .ev { font-size: .62rem; }
  .pagehead { align-items: flex-start; }
  .kanban { grid-auto-columns: 82vw; }
  .filters > div { min-width: calc(50% - .25rem); flex: 1; }
}
@media print {
  .side, .top, .mobile-nav, .tabs, .actions, .btn, .demo-banner { display: none !important; }
  .app { display: block; } .content { padding: 0; } .card { box-shadow: none; }
}
code { word-break: break-all; white-space: normal; font-size: .8rem; }
.dl dd { min-width: 0; overflow-wrap: anywhere; }
.tbl.compact td, .tbl.compact th { padding: .45rem .4rem; font-size: .84rem; }
html, body { overflow-x: hidden; }
.cal { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .day { min-width: 0; overflow: hidden; }
.drawer { visibility: hidden; } body.drawer-open .drawer { visibility: visible; }
@media (max-width: 860px) { .top .search { min-width: 0; } .top .search input { font-size: .85rem; } }
