:root {
  color-scheme: light;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  color: #182723;
  background: #f4f7f5;
  --ink: #12231f;
  --muted: #516660;
  --line: #dbe4df;
  --green: #176550;
  --white: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 3rem, 75rem); margin: 0 auto; }
.masthead { background: var(--ink); color: white; padding-top: env(safe-area-inset-top); }
.masthead-content { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .75rem; font-size: 1.25rem; letter-spacing: -.025em; }
.brand img { border-radius: .65rem; }
main.shell { padding: 2.6rem 0 max(2rem, env(safe-area-inset-bottom)); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.65rem); font-weight: 740; letter-spacing: -.045em; }
h2 { font-size: 1.35rem; }
p { color: var(--muted); }
.overview { display: flex; align-items: end; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.75rem; }
#environment { min-height: 1.25rem; font-weight: 630; }
.branch { min-width: min(100%, 16rem); }
.tools { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(11rem, 16rem) auto; align-items: end; gap: .8rem; }
label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 660; }
input, select, button { font: inherit; border-radius: .6rem; min-height: 3rem; }
input, select { background: white; border: 1px solid #b6c8bf; color: var(--ink); width: 100%; padding: .65rem .8rem; }
select { appearance: none; padding-right: 2.35rem; background-image: url("/chevron.svg"); background-position: right .8rem center; background-repeat: no-repeat; }
button { border: 1px solid transparent; padding: .58rem .85rem; cursor: pointer; font-weight: 660; }
button:disabled { cursor: default; opacity: .56; }
.primary { background: var(--green); color: white; }
.secondary { background: white; border-color: #b6c8bf; color: var(--ink); }
.quiet { background: transparent; border-color: #82958b; color: #fff; }
:focus-visible { outline: 3px solid #2b8e72; outline-offset: 2px; }
#notice, #connection { min-height: 1.55rem; margin: .85rem 0; }
.list { border: 1px solid var(--line); border-radius: .9rem; background: white; overflow: hidden; }
.list-header, .order { display: grid; grid-template-columns: .85fr 1.45fr .8fr 1.15fr 7rem; align-items: center; gap: .75rem; padding: .75rem 1rem; }
.list-header { background: #eaf1ed; color: #3d544c; font-weight: 660; font-size: .9rem; }
ul { padding: 0; margin: 0; list-style: none; }
.order { min-height: 4.4rem; border-top: 1px solid var(--line); }
.order span { overflow-wrap: anywhere; }
.order strong, .amount { font-variant-numeric: tabular-nums; }
.badge { justify-self: start; padding: .25rem .55rem; border-radius: .4rem; background: #eaf1ed; color: #28473b; font-size: .89rem; font-weight: 640; }
.badge[data-state="en_cours"], .badge[data-state="partielle"] { background: #fff1d4; color: #684700; }
.badge[data-state="a_verifier"] { background: #fce7e3; color: #8b2419; }
#empty { padding: 1.75rem 1rem; text-align: center; }
.login, dialog { background: var(--white); border: 1px solid var(--line); border-radius: .85rem; padding: 1.5rem; width: min(100%, 27rem); }
.login { margin: 1.2rem auto; }
.login h1 { font-size: 1.85rem; margin-bottom: 1rem; }
.login input { margin-bottom: .9rem; }
.login button { width: 100%; }
#login-error, #confirm-error { color: #8b2419; margin-top: .55rem; }
dialog { color: var(--ink); }
dialog::backdrop { background: #10231db8; }
#confirmation { margin: .8rem 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .7rem; flex-wrap: wrap; }
@media (max-width: 690px) {
  .shell { width: calc(100% - 1.5rem); }
  main.shell { padding-top: 1.25rem; }
  .overview { align-items: stretch; flex-direction: column; margin-bottom: 1rem; }
  .tools { grid-template-columns: minmax(0, 1fr) auto; }
  .search { grid-column: 1 / -1; }
  .list-header { display: none; }
  .order { grid-template-columns: minmax(0, 1fr) auto; }
  .order strong { grid-column: 1; grid-row: 1; }
  .order .name { grid-column: 1; grid-row: 2; }
  .order .amount { grid-column: 2; grid-row: 1; text-align: right; }
  .order .badge { grid-column: 1; grid-row: 3; }
  .order button { grid-column: 2; grid-row: 2 / 4; }
}
