/* What the web board adds to Drive Planner's stylesheet (style.css, copied from drive-planner/ui). */

/* templates/web/templates/login-card.html "Login card with ringed fields and a spinner on submit", in shadcn/ui's
   light theme to sit on the app's light background. */
#login { flex: 1; display: grid; place-items: center; }
#login[hidden], #app[hidden] { display: none; }
#login { --card: #fff; --card-foreground: oklch(0.145 0 0); --muted-foreground: oklch(0.556 0 0); --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); --radius: 0.625rem;
  font-size: 14px; line-height: 1.43; }
.lg-card { display: flex; flex-direction: column; gap: 24px; width: 384px; padding: 24px 0; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  background: var(--card); color: var(--card-foreground); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.lg-header, .lg-body { padding: 0 24px; }
.lg-header { display: grid; gap: 6px; }
.lg-header h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0; color: inherit; }
.lg-header p { margin: 0; color: var(--muted-foreground); }
.lg-form { display: flex; flex-direction: column; gap: 24px; }
.lg-field { display: grid; gap: 12px; }
.lg-field label { display: flex; align-items: center; font-weight: 500; line-height: 1; }
.lg-input { width: 100%; height: 36px; padding: 4px 12px; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px); outline: none;
  background: color-mix(in oklab, var(--input) 30%, transparent); color: inherit; font: inherit; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  transition: color var(--dur, 150ms) ease-out, border-color var(--dur, 150ms) ease-out, box-shadow var(--dur, 150ms) ease-out; }
.lg-input:focus-visible, .lg-input.focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.lg-actions { display: flex; flex-direction: column; gap: 12px; }
.lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 36px; padding: 0 16px; border: 0;
  border-radius: calc(var(--radius) - 2px); font-weight: 500; cursor: pointer; transition: background-color .15s, opacity .15s; }
.lg-btn.primary { background: var(--primary); color: var(--primary-foreground); }
.lg-btn.primary:hover:not(:disabled) { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.lg-btn:disabled { opacity: .5; cursor: default; }
.lg-btn svg { width: 16px; height: 16px; }
.lg-spin { animation: lg-spin 1s linear infinite; }
@keyframes lg-spin { to { rotate: 360deg; } }
.lg-error { margin: -12px 0 0; min-height: 0; color: #b42318; }
.lg-error:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .lg-input { transition-duration: 1ms; } .lg-spin { animation-duration: 3s; } }

/* templates/web/templates/toasts.html "Toast with Undo". */
.toasts { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 14px; height: 0; }
.toast { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; width: fit-content; display: flex; align-items: center; gap: 14px;
  padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--toast, #26262a); color: #fff; white-space: nowrap; box-shadow: 0 8px 24px rgb(0 0 0 / .2);
  transform-origin: bottom; transition: transform var(--dur, 200ms) var(--ease, cubic-bezier(.2,.8,.2,1)), opacity var(--dur, 200ms); }
.toast > * { transition: opacity 250ms ease-out; }
.toast.behind > * { opacity: 0; }
.toast::after { content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 13px; }
.toast button { padding: 4px 12px; border: 0; border-radius: 999px; background: var(--amber, #f2b632); color: #1d1d1f; font-weight: 600; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity 150ms; } }

/* The app: Drive Planner's menu, pages and student list; the web board adds its offices and accounts. */
#app:not([hidden]) { flex: 1; display: flex; min-width: 0; }
.mtabs .line { height: 36px; }
/* The menu folds to its icons (templates/web pin-fold.html, "Pin keeps it open"; Marius, 30/11): under the pointer or the
   keyboard it widens over the page and its pin fades in at the top right; pinned, it stays open and the page makes room. */
:root { --side-rail: 60px; --side-fold: 300ms; }
.side { width: calc(var(--side-rail) + var(--float)); transition: width var(--side-fold) ease-out; }
.side[data-pinned] { width: calc(var(--side-open) + var(--float)); }
.side-panel { right: auto; width: var(--side-rail); transition: width var(--side-fold) ease-out; }
.side .brand b, .side .mtabs a > span, .side-pin { opacity: 0; transition: opacity var(--side-fold) ease-out; }
.side:is([data-pinned], :hover, :has(:focus-visible)) .side-panel { width: var(--side-open); }
.side:is([data-pinned], :hover, :has(:focus-visible)) :is(.brand b, .mtabs a > span, .side-pin) { opacity: 1; }
/* Anchored where the open menu puts it, so the folded rail clips it and a click there never lands on it. */
.side-pin { position: absolute; top: 18px; left: calc(var(--side-open) - 36px); padding: 5px; border: 0; border-radius: 6px; background: none;
  color: var(--muted); cursor: pointer; outline: none; }
.side-pin svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-pin:hover, .side-pin[aria-pressed=true] { color: var(--text); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.side-pin[aria-pressed=true] svg { fill: currentColor; }
.side-pin:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { :root { --side-fold: 120ms; } }
/* The tabs in groups (Marius, 30/11): the pages of the week, the settings, and at the bottom Bureaux and Mon compte, two
   tabs like the others that name the office and the account on screen. */
.mtabs { flex: 1; min-height: 0; }
.mtabs .sep { flex: none; margin: 6px 10px; border: 0; border-top: 1px solid var(--float-line); }
.mtabs .sep.foot { margin-top: auto; }
/* One ground for every tab (Marius, 30/11): under the pointer only the text darkens. */
.mtabs a:hover { background: none; }
.mtabs a.two { height: 44px; }
/* As wide as the open menu leaves it (216 minus border, padding, icon and gap), so the folded rail clips it rather than squeezing it to nothing. */
.mtabs a.two > span { flex: none; display: flex; flex-direction: column; width: calc(var(--side-open) - 72px); }
.mtabs a.two small { font-size: 11.5px; line-height: 14px; color: var(--muted); }
.mtabs a.two b { font-size: 13.5px; line-height: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.mtabs a.two[aria-current=page] small { color: rgb(255 255 255 / .75); }
.side-list { max-width: 420px; }
.offices a, .account-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 6px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: 13px; font-weight: 500; text-align: left; text-decoration: none; color: var(--text); cursor: pointer; }
:is(.offices a, .account-list button):hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.account-list button small, .who small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
#other-accounts { display: flex; flex-direction: column; gap: 4px; }
#add-account, #sign-out { color: var(--muted); }
#other-accounts:not(:empty) + #add-account { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.who { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.who b { font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lg-btn.outline { border: 1px solid var(--border); background: var(--card); color: inherit; }
.lg-btn[hidden] { display: none; }

/* The pages beside the planning, as drive-planner/ui draws them; what the database adds to them. */
.add-student[hidden] { display: none; }
#students-rows tr { cursor: pointer; }
#students-rows tr[hidden] { display: none; }
.ranges { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.ranges li { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, 88px) minmax(0, 1fr) 26px; align-items: center; gap: 6px; }
/* Wide enough for a 12-hour clock's AM/PM, which Firefox shows on some systems. */
.pop-card .ranges li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) repeat(2, 120px) minmax(0, 1fr) 26px; }
.ranges li:has([data-x]) { grid-template-columns: minmax(0, 1fr) repeat(2, 88px) 26px; max-width: 520px; }
.ranges :is(select, input) { min-width: 0; height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
.ranges .x, .notes .x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
:is(.ranges, .notes) .x:hover { background: var(--gray-100); color: var(--text); }
.add-rule { align-self: flex-start; margin-top: 6px; padding: 4px 8px; border: 0; border-radius: 7px; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.add-rule:hover { background: var(--accent-soft); }
.pop-card .skills { display: flex; gap: 12px; font-size: 13px; }
.pop-card .skills label, .field.check { display: flex; flex-direction: row; align-items: center; gap: 6px; cursor: pointer; }
.field.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.field.check span { font-size: 13px; color: var(--text); }
.facts-line { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; font-size: 13px; }
.facts-line div { display: flex; gap: 6px; white-space: nowrap; }
.facts-line dt { color: var(--muted); }
.facts-line dd { margin: 0; font-weight: 600; }
#student-dialog .dlg-head #sheet-state { justify-self: end; font-size: 12px; color: var(--muted); }
#student-avail, #student-notes, #student-payments { display: flex; flex-direction: column; gap: 14px; }
:is(#student-sessions, #student-payments) .sessions-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.session-notes li.past { opacity: .7; }
.warn-line { margin: 8px 0 0; color: #b45309; font-size: 13px; font-weight: 600; }
.notes { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.notes li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.notes p { margin: 0; white-space: pre-wrap; font-size: 14px; }
.notes small { grid-row: 2; color: var(--muted); font-size: 12px; }
.notes .x { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.note-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.note-form textarea, .feedback-form textarea { flex: 1 1 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; resize: vertical; }
.note-form .field:not(.check) input { height: 32px; }
.feedback-form { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 760px; }
.feedback-form textarea { width: 100%; box-sizing: border-box; }
#alert-list li.handled { opacity: .65; }
#alert-list .alert-top { display: flex; justify-content: space-between; gap: 12px; }
#alert-list button { align-self: flex-start; }
#page-rules .parts { grid-template-columns: 1fr; }
#page-rules .part > div { padding: 0 16px 16px; font-size: 13.5px; }
#page-rules .part h4 { margin: 4px 0 6px; font-size: 13px; }
#page-rules .part ol { margin: 0 0 10px; padding-left: 22px; line-height: 1.7; }
#page-rules .table-wrap td, #page-rules .table-wrap th { padding: 6px 10px; text-align: left; }
/* Remplir: Priorités and Contraintes side by side, each a list reordered by drag (templates/web rank-drag). */
#part-fill { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
#part-fill h4 { margin: 4px 0 8px; }
#part-fill .rank { display: flex; flex-direction: column; gap: 4px; }
#part-fill .place { display: flex; align-items: center; gap: 8px; }
#part-fill .num { display: grid; place-items: center; align-self: stretch; flex: none; width: 36px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--gray-40); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }
#part-fill .item { position: relative; display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--gray-40); cursor: grab; user-select: none; touch-action: none;
  transition: background-color 150ms cubic-bezier(.4, 0, .2, 1), box-shadow 150ms cubic-bezier(.4, 0, .2, 1); }
#part-fill .item:hover { background: var(--gray-150); }
#part-fill .item.held { z-index: 10; cursor: grabbing; background: var(--panel); box-shadow: 0 10px 15px -3px rgb(16 24 40 / .12), 0 4px 6px -4px rgb(16 24 40 / .1); }
#part-fill .item svg { width: 14px; height: 14px; flex: none; color: var(--muted); opacity: .5; fill: currentColor; }
#part-fill .item svg:last-child { margin-left: auto; }
@media (max-width: 900px) { #part-fill { grid-template-columns: 1fr; } }
.rules-note { margin: 10px 0 0; color: var(--muted); }
#page-rules input.price { width: 90px; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
#page-rules .staff b { font-weight: 600; }

/* Drive Planner shows the car lane; a simulator or scooter gets its own beside it on the days it is booked. */
.lanes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.lane.idle { display: none; }
.actions { align-items: center; }
.week-tools { display: flex; gap: 6px; margin-top: 2px; }
.week-tools .tbtn { height: 26px; font-size: 12px; }
.export-at { position: relative; }
#export-menu { top: calc(100% + 6px); left: 0; right: auto; z-index: 6; min-width: 180px; transform-origin: top left; }
#export-menu[hidden] { display: none; }
.flag-menu button:not(.del) { border: 0; background: none; padding: 6px; border-radius: 6px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; white-space: nowrap; }
.flag-menu button:not(.del):hover { background: var(--gray-100); }
#save-state { min-width: 150px; text-align: right; font-size: 12px; color: var(--muted); }
#save-state[data-state="pending"], #save-state[data-state="saving"], #save-state[data-state="offline"] { color: #b45309; }
#offline-tag { display: none; margin-left: 8px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #b45309; background: color-mix(in srgb, #b45309 12%, transparent); }
body.offline #offline-tag { display: inline-block; }
#clear-week[hidden], #optimize[hidden] { display: none; }

/* Dragging: the chip follows the pointer over the cells, the lane it would land in turns green or red. */
.chip { touch-action: none; }
.locked-week .chip, .past .chip { cursor: default; }
.mode-dispatch:not(.locked-week) .cell:not(.past) .chip { cursor: grab; }
.chip.dragging { z-index: 10; pointer-events: none; cursor: grabbing; box-shadow: 0 8px 20px rgb(16 24 40 / .18); transition: none; }
.lane.drop-ok { box-shadow: inset 0 0 0 2px var(--car); }
.lane.drop-bad { box-shadow: inset 0 0 0 2px #d92d20; }
/* A Remplir result waiting for Oui or Non: its new lessons are dashed. */
#grid.preview .chip.new { border-left-style: dashed; outline: 1px dashed var(--c); outline-offset: -1px; }
.locked-week .cell:hover { background: inherit; }
/* Remplir's notes sit under the Oui / Non question instead of over it. */
/* The notice sits under the header's buttons, and under Oui / Non while they are asked, instead of over them. */
#notice { top: 96px; }
body:has(#plan-ask:not([hidden])) #notice { top: 144px; }
.actions > button { white-space: nowrap; }
.res-cards > .empty { grid-column: 1 / -1; }
.empty[hidden] { display: none; }

/* Clickable blocks (a Moniteurs card, Bureaux) stand off the page with a shadow and lift under the pointer. */
.pick { box-shadow: 0 1px 2px rgb(16 24 40 / .06), 0 3px 8px -2px rgb(16 24 40 / .14); cursor: pointer;
  transition: box-shadow 150ms var(--ease), translate 150ms var(--ease); }
.pick:not(.single):is(:hover, :focus-visible) { box-shadow: var(--float-shadow); translate: 0 -1px; outline: none; }
.pick.single { box-shadow: none; cursor: default; translate: none; }
.res-cards { align-items: stretch; }
.res-card.pick .facts-line { margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .pick { transition-duration: 1ms; } .pick:hover { translate: none; } }

/* The small popups, in the student sheet's glass, made near opaque: their inputs sit right on it. */
dialog.pop { --text: var(--ink-2); outline: none; width: min(340px, 92vw); max-height: 88vh; overflow: auto; padding: 18px 20px 20px;
  border: 1px solid color-mix(in srgb, var(--gray-0) 40%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--glass) 95%, transparent);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.15); backdrop-filter: blur(40px) saturate(200%) brightness(1.15); color: var(--text); box-shadow: 0 24px 60px rgba(16, 24, 40, .25); }
dialog.pop.wide { width: min(860px, 94vw); }
dialog.pop::backdrop { background: rgb(0 0 0 / .3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pop-head h3 { margin: 0; font-size: 18px; }
.pop-head .who { gap: 2px; }
.pop-head .name { font-size: 18px; font-weight: 600; }
.pop-head .role { font-size: 12.5px; color: var(--muted); }
.pop-head .x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pop-head .x:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--text); }
#offices, .account-list { display: flex; flex-direction: column; gap: 4px; }
:is(#offices a, .account-list button) { padding: 10px 12px; border-radius: 10px; font-size: 14.5px; }
.account-list button small { font-size: 12px; }
#offices a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pop-card { display: flex; flex-direction: column; gap: 20px; }
.pop-card section { display: flex; flex-direction: column; }
.pop-card h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pop-card .sheet-fields { padding-top: 0; border-top: 0; }

/* Compte: the team, one row per account, its access to the site and the roles it holds. */
.res-card.team { grid-column: 1 / -1; }
.team .staff li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 16px; }
.team .staff li.head span { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.team .access { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; color: var(--text); }
.team .access select { height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.team .access select:disabled { cursor: default; opacity: .7; }
.team .tag.role { border: 1px dashed var(--line); background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.team .tag.role[aria-pressed=true] { border-style: solid; border-color: transparent; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.team .tag.role:hover { color: var(--text); }
.team .roles { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.team .staff li.head span:last-child { text-align: right; }
.add-vehicle { display: flex; gap: 8px; margin: 0 0 16px; }
.add-vehicle select, .add-vehicle input { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
.add-vehicle input { flex: 0 1 280px; }
.team .add-vehicle { margin: 14px 0 0; flex-wrap: wrap; }
.team .add-vehicle input { flex: 1 1 140px; }
.team .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.team .login { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.team .login code { font-size: 12.5px; font-weight: 600; color: var(--text); user-select: all; }
.team .login .link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
