:root {
  --taupe: #514432;
  --ochre: #d2a039;
  --ochre-ink: #775214;
  --terracotta: #a9513c;
  --text: #40362b;
  --muted: #695d4d;
  --line: #e5d8be;
  --bg: #fbf7ef;
  --cream: #fcf5e4;
  --header-muted: #ffe4a5;
  --focus-ring: #956517;
  accent-color: var(--ochre-ink);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  background: var(--ochre);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 15px;
  font-weight: 650;
  min-height: 44px;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.secondary {
  background: #fff;
  color: var(--taupe);
  border-color: var(--line);
}
button.danger {
  color: #a23e2e;
  background: #fff1ec;
  border-color: #ebc5b9;
}
a {
  color: var(--taupe);
}
input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #b3a183;
  border-radius: 8px;
  background: #fff;
  min-height: 44px;
  color: var(--text);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23514432' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 600;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.82rem;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: Georgia, serif;
  font-size: 1.8rem;
  margin-bottom: 0;
}
h2 {
  font-size: 1.18rem;
}
h3 {
  font-size: 1rem;
}
.demo-banner {
  background: #fff0d0;
  border-bottom: 1px solid #e8c983;
  padding: 10px 20px;
  color: #6b4a16;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
}
.shell {
  display: flex;
  min-height: calc(100vh - 42px);
}
aside {
  width: 250px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 18px;
  background: var(--taupe);
  color: white;
}
.brand img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: contain;
}
.brand strong {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.brand small {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--header-muted);
}
nav {
  padding: 18px 12px;
  display: grid;
  gap: 5px;
}
nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 500;
  border-radius: 8px;
  padding: 12px;
}
nav button span:first-child {
  font-size: 1.15rem;
  width: 23px;
  color: var(--ochre-ink);
}
nav button.active {
  background: var(--cream);
  color: var(--taupe);
  font-weight: 700;
}
.side-bottom {
  margin-top: auto;
  padding: 22px 18px;
  line-height: 1.5;
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
.side-bottom small {
  display: block;
}
.workspace {
  min-width: 0;
  flex: 1;
}
header {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--taupe);
  color: white;
  padding: 25px 32px;
}
#eyebrow {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--header-muted);
  display: block;
  margin-bottom: 7px;
}
header :focus-visible,
.brand :focus-visible {
  outline-color: var(--header-muted);
}
.profile {
  min-width: 220px;
  font-size: 0.78rem;
}
main {
  padding: 28px 32px;
  max-width: 1600px;
  margin: auto;
}
footer {
  padding: 15px 32px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
  border-top: 1px solid var(--line);
}
.mobile-menu {
  display: none;
}
.toolbar {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.toolbar p {
  margin: 0;
  max-width: 750px;
  line-height: 1.6;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card {
  padding: 21px;
  border-color: #dfc486;
  border-top: 3px solid var(--ochre);
}
.card.gold {
  border-top-color: var(--ochre);
}
.card.red {
  border-top-color: var(--terracotta);
}
.card .value {
  font-size: 1.65rem;
  font-weight: 750;
  margin: 12px 0 7px;
  letter-spacing: -0.03em;
}
.card small {
  display: block;
  line-height: 1.5;
}
.panel {
  padding: 22px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.panel-head h2 {
  margin: 0;
}
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  justify-content: flex-end;
}
.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters label {
  min-width: 130px;
  flex: 1;
}
.filters label.search {
  flex: 2;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
th {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
  padding: 12px 10px;
  background: #faf3e4;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td:first-child,
th:first-child {
  padding-left: 14px;
}
tr:last-child td {
  border-bottom: 0;
}
.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 650;
}
.badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 650;
  background: #f2ece2;
  color: var(--taupe);
}
.badge.pending,
.badge.awaiting_incoming,
.badge.awaiting_direction,
.badge.draft {
  color: var(--ochre-ink);
  background: #fff2d3;
}
.badge.disputed,
.badge.cancelled,
.badge.rejected {
  color: #a04433;
  background: #fde8e0;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.row-actions button {
  font-size: 0.8rem;
  padding: 7px 10px;
  min-height: 36px;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}
.empty b {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
}
.notice {
  padding: 14px 16px;
  border-radius: 9px;
  line-height: 1.6;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.notice.warning {
  background: #fff6e4;
  border-color: #edd6a3;
  color: #79571e;
}
.total {
  font-weight: 750;
  padding: 15px;
  background: var(--cream);
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.step {
  padding: 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
}
.step.done {
  background: var(--cream);
  border-color: #b79354;
}
.step b,
.step small {
  display: block;
}
.step small {
  margin-top: 6px;
}
dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: 90vh;
  overflow: auto;
  border: 0;
  border-radius: 14px;
  padding: 24px;
  color: var(--text);
  box-shadow: 0 20px 100px #352b2055;
}
dialog::backdrop {
  background: #352b2066;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.dialog-top h2 {
  margin: 0;
}
.dialog-top button {
  font-size: 0.85rem;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--taupe);
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  max-width: 90vw;
  display: none;
  box-shadow: 0 8px 30px #0003;
}
#toast.error {
  background: #933f2d;
}
.form-error {
  color: #963f2e;
  background: #fff0e8;
  padding: 12px;
  border-radius: 8px;
  line-height: 1.5;
}
.amount-in {
  color: var(--ochre-ink);
}
.amount-out {
  color: var(--terracotta);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.intro {
  padding: 28px;
  background: var(--cream);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 23px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.intro h2 {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.intro p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 650px;
}
.intro small {
  color: var(--muted);
}
.help {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  font-weight: 400;
}
.checkbox input {
  width: 20px;
  min-height: 20px;
  flex-shrink: 0;
}
.evidence {
  max-width: 100%;
  max-height: 55vh;
  object-fit: contain;
}
.group-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  margin: 12px 0;
}
.split-row {
  display: grid;
  grid-template-columns: 2fr 1fr 44px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}
.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab {
  background: white;
  color: var(--taupe);
  border: 1px solid var(--line);
}
.tab.active {
  background: var(--ochre);
  color: var(--text);
}
.right {
  text-align: right;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 1100px) {
  aside {
    width: 220px;
  }
  header,
  main {
    padding: 22px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  aside {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 255px;
    z-index: 10;
    box-shadow: 15px 0 60px #0003;
  }
  aside.open {
    display: flex;
  }
  .mobile-menu {
    display: block;
    padding: 8px 11px;
  }
  header {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  header h1 {
    font-size: 1.45rem;
  }
  .profile {
    min-width: 100%;
    flex-basis: 100%;
  }
  .profile select {
    max-width: none;
  }
  main {
    padding: 18px 14px;
  }
  .demo-banner {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  .cards {
    gap: 10px;
  }
  .card {
    padding: 15px;
  }
  .card .value {
    font-size: 1.25rem;
  }
  .panel {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .intro {
    display: block;
    padding: 22px;
  }
  .intro small {
    display: block;
    margin-top: 14px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar .actions {
    width: 100%;
  }
  .toolbar .actions button {
    flex: 1;
  }
  .panel-head {
    align-items: flex-start;
  }
  .filters label {
    min-width: calc(50% - 12px);
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-actions button {
    flex: 1;
  }
  footer {
    padding: 16px;
  }
  .split-row {
    grid-template-columns: 1fr 1fr 40px;
  }
  .row-actions {
    min-width: 135px;
  }
}
@media print {
  .demo-banner,
  .shell > aside,
  header,
  footer,
  .toolbar,
  button {
    display: none;
  }
  main {
    padding: 0;
  }
  .panel {
    border: 0;
  }
}

/* Mobile layout: contain intrinsic date-field and table widths in their own cells. */
html, body { width: 100%; max-width: 100%; }
body { overflow-x: clip; }
.shell, .workspace, main, header, footer { min-width: 0; max-width: 100%; }
main { width: 100%; }
.header-title { flex: 1 1 0; min-width: 0; }
label, input, select, textarea, .card, .panel, .grid2, .form-grid, .filters,
.steps, .step, .intro > *, .panel-head > *, .actions, .form-actions,
.summary-row > *, .total > *, .split-row > * { min-width: 0; max-width: 100%; }
input[type="date"], input[type="month"] { min-inline-size: 0; max-inline-size: 100%; }
input, select, textarea { box-sizing: border-box; }
input[type="file"] { overflow: hidden; }
p, h1, h2, h3, label, small, .notice, .summary-row { overflow-wrap: anywhere; }
.table-wrap { min-width: 0; max-width: 100%; width: 100%; overscroll-behavior-inline: contain; }
.panel-head { flex-wrap: wrap; }
.brand { position: relative; }
.nav-backdrop, .nav-close { display: none; }

@media (max-width: 720px) {
  .shell { display: block; width: 100%; }
  .workspace { width: 100%; }
  header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px 12px; }
  .header-title { width: 100%; }
  header h1 { font-size: clamp(1.2rem, 5.3vw, 1.45rem); line-height: 1.25; }
  .profile { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .profile select { min-width: 0; width: 100%; }
  .cards, .grid2, .filters, .form-grid, .steps { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .filters label, .filters label.search { min-width: 0; width: 100%; }
  .cards { gap: 12px; }
  .card { padding: 16px; }
  .card .value { font-size: 1.4rem; line-height: 1.3; }
  .intro { width: 100%; padding: 20px; }
  .intro h2 { font-size: 1.35rem; line-height: 1.35; }
  .intro p { width: 100%; }
  .summary-row, .total { flex-wrap: wrap; gap: 8px 14px; }
  .summary-row > b { margin-inline-start: auto; }
  .dialog-top { align-items: flex-start; }
  dialog { width: calc(100% - 24px); max-width: calc(100% - 24px); max-height: calc(100dvh - 32px); padding: 18px; }
  .toolbar .actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .actions button, .form-actions button { white-space: normal; overflow-wrap: anywhere; }
  .split-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
  aside { width: min(300px, calc(100vw - 52px)); max-width: calc(100vw - 52px); height: 100dvh; }
  aside .brand { align-items: flex-start; padding: 22px 16px 70px; }
  aside .brand > div { min-width: 0; }
  .nav-close { display: inline-flex; position: absolute; left: 16px; bottom: 14px; padding: 7px 12px; min-height: 38px; }
  .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100dvh; padding: 0; border: 0; border-radius: 0; background: #352b2066; z-index: 9; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 721px) { .nav-backdrop, .nav-close { display: none !important; } }

/* 0.3.2: approved C palette, original logo and welcoming local dashboard. */
:root { color-scheme: only light; }
.brand img { width: 70px; height: 70px; flex-shrink: 0; background: #fff; border-radius: 12px; padding: 4px; }
.header-title h1 { color: #fff; font-weight: 500; }
.header-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.header-logo { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 7px; padding: 2px; }
#eyebrow { margin: 0; }
.profile { color: #fff; }
.profile select { color: var(--text); background-color: #fffaf0; }
.mobile-menu.secondary { background: #fff8e8; color: var(--taupe); border-color: #f1dba0; }
.intro { background: #fff; border-inline-start: 4px solid var(--ochre); box-shadow: 0 4px 18px #51443207; }
.intro h2 { color: var(--taupe); font-size: 1.85rem; font-family: inherit; font-weight: 750; }
.quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.quick-actions button { min-height: 52px; font-size: 1.05rem; border-radius: 12px; }
.quick-actions button:last-child { background: #f7dca0; }
.card, .panel { border-radius: 14px; }
@media (max-width:720px) {
 .intro h2 { font-size: 1.5rem; }
 .header-brand { gap: 7px; }
 .header-logo { width: 36px; height: 36px; }
 .quick-actions { gap: 10px; }
 .quick-actions button { padding: 12px 8px; }
 aside .brand { padding-top: 18px; }
}
@media (max-width:350px) { .quick-actions { grid-template-columns:minmax(0,1fr); } }

/* General homepage: equal access to the different parts of the application. */
.home-intro { padding: 18px 20px; margin-bottom: 22px; }
.home-intro h2 { font-size: 1.45rem; margin-bottom: 5px; }
.home-intro p { font-size: .95rem; }
.home-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.home-heading h2 { margin: 0; font-size: 1.15rem; }
.home-currency { min-width: 145px; font-size: .78rem; gap: 5px; }
.home-currency select { min-height: 38px; padding: 8px 30px 8px 10px; }
.module-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.module-tile { min-width: 0; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-top: 3px solid var(--ochre); border-radius: 14px; background: #fff; }
.module-tile.planned { border-top-color: #a8bf96; }
.module-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-height: 35px; margin-bottom: 12px; }
.module-icon { display: inline-flex; padding: 8px; border-radius: 10px; background: var(--cream); color: var(--ochre-ink); }
.module-status { padding: 4px 7px; border-radius: 15px; background: #edf3e6; color: #50663c; font-size: .72rem; font-weight: 650; }
.module-tile h3 { font-size: 1rem; color: var(--taupe); margin: 0 0 9px; overflow-wrap: anywhere; }
.module-metric { font-size: .93rem; font-weight: 650; margin: 0 0 7px; line-height: 1.45; }
.module-description { font-size: .85rem; line-height: 1.5; color: var(--muted); margin: 0 0 14px; overflow-wrap: anywhere; }
.module-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.module-link { min-width: 0; font-size: .82rem; min-height: 38px; padding: 8px 10px; border: 1px solid #dfc486; border-radius: 8px; background: #fff9e8; color: var(--taupe); white-space: normal; }
.module-tile.planned .module-link { background: #f4f7ef; border-color: #c1cdb0; }
.home-tasks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.home-task { display: flex; gap: 12px; justify-content: space-between; align-items: center; min-width: 0; text-align: left; background: var(--cream); color: var(--text); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; }
.home-task b { min-width: 25px; text-align: center; border-radius: 12px; background: #fff; padding: 2px 6px; }
.demo-help { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.demo-help summary { cursor: pointer; color: var(--taupe); font-weight: 650; }
.demo-help p { margin: 14px 0; }
@media(max-width:1150px) { .module-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:900px) { .module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:720px) {
 header { padding: 12px 14px; gap: 9px 10px; }
 header h1 { font-size: 1.25rem; }
 .profile { gap: 4px; }
 .home-intro { display: block; padding: 14px 16px; margin-bottom: 18px; }
 .home-intro h2 { font-size: 1.25rem; }
 .home-intro small { margin-top: 8px; }
 .home-heading { gap: 10px; align-items: flex-end; }
 .home-heading h2 { font-size: 1.02rem; flex: 1; }
 .home-currency { min-width: 0; width: 124px; flex-shrink: 0; }
 .module-grid { gap: 10px; }
 .module-tile { padding: 13px; }
 .module-top { margin-bottom: 9px; flex-wrap: wrap; }
 .module-icon { padding: 6px; }
 .module-tile h3 { font-size: .95rem; }
 .module-metric { font-size: .85rem; }
 .module-description { font-size: .8rem; }
 .module-link { font-size: .8rem; padding: 7px 8px; min-height: 40px; }
 .home-tasks { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:359px) { .module-grid { grid-template-columns: minmax(0,1fr); } }

/* Smartphone-first reception use: readable summaries and generous touch targets. */
@media (max-width: 600px) {
  main { padding: 16px 12px; }
  button, .module-link, .home-task, input, select { min-height: 46px; }
  .home-heading { align-items: center; }
  .home-heading h2 { font-size: 1.05rem; }
  .home-currency { font-size: .875rem; }
  .home-currency select { min-height: 46px; }
  .module-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .module-tile { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 6px 12px; padding: 16px; }
  .module-top { grid-column: 1; grid-row: 1 / 4; align-content: start; align-items: flex-start; margin: 0; }
  .module-status { display: none; }
  .module-tile h3, .module-metric, .module-description { grid-column: 2; margin: 0; }
  .module-tile h3 { font-size: 1.0625rem; line-height: 1.35; }
  .module-metric { font-size: 1rem; }
  .module-description { font-size: .9375rem; line-height: 1.45; }
  .module-links { grid-column: 1 / -1; margin-top: 8px; gap: 8px; }
  .module-link { flex: 1 1 110px; font-size: .9375rem; min-height: 46px; padding: 10px 12px; }
  .home-task { font-size: 1rem; }
  .home-intro p, .demo-help { font-size: .9375rem; }
  .demo-help summary { min-height: 44px; display: flex; align-items: center; }
  .nav-close { min-height: 44px; }
}

@media (max-width: 600px) {
  .home-intro p { display: none; }
  .module-tile.planned { order: 10; }
}

/* 0.4: approved compact homepage, natural module colours. */
.home-dashboard { max-width: 1000px; margin-inline: auto; }
.home-date { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 14px; color:var(--muted); font-size:.9375rem; margin-bottom:18px; }
.home-date span { font-size:.8125rem; }
.home-alerts { margin-bottom:22px; }
.home-alerts h2, .spaces-title { font-size:1.125rem; margin:0 0 12px; }
.all-clear { margin:0; padding:12px 14px; border-radius:12px; color:#425936; background:#edf2e6; font-weight:650; }
.shortcut-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.home-shortcut { display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center; min-width:0; min-height:148px; padding:18px 10px 14px; border:1px solid transparent; border-radius:16px; background:var(--tile-bg); color:var(--tile-ink); box-shadow:none; white-space:normal; }
.home-shortcut:hover { filter:brightness(.97); border-color:var(--tile-ink); }
.home-shortcut strong { font-size:1.125rem; line-height:1.25; color:#352b20; }
.home-shortcut small { font-size:.875rem; line-height:1.3; color:#5b5448; font-weight:500; }
.shortcut-line { display:block; width:36px; height:3px; border-radius:3px; background:var(--tile-ink); margin-top:3px; }
.tone-sage { --tile-bg:#e7e8d8; --tile-ink:#727650; }
.tone-stone { --tile-bg:#f1e2c5; --tile-ink:#9b752c; }
.tone-ochre { --tile-bg:#f6eacf; --tile-ink:#a17d35; }
.tone-peach { --tile-bg:#f5dfcf; --tile-ink:#ad6945; }
.tone-leaf { --tile-bg:#ede0d5; --tile-ink:#826956; }
.tone-sand { --tile-bg:#e8ddce; --tile-ink:#796247; }
.home-footnote { margin:14px 0 18px; color:var(--muted); font-size:.875rem; text-align:center; }
.home-admin,.cash-links { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.home-admin .module-link,.cash-links .module-link { min-height:44px; font-size:.9375rem; }
.proof-fields { border:1px solid var(--line); border-radius:12px; padding:14px; min-width:0; display:grid; gap:12px; }
.proof-fields legend { color:var(--taupe); font-weight:700; }
.proof-fields small { color:var(--muted); line-height:1.45; }
.proof-preview { border-bottom:1px solid var(--line); padding:12px 0 20px; }
.proof-download { display:inline-flex; align-items:center; min-height:44px; color:#715415; font-weight:650; }
@media(max-width:720px) {
  .shortcut-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .home-shortcut { min-height:116px; padding:12px 7px; gap:6px; }
  .home-shortcut strong { font-size:1rem; }
  .home-shortcut small { font-size:.8125rem; }
  .home-shortcut svg { width:30px; height:30px; }
  .home-date { margin-bottom:14px; }
  .home-alerts { margin-bottom:16px; }
  .home-alerts h2,.spaces-title { font-size:1.0625rem; margin-bottom:8px; }
  header { padding:10px 12px; gap:6px 10px; }
  .header-logo { width:28px; height:28px; }
  .header-brand { margin-bottom:2px; }
  #eyebrow { font-size:.6875rem; }
  header h1 { font-size:1.125rem; }
  .profile { font-size:0; gap:0; }
  .profile select { font-size:1rem; min-height:42px; padding:8px 12px; }
  .mobile-menu.secondary { min-height:44px; padding:8px 10px; }
  .demo-banner { padding:7px 12px; font-size:.75rem; line-height:1.35; }
  .home-admin { gap:6px; }
  .home-task { font-size:.9375rem; padding:10px 12px; }
}
@media(max-width:350px) {
 .home-shortcut strong { font-size:.9375rem; }
 .home-shortcut small { font-size:.75rem; }
}
[hidden] { display: none !important; }
nav .subnav { padding-inline-start: 40px; font-size: .9375rem; }

/* First private server slice; local demo layout remains independent. */
.server-app main { max-width: 980px; margin: auto; }
.server-app h1 { font-size: 1.3rem; }
.server-app section { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.server-app form { display: grid; gap: 14px; }
.server-app #list section { border-top: 3px solid #a5b993; }
.server-app #message { color: var(--taupe); font-weight: 600; }
.server-app [hidden] { display: none !important; }
.server-app header .brand { padding: 0; border: 0; }
@media (min-width: 721px) {
 .server-app #reservation-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.connected-app .profile { display:flex; flex-direction:row; align-items:center; gap:8px; max-width:none; font-size:.875rem; }
.connected-app #session-name { flex:1; min-width:0; }
.connected-app .profile button { padding:8px 10px; min-height:44px; font-size:.8125rem; }

.notification-entry { padding:14px 0; border-bottom:1px solid var(--line); }
.notification-entry h3 { margin:0 0 8px; font-family:inherit; font-size:1rem; }
.notification-entry p { margin:8px 0; }

@media (max-width:600px) {
  .supplier-ledger thead { display:none; }
  .supplier-ledger table,.supplier-ledger tbody { display:block; }
  .supplier-ledger tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); border:1px solid var(--line); border-radius:12px; margin:12px 0; padding:8px; }
  .supplier-ledger td { display:block; border:0; padding:8px; overflow-wrap:anywhere; }
  .supplier-ledger td:first-child,.supplier-ledger td:last-child { grid-column:1 / -1; }
  .supplier-ledger td:nth-child(2)::before { content:"Montant : "; display:block; font-size:.8rem; color:var(--muted); }
  .supplier-ledger td:nth-child(3)::before { content:"Échéance : "; display:block; font-size:.8rem; color:var(--muted); }
}
