@font-face {
  font-family: Tektur;
  src: url("/Tektur.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #172b36;
  background: #f2f6f7;
  --muted: #526571;
  --border: #d9e3e7;
  --white: #fff;
  --accent: #08635e;
  --accent-dark: #064b48;
  --round: 16px;
  --industrial-font: Tektur, Bahnschrift, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #126ad2; outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -70px; background: white; padding: 12px; z-index: 3; }
.skip:focus { top: 12px; }
.top { background: #fcfeff; border-bottom: 1px solid var(--border); }
html { scrollbar-gutter: stable; }
.top-inner { display: grid; grid-template-columns: minmax(0, clamp(240px, 20vw, 330px)) minmax(0, 1fr) minmax(125px, 11vw); min-height: 125px; padding: 3px 8px; gap: 8px; }
.supervisor-stack { grid-column: -2; display: grid; min-width: 0; margin-block: 5px; }
.top-inner:has(.supervisor-stack:not([hidden])) { grid-template-columns: minmax(0, clamp(155px, 20vw, 330px)) minmax(0, 1fr) minmax(210px, 21vw); }
.supervisor-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.workshop-entry.button { white-space: normal; }
.supervisor-login { grid-area: 1 / 2; align-self: center; justify-self: end; width: min(100%, 255px); }
.supervisor-login .form { display: grid; gap: 5px; }
.supervisor-entry.button { display: grid; place-items: center; align-content: center; gap: 4px; padding: 6px; background: linear-gradient(#284c52, #102c32); color: white; border: 2px solid #79989d; border-bottom-width: 5px; font-family: var(--industrial-font); font-size: 1rem; }
.supervisor-entry.button:hover, .supervisor-entry.button[aria-expanded="true"] { background: #214b51; border-color: #30d9b4; }
.supervisor-entry.button {
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .supervisor-entry.button:hover,
  .module-menu a:hover:not(:active):not([aria-disabled="true"]),
  .workshop-menu-tile:hover {
    position: relative;
    z-index: 1;
    transform: perspective(500px) translateY(-3px) rotateX(9deg) rotateY(-6deg);
  }
  .supervisor-entry.button:hover, .workshop-menu-tile:hover {
    box-shadow: 3px 9px 15px #102c3255, inset 0 1px 0 #ffffff40;
  }
}
.supervisor-entry svg { display: block; width: min(100%, 130px); height: auto; }
.supervisor-entry svg text { font-family: var(--industrial-font); font-size: 24px; font-weight: 750; }
.module-menu [data-page="outil-gammes"] { --tile-position: 0% 100%; --tile-border: #bba7d7; --tile-ink: #563b80; }
.equipment-photo-link { display: grid; gap: 5px; font-weight: 700; }
.equipment-photo-actions { min-width: 0; display: grid; gap: 8px; }
.equipment-photo-actions form .button { width: 100%; white-space: normal; }
.equipment-identity { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.equipment-identity > div { min-width: 0; flex: 1 1 165px; }
.equipment-identity h1 { font-size: clamp(1.3rem, 2.1vw, 2rem); overflow-wrap: anywhere; }
.equipment-sheet-label {
  margin-left: auto; padding: 7px 10px; border-radius: 6px; background: #dcebf2;
  color: #194c62; font-weight: 750; text-align: center;
}
.machine-preventive-list { display: grid; gap: 8px; }
.machine-preventive-tile { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: #f7fafb; min-width: 0; overflow-wrap: anywhere; }
.machine-preventive-tile.equipment-preventive-overdue { border-color: #ce263e; background: #fff0f2; }
.machine-preventive-tile h3, .machine-preventive-tile dl { margin: 0; }
.machine-preventive-tile dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px 8px; }
.machine-preventive-tile dd { margin: 0; }
.machine-preventive-guide { display: grid; gap: 3px; padding: 7px 9px; border: 1px solid #a7c9c2; border-radius: 5px; background: #eaf5f1; }
.equipment-summary .equipment-status { display: flex; justify-content: center; width: 100%; }
.equipment-preventive-overdue {
  margin-top: 8px; padding: 0 9px; border: 1px solid #bd4451; border-left-width: 4px;
  border-radius: 7px; background: #fde6e8;
}
.badge.bt-delay {
  display: table; margin-top: 5px; border: 1px solid #9d2132;
  background: #f9cfd5; color: #751323; white-space: normal;
}
.job-row-layout { display: grid; gap: 8px 10px; align-items: start; }
.job-row-layout.has-side-badge { grid-template-columns: minmax(0, 1fr) minmax(105px, 37%); align-items: stretch; }
.job-machine-tile {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center;
  gap: 8px; padding: 6px; border: 1px solid #7594a1; border-radius: 6px; background: #f7fafb;
}
.job-machine-tile p { margin: 2px 0 0; }
.job-row-details { grid-column: 1 / -1; display: grid; gap: 6px; }
.job-row-details.has-due-date { grid-template-columns: minmax(0, 1fr) minmax(105px, 35%); }
.job-due-tile { text-align: center; }
.job-acceptance-details {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 3px 12px; padding-block: 5px; font-size: .85rem;
}
.job-acceptance-details strong { margin-right: 4px; }
.job-acceptance-details span:last-child { white-space: nowrap; }
.job-detail-tile { padding: 8px 10px; border: 1px solid #a9bec7; border-radius: 6px; background: #f7fafb; }
.job-detail-tile p { margin: 4px 0 0; }
.job-row-side-badge { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; container-type: inline-size; }
.job-row-side-badge .badge {
  display: grid; place-items: center; margin: 0; padding: 4px;
  font-size: .76rem; white-space: normal; text-align: center; overflow-wrap: normal;
}
@container (max-width: 156px) {
  .job-row-side-badge .badge { grid-column: 1 / -1; }
}
.job-row-side-badge .badge:not(.bt-delay) { border: 1px solid currentColor; }
.job-row-side-badge .bt-delay { grid-column: 1 / -1; border-color: #870015; background: #b80824; color: white; }
.equipment-preventive-overdue.job-deadline-overdue { border-color: #c57727; background: #fff0dc; }
.job-row-side-badge .bt-delay.bt-delay-deadline { border-color: #98500c; background: #ffd693; color: #643100; }
.job-overdue-pulse { border-color: #e00023; animation: job-overdue-pulse 2s ease-in-out infinite alternate; }
@keyframes job-overdue-pulse {
  from { box-shadow: 0 0 0 0 #e0002350; }
  to { box-shadow: 0 0 0 3px #e00023bd; }
}
@media (prefers-reduced-motion: reduce) { .job-overdue-pulse { animation: none; } }
.job-row-side-badge .job-acceptance { grid-column: 1 / -1; }
.job-report-age {
  grid-column: 1 / -1; display: grid; gap: 2px; padding: 5px 7px;
  border: 1px solid #8ba8b6; border-radius: 6px; background: #eaf3f7;
  color: #193e52; font-size: .76rem; text-align: center;
}
.job-report-age strong { font-size: .95rem; }
.job-due-tile .badge { margin-top: 4px; white-space: normal; }
@media (max-width: 420px) {
  .job-row-layout.has-side-badge { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}
.tree-branch, .tree-article, .guide-step { margin: 10px 0 0; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #f8fbfc; overflow-wrap: anywhere; }
.cols.tree-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.tree-children { padding-left: 12px; border-left: 1px solid #a4bac1; margin-left: 5px; }
.tree-children > :is(.tree-branch, .tree-article) { position: relative; }
.tree-children > :is(.tree-branch, .tree-article)::before { content: ""; position: absolute; left: -13px; top: 20px; width: 12px; border-top: 1px solid #a4bac1; }
.tree-node-link { display: inline-block; padding: 4px 6px; border-radius: 5px; font-weight: 700; }
.tree-node-link[aria-current="true"] { background: #d8f0e9; color: #064b48; }
.tree-stock-request { margin-top: 10px; }
@media (max-width: 850px) { .cols.tree-layout { grid-template-columns: minmax(0, 1fr); } }
.tree-photo { display: block; max-width: 100%; max-height: 260px; object-fit: contain; margin: 10px 0; border-radius: 7px; }
.guide-step { position: relative; display: grid; gap: 9px; min-width: 0; padding-top: 24px; }
.guide-optional-field { position: relative; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
.guide-optional-field label { padding-inline-end: 26px; }
.guide-restore-field { justify-self: start; }
[data-guide-run-step] [data-guide-step-photo] { margin-block: 5px; }
[data-guide-run-step] label:has([data-guide-step-photo]) { margin-block: 12px; }
[data-job-guide-panel]:not([hidden]), [data-job-guide-panel]:not([hidden]) + .panel { margin-top: 16px; }
.job-equipment-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 12px; margin-top: 12px; }
.job-material-tile { min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: #f8fbfc; font-size: .9rem; overflow-wrap: anywhere; }
.job-material-tile ul { padding-inline-start: 16px; margin: 5px 0; }
.job-material-tile details { margin-top: 5px; }
.job-corrective-guides { border-color: #c74f5d; background: #fce5e8; color: #761321; }
.job-corrective-guides a { color: inherit; }
.job-corrective-link { border: 0; padding: 0; background: transparent; color: inherit; text-decoration: underline; text-align: left; cursor: pointer; }
.job-corrective-link[aria-expanded="true"] { font-weight: 750; }
.job-corrective-guides li + li { margin-top: 5px; }
.job-related-tiles { display: grid; gap: 8px; min-width: 0; }
.job-preventive-guides { border-color: #438a61; background: #e7f6ea; color: #185436; }
.job-preventive-guides a { color: inherit; }
.job-preventive-guides li + li { margin-top: 5px; }
@media (max-width: 640px) {
  .job-equipment-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 851px) {
  .job-followup-sticky { position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; }
}
.guide-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-photos .tree-photo { max-width: min(100%, 200px); max-height: 150px; }
.guide-reading-layout {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 10px; margin-block: 8px;
}
.guide-reading-layout.has-photos { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); }
.guide-reading-layout .guide-photos { align-content: start; }
.guide-reading-layout .guide-photos a { max-width: 100%; }
.guide-reading-tile {
  min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #f4f8fa; overflow-wrap: anywhere;
}
.guide-reading-tile h3 { margin: 0 0 6px; }
.guide-reading-tile p { margin: 0; }
.guide-step-remark { min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: 7px; }
@media (max-width: 700px) {
  .guide-reading-layout.has-photos { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .guide-reading-layout .guide-photos { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
  .guide-reading-layout, .guide-reading-layout.has-photos { grid-template-columns: minmax(0, 1fr); }
}
.guide-sidebar .row { margin: 8px 0; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: #f7fafb; }
.directory-tiles { margin-top: 12px; }
.directory-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; overflow-wrap: anywhere; }
.directory-tile-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 6px; margin-top: auto; }
.directory-tile-footer:has(.directory-intervention) .directory-code { margin-inline-end: auto; }
.directory-intervention { display: grid; gap: 2px; max-width: 100%; padding: 4px 7px; border: 1px solid #b56820; border-radius: 5px; background: #fff0dd; color: #713b07; font-size: .75rem; }
.directory-tile p { margin: 0; }
.directory-tile[data-directory-person] { cursor: pointer; }
.directory-entry { position: relative; display: grid; }
.directory-entry:has(.directory-select) h3 { padding-right: 28px; }
.directory-select { position: absolute; top: 11px; right: 11px; cursor: pointer; }
.directory-select input { width: 17px; height: 17px; accent-color: #08635e; }
.directory-entry:has(input:checked) .directory-tile { outline: 2px solid #08635e; }
.badge.directory-unassigned { border: 1px solid #b42439; }
.directory-scope-list { display: grid; justify-items: start; gap: 4px; margin: 0; padding: 0; list-style: none; }
.directory-scope-list li { padding: 3px 6px; border: 1px solid #c7dde1; border-radius: 5px; background: #edf5f6; }
#directory-scope-tree .scope-tree { display: block; max-height: 58vh; overflow: auto; padding: 2px 4px; }
#directory-scope-tree .scope-tree ul { display: block; max-height: none; overflow: visible; margin-left: 7px; padding-left: 8px; border-left: 1px solid var(--border); }
.scope-tree li { margin: 4px 0; overflow-wrap: anywhere; }
.scope-tree summary { color: #17495b; font-weight: 700; }
.scope-tree-choice { display: inline-flex; align-items: flex-start; gap: 7px; max-width: calc(100% - 22px); padding: 4px 5px; cursor: pointer; vertical-align: middle; }
.scope-tree-choice input[type="checkbox"] { width: 15px; height: 15px; margin: 2px 0 0; accent-color: #08635e; flex: none; }
.scope-tree-choice span { min-width: 0; overflow-wrap: break-word; }
.scope-tree summary .scope-tree-choice { border-radius: 5px; background: #edf4f6; }
.scope-tree-choice:has(input:checked) { background: #d9efe8; border-radius: 4px; }
.scope-tree-choice.scope-inherited { background: #e7f4ee; border-radius: 4px; }
#directory-scope-tree > .button { width: 100%; margin-top: 9px; }
#directory-scope-tree > .directory-site-plan { display: flex; justify-content: center; margin: 0 0 10px; }
.directory-bulk .muted { margin: 0; }
.production-machine-options { display: grid; gap: 5px; max-height: 200px; overflow-y: auto; }
.production-machine-options label { display: flex; align-items: center; gap: 7px; }
.brand { display: grid; grid-template: minmax(0, 44fr) minmax(0, 56fr) / 38% 62%; align-self: center; height: clamp(74px, 25vw, 119px); min-width: 0; padding: 2px 4px; color: #173c51; text-decoration: none; border-radius: 7px; background: white; container-type: inline-size; }
.brand-title { grid-area: 1 / 2; align-self: center; min-width: 0; perspective: 360px; }
.brand-rotation { display: grid; transform-style: preserve-3d; animation: brand-turn 7s linear infinite; }
.brand-face { grid-area: 1 / 1; text-align: center; font: italic 900 clamp(.95rem, 18cqw, 3.25rem)/.95 Arial, sans-serif; letter-spacing: -.045em; color: #07558b; text-shadow: 0 1px #c2e2fc, 0 2px #0e3859, 0 3px #0e3859; backface-visibility: hidden; transform: translateZ(2px); }
.brand-back { transform: rotateY(180deg) translateZ(2px); }
@keyframes brand-turn { to { transform: rotateY(360deg); } }
.bts-logo { position: relative; display: block; min-width: 0; overflow: hidden; }
.bts-logo img { position: absolute; top: 0; display: block; height: 100%; max-width: none; }
.bts-reducer { grid-area: 1 / 1 / 3 / 2; }
.bts-reducer img { left: 0; width: calc(100% / .38); }
.bts-wordmark { grid-area: 2 / 2; }
.bts-wordmark img { right: 0; width: calc(100% / .62); }
.module-menu { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-self: center; gap: 6px; min-width: 0; }
.module-menu.single-module { grid-template-columns: minmax(105px, 190px); }
.module-menu.technician-menu { grid-template-columns: repeat(3, minmax(0, 190px)); }
.module-menu.store-menu { grid-template-columns: repeat(3, minmax(0, 190px)); }
.module-menu.production-menu { grid-template-columns: repeat(4, minmax(0, 190px)); }
.module-menu.production-menu a[aria-disabled="true"] { opacity: .52; cursor: not-allowed; }
.module-menu [data-page^="controle-"] { --tile-position: 0% 100%; --tile-border: #90bcb1; --tile-ink: #265f51; }
.autocontrol-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 8px; margin-bottom: 12px; }
.autocontrol-tabs > .button { justify-content: center; text-align: center; min-height: 48px; white-space: normal; }
.preventive-photo-tab { position: relative; display: grid; align-items: end; isolation: isolate; min-height: clamp(85px, 11vw, 135px); padding: 12px 15px; border-radius: 9px; border: 2px solid #91a7ad; overflow: hidden; color: #fff; background: #162d37; text-decoration: none; }
.preventive-photo-tab img { position: absolute; inset: 0 0 0 auto; width: 74%; height: 100%; object-fit: cover; object-position: center 55%; z-index: -2; }
.preventive-photo-tab::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #122731 21%, #12273146 75%), linear-gradient(0deg, #112731b8, transparent 72%); z-index: -1; }
.preventive-photo-tab span { font-family: var(--industrial-font); font-size: clamp(.95rem, 1.45vw, 1.25rem); font-weight: 750; line-height: 1.2; }
.preventive-photo-tab:hover, .preventive-photo-tab[aria-current="page"] { border-color: #20ac97; }
.preventive-photo-tab[aria-current="page"] { box-shadow: inset 0 -4px #20ac97; }
.autocontrol-status { display: grid; gap: 2px; padding: 5px 7px; border: 1px solid; border-radius: 6px; }
.autocontrol-status.is-pending { color: #8f1830; background: #ffe8eb; border-color: #c73e56; }
.autocontrol-status.is-complete { color: #155638; background: #e5f7eb; border-color: #369263; }
.autocontrol-work.is-pending { border-inline-start: 4px solid #c73e56; }
.autocontrol-work.is-complete { border-inline-start: 4px solid #369263; }
.autocontrol-step { padding: 10px; background: #f4f8f8; border: 1px solid var(--border); border-radius: 7px; }
.autocontrol-step h3 { margin-bottom: 5px; }
@media (max-width: 720px) { .module-menu.production-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.module-menu a {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: end;
  container-type: inline-size;
  min-width: 0; height: 119px; padding: 6px 5px 8px; border: 1px solid var(--tile-border);
  border-bottom-width: 3px; border-radius: 9px; background: var(--tile-border); color: white;
  text-align: center; text-decoration: none;
  box-shadow: inset 0 1px 0 #fffd, 0 2px 4px #122e4033;
  transition: box-shadow .16s ease, transform .16s ease;
}
.module-menu a::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(to bottom, transparent 20%, #13273517 37%, #132735de 70%, #132735), url("/navigation-bts.jpg");
  background-size: 100% 100%, 300% 200%; background-position: center, var(--tile-position);
}
.module-menu span { display: grid; align-items: end; min-height: 2.2em; font: 700 clamp(16px, 1.45vw, 22px)/1.08 Arial, sans-serif; text-shadow: 0 1px 3px #0d1e2a; }
.module-menu [data-page="accueil"] { --tile-position: 0% 0%; --tile-border: #83b9c3; --tile-ink: #134855; }
.module-menu [data-page="parc"] { --tile-position: 50% 0%; --tile-border: #8aaed4; --tile-ink: #164878; }
.module-menu [data-page="parc"]::before {
  background-image: linear-gradient(to bottom, transparent 42%, #132735f0 93%), url("/machine-generique.png"), linear-gradient(#d5eaf4, #749aae);
  background-size: 100% 100%, auto 92%, 100% 100%;
  background-position: center, center top, center;
  background-repeat: no-repeat;
}
.module-menu .people-menu { --tile-border: #82a9a4; --tile-ink: #245a54; background: linear-gradient(#afd3cd, #203c44 86%); }
.module-menu .people-menu::before {
  inset: 9px 0 auto; margin: auto; height: 58px; width: 65px;
  background:
    radial-gradient(circle at 50% 23%, #f4fff9 0 12%, transparent 13%),
    radial-gradient(ellipse at 50% 78%, #f4fff9 0 25%, transparent 26%),
    radial-gradient(circle at 18% 36%, #b7ddd8 0 8%, transparent 9%),
    radial-gradient(circle at 82% 36%, #b7ddd8 0 8%, transparent 9%);
}
.module-menu [data-page="interventions"] { --tile-position: 100% 0%; --tile-border: #86b8a7; --tile-ink: #14634e; }
.module-menu [data-page="preventif"] { --tile-position: 0% 100%; --tile-border: #bba7d7; --tile-ink: #563b80; }
.module-menu [data-page="gammes"] { --tile-border: #dab261; --tile-ink: #714d14; }
.module-menu [data-page="gammes"]::before {
  background: linear-gradient(transparent 25%, #132735 95%), url("/tuile-preventif.jpg") center 40% / cover;
}
.module-menu [data-page="indicateurs"] { --tile-position: 0% 100%; --tile-border: #8bb9c5; --tile-ink: #234c6a; background: linear-gradient(#94c6d8, #223f60 82%); }
.module-menu [data-page="planning"] { --tile-position: 0% 0%; --tile-border: #83b9c3; --tile-ink: #134855; }
.module-menu .stock-menu { --tile-border: #c8a566; --tile-ink: #704712; background: linear-gradient(#d9b57e, #272b30 82%); }
.module-menu .stock-menu::before {
  inset: 10px 0 auto; margin: auto; width: 56px; height: 38px; border: 2px solid #543d27; border-radius: 5px; transform: skewY(-8deg);
  background: linear-gradient(90deg, transparent 39%, #fff1b5 40% 59%, transparent 60%), linear-gradient(#f9cb83, #b77737);
  box-shadow: 4px 5px 0 #634124;
}
.module-menu .settings { --tile-border: #78a2b4; --tile-ink: #254457; background: linear-gradient(145deg, #c4e8e9, #50798c); }
.module-menu .settings::before {
  inset: 5% 0 auto; margin-inline: auto; width: 52%; max-width: 76px; aspect-ratio: 1;
  border: 1px solid #254457; border-radius: 6px 13px 6px 6px; transform: rotate(-12deg) skewX(-6deg);
  box-shadow: inset 1px 1px 2px #b9d1da, inset -3px -3px 3px #152f43, 4px 5px 0 #284959, 6px 8px 9px #173b5860;
  background:
    linear-gradient(#173247, #28485e) 63% 7% / 12% 25% no-repeat,
    linear-gradient(110deg, #e8f5f5, #839eab 72%, #ccdde2) 50% 0 / 54% 34% no-repeat,
    repeating-linear-gradient(to bottom, #c1d8dc 0 1px, #edf6f5 1px 4px) 50% 81% / 54% 20% no-repeat,
    linear-gradient(to bottom, #58b0bc 25%, #edf6f5 25%) 50% 75% / 63% 41% no-repeat,
    linear-gradient(140deg, #588497, #2c516d 62%, #203952);
}
.module-menu .settings::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, transparent 25%, #13273530 43%, #132735e8 72%, #132735); }
.module-menu a[aria-current="page"] { border-color: white; box-shadow: inset 0 0 0 2px var(--tile-ink), 0 0 0 2px var(--tile-ink); }
.module-menu a:hover, .module-menu a:focus-visible {
  z-index: 1;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 20px #ffffff60, 0 0 0 2px #16859c, 0 4px 10px #122e4070;
}
.module-menu a:active { transform: translateY(2px); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .module-menu a:hover:not([aria-disabled="true"]) {
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 20px #ffffff60, 0 0 0 2px #16859c, 3px 9px 15px #122e4070;
  }
}
.module-menu a:focus-visible { outline: 3px solid white; outline-offset: -5px; }
.module-state { align-self: start; margin: 6px 7px 3px; padding-bottom: 5px; border-bottom: 1px solid #b5c7d1; color: #173c51; text-align: right; text-transform: uppercase; letter-spacing: .04em; font: 750 clamp(14px, 1.5vw, 24px)/1.02 Bahnschrift, "Arial Narrow", Arial, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-summary { min-width: 0; text-align: right; padding: 0 4px; }
.session-user { margin: 4px 4px 6px; font-size: .82rem; overflow-wrap: anywhere; }
.session-summary .button { min-height: 30px; padding: 3px 7px; font-size: .82rem; }
.session-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.directory-code { justify-self: end; margin-top: 4px; max-width: 100%; }
.directory-code[open] { justify-self: stretch; display: grid; gap: 8px; }
.directory-code > summary { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .module-menu a { transition: none; }
  .brand-rotation { animation: none; }
}
@media (max-width: 1250px) {
  .top-inner { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: auto auto; gap: 5px; }
  .module-menu { grid-area: 2 / 1 / 3 / -1; }
  .module-state { align-self: center; }
}
@media (min-width: 651px) and (max-width: 1250px) {
  .top-inner:has(.supervisor-login:not([hidden])) { grid-template-columns: minmax(0, 3fr) minmax(170px, 2fr) minmax(125px, 1fr); }
}
@media (max-width: 650px) {
  .top-inner:has(.supervisor-stack:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(185px, 1.5fr); }
  .supervisor-login { grid-area: 2 / 1 / 3 / -1; padding: 4px; }
}
@media (max-width: 850px) { .module-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 250px); align-items: start; gap: 20px; max-width: 1540px; margin: auto; padding: 34px 36px 60px; }
.workspace.without-sidebar { grid-template-columns: minmax(0, 1fr); }
.workspace:is(.left-menu-workspace, .equipment-wide-workspace) {
  --left-menu-column: minmax(145px, 170px);
  max-width: none; gap: 16px; padding-inline: clamp(12px, 1.6vw, 28px);
}
.workspace.left-menu-workspace {
  grid-template-columns: var(--left-menu-column) minmax(0, 1fr) minmax(185px, 240px);
}
.workspace.equipment-wide-workspace {
  grid-template-columns: var(--left-menu-column) minmax(0, 1fr);
}
.equipment-wide-workspace main { grid-column: 2; grid-row: 1; }
.equipment-wide-workspace .park-actions { grid-column: 1; grid-row: 1; }
.machine-site-view canvas { max-height: 75vh; object-fit: contain; }
@media (max-width: 700px) {
  .workspace.equipment-wide-workspace { grid-template-columns: minmax(0, 1fr); }
  .equipment-wide-workspace main { grid-column: 1; grid-row: 2; }
}
.park-actions { position: sticky; top: 16px; display: grid; gap: 10px; align-content: start; }
.park-actions .button { justify-content: center; text-align: center; }
.park-actions.equipment-menu { margin-top: 0; }
.equipment-menu-tile { display: grid; align-content: start; gap: 8px; }
.panel.equipment-menu-tile { padding: 10px; }
.panel.equipment-identity-edit { padding: 10px; }
.equipment-identity-edit summary { cursor: pointer; font-weight: 700; }
.equipment-identity-edit .form { margin-top: 10px; }
.equipment-identity-edit input { min-width: 0; width: 100%; }
.quick-risk-stop, .quick-risk-actions { margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 7px; }
.quick-risk-stop legend, .quick-risk-actions legend { font-weight: 750; }
.quick-risk-stop { border-color: #bd4451; background: #fff3f3; }
.quick-risk-stop ul { padding-left: 1.3em; }
.quick-risk-choice { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 8px; margin-bottom: 5px; }
.quick-risk-choice label {
  display: flex; align-items: start; gap: 8px; padding: 7px; border: 1px solid var(--border);
  border-radius: 5px; background: #f4f8fa; cursor: pointer;
}
.quick-risk-choice label span span { display: block; font-weight: normal; }
.quick-risk-choice label:has(input:checked) { background: #fff0b8; border-color: #aa6d10; }
.quick-risk-sign { position: relative; display: grid; place-items: end center; padding-bottom: 4px; height: 33px; isolation: isolate; cursor: help; }
.quick-risk-sign::before, .quick-risk-sign::after {
  content: ""; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); z-index: -2; background: #302b1b;
}
.quick-risk-sign::after { inset: 5px 4px 3px; z-index: -1; background: #ffd551; }
.quick-risk-legend {
  display: none; position: absolute; top: 100%; left: 0; z-index: 2; width: max-content; max-width: 210px;
  padding: 6px 8px; border-radius: 4px; background: #173747; color: white; pointer-events: none;
}
.quick-risk-sign:hover, .quick-risk-sign:focus { z-index: 2; }
.quick-risk-sign:hover .quick-risk-legend, .quick-risk-sign:focus .quick-risk-legend { display: block; }
.equipment-summary > .equipment-identity-edit { margin-bottom: 10px; }
.equipment-summary > .equipment-identity-edit .form { max-width: 275px; }
@media (min-width: 1001px) {
  .left-menu-workspace .park-actions,
  .left-menu-workspace .machine-sidebar,
  .left-menu-workspace .guide-sidebar { margin-top: var(--park-card-offset, 0px); }
}
.park-count { padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: white; color: var(--muted); }
.park-count-row { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.park-title-tile {
  position: absolute; inset: auto -1px calc(100% + 16px); margin: 0;
  padding: 11px 7px; border-radius: 8px; background: #dcebf2; color: #194c62;
  text-align: center; font-size: 1.15rem;
}
@media (max-width: 1000px) {
  .workspace.left-menu-workspace { grid-template-columns: minmax(0, 1fr) minmax(185px, 240px); }
  .park-actions { grid-column: 1 / -1; position: static; display: flex; flex-wrap: wrap; margin-top: 0; }
  .park-title-tile { position: static; }
  .equipment-menu-tile { display: flex; flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .workspace.left-menu-workspace { grid-template-columns: minmax(0, 1fr); }
}
.workspace.planning-workspace { grid-template-columns: minmax(0, 1fr) clamp(220px, 23vw, 320px); max-width: none; padding-inline: clamp(12px, 2vw, 28px); }
.planning-sidebar { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 14px; border: 1px solid var(--border); border-radius: var(--round); background: white; }
.planning-sidebar h2 { margin-bottom: 8px; }
.planning-sidebar h3 { color: var(--muted); margin-bottom: 8px; }
.planning-sidebar .planning-card { margin-bottom: 8px; }
@media (max-width: 850px) {
  .workspace.planning-workspace { grid-template-columns: minmax(0, 1fr); }
  .planning-sidebar { position: static; max-height: none; }
}
.login-tiles, .role-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.role-cards { margin-bottom: 16px; }
.profile-tile {
  min-width: 0; overflow: hidden; border: 1px solid #a2b6be; border-bottom: 5px solid #829aa4;
  border-radius: 13px; background: white; box-shadow: 0 7px 16px #17354622, inset 0 1px 0 #ffffffc9;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.profile-tile[data-profile="responsable"] { --profile-position: 0% 0%; --profile-tone: #173c51; }
.profile-tile[data-profile="technicien"] { --profile-position: 100% 0%; --profile-tone: #155655; }
.profile-tile[data-profile="production"] { --profile-position: 0% 100%; --profile-tone: #63451b; }
.profile-tile[data-profile="magasinier"] { --profile-position: 100% 100%; --profile-tone: #465133; }
.profile-art {
  display: flex; align-items: end; justify-content: space-between; gap: 8px; aspect-ratio: 3 / 2;
  margin: 0; padding: 11px; color: white; font-size: 1.08rem; line-height: 1.15; overflow-wrap: anywhere;
  background: linear-gradient(to bottom, transparent 35%, #0d2026f2 100%) center / 100% 100% no-repeat,
    url("/tuiles-profils.png") var(--profile-position) / 200% 200% no-repeat, var(--profile-tone, #173c51);
  text-shadow: 0 1px 3px #0d2026;
}
.login-tile-body { padding: 14px; }
.login-tile:focus-within, .role-card[aria-current="page"] { border-color: var(--accent); box-shadow: 0 0 0 2px #08635e55, 0 8px 18px #17354633; }
.role-card { display: block; color: inherit; text-decoration: none; }
.role-card strong { font-family: var(--industrial-font); }
.role-card small { flex: none; min-width: 1.8em; padding: 3px; border-radius: 5px; background: #0d2026b3; color: white; text-align: center; }
.workshop-navigation { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.workshop-menu-tile { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.workshop-menu-tile:hover { border-color: #30d9b4; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .profile-tile:hover { transform: perspective(800px) translateY(-3px) rotateX(3deg); box-shadow: 0 11px 21px #17354638; }
  .role-card:active { transform: translateY(2px); box-shadow: 0 3px 8px #17354628; }
}
@media (prefers-reduced-motion: reduce) { .profile-tile { transition: none; } }
@media (max-width: 1000px) { .login-tiles, .role-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .login-tiles { grid-template-columns: minmax(0, 1fr); } }
.module-menu [data-page="signalement"] { --tile-position: 100% 0%; --tile-border: #86b8a7; --tile-ink: #14634e; }
.module-menu [data-page="releves-production"] { --tile-position: 0% 100%; --tile-border: #8bb9c5; --tile-ink: #234c6a; }
.planning-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin-bottom: 14px; }
.planning-week .button[aria-current="date"] { background: var(--accent); border-color: var(--accent); color: white; }
.planning-week .button { flex-direction: column; justify-content: center; gap: 2px; }
.planning-day-completed { color: #17653d; font-weight: 700; }
.planning-week .button[aria-current="date"] .planning-day-completed { color: #e0fae9; }
.planning-layout { margin-top: 16px; }
.planning-timeline { overflow-x: auto; margin-top: 10px; padding: 4px; }
.planning-axis { min-width: calc(var(--planning-hours, 11) * 49px); }
.planning-ruler { display: grid; grid-template-columns: repeat(var(--planning-hours, 11), minmax(0, 1fr)); background: #ebf1f4; }
.planning-hour { border: 1px solid var(--border); border-right: 0; text-align: center; font-size: .8rem; font-variant-numeric: tabular-nums; }
.planning-hour:last-child { border-right: 1px solid var(--border); }
.planning-quarter-ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.planning-slot { display: block; min-height: 19px; border-top: 1px solid var(--border); background: #f8fafb; }
.planning-slot + .planning-slot { border-left: 1px solid #c4d4db; }
.planning-slot.drop-target, .planning-week .button.drop-target { background: #d7f0e5; color: #173243; outline: 2px solid var(--accent); }
.planning-slot.drop-denied, .planning-week .button.drop-denied { background: #fbdce0; color: #761321; outline: 3px solid #761321; }
.planning-track { position: relative; min-height: 48px; margin-top: 4px; background-image: linear-gradient(to right, #dae5e9 1px, #f5f8f9 1px); background-size: calc(100% / var(--planning-hours, 11)) 100%; }
.planning-bar { position: absolute; top: 2px; min-width: 4px; overflow: hidden; padding: 3px 4px; border: 1px solid var(--bt-edge, var(--border)); border-radius: 5px; background: var(--bt-background, white); color: #173243; font-size: .8rem; font-weight: 750; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.planning-bar strong, .planning-bar small { display: block; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.planning-bar small { color: inherit; font-size: .72rem; font-weight: 600; }
.planning-bar[draggable=true] { cursor: grab; }
.planning-tooltip {
  position: fixed; z-index: 20; pointer-events: none; max-width: min(375px, calc(100vw - 16px));
  padding: 8px 11px; border: 1px solid #274756; border-radius: 7px;
  background: #16313e; color: white; font-size: .87rem; font-weight: 400;
  line-height: 1.35; box-shadow: 0 3px 9px #0d242e40; overflow-wrap: anywhere;
}
.planning-tooltip strong { font-weight: 800; }
.planning-card { margin: 4px 0; padding: 7px; border: 1px solid #aac9c5; border-radius: 6px; background: white; overflow-wrap: anywhere; }
.planning-acceptance { --bt-edge: #bc5359; --bt-outline: #8e1022; --bt-background: #fff1f0; }
.planning-progress { --bt-edge: #bd732d; --bt-outline: #a34700; --bt-background: #fff4e4; }
.planning-closed { --bt-edge: #438c65; --bt-outline: #19613b; --bt-background: #edf8ef; }
.planning-card:is(.planning-acceptance, .planning-progress, .planning-closed) { border-color: var(--bt-edge); border-left-width: 4px; background: var(--bt-background); }
.planning-workspace .planning-card:is(.planning-acceptance, .planning-progress, .planning-closed),
.planning-bar:is(.planning-acceptance, .planning-progress, .planning-closed) { border: 2px solid var(--bt-outline); border-left-width: 5px; }
.planning-workspace .planning-card.planning-overdue { background: #fde6e8; border-color: #bd4451; border-left-width: 4px; }
.planning-workspace .planning-card.planning-progress, .planning-bar.planning-progress { border-color: transparent; }
.technician-bt { background: var(--bt-background, white); }
.technician-bt td:first-child { box-shadow: inset 4px 0 var(--bt-edge, transparent); }
.table > .planning-legend { margin: 0 0 8px; }
.planning-card .line { margin-top: 5px; }
.planning-card-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.planning-kind { margin-left: auto; padding: 3px 6px; border: 1px solid; border-radius: 5px; font-size: .75rem; line-height: 1.2; font-weight: 800; white-space: nowrap; }
.planning-kind-corrective { border-color: #536683; background: #e7edf7; color: #263e63; }
.planning-kind-preventive { border-color: #278477; background: #d8f2eb; color: #12594e; }
.planning-duration { display: inline-block; padding: 3px 6px; border-radius: 5px; font-size: .78rem; font-weight: 750; }
.planning-duration-wait { background: #f8e0a2; color: #614600; }
.planning-duration-work { background: #cae8fc; color: #154973; }
.planning-legend { margin-top: 8px; }
.planning-card[draggable=true] { cursor: grab; }
.planning-assignment { margin-top: 6px; }
.planning-upcoming-preventive { margin-top: 12px; }
.planning-upcoming-preventive > h3 { margin-bottom: 8px; }
.planning-assignment .form { gap: 5px; }
.planning-assignment select, .planning-assignment .button { min-height: 32px; padding-block: 4px; }
.planning-drag-preview .planning-assignment { display: none; }
.planning-drag-preview { position: fixed; z-index: 5; width: min(250px, calc(100vw - 16px)); margin: 0; pointer-events: none; box-shadow: 0 4px 14px #122b4055; }
.planning-drag-time { display: block; margin: 1px 0 5px; padding: 4px 7px; border-radius: 4px; background: #103b3c; color: white; font-size: .88rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.planning-drag-preview.drop-denied { background: #761321; border-color: #450a14; color: white; }
.planning-drag-preview.drop-denied .planning-drag-time { background: #450a14; }
.planning-drag-preview.drop-denied a { color: white; }
.planning-card small { display: block; }
.account-list { margin-top: 16px; }
main { min-width: 0; }
.machine-sidebar { position: sticky; top: 16px; padding: 16px; background: white; border: 1px solid var(--border); border-radius: var(--round); }
.machine-sidebar h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.machine-sidebar h2 img { object-fit: contain; }
.machine-sidebar ul { display: grid; gap: 8px; max-height: calc(100dvh - 110px); overflow-y: auto; list-style: none; margin: 0; padding: 4px; }
.machine-sidebar :is(a, [data-stock-machine], [data-preventive-machine]) { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: #f7fafb; color: inherit; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.machine-sidebar :is([data-stock-machine], [data-preventive-machine]) { width: 100%; text-align: left; }
.preventive-workspace .machine-sidebar { position: relative; top: auto; padding: 0; border: 0; background: transparent; }
.preventive-workspace #machine-sidebar-list,
#preventive-scope-filters { background: white; border: 1px solid var(--border); border-radius: var(--round); }
.preventive-workspace #machine-sidebar-list { padding: 16px; }
#preventive-scope-filters:not([hidden]) { display: grid; gap: 6px; margin-bottom: 10px; padding: 10px 12px; }
#preventive-scope-filters label { display: grid; grid-template-columns: 5em minmax(0, 1fr); align-items: center; gap: 5px; }
#preventive-scope-filters select { min-height: 30px; margin: 0; padding-block: 4px; }
.machine-preventive-count { justify-self: start; margin-top: 3px; padding: 2px 6px; border-radius: 5px; background: #14583b; color: #fff; font-size: .78rem; }
.machine-thumbnail { display: block; width: 58px; height: 50px; object-fit: cover; border-radius: 6px; background: #e8efef; }
.machine-thumbnail.placeholder, .photo.placeholder { background: transparent; }
.machine-thumbnail.placeholder, .tile .photo.placeholder { object-fit: contain; }
.equipment-thumb { width: 44px; height: 42px; }
.equipment-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 8px; }
.preventive-calendar-row { grid-template-columns: clamp(72px, 9vw, 120px) minmax(0, 1fr); align-items: center; gap: 14px; }
.preventive-calendar-photo { width: 100%; height: clamp(65px, 8vw, 96px); object-fit: contain; border-radius: 6px; }
.preventive-calendar-row p { margin: 5px 0 0; }
.preventive-calendar-due { display: grid; justify-items: end; gap: 3px; margin-inline-start: auto; text-align: right; }
.preventive-calendar-due time { font-size: .9rem; font-weight: 650; }
.preventive-tile-controls { display: flex; align-items: center; gap: 6px; }
.preventive-lock { cursor: pointer; min-width: 32px; min-height: 30px; border: 1px solid var(--border); border-radius: 6px; background: #f7fafb; }
.preventive-lock[aria-pressed="true"] { border-color: #9c4850; background: #fce5e8; }
td .equipment-row { align-items: center; }
.planning-equipment { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 5px; align-items: start; margin-top: 3px; }
.equipment-detail { display: grid; grid-template-columns: minmax(64px, 110px) minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 10px; }
.equipment-detail-photo { display: block; width: 100%; max-height: 118px; object-fit: contain; border-radius: 8px; }
.report-equipment { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.equipment-overview { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 10px; align-items: start; margin-top: 8px; }
.equipment-doc-list { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: #f8fbfc; }
.equipment-doc-list li + li { margin-top: 6px; }
.file-list-entry { display: flex; align-items: start; justify-content: space-between; gap: 5px; }
.file-list-entry a { min-width: 0; overflow-wrap: anywhere; }
.file-trash-form { flex: none; }
.file-trash { min-width: 29px; min-height: 28px; border: 1px solid #e2b1b5; border-radius: 5px; background: #fff4f4; color: #811925; }
.file-trash:hover { background: #ffe0e0; }
.file-trash:disabled { opacity: .55; }
.equipment-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.equipment-dropzone.equipment-quick-drop { padding: 0; border-width: 1px; }
.equipment-quick-drop .button { width: 100%; background: transparent; border: 0; }
.equipment-quick-drop .button:hover { background: #e4f3ef; }
.equipment-quick-upload .form-error { margin-top: 5px; }
@media (max-width: 420px) { .equipment-overview { grid-template-columns: minmax(0, 1fr); } }
.equipment-dropzone { display: grid; gap: 5px; padding: 12px; border: 2px dashed #8eabb3; border-radius: 10px; background: #f5fafb; cursor: pointer; }
.equipment-dropzone.file-over, .equipment-dropzone:focus-within { border-color: var(--accent); background: #e4f3ef; }
.equipment-dropzone small { font-weight: 500; }
.equipment-file-list { margin: 5px 0 10px; padding-left: 20px; overflow-wrap: anywhere; }
.machine-label { display: grid; gap: 3px; }
.machine-sidebar a:hover, .machine-sidebar a[aria-current="page"] { border-color: #6e9f98; background: #e4f3ef; }
.machine-sidebar a:is([data-home-machine-state="offline"], [data-home-machine-state="overdue"]) { background: #fde0e3; border-color: #a61c2e; color: #761321; }
.machine-sidebar a[data-home-machine-state="offline"] { border: 5px solid #e00023; }
.machine-sidebar a[data-home-machine-state="available"] { background: #dcf2e5; border-color: #4d9870; color: #175137; }
.machine-sidebar a[data-home-machine-state="preventive"] { background: #fff2c6; border-color: #ae811b; color: #654600; }
.machine-sidebar a[data-home-machine-state]:hover { box-shadow: inset 0 0 0 1px currentColor; }
.machine-sidebar a[data-home-machine-state] { gap: 4px 9px; }
.home-machine-name { grid-column: 1 / -1; font-size: .82rem; line-height: 1.2; }
.home-machine-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 4px; min-width: 0; }
.home-machine-preventive { padding: 2px 4px; border: 1px solid currentColor; border-radius: 4px; font-size: .7rem; line-height: 1.15; font-weight: 750; background: #e5f5eb; color: #175137; }
.home-machine-preventive[data-priority="1"] { background: #fff0d3; color: #754200; }
.home-machine-preventive[data-priority="2"] { background: #fff0f1; color: #a00d25; }
.machine-availability-summary { margin: -5px 0 10px; color: var(--muted); font-size: .8rem; }
.home-machine-downtime {
  grid-column: 2; justify-self: end; font-size: .75rem; font-weight: 800;
  padding: 2px 5px; border-radius: 4px; background: #feeef0; color: #861424;
}
.machine-sidebar a[data-home-machine-state="offline"] .machine-thumbnail { grid-row: 2 / span 2; }
.machine-sidebar :is([data-stock-machine], [data-preventive-machine]):is(:hover, [aria-pressed="true"]) { border-color: #6e9f98; background: #e4f3ef; }
.machine-sidebar :is([data-stock-machine], [data-preventive-machine])[aria-pressed="true"] { box-shadow: inset 0 0 0 1px #12645e; }
.machine-code { color: var(--accent-dark); font-size: .84rem; font-weight: 750; }
@media (max-width: 850px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .machine-sidebar { position: static; }
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.05; letter-spacing: -.045em; margin-bottom: 12px; }
h2 { font-size: 1.26rem; letter-spacing: -.02em; margin-bottom: 16px; }
h3 { font-size: 1rem; margin-bottom: 6px; }
p { line-height: 1.55; margin-bottom: 0; }
.muted, small { color: var(--muted); }
.muted { font-size: .94rem; }
.hero { background: #103b3c; border-radius: 22px; padding: clamp(16px, 3vw, 36px); margin-bottom: 16px; }
.hero-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; color: #f3fffa; }
.hero-heading p { color: #d1e8e3; }
.hero .metrics { margin-bottom: 0; }
.hero .eyebrow { color: #a8d9cb; margin-bottom: 14px; }
.hero .primary { background: #c9f1df; color: #103b3c; border-color: #c9f1df; }
.hero .primary:hover { background: #e4fff1; }
.eyebrow { font-size: .84rem; font-weight: 700; letter-spacing: .04em; }
.line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.line > input { flex: 1 1 140px; width: auto; }
.between { justify-content: space-between; }
.page-head { margin: 8px 0 26px; display: flex; gap: 20px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.back { display: inline-block; margin: 0 0 14px; font-size: .91rem; font-weight: 650; }
.metrics, .cols, .tiles { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; margin: 20px 0; }
.metric { display: block; padding: 18px; background: white; border: 1px solid var(--border); border-radius: var(--round); text-decoration: none; color: inherit; }
.metric-summary { display: block; color: inherit; text-decoration: none; }
.metric-summary:hover .badge { text-decoration: underline; }
.metric-equipment { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.dashboard-lane { min-width: 0; }
.dashboard-lane > h2 { margin: 0 0 9px; padding: 10px 14px; border-radius: 9px; background: #103b3c; color: #f3fffa; }
.dashboard-work { display: grid; gap: 9px; }
.dashboard-work-card { min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: white; }
.dashboard-work-card:focus-within { border-color: var(--accent); }
.workshop-queues { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 12px; margin: 12px 0; }
.workshop-job-card { display: grid; gap: 5px; color: inherit; text-decoration: none; }
.workshop-job-card:hover { border-color: var(--accent); }
.workshop-next-action { color: var(--accent-dark); font-weight: 750; }
.workshop-view-all { justify-self: start; }
@media (max-width: 700px) {
  .technician-job-columns > div:last-child { grid-row: 1; }
}
.dashboard-work-card:has(.dashboard-di-link),
.metric-equipment .job-row-layout:has(.dashboard-di-link) { position: relative; }
.dashboard-di-link::after { content: ''; position: absolute; inset: 0; cursor: pointer; }
.metric-equipment .dashboard-di-link::after { z-index: 1; }
.planning-card[data-planning-target] { outline: 2px solid var(--accent); outline-offset: 2px; }
.planning-preventive-edge { --planning-work-edge: #168346; }
.planning-corrective-edge { --planning-work-edge: #d3122c; }
.planning-card:is(.planning-preventive-edge, .planning-corrective-edge) { position: relative; }
.planning-type-marker {
  position: absolute; bottom: 4px; right: 4px; display: grid; place-items: center;
  min-width: 15px; height: 15px; border-radius: 3px; background: var(--planning-work-edge);
  color: #fff; font-size: 10px; font-weight: 800; line-height: 1;
}
.planning-card:has(.planning-type-marker) > .line:last-of-type,
.planning-bar:has(.planning-type-marker) > small { padding-right: 20px; }
.planning-legend-type { display: inline-flex; align-items: center; gap: 5px; }
.planning-legend-type .planning-type-marker { position: static; }
:is(.planning-card, .planning-bar):is(.planning-preventive-edge, .planning-corrective-edge)::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 2px solid var(--planning-work-edge);
  border-radius: 3px;
  pointer-events: none;
}
.planning-timeline-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 6px 16px; margin-bottom: 9px; }
.planning-timeline-header p { margin: 0; }
.planning-timeline-legend { margin-inline-start: auto; display: grid; justify-items: end; gap: 4px; }
.planning-timeline-legend .planning-legend { margin: 0; justify-content: flex-end; }
.planning-work-legend .planning-kind { margin: 0; border: 2px solid var(--planning-work-edge); }
.metric:hover, .tile:hover { border-color: #6e9f98; }
.metric-summary > strong { display: block; font-size: 2rem; line-height: 1.1; margin: 10px 0 4px; }
.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.stock-forms { margin-block: 16px; }
.csv-example { display: block; width: min(100%, 330px); height: auto; margin: 8px 0; }
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .tile { background: white; border: 1px solid var(--border); border-radius: var(--round); padding: 21px; min-width: 0; }
.panel.park-actions { padding: 10px; }
.indicator-section { margin-bottom: 18px; }
.indicator-section h2 { margin-bottom: 9px; }
.indicator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 192px), 1fr)); gap: 12px; }
.indicator-card { border-left-width: 4px; border-left-color: #4f8c80; padding: 14px; }
.indicator-card.attention { border-left-color: #ba771e; }
.indicator-card.alert { border-left-color: #b9293c; }
.indicator-card h3 { font-size: .95rem; margin-bottom: 6px; }
.indicator-card strong { display: block; font-size: 1.65rem; }
.indicator-card p { margin: 5px 0 0; }
.indicator-card-link { display: grid; color: inherit; text-decoration: none; border-radius: 12px; }
.indicator-card-link:hover .indicator-card,
.indicator-card-link:focus-visible .indicator-card { background: #e2f4ee; border-color: #07816d; }
.indicator-trs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 14px; }
.indicator-trs-value { font-size: 1.65rem; color: #086653; }
.indicator-curve { display: block; width: 100%; max-width: 900px; height: auto; color: #087b69; }
.indicator-curve line { stroke: #c4d3d8; }
.indicator-curve path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.indicator-marker { cursor: help; }
.indicator-marker-hit { fill: transparent; }
.indicator-marker-dot { fill: currentColor; stroke: white; stroke-width: 1.5; }
.indicator-marker-tooltip { visibility: hidden; pointer-events: none; }
.indicator-marker-tooltip rect { fill: #123438; }
.indicator-curve .indicator-marker-tooltip text { fill: white; font-size: 13px; font-weight: 700; }
.indicator-marker:hover .indicator-marker-tooltip,
.indicator-marker:focus .indicator-marker-tooltip { visibility: visible; }
.indicator-marker:hover .indicator-marker-dot,
.indicator-marker:focus .indicator-marker-dot { stroke: #123438; stroke-width: 2; }
.indicator-curve text { fill: #364f61; font-size: 11px; }
.indicator-curve-values dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.panel + .panel { margin-top: 16px; }
.cols > .panel + .panel { margin-top: 0; }
.tile { display: block; color: inherit; text-decoration: none; overflow: hidden; }
.tile h2 { margin: 9px 0 5px; }
.tile .photo { margin-bottom: 10px; }
.photo { width: 100%; max-height: 265px; object-fit: contain; background: #e8efef; border-radius: 10px; }
.tile .photo { height: 125px; object-fit: cover; }
.tile.park-equipment-tile {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(68px, 34%); grid-template-rows: 1fr auto;
  gap: 12px 10px; padding: 14px;
}
.park-equipment-link, .park-equipment-work a { color: inherit; text-decoration: none; }
.park-equipment-link::after { content: ''; position: absolute; inset: 0; }
.park-equipment-work a { position: relative; }
.park-equipment-link:hover, .park-equipment-work a:hover strong { text-decoration: underline; }
.park-equipment-name { min-width: 0; overflow-wrap: anywhere; }
.park-equipment-name h2 { margin-bottom: 7px; }
.park-equipment-name p { margin-top: 4px; }
.park-equipment-media { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-rows: auto auto 1fr; gap: 6px; }
.park-equipment-production { display: grid; gap: 4px; align-self: end; min-width: 0; text-align: center; }
.park-production-stat { display: grid; gap: 1px; padding: 4px; border: 1px solid var(--border); border-radius: 6px; background: #f1f5f6; font-size: .75rem; overflow-wrap: anywhere; }
.park-production-stat.park-trs.work-ok { background: #dcf6e4; border: 2px solid #00a83f; }
.park-production-stat.park-trs.work-soon { background: #fff0df; border: 2px solid #ff7800; }
.park-production-stat.park-trs.work-late { background: #ffe3e8; border: 2px solid #f00029; }
.park-trs strong { font-size: .94rem; }
.park-equipment-photo { padding: 4px; border-radius: 8px; background: #edf3f4; overflow: hidden; }
.park-equipment-photo.is-offline { background: #bf2638; }
.park-equipment-tile .park-equipment-photo .photo { width: 100%; height: clamp(65px, 7vw, 100px); margin: 0; object-fit: contain; background: transparent; }
.park-equipment-media .equipment-status { justify-content: center; padding-inline: 4px; text-align: center; }
.park-equipment-work { display: grid; gap: 6px; min-width: 0; }
.park-intervention-group {
  display: grid; gap: 4px; padding: 4px;
  background: #fce4e9; border: 1px solid #d990a1; border-radius: 6px;
}
.park-intervention-group h3, .park-guide-counts h3 {
  margin: 0; padding: 0 3px; font-size: .85rem;
}
.park-guide-counts h3 { grid-column: 1 / -1; }
.park-guide-counts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; background: #ffe599; border: 1px solid #d3a73c; border-radius: 6px;
}
.park-guide-counts a {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 2px 6px; padding: 5px 6px; border: 1px solid #d3a73c; border-radius: 4px;
  background: #fff8df; color: #4a3210; font-size: .82rem;
}
.park-guide-counts a:hover, .park-guide-counts a:focus-visible { background: #fff; }
.park-work-summary { display: grid; gap: 2px; padding: 6px 8px; border-radius: 6px; background: #f1f5f6; border: 2px solid var(--border); font-size: .82rem; overflow-wrap: anywhere; }
.park-work-summary.preventive { background: #eaf5f0; }
.park-work-summary.work-ok,
.park-work-summary.work-soon,
.park-work-summary.work-late { border-width: 3px; }
.park-work-summary.work-ok { border-color: #00a83f; }
.park-work-summary.work-soon { border-color: #ff7800; }
.park-work-summary.work-late { border-color: #f00029; }
.park-work-detail { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.row { padding: 13px 0; border-bottom: 1px solid #e8eef0; overflow-wrap: anywhere; }
.row:last-child { padding-bottom: 0; border-bottom: 0; }
.row:first-child { padding-top: 0; }
.row a { font-weight: 650; }
.row p { margin-top: 4px; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 6px; font-size: .85rem; line-height: 1.35; font-weight: 700; background: #e7eef7; color: #244874; }
.badge.equipment-status { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.equipment-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.equipment-status.equipment-online { background: #156c41; }
.equipment-status.equipment-offline { background: #a61c2e; }
.badge.bt-state { padding: 3px 9px; border: 3px solid; font-weight: 800; }
.badge.bt-state.late { border-color: #8e1022; background: #ffd5d8; color: #701020; }
.badge.bt-state.due { border-color: #a34700; background: #ffe0b2; color: #713600; }
.badge.bt-state.good { border-color: #19613b; background: #cff2d6; color: #164a2f; }
.good { background: #def3e9; color: #145343; }
.late { background: #fbe7e5; color: #932e34; }
.due { background: #fff0d1; color: #694900; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: #17323b; text-decoration: none; font-weight: 650; font-size: .94rem; text-align: center; }
.button:hover { background: #ebf4f2; }
.button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--accent); border-color: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.form { display: grid; gap: 13px; max-width: 850px; }
.form p { margin: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; align-items: end; }
.filters label { flex: 1 1 140px; }
label { display: block; font-weight: 650; font-size: .92rem; }
input:not([type="checkbox"], [type="radio"]), textarea, select { display: block; border: 1px solid #aebfc8; color: #172b36; background: #fff; border-radius: 8px; padding: 9px 10px; min-height: 42px; width: 100%; }
label > input:not([type="checkbox"], [type="radio"]), label > select, label > textarea { margin-top: 5px; }
@media (min-width: 851px) {
  .preventive-workspace .machine-sidebar { margin-top: var(--preventive-sidebar-offset, 160px); }
  #preventive-scope-filters:not([hidden]) { position: absolute; inset: auto 0 calc(100% + 10px); margin: 0; }
  .workspace.directory-workspace { grid-template-columns: minmax(0, 1fr) minmax(235px, 290px); }
  .directory-workspace .machine-sidebar { top: 68px; margin-top: var(--park-card-offset, 0px); }
  #directory-scope-tree > .directory-site-plan {
    position: absolute; bottom: calc(100% + 8px); left: 0; margin: 0;
  }
}
@media (min-width: 1001px) {
  .preventive-workspace .park-actions { margin-top: var(--preventive-sidebar-offset, 160px); }
}
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }
textarea { min-height: 88px; resize: vertical; }
select { appearance: none; padding-right: 31px; background-image: linear-gradient(45deg, transparent 50%, #526571 50%), linear-gradient(135deg, #526571 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.notice { background: #dff3e9; color: #174f39; padding: 12px 16px; border: 1px solid #9bcab3; border-radius: 8px; max-width: min(850px, calc(100% - 32px)); margin: 16px auto 0; font-weight: 650; }
.notice.error, .form-error { color: #8b2531; }
.notice.error { background: #fbe6e4; border-color: #e1a7a7; }
.form-error { font-weight: 650; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
dl { margin: 0; }
dt { font-weight: 700; margin: 12px 0 4px; }
dd { margin: 0; }
details { margin-top: 14px; }
summary { cursor: pointer; font-weight: 650; }
details form { margin-top: 12px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid #e5edef; }
th { color: var(--muted); font-size: .87rem; }
.table { overflow-x: auto; }
#print { display: none; }
@media (max-width: 955px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .workspace { padding-left: 16px; padding-right: 16px; }
  .cols, .tiles, .fields { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; gap: 8px; }
  a.metric, .metric-summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  .metric-summary > strong { margin: 0 0 0 auto; }
  .module-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  body { background: white; color: black; font: 11pt "Segoe UI", sans-serif; }
  body.printing > :not(#print) { display: none !important; }
  body.printing #print { display: block; }
  #print h1 { font-size: 25pt; margin: 0 0 12pt; }
  #print h2 { font-size: 15pt; margin: 16pt 0 6pt; }
  #print p { margin-bottom: 7pt; }
  #print .print-block { break-inside: avoid; border-top: 1px solid #bbb; }
  #print .print-step-photo { display: block; max-width: 100%; max-height: 95mm; object-fit: contain; }
  #print .print-attachments { break-before: page; }
  #print .print-attachment h3 { break-after: avoid; }
  #print .print-pdf-page { display: block; max-width: 100%; max-height: 230mm; object-fit: contain; break-inside: avoid; margin: 0 auto 8mm; }
  #print .writing { min-height: 38pt; }
}
@page { margin: 17mm; }
@media screen {
  h1, h2, h3, .brand-face, .module-menu span, .module-state, .machine-code { font-family: var(--industrial-font); }
  .brand-face { font-style: normal; letter-spacing: -.035em; }
  h1, h2 { letter-spacing: -.015em; }
  .module-menu span { font-size: clamp(.72rem, 12cqi, 1.3rem); }
  .machine-code { font-variant-numeric: tabular-nums; }
}
.workspace.store-plan-workspace { max-width: none; padding-inline: clamp(12px, 1.6vw, 28px); }
.store-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 22vw, 340px); gap: 16px; align-items: start; }
.store-layout > div { min-width: 0; }
.store-layout > div:first-child > .panel { padding-inline: clamp(10px, 1.2vw, 21px); }
.store-layout > div > .panel + .panel { margin-top: 16px; }
.store-plan-scroll { overflow-x: auto; }
.store-plan-frame {
  position: relative; min-width: 100%;
  width: max(100%, calc(var(--store-columns, 8) * 71px + 3px));
  padding-bottom: 28px;
}
.plan-size-handle, .site-move {
  position: absolute; z-index: 1; display: grid; place-items: center;
  width: 24px; height: 24px; min-height: 0; padding: 0; border: 1px solid #7199a3;
  border-radius: 5px; background: white; color: #174955; touch-action: none;
}
.plan-size-handle { right: 2px; bottom: 2px; cursor: nwse-resize; }
.store-scale-preview {
  position: absolute; z-index: 2; inset: 0 auto auto 0; pointer-events: none;
  padding: 4px; border: 2px dashed #17627e; color: #12384b; background: #73bdde33; font-weight: 700;
}
.store-scale-preview.blocked { border-color: #932b36; background: #de737b44; }
.site-plan-scroll { overflow: auto; max-height: 75vh; }
.site-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.site-name-control { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; }
.site-tree, .site-tree ul { list-style: none; margin: 5px 0; padding-left: 13px; border-left: 1px solid var(--border); }
.site-tree li { padding: 3px 0; overflow-wrap: anywhere; }
.site-tree summary { color: #174955; font-weight: 700; }
.site-tree summary a + a { margin-left: 4px; font-size: .77rem; font-weight: 500; }
.site-tree .button { margin: 5px 0; }
.site-tree-group { position: relative; padding-right: 27px !important; }
.site-tree-group .store-trash { top: 1px; }
.site-group-selection { margin: 6px 0 9px; }
.site-selection-rectangle {
  position: fixed; z-index: 25; pointer-events: none; border: 1px dashed #126e93; background: #58aad940;
}
.site-group-frame {
  position: relative; z-index: 3; pointer-events: none; outline: 2px dashed #397491; outline-offset: 2px;
  border-radius: 5px;
}
.site-group-frame > span {
  position: absolute; left: 0; bottom: 0; padding: 2px 4px; border-radius: 3px;
  background: #d8eaf4; color: #16475e; font-size: .7rem;
}
.site-group-frame .store-trash { pointer-events: auto; top: -5px; right: -5px; }
.site-object.machine.group-selected { border-color: #075dcc; background: #cbe6ff; box-shadow: inset 0 0 0 1px #075dcc; }
.site-plan-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.site-plan-heading h1, .site-plan-heading .site-tabs { margin: 0; }
.site-plan-heading .notice { margin: 0 0 0 auto; padding: 7px 12px; max-width: 100%; }
.site-plan-heading .site-lock { margin-left: auto; font-size: 1.1rem; }
.site-plan-heading .notice:not([hidden]) + .site-lock { margin-left: 0; }
.site-add-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.site-add-controls .button { min-width: 0; padding-inline: 5px; text-align: center; white-space: normal; }
.site-tab { position: relative; }
.site-tab:has(.store-trash) a { padding-right: 36px; }
.site-tab .store-trash { top: 50%; right: 5px; transform: translateY(-50%); }
.site-tab:has(.site-eye) a { padding-right: 46px; }
.site-tab:has(.site-eye):has(.store-trash) a { padding-right: 77px; }
.site-tab .site-eye { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); padding: 0; width: 36px; min-height: 32px; justify-content: center; color: #344c5b; }
.site-tab:has(.store-trash) .site-eye { right: 34px; }
.site-tab .site-eye[aria-pressed="true"] { color: #115638; background: #dcf2e5; }
.site-eye-icon { position: relative; display: grid; place-items: center; width: 24px; height: 22px; }
.site-eye-icon::before { content: ''; position: absolute; width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 70% 0; transform: rotate(45deg) scaleY(.85); }
.site-eye-icon > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.site-eye[aria-pressed="false"] .site-eye-icon::before { width: 23px; height: 12px; border: 0; border-bottom: 2px solid currentColor; border-radius: 0 0 50% 50%; transform: translateY(-4px); }
.site-eye[aria-pressed="false"] .site-eye-icon > span { width: 2px; height: 4px; border-radius: 1px; transform: translateY(5px); box-shadow: -6px -1px currentColor, 6px -1px currentColor; }
.site-plan.placing, .site-plan.placing .site-object > a { cursor: crosshair; }
.site-editor-trash { position: relative; height: 0; }
.site-editor-trash .store-trash { top: -28px; right: 0; }
.site-plan-frame { position: relative; width: max-content; padding-bottom: 28px; }
.site-perspective { display: block; width: 100%; height: auto; background: #f4f8f9; border-radius: 8px; }
#equipment-site-preview:not(:empty) { margin-bottom: 16px; }
.site-plan {
  --site-cell: 28px;
  user-select: none;
  display: grid; grid-template: repeat(var(--site-rows, 8), var(--site-cell)) / repeat(var(--site-columns, 8), var(--site-cell));
  width: max-content; isolation: isolate; outline: 1px solid #d9e5e9; outline-offset: -1px;
  background-color: #f5f9fa;
  background-image: linear-gradient(to right, #d9e5e9 1px, transparent 1px),
    linear-gradient(to bottom, #d9e5e9 1px, transparent 1px);
  background-size: var(--site-cell) var(--site-cell);
}
.site-object {
  position: relative; min-width: 0; margin: 1px; border: 2px solid #476e7b;
  border-radius: 5px; background: #d4e8ee99;
}
.site-object.salle { z-index: 1; border-color: #987542; background: #f4dfafbb; }
.site-object.machine { z-index: 2; border-color: #17625a; background: #c2e5dc; }
.site-object.site-outside-scope { border-color: #ba1830; background: #f9d8df; color: #801329; }
.site-object.machine.site-outside-scope { background: #f5a7b3; }
.site-outside-scope > span { display: block; margin: 4px; font-size: .77rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-scope-legend { color: #a4162c; font-size: .82rem; font-weight: 700; }
.site-object.selected { border-color: #0c4b73; box-shadow: inset 0 0 0 1px #0c4b73; }
.site-object .store-trash { z-index: 2; }
.site-object a {
  position: absolute; top: 25px; left: 2px; right: 2px; overflow: hidden;
  background: #ffffffde; border-radius: 3px; white-space: nowrap; text-overflow: ellipsis; font-size: .8rem;
}
.site-object.machine .store-trash { width: 20px; height: 20px; }
.site-object.machine a { top: 22px; font-size: .73rem; }
.site-move { left: 1px; top: 1px; width: 22px; height: 22px; cursor: move; }
.site-object .plan-size-handle { width: 20px; height: 20px; }
.site-object.compact a { inset: 0; background: transparent; }
.site-object.batiment > a, .site-object.batiment.site-outside-scope > span {
  position: absolute; z-index: 3; inset: 3px 4px auto; margin: 0; width: fit-content; max-width: calc(100% - 8px);
  padding: 1px 4px; border-radius: 3px; background: #f8fcfd; font-weight: 750;
}
.site-object.batiment:has(> .site-move):not(.compact) > a { left: 26px; max-width: calc(100% - 56px); }
.site-object.batiment.site-outside-scope > span { background: #fff0f2; }
.site-object.compact button { visibility: hidden; }
.site-object.compact:is(:hover, :focus-within, .selected) { z-index: 4; }
.site-object.compact:is(:hover, :focus-within, .selected) button { visibility: visible; }
.site-object.compact .site-move { left: 0; top: 100%; }
.site-object.compact .store-trash { right: 0; bottom: 100%; top: auto; }
.site-object.compact .plan-size-handle { right: auto; bottom: 0; left: 100%; }
.site-gesture-preview {
  z-index: 3; display: grid; place-items: center; pointer-events: none;
  border: 2px dashed #17627e; background: #73bdde55; color: #12384b; font-weight: 700;
}
.store-plan { display: grid; grid-template-columns: repeat(var(--store-columns, 8), minmax(66px, 1fr)); grid-auto-rows: 86px; gap: 5px; padding: 4px; }
.store-size { padding: 12px; border-radius: 8px; background: #eef4f5; }
[data-shelf-size][hidden] { display: none; }
.store-cell {
  min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px dashed #8aa6ae; border-radius: 6px; background: #f0f5f6; color: #194752;
  text-align: center; text-decoration: none; line-height: 1.2;
}
.store-cell[data-storage-id] { border: 1px solid #6c9192; cursor: grab; background: #cfe8e4; }
.store-cell.etagere { background: #deebf7; border-color: #849db8; }
.store-cell.rack { background: #f3e5d2; border-color: #ac8964; }
.store-cell.ouverte { background: #e7eff3; border-color: #849fae; }
.store-cell.local { background: #f7f1e8; border-color: #aa8e6a; }
.store-cell.local .store-top-shape {
  width: 42px; height: 22px; border: 3px solid #8c704f; border-bottom-color: transparent;
  background: #e9dfce; box-shadow: none;
}
.store-cell.local .store-top-shape::after { content: none; }
.store-cell.basse { background: #f5e7cc; border-color: #b79a64; }
.store-cell:hover, .store-cell.selected { box-shadow: inset 0 0 0 2px #126462; }
.store-cell small { padding: 2px; }
.store-cell strong { overflow-wrap: anywhere; }
.store-grid-slot { position: relative; display: grid; min-width: 0; }
.store-trash, .store-rotate, .store-stretch {
  position: absolute; top: 2px; right: 2px; display: grid; place-items: center;
  width: 24px; height: 24px; min-height: 0; padding: 0; border: 1px solid #b97077;
  border-radius: 5px; color: #822632; background: #fff6f6; font-size: 13px; cursor: pointer;
}
.store-trash:hover { background: #f9dce0; }
.store-rotate, .store-stretch { color: #174955; border-color: #7199a3; background: #fff; }
.store-rotate { left: 2px; right: auto; font-size: 17px; }
.store-stretch { top: auto; bottom: 2px; cursor: nwse-resize; touch-action: none; }
.store-stretch-preview {
  position: absolute; z-index: 2; top: 0; left: 0; pointer-events: none;
  display: grid; place-items: start center; color: #12384b; font-weight: 700;
  border: 2px dashed #17627e; border-radius: 6px; background: #73bdde55;
}
.store-stretch-preview.blocked { border-color: #932b36; background: #de737b66; }
.store-turn-1 { transform: rotate(90deg); }
.store-turn-2 { transform: rotate(180deg); }
.store-turn-3 { transform: rotate(270deg); }
.store-top-shape {
  position: relative; display: block; width: 38px; height: 19px; margin: 4px 0;
  border: 2px solid #345b5d; border-radius: 2px;
  background: linear-gradient(90deg, #8ebeb8 48%, #345b5d 48% 52%, #8ebeb8 52%);
  box-shadow: inset 0 -4px #416f6e;
}
.store-top-shape::after {
  content: ""; position: absolute; left: calc(50% - 5px); bottom: 4px; width: 2px; height: 3px;
  background: #254450; box-shadow: 8px 0 #254450;
}
.store-cell.etagere .store-top-shape {
  border-color: #426784; border-radius: 0; box-shadow: none;
  background: repeating-linear-gradient(90deg, #bcd5ec 0 9px, #426784 9px 11px);
}
.store-cell.ouverte .store-top-shape {
  border-radius: 0; border: 2px solid #537183; box-shadow: none;
  background: repeating-linear-gradient(90deg, transparent 0 6px, #7897a8 6px 8px);
}
.store-cell.rack .store-top-shape {
  border-color: #795736; border-radius: 0; box-shadow: none;
  background: repeating-linear-gradient(0deg, #e4c69f 0 4px, #795736 4px 6px);
}
.store-cell:is(.etagere, .ouverte, .rack) .store-top-shape::after { content: none; }
.store-cell.basse .store-top-shape {
  width: 48px; height: 14px; border-color: #785a36;
  background: linear-gradient(90deg, #e5c58e 48%, #785a36 48% 52%, #e5c58e 52%);
  box-shadow: inset 0 -3px #ad864e;
}
#store-perspective { display: block; width: 100%; height: auto; background: #f4f8f9; border-radius: 8px; }
@media (max-width: 900px) { .store-layout { grid-template-columns: minmax(0, 1fr); } }
.store-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.store-navigation-tile {
  --photo-x: 0%;
  --photo-y: 0%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: end;
  min-height: 105px;
  padding: 10px;
  border: 2px solid #75969b;
  border-radius: 9px;
  background: #183438;
  color: white;
  font-weight: 750;
  text-decoration: none;
}

.store-navigation-tile::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 50%;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url('/tuiles-magasin.jpg') var(--photo-x) var(--photo-y) / 300% 200% no-repeat;
}

.store-navigation-tile::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(transparent 25%, #081c20 100%);
}

.store-navigation-tile:nth-child(3n + 2) { --photo-x: 50%; }
.store-navigation-tile:nth-child(3n) { --photo-x: 100%; }
.store-navigation-tile:nth-child(n + 4) { --photo-y: 100%; }
.store-navigation-tile[aria-current="page"] { border-color: #30d9b4; box-shadow: 0 0 0 1px #0a665e; }
.store-navigation-tile.store-delete-tile { border-color: #d18484; }
.button.stock-delete-action { color: #882e35; border-color: #d18484; }
.button.stock-delete-action:hover { background: #faeded; color: #70232a; }
[data-form="part-delete"] button.primary { background: #882e35; border-color: #882e35; }
.store-navigation-tile:hover,
.store-navigation-tile:focus-visible { color: white; border-color: #30d9b4; filter: brightness(1.18); }
.session-qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.session-qr-card { text-align: center; }
.session-qr-card svg { width: min(100%, 260px); height: auto; display: block; margin: auto; }
.directory-login-qr svg { display: block; width: 145px; max-width: 100%; height: auto; }

.directory-entry:has(.directory-trash) h3 { padding-right: 32px; }
.directory-entry:has(.directory-trash):has(.directory-select) h3 { padding-right: 62px; }
.directory-trash { position: absolute; top: 8px; right: 8px; }
.directory-entry:has(.directory-select) .directory-trash { right: 34px; }
.directory-delete-filter { margin-bottom: 12px; }

.directory-edit-field { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.directory-edit-field:hover { text-decoration: underline; }
.directory-edit-field:focus-visible { outline: 2px solid #08635e; outline-offset: 3px; }
.directory-editor, .stock-editor {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border: 1px solid #a8bfca;
  border-radius: 12px;
  color: inherit;
  background: #fff;
}
.directory-editor::backdrop, .stock-editor::backdrop { background: rgba(17, 39, 48, .55); }
.directory-editor h2, .stock-editor h2 { margin: 0 0 16px; }
.stock-cell-edit {
  padding: 0; border: 0; background: transparent; color: var(--accent, #08635e);
  font: inherit; text-align: left; text-decoration: underline dotted; cursor: pointer;
}
.stock-cell-edit:hover { text-decoration-style: solid; }
.stock-cell-edit:focus-visible { outline: 2px solid #08635e; outline-offset: 3px; }
.stock-thumbnail, .stock-photo-edit {
  box-sizing: border-box; display: block; width: 42px; height: 42px; border-radius: 6px;
}
.stock-thumbnail { object-fit: cover; }
.stock-photo-edit {
  padding: 0; border: 0; background: #e9f1f3; color: #155856; font-size: 1.15rem; cursor: pointer;
}
.stock-photo-edit:hover, .stock-photo-edit:focus-visible { outline: 2px solid #08635e; outline-offset: 2px; }

.workshop-close-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.workshop-close-row > details { flex: 1 1 280px; min-width: 0; }
.workshop-close-row > .form { margin: 0; }

.module-menu .home-release {
  position: absolute;
  top: 47%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 8px);
  padding: 3px 5px;
  border-radius: 4px;
  background: #112a39eb;
  color: #fff;
  font: 700 clamp(8px, 10cqi, 11px)/1.15 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.park-site-plan-link { display: block; color: inherit; text-decoration: none; border-radius: 8px; }
.park-site-plan-link:hover h2 { text-decoration: underline; }
.park-site-plan-link:focus-visible { outline: 2px solid #08635e; outline-offset: 4px; }

.workshop-session-status { display: inline-flex; gap: 5px; flex-wrap: wrap; margin-inline-start: 8px; }
.workshop-close-row summary > small { display: block; margin-top: 4px; }

.preventive-report-summary { margin-block: 12px; }
.preventive-report-summary td { white-space: pre-wrap; overflow-wrap: anywhere; }
@media print {
  .preventive-report-summary .table { overflow: visible; }
  .preventive-report-summary tr { break-inside: avoid; }
}

.workshop-photo-tile { margin-block: 10px 14px; }
.workshop-photo-tile h3 { margin-top: 0; }
.workshop-photo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 150px)); gap: 8px; margin-top: 8px; }
.workshop-photo-gallery a { min-width: 0; overflow-wrap: anywhere; }
.workshop-photo-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
