/* BCE CRM: a light SaaS look in BCE's house style (blue #205375, orange #F79C41).
   No build step, no framework, no inline styles. Inter is served from /static (SIL Open Font License). */

@font-face {
  font-family: "Inter";
  src: url("/static/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #205375;
  --brand-600: #1a4561;
  --brand-50: #eef4f8;
  --brand-100: #d9e7f0;
  --navy: #0f2a3d;
  --navy-2: #133650;
  --orange: #f79c41;
  --orange-600: #e0841f;
  --orange-50: #fef3e7;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --sunk: #f8fafc;
  --text: #1b2733;
  --muted: #64748b;
  --line: #e4e9ef;
  --line-strong: #d3dbe4;

  --free: #15803d;
  --free-bg: #e7f6ec;
  --part: #0e7490;
  --part-bg: #e3f4f8;
  --full: #205375;
  --full-bg: #dde9f2;
  --over: #c2410c;
  --over-bg: #fdeae0;
  --bad: #c62828;
  --off: #94a3b8;
  --off-bg: #f1f4f7;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(16 42 61 / 0.04), 0 1px 3px rgb(16 42 61 / 0.06);
  --shadow-lg: 0 10px 30px rgb(16 42 61 / 0.08);
  --sidebar: 248px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--orange-600); }
img { max-width: 100%; height: auto; }

h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 1rem; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 10px; }

.icon { width: 18px; height: 18px; flex: none; }

/* App shell: sidebar, top bar, content */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar);
  flex: none;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
  color: #c9d6e2;
  padding: 20px 14px;
}
.sidebar .logo { display: block; padding: 4px 10px 22px; }
.sidebar .logo img { width: 132px; display: block; }
.sidebar nav { flex: 1; overflow-y: auto; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7f97ab;
  font-weight: 600;
  padding: 0 12px 6px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: #c9d6e2;
  font-weight: 500;
  position: relative;
}
.sidebar nav a .icon { color: #8fa8bd; }
.sidebar nav a:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
.sidebar nav a:hover .icon { color: #fff; }
.sidebar nav a.active { background: rgb(255 255 255 / 0.1); color: #fff; }
.sidebar nav a.active .icon { color: var(--orange); }
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--orange);
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 0;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  margin-top: 12px;
}
.who-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.who-name strong { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-name span { font-size: 0.78rem; color: #8fa8bd; }
.who form { margin: 0; }
.icon-button {
  background: transparent;
  border: 0;
  color: #8fa8bd;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
}
.icon-button:hover { background: rgb(255 255 255 / 0.08); color: #fff; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.search {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--muted);
}
.search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-100); }
.search input { border: 0; background: transparent; padding: 9px 0; box-shadow: none; }
.search input:focus { outline: none; box-shadow: none; }
.topbar .button { margin-left: auto; }

main { padding: 28px 32px 48px; max-width: 1400px; width: 100%; }

/* Page title row */
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.bar > :first-child { flex: 1; min-width: 240px; }
.sub { color: var(--muted); margin: 4px 0 0; }
.title-with-avatar { display: flex; align-items: center; gap: 14px; }

/* Avatars */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-100);
  color: var(--brand);
  font-weight: 650;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  flex: none;
}
.avatar.person { border-radius: 50%; background: var(--orange-50); color: var(--orange-600); }
.avatar.sm { width: 28px; height: 28px; font-size: 0.7rem; margin-right: 10px; vertical-align: middle; }
.avatar.lg { width: 52px; height: 52px; font-size: 1rem; border-radius: 14px; }
.avatar.lg.person { border-radius: 50%; }
.who .avatar { background: var(--orange); color: var(--navy); border-radius: 50%; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card.flush > .card-head { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--sunk); }
.card.flush > .empty { margin: 16px 20px; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.scroll { overflow-x: auto; }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split.wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 20px; }
.stack-lg + .card, .card + .card, .tiles + .card, section.card + section.card { margin-top: 20px; }

/* Key figures */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  color: var(--text);
}
.tile strong { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.tile-note { font-size: 0.8rem; color: var(--muted); }
.tile-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand);
}
.tile .pill { align-self: flex-start; margin-top: 6px; }
.tile.link:hover { border-color: var(--brand-100); box-shadow: var(--shadow-lg); color: var(--text); }
.tile.accent { background: linear-gradient(135deg, var(--brand) 0%, var(--navy) 100%); border-color: transparent; color: #fff; }
.tile.accent .tile-label, .tile.accent .tile-note { color: #c9d9e6; }
.tile.accent .tile-icon { background: rgb(255 255 255 / 0.12); color: var(--orange); }
.tile.accent:hover { color: #fff; }
.tile.warn { border-color: #f6c9b0; background: linear-gradient(180deg, #fff 0%, var(--over-bg) 100%); }
.tile.warn strong { color: var(--over); }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; background: var(--sunk); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfe; }
tfoot td { background: var(--sunk); font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
a.strong { font-weight: 600; color: var(--text); display: inline-flex; align-items: center; }
a.strong:hover { color: var(--brand); }
tr.inactive td { color: var(--muted); }
.load-col { min-width: 260px; }
.budget-col { min-width: 220px; }

/* Facts */
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Forms */
label { display: block; font-weight: 550; font-size: 0.85rem; margin-bottom: 6px; color: #334155; }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0 8px 0 0; accent-color: var(--brand); vertical-align: -3px; }
label.check { font-weight: 500; display: flex; align-items: center; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 16px; margin: 0; }
legend { font-weight: 600; font-size: 0.85rem; padding: 0 6px; color: #334155; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 170px; }
.row > .grow2 { flex: 2; }
.row.days > * { min-width: 90px; }
.hint { color: var(--muted); font-size: 0.82rem; }
.form-wrap { max-width: 860px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.danger-zone { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border: 1px dashed #f2c3c3; border-radius: var(--radius); background: #fff8f8; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(16 42 61 / 0.12);
  transition: background 0.15s, border-color 0.15s;
}
button:hover, .button:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.button .icon, button .icon { width: 16px; height: 16px; }
button.secondary, .button.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow); }
button.secondary:hover, .button.secondary:hover { background: var(--sunk); color: var(--brand); border-color: var(--brand-100); }
.topbar .button { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.topbar .button:hover { background: var(--orange-600); border-color: var(--orange-600); color: var(--navy); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.danger:hover { background: #a61f1f; border-color: #a61f1f; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 500; box-shadow: none; }
button.link:hover { color: var(--bad); background: none; }
button.wide { width: 100%; padding: 11px 16px; }
.icon-only { padding: 8px; }

/* Badges, pills, notices */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--brand-50);
  color: var(--brand);
  white-space: nowrap;
  vertical-align: middle;
}
h1 .badge { font-size: 0.8rem; margin-left: 8px; vertical-align: 4px; letter-spacing: 0; }
.badge.ok { background: var(--free-bg); color: var(--free); }
.badge.warn { background: var(--orange-50); color: #b45f0c; }
.badge.bad { background: #fdecec; color: var(--bad); }
.badge.muted { background: var(--off-bg); color: var(--muted); }
.badge.accent { background: var(--orange-50); color: #b45f0c; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.free { background: var(--free-bg); color: var(--free); }
.pill.part { background: var(--part-bg); color: var(--part); }
.pill.full { background: var(--full-bg); color: var(--full); }
.pill.over { background: var(--over-bg); color: var(--over); }
.pill.off { background: var(--off-bg); color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.notice { padding: 12px 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); }
.notice.ok { border-left-color: var(--free); background: #f6fcf8; }
.notice.bad { border-left-color: var(--bad); background: #fff7f7; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--sunk); }

/* Load and budget bars */
progress.load-bar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 80px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--off-bg);
  overflow: hidden;
  color: var(--brand);
}
progress.load-bar::-webkit-progress-bar { background: var(--off-bg); border-radius: 999px; }
progress.load-bar::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
progress.load-bar::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
progress.load-bar.part::-webkit-progress-value { background: var(--part); }
progress.load-bar.part::-moz-progress-bar { background: var(--part); }
progress.load-bar.full::-webkit-progress-value { background: var(--brand); }
progress.load-bar.full::-moz-progress-bar { background: var(--brand); }
progress.load-bar.over::-webkit-progress-value { background: var(--over); }
progress.load-bar.over::-moz-progress-bar { background: var(--over); }
progress.load-bar.budget::-webkit-progress-value { background: var(--orange); }
progress.load-bar.budget::-moz-progress-bar { background: var(--orange); }
.load-cell { display: grid; grid-template-columns: minmax(80px, 1fr) auto auto; align-items: center; gap: 10px; }
.budget { display: flex; flex-direction: column; gap: 5px; min-width: 160px; }
.budget.over strong { color: var(--over); }

/* Tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; padding: 4px; background: #e9eef3; border-radius: 10px; width: fit-content; max-width: 100%; }
.tabs a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-weight: 550; font-size: 0.85rem; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs .count { font-size: 0.75rem; color: var(--muted); margin-left: 2px; }

/* Planning */
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.week-label { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 1rem; }
.week-jump { display: flex; gap: 6px; margin-left: auto; }
.week-jump input { width: auto; padding: 7px 10px; }
.week-jump button { padding: 7px 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.free { background: var(--free-bg); border: 1px solid #9fd8b2; }
.dot.part { background: var(--part-bg); border: 1px solid #93cfdd; }
.dot.full { background: var(--full-bg); border: 1px solid #9ebbd2; }
.dot.over { background: var(--over-bg); border: 1px solid #f2ab88; }
.dot.off { background: var(--off-bg); border: 1px solid var(--line-strong); }

table.planning th.day { text-align: center; min-width: 96px; }
table.planning th.day span { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 0.75rem; }
table.planning th.today { color: var(--orange-600); background: var(--orange-50); }
table.planning td.today { background: #fffaf4; }
.slot-td { text-align: center; padding: 8px; }
a.slot {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  transition: transform 0.1s, box-shadow 0.1s;
}
a.slot strong { font-size: 1rem; }
a.slot span { font-size: 0.75rem; opacity: 0.75; }
a.slot:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
a.slot.free { background: var(--free-bg); color: var(--free); border-color: #c4e9d0; }
a.slot.part { background: var(--part-bg); color: var(--part); border-color: #c0e4ed; }
a.slot.full { background: var(--full-bg); color: var(--full); border-color: #bcd2e3; }
a.slot.over { background: var(--over-bg); color: var(--over); border-color: #f6c3a8; }
a.slot.off { background: var(--off-bg); color: var(--off); border-color: var(--line); }
.week-cell { min-width: 260px; }

table.roster td:first-child { min-width: 240px; }
table.roster input.hours {
  width: 68px;
  text-align: center;
  padding: 7px 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin: 0 auto;
  display: block;
}
table.roster .off-day input.hours { background: var(--off-bg); }
table.roster .outside input.hours { border-style: dashed; color: var(--muted); }
table.roster tr.new-row td { background: var(--sunk); }
table.roster tr.new-row select { min-width: 220px; }
table.roster tfoot td { text-align: center; }
table.roster tfoot td:first-child { text-align: left; }
table.roster tfoot td.num { text-align: center; }
table.roster tfoot td:last-child { text-align: right; }
.copy-week { margin-top: 14px; }

/* Dossier timeline */
.dossier-form { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.dossier-form textarea { min-height: 80px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.entry { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.entry:last-child { padding-bottom: 0; }
.entry-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  background: var(--brand-50);
  color: var(--brand);
  border: 3px solid var(--surface);
}
.entry-icon .icon { width: 16px; height: 16px; }
.entry.call .entry-icon { background: var(--free-bg); color: var(--free); }
.entry.meeting .entry-icon { background: var(--orange-50); color: var(--orange-600); }
.entry.email .entry-icon { background: var(--part-bg); color: var(--part); }
.entry-body { flex: 1; min-width: 0; padding-top: 6px; }
.entry-meta { font-size: 0.82rem; color: var(--muted); }
.entry-meta strong { color: var(--text); font-weight: 600; }
.entry-body p { margin: 4px 0 4px; overflow-wrap: anywhere; }
.entry-body form { margin: 0; }
.timeline.compact .entry { padding-bottom: 14px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #475569; }

/* Overview */
.occupancy { list-style: none; margin: 0; padding: 0; }
.occupancy li {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) auto minmax(170px, 1.3fr) 118px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.occupancy li:last-child { border-bottom: 0; padding-bottom: 0; }
.occupancy li:first-child { padding-top: 0; }
.occupancy li > .pill { justify-self: end; }
.who-cell { display: flex; align-items: center; color: var(--text); }
.who-cell > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.mini-days { display: flex; gap: 4px; }
.mini {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 650;
  text-transform: uppercase;
}
.mini.free { background: var(--free-bg); color: var(--free); }
.mini.part { background: var(--part-bg); color: var(--part); }
.mini.full { background: var(--full-bg); color: var(--full); }
.mini.over { background: var(--over-bg); color: var(--over); }
.mini.off { background: var(--off-bg); color: var(--off); }
.mini.today { box-shadow: 0 0 0 2px var(--orange); }

.project-list { list-style: none; margin: 0; padding: 0; }
.project-list li { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.project-list li:first-child { padding-top: 0; }
.project-list li:last-child { border-bottom: 0; padding-bottom: 0; }

/* Sign-in with brand panel */
body.bare { background: var(--surface); }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 56px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 12%, rgb(247 156 65 / 0.22) 0, transparent 38%),
    radial-gradient(circle at 10% 90%, rgb(255 255 255 / 0.07) 0, transparent 45%),
    linear-gradient(150deg, var(--brand) 0%, var(--navy-2) 55%, var(--navy) 100%);
}
.brand-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 46px solid rgb(247 156 65 / 0.12);
  transform: rotate(45deg);
  border-radius: 28px;
}
.brand-panel img { width: 190px; position: relative; z-index: 1; }
.brand-panel h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; max-width: 14em; margin-bottom: 16px; position: relative; z-index: 1; }
.brand-panel p { color: #c9d9e6; font-size: 1.02rem; max-width: 30em; position: relative; z-index: 1; }
.brand-panel small { color: #8fa8bd; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-inner { width: 100%; max-width: 380px; }
.auth-inner h1 { margin-bottom: 6px; }
.auth-inner .muted { margin-bottom: 26px; }
.auth-inner input { padding: 11px 13px; }

.lone { max-width: 480px; margin: 12vh auto; padding: 0 16px; text-align: center; }
.lone img { width: 150px; margin-bottom: 24px; background: var(--navy); padding: 16px 20px; border-radius: var(--radius); }
.lone .card { text-align: left; }
.lone h1 { font-size: 1.3rem; margin-bottom: 10px; }

/* Smaller screens */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.wide, .split.even { grid-template-columns: minmax(0, 1fr); }
  .occupancy li { grid-template-columns: minmax(150px, 1fr) auto; }
  .occupancy li .load-cell { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { position: static; height: auto; width: 100%; padding: 12px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .sidebar .logo { padding: 0 8px 0 0; }
  .sidebar .logo img { width: 92px; }
  .sidebar nav { order: 3; width: 100%; display: flex; gap: 4px; overflow-x: auto; }
  .nav-group { display: flex; gap: 4px; }
  .nav-group + .nav-group { margin-top: 0; }
  .nav-title { display: none; }
  .sidebar nav a { padding: 8px 10px; white-space: nowrap; }
  .sidebar nav a.active::before { display: none; }
  .who { margin: 0 0 0 auto; padding: 0; border: 0; }
  .who-name { display: none; }
  .topbar { position: static; padding: 10px 16px; }
  .topbar .button span { display: none; }
  main { padding: 20px 16px 40px; }
  .auth { grid-template-columns: 1fr; }
  .brand-panel { padding: 32px 24px; gap: 24px; }
  .brand-panel img { width: 140px; }
  .week-jump { margin-left: 0; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .occupancy li { grid-template-columns: minmax(0, 1fr); }
  .project-list li { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .sidebar, .topbar, .no-print, .dossier-form { display: none; }
  body { background: #fff; }
  main { padding: 0; }
  .card, .tile, .table-card { box-shadow: none; }
}
