/* CTI ERP Entreprise — identité visuelle (reprise du système « Modernist » de l'application d'origine). */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/archivo-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/archivo-latin-ext.woff2") format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --color-bg: #f4f5f7;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #2f5a8f;
  --color-accent-100: #e9eef5; --color-accent-200: #c8d5e5; --color-accent-300: #9db2cd; --color-accent-400: #6a87ad;
  --color-accent-500: #2f5a8f; --color-accent-600: #284d7a; --color-accent-700: #21406a; --color-accent-800: #183253; --color-accent-900: #0b2346;
  --color-divider: #d9dde3;
  --font-heading: "Segoe UI", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, Tahoma, Verdana, sans-serif;
  --font-body: "Segoe UI", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, Tahoma, Verdana, sans-serif;
  --font-heading-weight: 800;
  /* police des boutons, champs et tableaux de l'original (règle !important, sans « Segoe UI Variable Text ») */
  --font-ctl: "Segoe UI", -apple-system, BlinkMacSystemFont, Tahoma, Verdana, sans-serif;
  --ink: #1d2228; --muted: #5b636d; --muted-2: #8a9099; --green: #2db34a; --red: #a8231a;
}
*, *::before, *::after { box-sizing: border-box; }
/* comme l'original : la pile de polices du corps n'inclut pas « Segoe UI Variable Text » (seul le conteneur principal l'utilise) */
html, body { margin: 0; background: #f4f5f7; font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Tahoma, Verdana, sans-serif; font-size: 13px; }
body { line-height: 1.55; font-weight: 400; color: var(--color-text); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
p { margin: 0 0 12px; }
a { color: #21406a; text-underline-offset: 3px; }
a:hover { color: #2f5a8f; }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
.btn, .input, .table, .field label, select, input, textarea, button { font-family: var(--font-ctl) !important; }
/* liens qui remplacent un <button> de l'original : mêmes valeurs par défaut qu'un bouton (les styles en ligne priment) */
.ub { display: inline-block; font-family: var(--font-ctl); font-size: 13.3333px; line-height: normal; text-align: center; padding: 1px 6px; cursor: pointer; text-decoration: none; }
form { margin: 0; }
/* formulaire qui ne sert qu'à envelopper un bouton : sans boîte, le bouton reste un enfant direct du conteneur, comme dans l'original */
form.fc { display: contents; }
svg.ic { display: block; flex: none; }

@keyframes cti-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cti-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes cti-slide { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.anim-in { animation: cti-in 0.3s ease both; }

/* — boutons — */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 800; font-size: 13px; min-height: 32px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent; padding: 8px 14.4px; border-radius: 0; }
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); background: transparent; }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: 4px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); }
.btn-danger-ghost { color: #a8231a; }
.btn-danger-ghost:hover { color: #a8231a; background: #fbe5e2; }
.btn-sm { min-height: 26px; padding: 0 8px; font-size: 11.5px; }
/* bouton × de l'original : bouton sans bordure, marges et hauteur de ligne par défaut d'un bouton */
.x-btn { display: inline-block; border: none; background: transparent; cursor: pointer; font-family: var(--font-ctl); font-size: 16px; line-height: normal; text-align: center; color: #8a9099; padding: 1px 6px; }
.link-btn { display: inline-block; border: none; background: transparent; padding: 0; cursor: pointer; font-family: var(--font-ctl); font-size: 13px; font-weight: 700; line-height: normal; text-align: center; color: var(--color-accent); text-decoration: none; }

/* — formulaires — */
.field > label { display: block; font-size: 12px; margin-bottom: 5px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.input { width: 100%; min-height: 36px; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--color-text);
  caret-color: var(--color-accent); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: 0; }
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.input-sm { min-height: 28px; padding: 2px 6px; font-size: 12.5px; }
.input-xs { min-height: 26px; padding: 2px 6px; font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* — tableaux — */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: 8px; border-bottom: 2px solid var(--color-divider); font-weight: 700; }
.table td { padding: 8px; border-bottom: 1px solid var(--color-divider); vertical-align: middle; }
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.table tr.clk { cursor: pointer; }
.table td.tight { padding: 3px 4px; }
.table .r { text-align: right; }
.tnum { font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; background: #ffffff; border: 2px solid var(--color-divider); }

/* — étiquettes — */
.tag { display: inline-flex; padding: 2px 8px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tag-sm { padding: 2px 7px; font-size: 11px; }

/* — structure — */
.shell { position: fixed; inset: 0; display: flex; flex-direction: column; font-family: var(--font-body); color: #1d2228; background: #f4f5f7; }
.topbar { flex: none; height: 52px; background: #0b2346; color: #ffffff; display: flex; align-items: stretch; }
.topbar .tb-btn { flex: none; border: none; background: transparent; color: #ffffff; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: none; }
.topbar .tb-btn:hover { background: #17345c; color: #ffffff; }
.topbar .tb-sep { border-right: 1px solid rgba(255,255,255,0.12); }
.topbar .logo { flex: none; display: flex; align-items: center; padding: 0 16px; border-left: 1px solid rgba(255,255,255,0.12); border-right: 1px solid rgba(255,255,255,0.12); }
.topbar .logo img { height: 34px; width: auto; }
.topbar .appname { flex: none; display: flex; align-items: center; padding: 0 18px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.topbar nav { flex: 1; min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
/* les entrées de menu étaient des <button> : hauteur de ligne « normal », texte centré */
.topbar nav a { flex: none; display: flex; align-items: center; padding: 0 14px; font-family: var(--font-ctl); font-size: 13.5px; font-weight: 600; line-height: normal; text-align: center; white-space: nowrap; text-decoration: none; cursor: pointer; }
.topbar nav a:hover { background: rgba(255,255,255,0.07); }
.topbar .right { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.topbar select { height: 32px; background: #17345c; color: #ffffff; border: 1px solid rgba(255,255,255,0.2); font-size: 12.5px; font-weight: 600; padding: 0 8px; cursor: pointer; }
.topbar .me { display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.12); }
.topbar .me .av { width: 32px; height: 32px; flex: none; background: linear-gradient(135deg, #5f80aa, #1f3d66); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.topbar .me > div { display: flex; flex-direction: column; gap: 1px; }
.topbar .me strong { font-size: 12.5px; white-space: nowrap; }
.topbar .me div span { font-size: 11px; color: #9aa3ad; white-space: nowrap; }
.topbar .logout { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.2); background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.topbar .logout:hover { background: #17345c; }
.gradbar { height: 3px; flex: none; background: linear-gradient(90deg, #9fb0c4, #2f5a8f); }
.body { flex: 1; min-height: 0; display: flex; }
.sidebar { flex: none; width: 248px; background: #f4f5f7; border-right: 2px solid #c9cfd6; overflow-y: auto; display: flex; flex-direction: column; animation: cti-in 0.2s ease both; }
html.sb-hidden .sidebar { display: none; }
.sidebar .sb-head { padding: 10px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #c9cfd6; }
.sidebar .sb-head span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-right: auto; }
.sidebar .sb-head button { border: none; background: transparent; cursor: pointer; font-size: 11.5px; font-weight: 700; color: #2f5a8f; padding: 0; }
.sb-group { display: flex; flex-direction: column; border-bottom: 1px solid #17345c; }
.sb-group > button { display: grid; grid-template-columns: 24px minmax(0,1fr) 16px; gap: 10px; align-items: center; padding: 9px 12px; border: none; color: #fff; text-align: left; cursor: pointer; }
.sb-group > button:hover { background: #17345c !important; }
.sb-group .ib { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.sb-group strong { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-group .chev { transition: transform 0.15s; }
.sb-group.closed .chev { transform: rotate(180deg); }
.sb-group.closed .sb-items { display: none; }
.sb-items { display: flex; flex-direction: column; background: #ffffff; padding: 4px 0; }
.sb-items a { padding: 7px 12px 7px 46px; font-family: var(--font-ctl); font-size: 12.5px; line-height: normal; text-align: left; text-decoration: none; cursor: pointer; }
.sb-items a:hover { background: #eef2f8 !important; }
main.main { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; }
footer.status { flex: none; height: 26px; background: #e9ecf0; border-top: 1px solid #c9cfd6; display: flex; align-items: center; font-size: 11.5px; color: #3d434b; overflow: hidden; white-space: nowrap; }
footer.status > span { padding: 0 12px; height: 100%; display: flex; align-items: center; border-right: 1px solid #c9cfd6; }
footer.status .push { margin-left: auto; border-left: 1px solid #c9cfd6; border-right: none; }
footer.status .last { border-left: 1px solid #c9cfd6; border-right: none; font-variant-numeric: tabular-nums; }

/* — en-têtes de page — */
.page { padding: 24px; display: flex; flex-direction: column; gap: 16px; animation: cti-in 0.3s ease both; }
.page.w1300 { max-width: 1300px; } .page.w1400 { max-width: 1400px; } .page.w1560 { max-width: 1560px; } .page.w1000 { max-width: 1000px; } .page.w1100 { max-width: 1100px; }
.phead { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid #1d2228; padding-bottom: 12px; }
.phead .ttl { display: flex; flex-direction: column; gap: 4px; margin-right: auto; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #21406a; }
.kicker.rh { color: #5b4bc4; } .kicker.frais { color: #8a5a00; }
.h1 { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 21px; line-height: 1.12; }
.h1.lg { font-size: 22px; }
.h2c { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.h2c.sm { font-size: 11.5px; }
.sub { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; } .xsmall { font-size: 11.5px; }

/* — blocs — */
.panel { background: #ffffff; border: 2px solid var(--color-divider); }
.panel-h { padding: 10px 14px; border-bottom: 2px solid var(--color-divider); display: flex; gap: 8px; align-items: baseline; }
.panel-b { padding: 12px 14px; }
.empty { background: #ffffff; border: 2px solid var(--color-divider); padding: 20px; font-size: 13px; color: var(--muted); }
.empty strong { display: block; font-family: var(--font-heading); font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: #ffffff; border: 2px solid var(--color-divider); border-right-width: 1px; }
.kpis > div { padding: 12px 16px; border-right: 1px solid var(--color-divider); display: flex; flex-direction: column; gap: 2px; }
.kpis > div span { font-size: 11.5px; color: var(--muted); }
.kpis > div strong { font-family: var(--font-heading); font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpis.lg > div strong { font-size: 19px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-block; padding: 5px 11px; border: 2px solid var(--color-divider); background: #ffffff; color: var(--ink); font-family: var(--font-ctl); font-size: 12.5px; font-weight: 700; line-height: normal; text-align: center; cursor: pointer; text-decoration: none; }
.chip:hover { color: var(--ink); }
.chip.on { border-color: #2f5a8f; background: #2f5a8f; color: #ffffff; }
.chip.dark.on { border-color: #1d2228; background: #1d2228; }
.chip.navy.on { border-color: #0b2346; background: #0b2346; }
.chip.sm { font-size: 12px; }
.search { display: flex; align-items: center; gap: 8px; border: 2px solid var(--color-divider); padding: 0 10px; width: 340px; max-width: 100%; background: #ffffff; }
.search input { flex: 1; min-width: 0; border: none; outline: none; height: 34px; font-size: 13.5px; background: transparent; }
.gate { border-left: 4px solid; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.gate strong { font-size: 13px; } .gate span { font-size: 12.5px; line-height: 1.5; }
.bar-track { height: 6px; background: #eceef1; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #9fb0c4, #2f5a8f); }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border: none; border-bottom: 1px solid #eceef1; background: transparent; text-align: left; font-family: inherit; color: var(--ink); width: 100%; }
.check .box { width: 18px; height: 18px; flex: none; border: 2px solid #a0a7b0; background: #fff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.check.on .box { border-color: #2db34a; background: #2db34a; }
.check.on span.l { font-weight: 700; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12px; color: #3d434b; }
.legend span.i { display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 10px; flex: none; }
.av-sq { width: 28px; height: 28px; flex: none; background: #1d2228; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; }
.hbars .row { display: grid; grid-template-columns: 150px minmax(0,1fr) 88px; gap: 10px; align-items: center; font-size: 12.5px; }
.hbars .row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars .track { height: 12px; background: #eceef1; }
.hbars .track > div { height: 100%; }
.hbars strong { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.flex { display: flex; } .wrap { flex-wrap: wrap; } .gap8 { gap: 8px; } .gap16 { gap: 16px; } .ai-start { align-items: flex-start; } .ai-center { align-items: center; }
.col { display: flex; flex-direction: column; }
.ml-auto { margin-left: auto; } .mr-auto { margin-right: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.grid2 .full { grid-column: 1 / -1; }

/* — fiche — */
.formbar { position: sticky; top: 0; z-index: 5; background: #ffffff; border-bottom: 2px solid var(--color-divider); padding: 10px 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pager { display: flex; }
.pager a { width: 32px; height: 30px; padding: 1px 6px; border: 2px solid var(--color-divider); background: #ffffff; display: flex; align-items: center; justify-content: center; font-family: var(--font-ctl); font-size: 14px; line-height: normal; text-decoration: none; color: var(--ink); }
.pager a + a { border-left: none; }
.stagebar { margin-left: auto; display: flex; padding-left: 8px; flex-wrap: wrap; }
.stagebar button { margin-left: -6px; padding: 8px 20px 8px 18px; border: none; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.title-input { font-family: var(--font-heading); font-size: 19px; font-weight: 700; border: none; border-bottom: 2px solid var(--color-divider); padding: 4px 0; background: transparent; color: var(--ink); outline: none; width: 100%; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 4px 36px; }
.frow { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 42px; border-bottom: 1px solid #eceef1; padding: 4px 0; }
.frow > label { font-size: 12.5px; font-weight: 700; color: #3d434b; }
.frow .ctl { display: flex; gap: 6px; align-items: center; min-width: 0; }
.frow .ctl .input { flex: 1; min-width: 0; }
.frow .ctl input.input, .frow .ctl select.input { min-height: 34px; }
.relbtn { flex: none; width: 32px; height: 34px; padding: 1px 6px; border: 2px solid var(--color-divider); background: #ffffff; color: #2f5a8f; font-family: var(--font-ctl); font-size: 14px; font-weight: 700; line-height: normal; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.smart { display: flex; flex-wrap: wrap; border: 2px solid var(--color-divider); border-right-width: 1px; }
.smart a, .smart span.sb { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-right: 1px solid var(--color-divider); background: #ffffff; cursor: pointer; font-family: var(--font-ctl); font-size: 13.3333px; line-height: normal; text-align: left; min-width: 128px; color: var(--ink); text-decoration: none; }
.smart a:hover { background: #f4f6fa; color: var(--ink); }
.smart .v { display: flex; flex-direction: column; }
.smart strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.smart .v span { font-size: 11.5px; color: var(--muted); }
.chat { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; padding: 10px 16px; border-bottom: 1px solid #eceef1; }
.chat .av { width: 28px; height: 28px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; }
.ltots { margin-left: auto; min-width: 320px; display: flex; flex-direction: column; border: 2px solid var(--color-divider); }
.ltots > div { display: flex; justify-content: space-between; gap: 24px; padding: 8px 12px; border-bottom: 1px solid var(--color-divider); }

/* — kanban — */
.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; }
.kcol { flex: 0 0 292px; display: flex; flex-direction: column; gap: 8px; min-height: 420px; }
.kcol.over { background: #eef2f7; outline: 2px dashed #9db2cd; }
.kcard { background: #ffffff; border: 2px solid var(--color-divider); padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; text-decoration: none; color: var(--ink); }
.kcard:hover { border-color: #2f5a8f; color: var(--ink); }
.kcard.dragging { opacity: 0.5; }

/* — planning — */
.pgrid { display: grid; grid-template-columns: 220px repeat(6, minmax(0, 1fr)); }
.pcell { border-left: 1px solid var(--color-divider); padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.pcell.over { outline: 2px dashed #2f5a8f; outline-offset: -3px; background: #eef2f7 !important; }
.pchip { padding: 5px 7px; color: #ffffff; cursor: pointer; display: flex; flex-direction: column; gap: 1px; text-decoration: none; }
.pchip:hover { color: #fff; filter: brightness(1.08); }
.pchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* — modales et messages — */
.modal-bg { position: fixed; inset: 0; z-index: 300; background: rgba(29,34,40,0.55); display: none; align-items: center; justify-content: center; padding: 24px; animation: cti-in 0.15s ease both; }
.modal-bg.open { display: flex; }
.modal { width: min(100%, 460px); background: #ffffff; border-top: 4px solid #b8322a; box-shadow: 0 24px 60px rgba(29,34,40,0.35); display: flex; flex-direction: column; }
.modal.info { border-top-color: #2f5a8f; }
.modal .mb { padding: 18px 20px 6px; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 14px; align-items: start; }
.modal .mi { width: 40px; height: 40px; background: #fbe5e2; color: #a8231a; display: flex; align-items: center; justify-content: center; }
.modal.info .mi { background: #e9eef5; color: #2f5a8f; }
.modal .mt { font-family: var(--font-heading); font-size: 16px; line-height: 1.3; font-weight: 700; }
.modal .mm { font-size: 13px; line-height: 1.55; color: #3d434b; }
.modal .mf { padding: 16px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; }
.modal input.input { margin-top: 8px; }
.toast-wrap { position: fixed; right: 18px; bottom: 40px; z-index: 400; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { background: #1d2228; color: #fff; padding: 10px 14px; font-size: 13px; border-left: 4px solid #9fb0c4; box-shadow: 0 10px 30px rgba(0,0,0,0.25); animation: cti-in 0.2s ease both; }
.toast.error { border-left-color: #b8322a; background: #3a1512; }
.saving { position: fixed; top: 58px; right: 18px; z-index: 50; background: #1d2228; color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 10px; display: none; }
.saving.on { display: block; }

/* — impression — */
.sheet { width: 210mm; min-height: 297mm; background: #ffffff; color: #1d2228; font-family: var(--font-body); font-size: 10pt; display: flex; flex-direction: column; flex: none; }
.print-page { min-height: 100vh; background: rgba(29,34,40,0.62); display: flex; flex-direction: column; align-items: center; padding: 24px; }
.print-bar { width: 210mm; max-width: 100%; display: flex; gap: 8px; margin-bottom: 12px; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #ffffff !important; }
  .no-print, .topbar, .sidebar, footer.status, .gradbar, .formbar, .toast-wrap { display: none !important; }
  .print-page { background: #fff; padding: 0; display: block; min-height: 0; }
  .sheet { box-shadow: none !important; width: 210mm; }
  .shell { position: static; display: block; }
  .body, main.main { display: block; overflow: visible; }
  .print-only-area { display: block !important; }
  body.print-area-mode .shell .main > *:not(.print-target-wrap) { display: none !important; }
}
@media (max-width: 760px) {
  .topbar .appname, .topbar .me div, .topbar .logo { display: none; }
  .sidebar { position: fixed; z-index: 30; top: 55px; bottom: 26px; left: 0; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
  .page { padding: 16px; }
  .frow { grid-template-columns: 1fr; gap: 4px; }
  .formbar { padding: 10px 16px; }
}
