:root {
  --ink:#192327;
  --muted:#6b757a;
  --paper:#f4f5f4;
  --line:#e1e5e3;
  --accent:#ff7348;
  --accent-dark:#ba3d1c;
  --rail:#14191b;
  --green:#23764a;
  --radius:10px
}

* {
  box-sizing:border-box
}

html,body {
  margin:0;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-size:14px
}

body {
  min-width:320px
}

a {
  color:var(--accent-dark);
  text-decoration:none
}

button,input,select,textarea {
  font:inherit
}

button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #ec805e;
  outline-offset:3px
}

h1,h2,h3,p {
  margin-top:0
}

h1 {
  font-size:clamp(28px,3vw,38px);
  font-weight:750;
  letter-spacing:-1.3px;
  line-height:1.14;
  margin-bottom:12px
}

h2 {
  font-size:21px;
  font-weight:700;
  letter-spacing:-.45px
}

h3 {
  font-size:18px;
  font-weight:700
}

h1:focus {
  outline:none
}

.skip-link {
  position:fixed;
  top:-60px;
  left:20px;
  z-index:25000;
  padding:12px;
  background:white
}

.skip-link:focus {
  top:12px
}

.app-shell {
  display:flex;
  min-height:100vh
}

.app-sidebar {
  width:240px;
  flex-shrink:0;
  background:var(--rail);
  color:#dce2e3;
  padding:32px 22px;
  position:fixed;
  inset:0 auto 0 0;
  z-index:100;
  display:flex;
  flex-direction:column;
  overflow:auto;
  border-right:1px solid #293134
}

.brand {
  display:flex;
  align-items:center;
  gap:10px;
  color:white;
  font-size:18px;
  font-weight:800;
  letter-spacing:.6px
}

.brand img {
  object-fit:contain;
  flex-shrink:0
}

.brand small {
  display:block;
  font-size:8px;
  letter-spacing:2px;
  color:#9ca6a9;
  margin-top:7px
}

.rail-nav {
  margin-top:35px
}

.nav-section-label {
  font-size:9px;
  letter-spacing:1.8px;
  font-weight:650;
  color:#8a969b;
  padding:0 12px;
  margin:28px 0 12px
}

.rail-nav>a,.logout-form button {
  display:flex;
  align-items:center;
  gap:11px;
  color:#b5bfc2;
  padding:12px 13px;
  margin:4px 0;
  font-size:12px;
  font-weight:550;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  width:100%;
  text-align:left
}

.rail-nav .mud-icon-root {
  font-size:19px
}

.rail-nav>a:hover,.logout-form button:hover {
  color:white;
  background:#ffffff08
}

.rail-nav>a.active {
  background:#ff734812;
  border-color:#ff73482a;
  color:#ff966f
}

.rail-nav .team-login {
  margin-top:25px;
  border-top:1px solid #2d3538;
  border-radius:0;
  padding-top:20px
}

.logout-form {
  margin-top:22px
}

.logout-form button {
  cursor:pointer
}

.sidebar-footer {
  margin-top:auto;
  padding:40px 12px 0;
  color:#9aa6ab;
  font-size:11px
}

.sidebar-footer small {
  display:block;
  font-size:8px;
  letter-spacing:1.4px;
  margin-top:15px;
  color:#7f8d94
}

.brand-slash {
  color:var(--accent);
  font-size:23px;
  font-weight:800;
  margin-right:8px
}

.app-workspace {
  margin-left:240px;
  min-width:0;
  flex:1
}

.app-topbar {
  height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 40px;
  border-bottom:1px solid var(--line);
  background:#fafbf9;
  gap:14px
}

.topbar-context {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:9px;
  letter-spacing:1.9px;
  color:var(--muted);
  font-weight:650
}

.topbar-tools {
  display:flex;
  align-items:center;
  gap:18px;
  font-size:11px
}

.topbar-tools a {
  color:#505c61
}

.topbar-separator {
  height:19px;
  border-left:1px solid var(--line)
}

.language-control select {
  border:0;
  background:none;
  color:#566267;
  font-size:11px;
  font-weight:650;
  padding:7px;
  cursor:pointer
}

.menu-toggle {
  display:none;
  background:none;
  border:0;
  padding:4px
}

.sidebar-backdrop {
  display:none
}

.page-content {
  max-width:1600px;
  margin:auto;
  padding:40px
}

.page-footer {
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-top:1px solid var(--line);
  margin:0 40px;
  padding:20px 0;
  color:#7b878b;
  font-size:10px
}

.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  margin-bottom:32px
}

.eyebrow {
  font-size:9px;
  font-weight:700;
  letter-spacing:2px;
  color:var(--accent-dark);
  margin-bottom:14px
}

.page-description {
  font-size:13px;
  color:var(--muted);
  line-height:1.7;
  max-width:600px;
  margin:0
}

.heading-actions {
  display:flex;
  gap:10px;
  align-items:center;
  flex-shrink:0;
  margin-top:27px
}

.btn,.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--line);
  padding:11px 16px;
  border-radius:7px;
  font-size:12px;
  font-weight:650;
  line-height:1.4;
  cursor:pointer;
  background:white;
  color:var(--ink);
  box-shadow:none;
  text-decoration:none
}

.btn:hover,.button:hover {
  filter:brightness(.97);
  color:var(--ink)
}

.btn-primary,.btn-success,.button-primary {
  color:white;
  background:var(--ink);
  border-color:var(--ink)
}

.btn-primary:hover,.btn-success:hover,.button-primary:hover {
  color:white;
  background:#2e3c42;
  border-color:#2e3c42
}

.button-accent {
  color:#2c150d;
  background:var(--accent);
  border-color:var(--accent)
}

.button-accent:hover {
  color:#2c150d
}

.btn-outline-secondary,.btn-secondary {
  background:white;
  color:#526268;
  border-color:#d6ddda
}

.btn-outline-danger,.btn-danger {
  color:#ad3024;
  background:#fff8f6;
  border-color:#ead0ca
}

.btn:disabled,button:disabled {
  cursor:default;
  opacity:.5
}

.btn-sm {
  padding:7px 10px;
  font-size:11px
}

.form-control,.form-select {
  border:1px solid #d9dfdd;
  border-radius:7px;
  padding:12px 13px;
  font-size:13px;
  color:var(--ink);
  background:white
}

.form-control:focus,.form-select:focus {
  border-color:#de815e;
  box-shadow:0 0 0 3px #ff73481a
}

.form-label {
  font-size:12px;
  font-weight:650;
  margin-bottom:8px
}

.form-text {
  font-size:11px;
  line-height:1.5;
  color:var(--muted)
}

.form-check-input:checked {
  background-color:var(--accent-dark);
  border-color:var(--accent-dark)
}

.validation-message,.validation-errors {
  color:#ad3024;
  font-size:12px
}

.invalid {
  border-color:#b6422b
}

.alert {
  border-radius:8px;
  padding:15px 18px;
  font-size:13px;
  border:1px solid var(--line)
}

.alert-danger {
  background:#fff1ed;
  color:#963b2c;
  border-color:#efcfc3
}

.alert-success {
  background:#edf7f0;
  color:#235e3f;
  border-color:#d3e8db
}

.alert-info {
  background:#edf3f5;
  color:#40626d;
  border-color:#d7e4e8
}

.alert button {
  margin-left:12px
}

.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden
}

.panel-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:22px 24px;
  border-bottom:1px solid var(--line);
  gap:16px
}

.panel-heading h2 {
  font-size:16px;
  margin:0
}

.panel-heading p {
  font-size:11px;
  color:var(--muted);
  margin:5px 0 0
}

.panel-body {
  padding:26px
}

.panel-footer {
  border-top:1px solid var(--line);
  padding:17px 24px;
  color:var(--muted);
  font-size:11px
}

.card-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px
}

.rally-card {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:25px;
  transition:border-color .15s,transform .15s;
  display:flex;
  flex-direction:column
}

.rally-card:hover {
  border-color:#d1a28d;
  transform:translateY(-2px)
}

.rally-card .card-year {
  font-size:10px;
  letter-spacing:1.4px;
  font-weight:650;
  color:#7e8b90
}

.rally-card h2 {
  font-size:23px;
  margin:23px 0 11px;
  line-height:1.2
}

.rally-card p {
  font-size:12px;
  color:var(--muted);
  line-height:1.7
}

.rally-card .button {
  margin-top:auto;
  justify-content:space-between
}

.rally-card-top {
  display:flex;
  justify-content:space-between;
  align-items:center
}

.live-label {
  color:#397150;
  font-size:9px;
  font-weight:700;
  letter-spacing:1px;
  display:inline-flex;
  align-items:center;
  gap:7px
}

.live-label:before {
  content:"";
  width:5px;
  height:5px;
  background:#448762;
  border-radius:100%
}

.hero-band {
  position:relative;
  overflow:hidden;
  background:#1c2427;
  color:white;
  padding:30px 32px;
  border-radius:var(--radius);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:25px;
  margin-bottom:28px
}

.hero-band h2 {
  font-size:24px;
  margin-bottom:9px;
  letter-spacing:-.6px
}

.hero-band p {
  color:#bac4c7;
  font-size:12px;
  line-height:1.7;
  margin:0;
  max-width:590px
}

.hero-band .hero-slash {
  font-size:80px;
  font-weight:900;
  font-style:italic;
  letter-spacing:-20px;
  color:#ff734825;
  position:absolute;
  right:190px;
  top:-20px;
  pointer-events:none
}

.hero-band .button {
  flex-shrink:0;
  z-index:1
}

.section-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:30px 0 18px
}

.section-title h2 {
  font-size:17px;
  margin:0
}

.section-title span {
  font-size:11px;
  color:var(--muted)
}

.stats-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:28px
}

.stat-card {
  border:1px solid var(--line);
  background:white;
  border-radius:var(--radius);
  padding:21px 23px
}

.stat-card span {
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:600;
  letter-spacing:.6px
}

.stat-card strong {
  display:block;
  font-size:34px;
  font-weight:700;
  letter-spacing:-1px;
  margin:12px 0 3px;
  font-variant-numeric:tabular-nums
}

.stat-card small {
  font-size:10px;
  color:var(--muted)
}

.stat-card.accent {
  border-top:3px solid var(--accent);
  padding-top:19px
}

.stat-card.green strong {
  color:var(--green)
}

.data-table {
  width:100%;
  border-collapse:collapse;
  font-size:12px
}

.data-table th {
  font-size:9px;
  letter-spacing:.7px;
  color:#7c888e;
  font-weight:700;
  text-transform:uppercase;
  text-align:left;
  background:#f9faf8;
  padding:14px 20px;
  white-space:nowrap;
  border-bottom:1px solid var(--line)
}

.data-table td {
  padding:17px 20px;
  border-bottom:1px solid #edf0ed;
  vertical-align:middle
}

.data-table tbody tr:last-child td {
  border-bottom:0
}

.data-table tbody tr:hover {
  background:#fafbf9
}

.crew-number {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f1f3f0;
  border:1px solid #e5e8e3;
  border-radius:5px;
  min-width:36px;
  min-height:31px;
  padding:3px 7px;
  font-weight:750;
  font-variant-numeric:tabular-nums
}

.crew-names {
  font-weight:650;
  color:#2b363b
}

.crew-car {
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-top:5px
}

.status-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:5px;
  font-size:10px;
  font-weight:650;
  white-space:nowrap;
  background:#f1f3f2;
  color:#6b787d
}

.status-dot {
  width:5px;
  height:5px;
  border-radius:100%;
  background:currentColor
}

.status-0 {
  background:#fff1df;
  color:#936524
}

.status-1 {
  background:#eaf1fb;
  color:#446ba1
}

.status-2 {
  background:#eeeafb;
  color:#7959a4
}

.status-3 {
  background:#e8f5eb;
  color:#36774b
}

.status-5 {
  background:#fcebe8;
  color:#a35041
}

.toolbar {
  display:flex;
  gap:15px;
  align-items:center;
  justify-content:space-between;
  padding:20px 24px;
  border-bottom:1px solid var(--line);
  flex-wrap:wrap
}

.toolbar-inputs {
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap
}

.search-box {
  min-width:240px;
  max-width:380px;
  width:100%;
  font-size:12px
}

.toolbar .form-select {
  font-size:12px;
  max-width:220px
}

.count-label {
  font-size:10px;
  color:var(--muted)
}

.empty-state {
  text-align:center;
  padding:45px 24px;
  background:white;
  border:1px dashed #d3dcd7;
  border-radius:10px
}

.empty-state h2 {
  font-size:18px
}

.empty-state p {
  font-size:13px;
  color:var(--muted);
  margin-bottom:0
}

.progress-track {
  height:5px;
  background:#edf0ed;
  border-radius:4px;
  overflow:hidden;
  margin:13px 0 20px
}

.progress-track span {
  display:block;
  height:100%;
  background:var(--accent)
}

.progress-meta {
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:11px;
  color:var(--muted)
}

.card-metric {
  display:flex;
  gap:8px;
  align-items:baseline;
  margin:18px 0
}

.card-metric strong {
  font-size:33px
}

.card-metric span {
  font-size:11px;
  color:var(--muted)
}

.form-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 280px;
  gap:24px;
  align-items:start;
  max-width:1050px
}

.form-section {
  padding:26px;
  border-bottom:1px solid var(--line)
}

.form-section h2 {
  font-size:16px;
  margin-bottom:6px
}

.form-section>.section-help {
  color:var(--muted);
  font-size:12px;
  margin-bottom:23px
}

.form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px
}

.field-full {
  grid-column:1/-1
}

.choice-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}

.choice-card {
  border:1px solid var(--line);
  border-radius:8px;
  padding:20px;
  cursor:pointer;
  display:block;
  background:white
}

.choice-card:has(input:checked) {
  border-color:#d96b43;
  box-shadow:inset 0 0 0 1px #d96b43;
  background:#fff9f4
}

.choice-card strong {
  display:block;
  font-size:14px;
  margin:12px 0 8px
}

.choice-card small {
  display:block;
  font-size:11px;
  line-height:1.7;
  color:var(--muted)
}

.choice-card input {
  accent-color:var(--accent-dark)
}

.choice-price {
  font-size:9px;
  letter-spacing:1px;
  color:var(--accent-dark);
  font-weight:700
}

.special-choices {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px
}

.special-choice {
  border:1px solid #d7deda;
  background:white;
  border-radius:6px;
  padding:9px 14px;
  font-weight:650;
  font-size:12px
}

.special-choice.selected {
  border-color:#d66a44;
  background:#fff3eb;
  color:#a44324
}

.form-sidebar {
  background:#edf0ec;
  padding:25px;
  border:1px solid #dfe5de;
  border-radius:10px
}

.form-sidebar h2 {
  font-size:16px
}

.form-sidebar p,.form-sidebar li {
  font-size:12px;
  line-height:1.9;
  color:#64716f
}

.form-sidebar ol {
  padding-left:17px;
  margin:20px 0
}

.form-submit {
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:center;
  padding:23px 26px
}

.form-submit small {
  font-size:10px;
  color:var(--muted);
  max-width:290px;
  line-height:1.7
}

fieldset {
  min-width:0;
  border:0;
  padding:0;
  margin:0
}

.success-panel {
  border:1px solid #d0e5d5;
  background:#f0f8f1;
  border-radius:10px;
  padding:25px;
  margin-bottom:24px
}

.success-panel h2 {
  font-size:20px;
  color:#2e6742
}

.success-panel p {
  color:#4b7157;
  font-size:13px
}

.admin-controls {
  display:flex;
  gap:16px;
  align-items:end;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom:24px
}

.admin-selects {
  display:flex;
  gap:16px;
  flex:1
}

.admin-selects>div {
  min-width:150px;
  flex:1;
  max-width:340px
}

.admin-selects label {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-bottom:8px;
  font-weight:600
}

.edit-table {
  min-width:1100px
}

.edit-table th {
  padding:14px 10px
}

.edit-table td {
  padding:13px 10px
}

.edit-table input:not([type=checkbox]),.edit-table select {
  width:100%;
  border:1px solid #e1e6e1;
  background:#fcfdfb;
  border-radius:5px;
  padding:8px;
  font-size:11px;
  color:#37464c;
  min-width:50px
}

.edit-table input[type=checkbox] {
  accent-color:var(--accent-dark);
  width:16px;
  height:16px
}

.admin-toggle {
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:32px;
  white-space:nowrap;
  cursor:pointer
}

.edit-table .admin-toggle input[type=checkbox] {
  position:absolute;
  inset:0;
  z-index:1;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:pointer
}

.admin-toggle-track {
  position:relative;
  display:block;
  flex:none;
  width:44px;
  height:24px;
  border-radius:24px;
  background:#d85862;
  transition:background .16s
}

.admin-toggle-track::before {
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:white;
  box-shadow:0 1px 3px #0002;
  transition:transform .16s
}

.admin-toggle input:checked + .admin-toggle-track {
  background:#27864b
}

.admin-toggle input:checked + .admin-toggle-track::before {
  transform:translateX(20px)
}

.admin-toggle input:focus-visible + .admin-toggle-track {
  outline:2px solid var(--ink);
  outline-offset:3px
}

.admin-toggle-text {
  font-size:12px;
  color:var(--ink)
}

.edit-table .admin-toggle input:disabled {
  cursor:not-allowed
}

.admin-toggle input:disabled ~ span {
  opacity:.55
}

.edit-table th:nth-child(1) {
  width:75px
}

.edit-table th:nth-child(2),.edit-table th:nth-child(3) {
  width:135px
}

.edit-table th:nth-child(4) {
  width:65px
}

.row-actions {
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:5px;
  min-width:160px;
  white-space:nowrap
}

.row-actions > button {
  flex-shrink:0
}

.row-actions .crew-delete {
  margin-left:auto
}

.row-actions .crew-save:disabled {
  background:#eef1f0;
  border-color:#d6ddda;
  color:#65736d;
  opacity:1;
  box-shadow:none;
  filter:none
}

.row-alert {
  font-size:10px;
  color:#984535;
  margin:8px 0 0;
  max-width:190px
}

.edit-table tr.is-dirty {
  background:#fffaf3
}

.table-responsive {
  overflow:auto;
  max-width:100%
}

.import-area {
  padding:22px 24px;
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap
}

.import-area label {
  font-size:11px;
  color:var(--muted);
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap
}

.import-area input {
  font-size:11px
}

.connection-banner {
  background:#fff3df;
  border:1px solid #eddbb8;
  color:#80602c;
  border-radius:8px;
  padding:13px 18px;
  margin-bottom:24px;
  font-size:12px
}

.mud-dialog .mud-dialog-title {
  font-weight:700
}

.mud-button {
  font-size:12px!important
}

.mud-snackbar {
  font-size:13px
}

.login-page {
  display:grid;
  place-items:center;
  min-height:100vh;
  padding:24px;
  background:#14191b
}

.login-card {
  max-width:430px;
  width:100%;
  background:#fafbf9;
  border-radius:12px;
  padding:38px
}

.login-card .brand {
  color:var(--ink);
  margin-bottom:32px
}

.login-card h1 {
  font-size:29px
}

.login-card p {
  font-size:13px;
  color:var(--muted);
  line-height:1.6
}

.login-card label {
  display:block;
  margin:20px 0;
  font-size:12px;
  font-weight:650
}

.login-card input {
  display:block;
  box-sizing:border-box;
  width:100%;
  margin-top:8px;
  padding:12px;
  border:1px solid #d1d9d4;
  border-radius:7px
}

.login-card button {
  width:100%;
  margin:6px 0 24px
}

.login-card .error {
  color:#9e392a
}

.login-back {
  font-size:11px
}

.blazor-error-boundary {
  padding:20px;
  background:#fff0e9;
  color:#943e2f;
  border-radius:8px
}

.blazor-error-boundary:after {
  content:"Impossible d’afficher cette partie de la page."
}

#components-reconnect-modal {
  display:none
}

#components-reconnect-modal.components-reconnect-show,#components-reconnect-modal.components-reconnect-retrying,#components-reconnect-modal.components-reconnect-failed,#components-reconnect-modal.components-reconnect-rejected,#components-reconnect-modal.components-reconnect-paused {
  display:grid;
  place-items:center;
  position:fixed;
  inset:0;
  z-index:20000;
  background:#101828aa;
  padding:24px
}

.reconnect-card {
  background:white;
  color:var(--ink);
  max-width:520px;
  padding:32px;
  border-radius:12px;
  box-shadow:0 20px 100px #0003
}

.reconnect-card h2 {
  font-size:23px
}

.reconnect-card p {
  line-height:1.7;
  font-size:13px;
  color:var(--muted)
}

.reconnect-card button {
  padding:10px 16px;
  margin:8px 8px 0 0;
  border:1px solid var(--line);
  background:var(--ink);
  color:white;
  border-radius:6px
}

.reconnect-failed,.reconnect-rejected,#reconnect-retry,#reconnect-reload {
  display:none
}

.components-reconnect-failed .reconnect-failed,.components-reconnect-failed #reconnect-retry,.components-reconnect-rejected .reconnect-rejected,.components-reconnect-rejected #reconnect-reload {
  display:block
}

.components-reconnect-failed .reconnect-wait,.components-reconnect-rejected .reconnect-wait {
  display:none
}

@media(min-width:1500px) {
  .page-content {
    padding:46px 52px
  }
  .app-topbar {
    padding:0 52px
  }
}

@media(max-width:1150px) {
  .app-sidebar {
    width:215px;
    padding:28px 16px
  }
  .app-workspace {
    margin-left:215px
  }
  .brand {
    font-size:16px
  }
  .brand img {
    width:56px;
    height:56px
  }
  .page-content {
    padding:30px
  }
  .app-topbar {
    padding:0 30px
  }
  .card-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .form-layout {
    grid-template-columns:minmax(0,1fr) 230px
  }
  .stats-grid {
    gap:10px
  }
  .stat-card {
    padding:18px
  }
  .hero-band {
    align-items:flex-start
  }
}

@media(max-width:850px) {
  .app-sidebar {
    transform:translateX(-100%);
    width:240px;
    transition:transform .2s
  }
  .menu-open .app-sidebar {
    transform:translateX(0)
  }
  .app-workspace {
    margin-left:0
  }
  .menu-toggle {
    display:inline-flex
  }
  .menu-open .sidebar-backdrop {
    display:block;
    position:fixed;
    inset:0;
    border:0;
    background:#0d181955;
    z-index:99
  }
  .form-layout {
    grid-template-columns:1fr
  }
  .form-sidebar {
    max-width:none
  }
  .page-content {
    padding:28px 24px
  }
  .app-topbar {
    padding:0 24px
  }
  .page-footer {
    margin:0 24px
  }
  .topbar-context {
    font-size:8px;
    letter-spacing:1px
  }
  .hero-band .hero-slash {
    display:none
  }
}

@media(max-width:550px) {
  .page-content {
    padding:26px 18px
  }
  .app-topbar {
    height:66px;
    padding:0 18px
  }
  .topbar-tools {
    gap:9px
  }
  .topbar-tools a {
    font-size:10px
  }
  .topbar-context>span {
    display:none
  }
  .page-heading {
    flex-direction:column;
    gap:15px;
    margin-bottom:25px
  }
  .heading-actions {
    margin-top:0
  }
  .card-grid {
    grid-template-columns:1fr;
    gap:14px
  }
  .hero-band {
    padding:25px;
    flex-direction:column;
    gap:20px
  }
  .hero-band h2 {
    font-size:21px
  }
  .stats-grid {
    grid-template-columns:1fr 1fr;
    gap:10px
  }
  .stat-card {
    padding:16px
  }
  .stat-card strong {
    font-size:28px
  }
  .stat-card small {
    font-size:9px
  }
  .panel-heading,.toolbar {
    padding:19px
  }
  .toolbar-inputs {
    width:100%
  }
  .toolbar .form-select {
    max-width:none
  }
  .search-box {
    min-width:0;
    max-width:none
  }
  .form-section {
    padding:23px 19px
  }
  .form-grid,.choice-grid {
    grid-template-columns:1fr
  }
  .form-submit {
    padding:21px 19px;
    flex-direction:column;
    align-items:stretch
  }
  .form-submit .btn {
    width:100%
  }
  .form-submit small {
    max-width:none
  }
  .admin-selects {
    width:100%;
    flex-wrap:wrap
  }
  .admin-selects>div {
    min-width:100%;
    max-width:none
  }
  .page-footer {
    margin:0 18px;
    flex-direction:column;
    font-size:9px
  }
  .panel-body {
    padding:20px
  }
  .login-card {
    padding:28px
  }
  .status-pill {
    font-size:10px
  }
  .form-sidebar {
    padding:22px
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
    scroll-behavior:auto!important
  }
}

.table-toolbar {
  display:flex;
  align-items:end;
  gap:18px;
  padding:18px 24px;
  border-bottom:1px solid var(--line);
  flex-wrap:wrap
}

.table-toolbar label {
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:11px;
  font-weight:650;
  min-width:170px
}

.table-toolbar label:first-child {
  flex:1;
  max-width:380px
}

.table-toolbar input,.table-toolbar select {
  border:1px solid #d9dfdd;
  background:white;
  padding:10px 12px;
  border-radius:6px;
  font-size:12px;
  font-weight:400
}

.muted {
  color:var(--muted);
  font-size:11px
}

.edit-table tr.row-dirty {
  background:#fffaf3
}

.production-overview {
  padding:20px 24px;
  border-bottom:1px solid var(--line)
}

.production-overview > p {
  margin:0 0 12px;
  font-size:12px;
  font-weight:650
}

.production-overview > p span {
  font-weight:400;
  color:var(--muted)
}

.production-summary {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px
}

.production-metric {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:16px;
  border:1px solid transparent;
  border-radius:8px;
  text-align:left;
  cursor:pointer
}

.production-metric span {
  font-size:12px;
  font-weight:650
}

.production-metric strong {
  font-size:26px;
  line-height:1
}

.production-metric:hover,.production-metric[aria-pressed=true] {
  border-color:currentColor
}

.production-metric:focus-visible {
  outline:2px solid currentColor;
  outline-offset:3px
}

.production-row {
  --production-color:#9ba4a7;
  --production-tint:#fafbfb
}

.production-status-0 {
  --production-color:#b07820;
  --production-tint:#fffaf1
}

.production-status-1 {
  --production-color:#446ba1;
  --production-tint:#f5f8fd
}

.production-status-2 {
  --production-color:#7959a4;
  --production-tint:#f8f6fd
}

.production-status-3 {
  --production-color:#36774b;
  --production-tint:#f2faf4
}

.production-status-5 {
  --production-color:#a35041
}

.edit-table .production-row > td {
  background:var(--production-tint)
}

.edit-table .production-row > td:first-child {
  box-shadow:inset 4px 0 var(--production-color)
}

.production-row-status {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px
}

.production-row-status small,.production-pending {
  color:#936524;
  font-size:11px
}

.production-pending {
  margin:8px 0 0
}

@media(max-width:850px) {
  .production-summary {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}

@media(max-width:550px) {
  .production-overview {
    padding:18px
  }
  .production-overview > p span {
    display:block;
    margin-top:5px
  }
}

.import-area p {
  margin:5px 0 0;
  font-size:11px
}

.import-area strong {
  font-size:12px;
  color:var(--ink)
}

[hidden] {
  display:none!important
}

.login-brand {
  display:block;
  margin-bottom:25px
}

.login-card .eyebrow {
  color:var(--accent-dark);
  font-size:9px
}

.login-card .row-alert {
  color:#984535;
  max-width:none
}

@media(max-width:550px) {
  .table-toolbar {
    padding:18px
  }
  .table-toolbar label {
    width:100%;
    max-width:none!important
  }
  .panel-heading {
    flex-wrap:wrap
  }
}

.btn-primary {
  --bs-btn-disabled-bg:var(--ink);
  --bs-btn-disabled-border-color:var(--ink)
}

.edit-table {
  min-width:1250px
}

.edit-table th:nth-child(5) {
  min-width:155px
}

.edit-table th:nth-child(6) {
  min-width:90px
}

.login-card a[href="/"] {
  font-size:12px
}

.choice-grid input[type=radio],.form-section input[type=radio],.form-section input[type=checkbox] {
  accent-color:var(--accent-dark)
}
/* Keep the published metric neutral despite the framework's .green utility. */
.stat-card.green {
  background: white !important;
}
.toolbar-inputs {
  flex: 1;
  min-width: 0;
}
.toolbar .form-select {
  width: 220px;
}
@media(max-width:550px) {
  .toolbar-inputs .search-box, .toolbar .form-select {
    width: 100%;
    flex-basis: 100%;
  }
}
