/* Suivi des temps — charte graphique SMARTEC Ingénierie V2
   Couleurs : #32BFF2 · #269DC3 · #16728C · #0C5061 · #073C49 · #012128
   Dégradé : #32BFF2 (0 %) → #0C5061 (77 %) → #012128 (100 %) — Police : Poppins */
@font-face { font-family: "Poppins"; font-weight: 300; font-style: normal; font-display: swap; src: url(fonts/poppins-light.woff) format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/poppins-regular.woff) format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500 600; font-style: normal; font-display: swap; src: url(fonts/poppins-medium.woff) format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700 900; font-style: normal; font-display: swap; src: url(fonts/poppins-bold.woff) format("woff"); }
:root {
  --c1: #32BFF2; --c2: #269DC3; --c3: #16728C; --c4: #0C5061; --c5: #073C49; --c6: #012128;
  --gradient: linear-gradient(115deg, #32BFF2 0%, #0C5061 77%, #012128 100%);
  --bg: #f2f6f8;
  --surface: #ffffff;
  --ink: #012128;
  --ink-2: #3c5761;
  --muted: #6d848c;
  --line: #dce6ea;
  --line-2: #ecf2f5;
  --green: #0C5061;          /* bouton principal (couleur 4 de la charte) */
  --green-600: #16728C;
  --green-ink: #0C5061;
  --green-soft: #e2f3fa;     /* fond actif / encarts */
  --green-soft-2: #f0f8fc;
  --green-line: #c3e3f1;
  --eyebrow: #269DC3;
  --bar: #16728C;
  --bar-2: #269DC3;
  --track: #e5eef2;
  --danger: #b3261e;
  --warn-bg: #fff6e0;
  --warn-ink: #8a5a00;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(1, 33, 40, .04);
  --font: "Poppins", "Arial Nova", Arial, system-ui, sans-serif;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
a { color: var(--green-ink); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.boot { padding: 80px; text-align: center; color: var(--muted); }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
svg.ic.sm { width: 16px; height: 16px; }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, #fff 0 299px, var(--line) 299px 300px, transparent 300px); }
.side {
  background: var(--surface); border-right: 1px solid var(--line); padding: 30px 18px 18px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.logo { display: block; padding: 4px 6px; }
.logo img { display: block; width: 210px; height: auto; }
.side .sect { font-size: 12px; letter-spacing: .16em; color: var(--muted); margin: 48px 0 14px 18px; font-weight: 600; }
.side nav { display: flex; flex-direction: column; gap: 6px; }
.side nav a {
  display: flex; align-items: center; gap: 16px; padding: 15px 18px; border-radius: var(--radius-sm);
  color: #3a4842; text-decoration: none; font-size: 16.5px; font-weight: 600;
}
.side nav a:hover { background: var(--green-soft-2); }
.side nav a.on { background: var(--green-soft); color: var(--green-ink); }
.side nav a .badge { margin-left: auto; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); }
.side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.side .saved { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f8faf9; padding: 14px 16px; font-size: 13.5px; }
.side .saved .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #32BFF2; margin-right: 8px; vertical-align: 1px; }
.side .saved .muted { margin-top: 8px; font-size: 13px; }
.side .me { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 16px 4px 0; }
.side .me .who { min-width: 0; flex: 1; }
.side .me .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me .who span { font-size: 12px; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; flex: none; border: 1px solid var(--line); }

.topbar { height: 86px; display: flex; align-items: center; gap: 14px; padding: 0 32px 0 56px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.crumbs { display: flex; align-items: center; gap: 14px; font-size: 16px; color: var(--muted); font-weight: 500; }
.crumbs b { color: var(--ink); font-weight: 600; }
.topbar .right { margin-left: auto; display: flex; gap: 10px; }
.burger { display: none; }

.page { padding: 44px 32px 60px 56px; max-width: 1560px; }
.page-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 32px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .2em; color: var(--eyebrow); text-transform: uppercase; }
.page-head h1 { font-size: 42px; font-weight: 700; margin: 14px 0 12px; letter-spacing: -.025em; }
.page-head p { margin: 0; color: var(--ink-2); font-size: 17px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; padding-top: 22px; }

/* ---------- Boutons & champs ---------- */
button, .btn {
  font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); padding: 10px 16px; cursor: pointer; line-height: 1.25; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
button:hover, .btn:hover { border-color: #c7d3cc; background: #fbfcfb; }
button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover { background: var(--green-600); }
button.big { padding: 17px 26px; font-size: 16px; border-radius: 10px; }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-2); padding: 7px 10px; }
button.ghost:hover { background: var(--green-soft-2); }
button.icon { padding: 6px; border-color: transparent; background: transparent; color: var(--muted); border-radius: 6px; }
button.icon:hover { background: var(--line-2); color: var(--ink); }
button.on { background: var(--green-soft); border-color: var(--green-line); color: var(--green-ink); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; background: #fff; min-width: 0;
}
select { padding-right: 30px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid #32BFF2; outline-offset: 0; border-color: var(--green-600); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
label.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.seg button { border: 0; border-radius: 0; padding: 10px 14px; font-weight: 600; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--green-soft); color: var(--green-ink); }

/* ---------- Bandeaux ---------- */
.banner { display: flex; align-items: center; gap: 14px; background: var(--green-soft-2); border: 1px solid var(--green-line); border-radius: var(--radius-sm); padding: 18px 22px; margin-bottom: 30px; color: var(--ink-2); font-size: 15px; }
.banner svg { color: var(--green-ink); }
.banner.warn { background: #fff8ea; border-color: #f0dfb5; }
.banner.danger { background: #fdecea; border-color: #f0c8c4; }

/* ---------- Filtres ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 36px; }
.filters .spacer { flex: 1; }
.period { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.period .lbl { display: inline-flex; align-items: center; gap: 12px; padding: 0 16px; min-width: 210px; font-weight: 600; font-size: 15px; }
.period .lbl svg { color: var(--ink-2); }
.period button { border: 0; border-radius: 0; padding: 12px 10px; color: var(--muted); }
.period input[type=date] { border: 0; padding: 10px 8px; }
.filters select { padding: 12px 34px 12px 14px; font-weight: 500; font-size: 15px; background-color: #fff; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; gap: 12px; padding: 28px 34px 8px; }
.card > .hd h2 { font-size: 20px; font-weight: 700; }
.card > .hd .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.card > .hd .tagline { font-size: 12px; letter-spacing: .14em; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.card > .bd { padding: 20px 34px 30px; }
.card > .bd.flush { padding: 8px 0 0; }
.stack > * + * { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-gap { margin-top: 28px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 36px; }
.kpi { padding: 34px 30px 30px; position: relative; }
.kpi .lbl { font-size: 15.5px; color: var(--ink-2); font-weight: 500; }
.kpi .ico { position: absolute; top: 32px; right: 30px; color: var(--muted); }
.kpi .val { font-size: 46px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; margin-top: 30px; line-height: 1; white-space: nowrap; }
.kpi .val small { font-size: 26px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.kpi .sub { font-size: 13.5px; color: var(--muted); margin-top: 28px; }
.kpi.accent { background: var(--gradient); border-color: transparent; color: #fff; overflow: hidden; }
.kpi.accent .lbl, .kpi.accent .sub, .kpi.accent .ico, .kpi.accent .val small { color: rgba(255,255,255,.82); }
.kpi.accent::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 230px; height: 230px; border-radius: 50%; background: rgba(50,191,242,.18); }

/* ---------- Barres horizontales ---------- */
.hbars { display: flex; flex-direction: column; gap: 26px; }
.hbar .top { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; font-weight: 500; margin-bottom: 12px; }
.hbar .top b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hbar .top .sub { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 13px; }
.track { height: 10px; background: var(--track); border-radius: 5px; overflow: hidden; }
.track > i { display: block; height: 100%; background: var(--bar); border-radius: 0 5px 5px 0; }
.hbar.click { cursor: pointer; }
.hbar.click:hover .top span:first-child { color: var(--green-ink); text-decoration: underline; }
.more { margin-top: 20px; }

/* ---------- Équipe en un regard ---------- */
.team { display: flex; flex-direction: column; }
.team .m { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.team .m:last-child { border-bottom: 0; }
.team .m:hover b { color: var(--green-ink); }
.team .m .who { flex: 1; min-width: 0; }
.team .m .who b { display: block; font-size: 15.5px; font-weight: 600; }
.team .m .who span { font-size: 13px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team .m .h { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; text-align: right; }
.team .m .h span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.team .m .mini { width: 90px; }

/* ---------- Secteurs ---------- */
.card > .bd:has(.donut-wrap) { container-type: inline-size; }
.donut-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: center; }
.donut { position: relative; width: 210px; height: 210px; }
.donut svg { width: 210px; height: 210px; display: block; }
.donut path { cursor: pointer; transition: opacity .15s; }
.donut.hl path:not(.hl) { opacity: .28; }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut .center b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.donut .center span { font-size: 12px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 46px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; font-size: 14px; }
.legend li:hover, .legend li.hl { background: var(--green-soft-2); }
.legend li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend li .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.legend li .p { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); }
.legend-inline span { display: inline-flex; align-items: center; gap: 7px; }

@container (max-width: 560px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } .donut-wrap .legend { width: 100%; } }

/* ---------- Tâches par projet (barres empilées) ---------- */
.stk { display: flex; flex-direction: column; gap: 14px; }
.stk .r { display: grid; grid-template-columns: 230px minmax(0, 1fr) 80px; gap: 18px; align-items: center; }
.stk .r .n { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.stk .r .n:hover { color: var(--green-ink); text-decoration: underline; }
.stk .r .n small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.stk .r .t { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; font-size: 14px; }
.stk .bar { display: flex; gap: 2px; height: 18px; }
.stk .bar i { display: block; height: 100%; min-width: 2px; cursor: default; }
.stk .bar i:first-child { border-radius: 4px 0 0 4px; }
.stk .bar i:last-child { border-radius: 0 4px 4px 0; }
.stk .bar i:only-child { border-radius: 4px; }
.stk .bar i:hover { filter: brightness(1.1) saturate(1.1); }

/* ---------- Colonnes mensuelles ---------- */
.cols { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding: 22px 4px 0; border-bottom: 1px solid #c3d2d8; }
.cols .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 14px; }
.cols .col > i { width: 68%; max-width: 42px; background: var(--bar); border-radius: 4px 4px 0 0; min-height: 1px; }
.cols .col:hover > i { background: var(--bar-2); }
.cols .col .v { font-size: 11.5px; color: var(--ink-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.cols-labels { display: flex; gap: 6px; padding: 8px 4px 0; }
.cols-labels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); min-width: 14px; overflow: hidden; white-space: nowrap; }
.tip { position: fixed; z-index: 60; background: #012128; color: #fff; padding: 8px 11px; border-radius: 8px; font-size: 12.5px; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); max-width: 300px; line-height: 1.4; }
.tip b { font-weight: 700; }

/* ---------- Tableaux ---------- */
.tbl-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfa; position: sticky; top: 0; }
table.data th:first-child, table.data td:first-child { padding-left: 34px; }
table.data th:last-child, table.data td:last-child { padding-right: 34px; }
table.data th.num { text-align: right; }
table.data td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--green-soft-2); }
table.data tbody tr:hover td.acts button { visibility: visible; }
table.data td.acts { white-space: nowrap; text-align: right; width: 1%; }
table.data td.acts button { visibility: hidden; }
@media (hover: none) { table.data td.acts button { visibility: visible; } }
table.data tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: #fafbfa; }
table.data td.zero { color: #c7cfcb; }
.scroll-y { max-height: 560px; overflow-y: auto; }
.tag { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--line-2); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.tag.ok { background: #e3f4ea; color: #1f6b47; }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag.admin { background: var(--green-soft); color: var(--green-ink); }

/* ---------- Calendrier (semaine) ---------- */
.week-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 28px; }
.layout-week { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.layout-week aside { position: sticky; top: 112px; }
.day > .hd { padding: 20px 26px 12px; }
.day > .hd h2 { font-size: 17px; }
.day.today { border-color: #7fcdea; box-shadow: 0 0 0 1px #7fcdea; }
.day .tot { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; }
.day .tot.zero { color: var(--muted); font-weight: 500; }
table.entries { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.entries td { padding: 11px 10px; border-top: 1px solid var(--line-2); vertical-align: middle; font-size: 14px; }
table.entries td:first-child { padding-left: 26px; }
table.entries td.h { width: 86px; font-weight: 700; }
table.entries td.p { width: 38%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.entries td.p .client { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 8px; }
table.entries td.t { width: 150px; color: var(--ink-2); }
table.entries td.c { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.entries td.a { width: 112px; text-align: right; white-space: nowrap; padding-right: 18px; }
table.entries tr.view td.a button { visibility: hidden; }
table.entries tr.view:hover td { background: #fafcfb; }
table.entries tr.view:hover td.a button, table.entries tr.view td.a button:focus { visibility: visible; }
@media (hover: none) { table.entries tr.view td.a button { visibility: visible; } }
.entry-form { display: grid; grid-template-columns: 88px minmax(180px, 2fr) 160px minmax(120px, 2fr) auto; gap: 8px; align-items: center; padding: 12px 18px 12px 18px; }
.entry-form.new { background: #fafcfb; border-top: 1px solid var(--line-2); border-radius: 0 0 var(--radius) var(--radius); }
.entry-form input, .entry-form select { padding: 9px 11px; }
.entry-form button { padding: 9px 14px; }
.entry-form .acts { display: flex; gap: 6px; }
.big-total { font-size: 42px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.sum-list { list-style: none; margin: 0; padding: 0; }
.sum-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.sum-list li:last-child { border-bottom: 0; }
.sum-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-list li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Authentification ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--gradient); position: relative; overflow: hidden; }
.auth::before { content: ""; position: absolute; width: 900px; height: 900px; border-radius: 50%; right: -320px; bottom: -520px; background: rgba(50,191,242,.22); }
.auth .card { position: relative; }
.auth .logo img { width: 230px; }
.auth .card { width: 100%; max-width: 420px; padding: 38px; }
.auth .logo { margin-bottom: 26px; }
.auth h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.auth .err, dialog .err { color: var(--danger); font-size: 13px; }
.auth button.primary { justify-content: center; padding: 13px; font-size: 15px; }

/* ---------- Fenêtres & notifications ---------- */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(15, 35, 25, .25); color: var(--ink); }
dialog::backdrop { background: rgba(1, 33, 40, .5); }
dialog form { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { font-size: 20px; font-weight: 700; }
dialog .acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
dialog .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #012128; color: #fff; padding: 11px 18px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 100; font-size: 14px; font-weight: 500; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); }

/* ---------- Adaptation écrans ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2.even { grid-template-columns: 1fr; }
  .page { padding: 32px 24px 48px 32px; }
  .topbar { padding: 0 24px 0 32px; }
}
@media (max-width: 1000px) {
  .layout-week { grid-template-columns: 1fr; }
  .layout-week aside { position: static; }
}
@media (max-width: 860px) {
  .logo img { width: 180px; }
  .app { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .app.menu .side { transform: none; }
  .app.menu::after { content: ""; position: fixed; inset: 0; background: rgba(1,33,40,.4); z-index: 30; }
  .burger { display: inline-flex; }
  .topbar { height: 64px; padding: 0 14px; }
  .crumbs { font-size: 14px; } .crumbs .home, .crumbs .sep { display: none; }
  .page { padding: 22px 14px 40px; }
  .page-head { flex-direction: column; gap: 0; margin-bottom: 22px; }
  .page-head h1 { font-size: 30px; }
  .page-head p { font-size: 15px; }
  .page-head .actions { margin-left: 0; padding-top: 16px; }
  .kpis { gap: 12px; }
  .kpi { padding: 20px 18px; } .kpi .ico { top: 18px; right: 16px; } .kpi .val { font-size: 32px; margin-top: 18px; } .kpi .val small { font-size: 18px; } .kpi .sub { margin-top: 14px; }
  .card > .hd { padding: 20px 18px 6px; } .card > .bd { padding: 16px 18px 22px; }
  table.data th:first-child, table.data td:first-child { padding-left: 18px; }
  table.data th:last-child, table.data td:last-child { padding-right: 18px; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; } .legend { width: 100%; }
  .stk .r { grid-template-columns: 1fr 60px; } .stk .r .bar { grid-column: 1 / -1; grid-row: 2; }
  .entry-form { grid-template-columns: 90px 1fr; padding: 12px; }
  .entry-form [name=hours] { order: 1; } .entry-form [name=task] { order: 2; } .entry-form [name=project] { order: 3; grid-column: 1 / -1; }
  .entry-form [name=comment] { order: 4; grid-column: 1 / -1; } .entry-form .acts { order: 5; }
  table.entries td.t, table.entries td.c { display: none; } table.entries td.p { width: auto; } table.entries td:first-child { padding-left: 14px; }
  .period .lbl { min-width: 0; }
}

@media print {
  .side, .topbar, .filters, .page-head .actions, .no-print { display: none !important; }
  .app { display: block; } body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
  .scroll-y { max-height: none; overflow: visible; }
}
.kpi.accent > *:not(.ico) { position: relative; z-index: 1; } .kpi.accent .ico { z-index: 1; }
.legend-inline.chips { gap: 8px; align-items: center; }
.chip { padding: 6px 12px 6px 10px; border-radius: 20px; font-size: 13px; font-weight: 500; gap: 8px; background: #fff; }
.chip .muted { font-size: 12px; }
.chip.off { opacity: .55; background: var(--line-2); }
.chip.off .sw { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--muted); }
.chip.off { text-decoration: line-through; text-decoration-color: var(--muted); }
