/* ==========================================================================
	IXXO DMS application styles.
	Part 1 is the approved demo stylesheet (DOCS/client-dms/dms-demo-en.html)
	with every value kept; part 2 adds the components the real application
	needs, built from the same tokens.
	========================================================================== */

/* ---------- Part 1: the approved demo ---------- */
:root {
	--bg: #f6f8fc;
	--card: #ffffff;
	--well: #eef2f8;
	--line: #e4e9f2;
	--line-strong: #cfd7e6;
	--ink: #1b2c46;
	--ink-dim: #33425a;
	--ink-faint: #5b6b85;
	--navy: #16273f;
	--navy-800: #1f3252;
	--accent: #d8690f;
	--accent-ink: #b6550a;
	--accent-wash: #fcefe2;
	--accent-tint: #fbf6f0;
	--on-accent: #ffffff;
	--ok: #2f855a;
	--ok-wash: #e6f4ec;
	--warn: #b9750c;
	--warn-wash: #fcf0d8;
	--danger: #c2415c;
	--danger-wash: #fce7ec;
	--info: #2563c9;
	--info-wash: #e8f0fe;
	--violet: #6d4bd0;
	--violet-wash: #eee9fb;
	--teal: #0f9488;
	--teal-wash: #e1f5f1;
	--font: "IXXO Inter", system-ui, -apple-system, 'Segoe UI', sans-serif;
	--display: "IXXO Plex Sans", "IXXO Inter", system-ui, sans-serif;
	--mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
	--radius: 6px;
	--radius-sm: 4px;
	--shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
	--shadow-lg: 0 24px 50px -24px rgba(12, 23, 41, .30);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
aside { background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; }
.brand b { display: block; font-size: 15px; }
.brand small { color: var(--ink-faint); }
nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink-dim); text-decoration: none; cursor: pointer; margin-bottom: 2px; }
nav a:hover { background: var(--well); color: var(--ink); }
nav a.on { background: var(--accent-wash); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
nav a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(241, 146, 9, .35); }
nav .sec { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 14px 10px 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.live { background: var(--ok); }
.dot.build { background: var(--accent); }
.dot.later { background: var(--line-strong); }
main { padding: 24px 28px 60px; min-width: 0; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.sub { color: var(--ink-dim); max-width: 70ch; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.live { background: var(--ok-wash); color: var(--ok); }
.chip.build { background: var(--warn-wash); color: var(--warn); }
.chip.later { background: var(--well); color: var(--ink-dim); }
.chip.info { background: var(--info-wash); color: var(--info); }
.chip.bad { background: var(--danger-wash); color: var(--danger); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--ink-faint); font-weight: 600; background: var(--bg); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
.num { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.muted { color: var(--ink-faint); }
.small { font-size: 12px; }
.btn { border: 1px solid var(--line-strong); background: var(--card); border-radius: var(--radius-sm); padding: 7px 12px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--ink-faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(.96); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-dim); }
.input, select.input, textarea.input { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 10px; background: var(--card); width: 100%; }
.meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.note { background: var(--info-wash); border: 1px solid #C7D7FB; color: #1D3A6E; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.note.live { background: var(--ok-wash); border-color: #BFE3CB; color: #14532D; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.timeline time { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.vers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vcard { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--bg); }
.vcard.cur { border-color: var(--accent); background: var(--accent-wash); }
.pdf { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow); padding: 28px 32px; max-width: 720px; margin: 0 auto; font-size: 12.5px; }
.pdf h4 { margin: 0 0 4px; font-size: 15px; }
.pdf .rule { height: 2px; background: var(--accent); margin: 8px 0 14px; }
.pdf .item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: .2s; z-index: 1000; max-width: min(420px, calc(100vw - 40px)); pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.badge { display: inline-block; min-width: 20px; text-align: center; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; padding: 1px 6px; }
.hide { display: none !important; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; }
.over { color: var(--danger); font-weight: 600; }
@media (max-width: 900px) {
	.app { grid-template-columns: 1fr; }
	aside { position: static; height: auto; }
	.grid2, .grid3, .vers, .meta { grid-template-columns: 1fr; }
	main { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.toast { transition: none; }
}

/* IXXO website look (ixxo.com): the page sits between the site header and footer, in its container width. */
html, body { overflow-x: clip; }
body { background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); font-weight: 600; letter-spacing: -.012em; }
h1 { font-size: 26px; }
.demo-band { background: #fff; border-bottom: 1px solid var(--line); }
.demo-band .in { max-width: 1240px; margin: 0 auto; padding: 28px 24px 22px; }
.demo-band .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.demo-band h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); margin: 8px 0 6px; }
.demo-band p { margin: 0; color: var(--ink-dim); max-width: 70ch; }
.app { max-width: 1240px; margin: 24px auto 56px; padding: 0 24px; grid-template-columns: 240px 1fr; gap: 24px; min-height: 0; }
aside { position: sticky; top: 16px; height: auto; max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
main { padding: 0; }
.brand .mark { background: var(--navy); color: #fff; border-radius: var(--radius-sm); }
.brand b { font-family: var(--display); }
.btn { border-radius: var(--radius-sm); font-weight: 600; }
.btn.primary { color: #fff; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); filter: none; }
.badge { color: #fff; }
@media (max-width: 900px) {
	.app { grid-template-columns: 1fr; padding: 0 16px; margin-top: 16px; }
	aside { position: static; max-height: none; }
	.grid2, .grid3, .vers, .meta { grid-template-columns: 1fr; }
	.kv { grid-template-columns: 110px 1fr; }
	.timeline li { grid-template-columns: 1fr; gap: 2px; }
	.panel { overflow-x: auto; }
}

/* ---------- Part 2: application components ---------- */

/* Links and text */
a { color: var(--accent-ink); }
main a:not(.btn):not(.chip) { text-decoration: none; }
main a:not(.btn):not(.chip):hover { text-decoration: underline; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.mt { margin-top: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sep { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.stack > * + * { margin-top: 12px; }

/* Sidebar additions */
.brand { color: var(--ink); text-decoration: none; }
nav a .lbl { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
nav a .badge.alert { background: var(--danger); }
.aside-foot { padding: 12px 10px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); line-height: 1.35; white-space: nowrap; }
.btn:disabled, .btn.busy { opacity: .6; cursor: progress; }
.btn.danger { color: var(--danger); border-color: #efc2cc; }
.btn.danger:hover { background: var(--danger-wash); border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--well); }
.btn .lucide { width: 15px; height: 15px; }
.icon-btn { border: 0; background: transparent; padding: 4px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-faint); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--well); color: var(--ink); }

/* Chips as choices: <label class="chip"><input type="radio">…</label> */
.chip.violet { background: var(--violet-wash); color: var(--violet); }
.chip.teal { background: var(--teal-wash); color: var(--teal); }
.chip.accent { background: var(--accent-wash); color: var(--accent-ink); }
label.chip { cursor: pointer; border: 1px solid transparent; }
label.chip input { accent-color: var(--accent); margin: 0; }
label.chip:has(input:checked) { border-color: currentColor; box-shadow: 0 0 0 2px rgba(216, 105, 15, .12); }
.chip .x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 14px; line-height: 1; opacity: .7; }
.chip .x:hover { opacity: 1; }

/* Forms */
.input:disabled, .input[readonly] { background: var(--bg); color: var(--ink-faint); }
textarea.input { resize: vertical; min-height: 64px; }
.field .hint { font-size: 12px; color: var(--ink-faint); }
.field .err { font-size: 12px; color: var(--danger); font-weight: 600; }
.field.invalid .input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(194, 65, 92, .12); }
.field .req { color: var(--danger); margin-left: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
fieldset.box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px 4px; margin: 0 0 12px; }
fieldset.box legend { font-size: 12px; font-weight: 600; color: var(--ink-dim); padding: 0 4px; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters .field { margin: 0; min-width: 140px; flex: 1; }
.filters .field.wide { flex: 2; min-width: 200px; }

/* Picker: search box with selected chips (recipients, related documents) */
.picker { position: relative; }
.picker .chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.picker .chosen:empty { display: none; }
.picker .menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
.picker .menu button { display: flex; width: 100%; text-align: left; gap: 8px; align-items: center; justify-content: space-between; border: 0; background: transparent; padding: 8px 10px; cursor: pointer; }
.picker .menu button:hover, .picker .menu button.act { background: var(--accent-tint); }
.picker .menu .none { padding: 8px 10px; color: var(--ink-faint); font-size: 13px; }

/* Upload drop zone */
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg); padding: 14px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-tint); }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop .fname { font-weight: 600; color: var(--ink); word-break: break-all; }

/* Suggestions from the self-learning engine */
.suggest { border: 1px solid #f3d3b4; background: var(--accent-tint); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.suggest h3 { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 0 0 8px; }
.suggest .items { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button.chip { border: 1px solid #f0c9a4; background: #fff; color: var(--ink); cursor: pointer; font-weight: 500; }
.suggest button.chip:hover { border-color: var(--accent); }
.suggest button.chip b { color: var(--accent-ink); }
.suggest .conf { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }

/* KPI tiles (grid3 of panels in the demo) */
.kpi { margin: 0; }
.kpi .v { font-size: 26px; font-weight: 700; font-family: var(--display); line-height: 1.2; }
.kpi .v.bad { color: var(--danger); }
.kpi .v.ok { color: var(--ok); }
a.kpi, .kpi a { color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--line-strong); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.grid3.kpis { margin-bottom: 16px; }

/* Tables */
.table-wrap { overflow-x: auto; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn + .btn { margin-left: 4px; }
tr.muted td { color: var(--ink-faint); }
tr.sel td { background: var(--accent-tint); }
td .sub2 { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.empty { padding: 22px 10px; text-align: center; color: var(--ink-faint); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--ink-faint); flex-wrap: wrap; }
.pager .row { gap: 4px; }

/* Panel headers with actions */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px 0 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--ink-dim); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* Dialog */
dialog.dlg { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0; width: min(560px, calc(100vw - 32px)); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(22, 39, 63, .45); }
dialog.dlg .dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
dialog.dlg .dlg-head h2 { margin: 0; }
dialog.dlg .dlg-body { padding: 16px 18px; max-height: 70vh; overflow-y: auto; }
dialog.dlg .dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); }
dialog.dlg.wide { width: min(860px, calc(100vw - 32px)); }

/* Toast kinds */
.toast.bad { background: var(--danger); }
.toast.ok { background: var(--ink); }

/* Notes list */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.notes li:last-child { border-bottom: 0; }
.notes .who { font-size: 12px; color: var(--ink-faint); }
.notes .body { white-space: pre-wrap; margin-top: 2px; }

/* Protocol number and file badge */
.protocol { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--ink); }
.file-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--bg); }
.file-card .ext { flex: none; width: 40px; height: 48px; border-radius: 4px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--mono); text-transform: uppercase; }
.file-card .ext.pdf { background: var(--danger); }
.file-card .ext.doc, .file-card .ext.docx { background: var(--info); }
.file-card .ext.xls, .file-card .ext.xlsx { background: var(--ok); }
.file-card .ext.ppt, .file-card .ext.pptx { background: var(--accent); }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--well); }

/* Folder tree */
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--line-strong); margin-left: 8px; }
.tree li > .node { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); }
.tree li > .node:hover { background: var(--bg); }

/* Automation editor rows */
.rule-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.rule-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--bg); margin-bottom: 12px; }
.rule-block h3 { display: flex; align-items: center; justify-content: space-between; }

/* Progress bar (accuracy, learning) */
.bar { height: 8px; border-radius: 999px; background: var(--well); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar.ok > span { background: var(--ok); }

/* Header additions: user and company menus reuse the ixxo.com mega menu */
.site-header .mega.mega-user { min-width: 260px; left: auto; right: 0; }
.site-header .mega.mega-user .mega-grid { grid-template-columns: 1fr; }
.site-header .nav-link .nav-caption { display: block; font-size: 11px; color: var(--ink-faint); font-weight: 500; line-height: 1.1; }
.site-header button.mega-item { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.site-header .mega-item.is-current h4::after { content: " ✓"; color: var(--accent); }

/* Login page */
.auth-wrap { max-width: 440px; margin: 48px auto 72px; padding: 0 16px; }
.auth-wrap .panel { padding: 26px 28px; }
.auth-wrap h1 { font-size: 24px; margin-bottom: 6px; }
.auth-wrap .btn.primary { width: 100%; padding: 10px 12px; }
.auth-err { background: var(--danger-wash); color: var(--danger); border: 1px solid #f3c6cf; border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; margin-bottom: 12px; font-weight: 600; }

/* Print view */
@media print {
	.utilitybar, .site-header, .site-footer, aside, .demo-band, .no-print, .toast { display: none !important; }
	.app { display: block; margin: 0; padding: 0; max-width: none; }
	.panel { box-shadow: none; border-color: #bbb; break-inside: avoid; }
	body { background: #fff; }
}

@media (max-width: 1100px) {
	.grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
	.rule-row { grid-template-columns: 1fr; }
	.filters .field { min-width: 100%; }
	.site-header .nav-actions .btn.new-entry { display: none; }
}
@media (max-width: 520px) {
	.grid4 { grid-template-columns: 1fr; }
	.demo-band .in { padding: 20px 16px 16px; }
	td.actions { white-space: normal; }
}

/* ---------- Part 3: the application shell (compact, IXXO branded) ---------- */
body.shell { background: var(--bg); }
.shell-grid { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 14px 12px 12px; }
.side .side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; text-decoration: none; color: var(--ink); }
.side .side-brand img { height: 26px; width: auto; }
.side .side-brand b { display: block; font-family: var(--display); font-size: 15px; line-height: 1.1; }
.side .side-brand small { display: block; color: var(--ink-faint); font-size: 12px; line-height: 1.2; }
.side nav a { padding: 7px 10px; }
.side nav a .lucide { color: var(--ink-faint); flex: none; }
.side nav a.on .lucide { color: var(--accent); }
.side nav .lbl { gap: 9px; }
.side .side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-faint); }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 22px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar .gsearch { position: relative; flex: 0 1 380px; }
.topbar .gsearch input { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 12px 0 34px; background: var(--card); }
.topbar .gsearch .lucide { position: absolute; left: 11px; top: 11px; color: var(--ink-faint); }
.topbar .demo-flag { border: 1px dashed var(--line-strong); color: var(--ink-faint); font-size: 11px; padding: 3px 8px; border-radius: var(--radius-sm); white-space: nowrap; }
.topbar .spacer { flex: 1; }
.tb-btn { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; font-weight: 500; text-decoration: none; white-space: nowrap; }
.tb-btn:hover { border-color: var(--line-strong); background: var(--bg); }
.tb-btn .lucide { color: var(--ink-faint); }
.tb-btn .count { min-width: 18px; font-size: 12px; }
.tb-btn .count.hot { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 6px; font-weight: 700; }
.tb-menu { position: relative; }
.tb-drop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60; }
.tb-menu.open .tb-drop { display: block; }
.tb-drop a, .tb-drop button.item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; }
.tb-drop a:hover, .tb-drop button.item:hover { background: var(--bg); }
.tb-drop .sec { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 10px 4px; }
.tb-drop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tb-drop .who b { display: block; }
.tb-drop .is-current { background: var(--accent-wash); }
.tb-drop.bell { width: 360px; padding: 0; }
.tb-drop.bell .bell-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.tb-drop.bell #bellList { max-height: 420px; overflow-y: auto; }
.bell-item { display: flex; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.bell-item:hover { background: var(--bg); }
.bell-item.unread { background: var(--accent-tint); }
.bell-item .bell-title { display: block; font-weight: 600; font-size: 13px; }
.bell-item .bell-body { display: block; font-size: 12px; color: var(--ink-dim); }
.bell-item .bell-time { display: block; font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.content { padding: 22px 26px 40px; flex: 1; min-width: 0; }
.shell-foot { padding: 12px 26px; font-size: 11px; color: var(--ink-faint); border-top: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; line-height: 1; vertical-align: middle; }
.who-inline { display: inline-flex; align-items: center; gap: 6px; }
.demo-script { position: fixed; right: 18px; bottom: 18px; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 70; }
.demo-script .ds-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 600; cursor: pointer; }
.demo-script .ds-body { border-top: 1px solid var(--line); padding: 10px 14px 12px; display: none; font-size: 13px; }
.demo-script.open .ds-body { display: block; }
.demo-script ol { margin: 0; padding-left: 18px; }
.demo-script li { margin: 4px 0; }
.demo-script li.done { color: var(--ink-faint); text-decoration: line-through; }
.menu-toggle { display: none; }
@media (max-width: 980px) {
	.shell-grid { grid-template-columns: 1fr; }
	.side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 80; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
	body.nav-open .side { transform: none; }
	.menu-toggle { display: inline-flex; }
	.topbar { padding: 0 12px; }
	.topbar .tb-label, .topbar .demo-flag { display: none; }
	.content { padding: 16px; }
}
@media (max-width: 560px) {
	.topbar .gsearch { flex-basis: 140px; }
	.tb-drop.bell { width: min(360px, calc(100vw - 24px)); }
}

/* Login: Microsoft button and demo personas */
.auth-wrap.wide { max-width: 800px; }
.center { text-align: center; }
.ms-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.ms-btn:hover { background: var(--bg); border-color: var(--ink-faint); }
.pw-box { margin-top: 6px; }
.pw-box summary { cursor: pointer; color: var(--ink-dim); }
.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.persona { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.persona:hover { border-color: var(--accent); background: var(--accent-tint); }
.persona b { display: block; font-size: 14px; }
.persona .small { display: block; }
@media (max-width: 700px) {
	.persona-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
	.persona-grid { grid-template-columns: 1fr; }
}
.eyebrow-sm { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }

/* Document page: header, viewer with tabs, side cards */
.doc-head { margin-bottom: 14px; }
.doc-head h1 { margin: 10px 0 10px; font-size: 24px; }
.num-chip { font-family: var(--mono); font-size: 12px; font-weight: 600; background: var(--well); border-radius: var(--radius-sm); padding: 3px 8px; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.doc-viewer .preview-frame { height: 70vh; min-height: 460px; }
.doc-tabs-panel .tabs { margin-top: -6px; }
.side-card { padding: 14px 16px; }
.card-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-bottom: 8px; }
.side-card .kv { grid-template-columns: 120px 1fr; }
.ok-line { color: var(--ok); display: flex; gap: 6px; align-items: center; }
.currently { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-dim); }
@media (max-width: 1180px) {
	.doc-layout { grid-template-columns: 1fr; }
}
.viewer-bar { display: flex; justify-content: space-between; gap: 12px; margin: -4px 0 8px; }
.text-preview { margin-top: 10px; max-height: 360px; overflow: auto; white-space: pre-wrap; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }

/* Registry book */
.book-filters { align-items: center; }
.book-filters .tabs { margin: 0; border-bottom: 0; }
.tab-radio { padding: 8px 12px; color: var(--ink-dim); border-bottom: 2px solid transparent; cursor: pointer; font-weight: 500; }
.tab-radio input { position: absolute; opacity: 0; pointer-events: none; }
.tab-radio.on, .tab-radio:has(input:checked) { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
table.book th, .tracker th { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.stack-col > .panel:last-child { margin-bottom: 16px; }
.card-list { display: flex; flex-direction: column; }
.card-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.card-row:last-child { border-bottom: 0; }
.card-row:hover { background: var(--bg); text-decoration: none; }
.card-list.compact .card-row { padding: 8px 4px; }
.cr-title { display: block; font-weight: 600; }
.cr-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.cr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.quick { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; }
.quick:hover { border-color: var(--accent); background: var(--accent-tint); text-decoration: none; }
.quick .lucide { color: var(--accent); }
.intake-note { display: flex; gap: 8px; align-items: center; margin-top: 12px; text-decoration: none; }
.org-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.org-kpi .v { font-size: 22px; font-weight: 700; font-family: var(--display); }
.org-kpi .v.bad { color: var(--danger); }
@media (max-width: 1100px) {
	.dash-grid { grid-template-columns: 1fr; }
}

/* Translations */
.tr-table td { vertical-align: top; }
.tr-table .tr-input { min-height: 36px; resize: vertical; }
.tr-changed .tr-input { background: var(--accent-tint); border-color: #f0c9a4; }
.tr-original { margin-top: 4px; }

/* ---------- Part 4: lighter typography, full width, readable text ----------
	Client feedback: characters felt bulky and sentences packed. Everything here
	overrides earlier rules: smaller and lighter headings, buttons and chips, a
	more open line height, and no narrow measure caps on running text. */
html, body { font-size: 14px; line-height: 1.6; font-weight: 400; }
body.shell { letter-spacing: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
.content h1, .head h1 { font-size: 20px; margin: 0 0 4px; }
.doc-head h1 { font-size: 20px; font-weight: 600; margin: 8px 0 10px; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13.5px; font-weight: 600; }
.sub, .head .sub, p.sub { max-width: none; font-size: 13.5px; line-height: 1.6; }
.btn { font-weight: 500; font-size: 13px; padding: 6px 11px; gap: 6px; line-height: 1.4; }
.btn.primary { font-weight: 500; }
.btn.sm { font-size: 12px; padding: 3px 9px; }
.btn .lucide { width: 14px; height: 14px; }
.tb-btn { font-weight: 400; font-size: 13px; }
.chip { font-weight: 500; font-size: 11.5px; padding: 2px 9px; }
.num-chip { font-weight: 500; font-size: 12px; }
.num { font-size: 12.5px; }
nav a, .side nav a { font-weight: 400; font-size: 13.5px; }
nav a.on, .side nav a.on { font-weight: 500; }
.panel { padding: 16px 20px; }
.kpi .v, .org-kpi .v { font-weight: 600; font-size: 22px; }
.kv { font-size: 13px; line-height: 1.55; gap: 6px 14px; }
th { font-weight: 500; font-size: 11.5px; }
td { line-height: 1.5; }
.cr-title { font-weight: 500; }
.strong, b, strong { font-weight: 600; }
.field label { font-weight: 500; }
.card-label { font-weight: 500; }
.note { line-height: 1.6; }
.timeline li { line-height: 1.5; }
.side .side-brand b { font-weight: 600; }

/* ---------- Two-step verification (sign-in pages and My account) ---------- */
.auth-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--ink-faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.mfa-code { font-family: var(--mono); font-size: 20px; letter-spacing: 4px; text-align: center; }
.mfa-other { list-style: none; padding: 0; margin: 6px 0 12px; display: grid; gap: 6px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-ink, var(--accent)); cursor: pointer; font: inherit; text-decoration: underline; }
form.inline { display: inline; }
.mfa-choices { display: grid; gap: 10px; margin-top: 8px; }
.mfa-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; background: #fff; }
.mfa-choice:hover { border-color: var(--accent); background: var(--accent-wash, #fdf3ea); }
.mfa-choice b { display: block; font-weight: 600; }
.mfa-choice .lucide { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.mfa-steps { padding-left: 18px; margin: 4px 0 10px; line-height: 1.6; }
.mfa-qr { display: flex; justify-content: center; margin: 6px 0; }
.mfa-qr svg { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mfa-secret { font-size: 13px; letter-spacing: 1px; word-break: break-all; margin: 2px 0 14px; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-family: var(--mono); font-size: 14px; padding: 12px 14px; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); margin: 8px 0 12px; }
.mfa-method { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mfa-method:first-of-type { border-top: 0; }
.mfa-method .lucide { color: var(--ink-dim); }
.mfa-setup-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 4px 0 10px; background: var(--bg); align-items: flex-end; }
.mfa-setup-box .mfa-code { font-size: 17px; }
.mfa-radio { display: flex; align-items: flex-start; margin: 4px 0 8px; }
.mfa-radio input { margin-top: 3px; }

/* ---------- Customer branding (managed by IXXO) ---------- */
.co-logo { margin: 4px 0 10px; }
.co-logo img, .et-logo img { max-height: 56px; max-width: 220px; display: block; }
.side-customer { display: flex; align-items: center; gap: 8px; margin: -4px 14px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.side-customer img { max-height: 30px; max-width: 150px; display: block; }
.cron-line { display: block; margin-top: 6px; padding: 6px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12px; word-break: break-all; white-space: normal; }
