:root {
  color-scheme: dark;
  --panel-3: #2a2824;
  --blue: #65a7ff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}

label {
  display: grid;
  color: var(--muted);
  font-weight: 750;
}

.app-shell {
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.32);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  display: grid;
  place-items: center;
  font-weight: 950;
}

.invoice-form-actions {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(160px, 1.3fr);
  gap: 10px;
  margin-top: 14px;
}

.invoice-form-actions .btn {
  width: 100%;
}

.tax-control-panel {
  border-left: 4px solid var(--red);
}

.tax-payment-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tax-payment-form > div {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.tax-payment-form small {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 520px) {
  .tax-payment-form {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-form-actions {
    grid-template-columns: 1fr;
  }
}

.brand-row h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.brand-row p {
  margin: 3px 0 0;
  color: var(--amber-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-box {
  margin: 22px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.86);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-box strong,
.user-box span {
  display: block;
}

.user-box span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 14px;
}

.user-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 157, 22, 0.75);
  background: #111;
}

.user-avatar.initials {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, var(--red), #2b2b2b);
}

.side-nav a,
.logout {
  display: block;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ddd5c8;
  font-weight: 820;
}

.side-nav a:hover {
  color: #fff;
}

.side-nav a.active {
  color: #fff;
  border-left: 5px solid var(--amber);
  padding-left: 9px;
}

.logout {
  margin-top: 18px;
  text-align: center;
}

.logout-form {
  margin: 0;
}

.logout-form .logout {
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--amber);
  font-weight: 900;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-grid article,
.panel,
.login-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.dashboard-grid article {
  min-height: 118px;
  padding: 15px;
  border-left: 4px solid var(--amber);
}

.dashboard-grid span,
.dashboard-grid small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-grid strong {
  display: block;
  line-height: 1;
}

.finance-grid article:nth-child(4) {
  border-left-color: var(--green);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h3 {
  margin: 0;
  color: var(--amber-2);
  font-size: 22px;
}

.panel-head-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.work-layout,
.week-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 16px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid div,
.money-list div,
.doc-grid article {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  padding: 12px;
}

.profile-grid span,
.money-list span,
.doc-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-grid strong,
.money-list strong,
.doc-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 18px;
}

.money-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.pill.green {
  color: var(--green);
  border-color: rgba(86, 194, 113, 0.34);
}

.pill.red {
  color: var(--red);
  border-color: rgba(216, 73, 61, 0.42);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
  cursor: pointer;
}

.btn.primary {
  border: 0;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.invoice-form,
.admin-form,
.expense-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.admin-form {
  margin-top: 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
  min-height: auto;
}

.invoice-total {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  padding: 16px;
  border: 1px solid rgba(255, 153, 0, 0.5);
  border-radius: 6px;
  background: linear-gradient(rgba(31, 23, 10, 0.88), rgba(31, 23, 10, 0.88)),
    repeating-linear-gradient(135deg, rgba(255, 153, 0, 0.34) 0 12px, transparent 12px 24px);
}

.invoice-total span {
  color: var(--amber-2);
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-total strong {
  font-size: 34px;
}

.inline-form {
  display: grid;
  grid-template-columns: 180px 180px minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
}

table {
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

th {
  text-transform: uppercase;
}

.muted,
.empty {
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 22px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-shell {
  position: relative;
  z-index: 2;
}

.login-card h1 {
  margin: 0;
}

.login-form {
  display: grid;
  margin-top: 22px;
}

.alert {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid rgba(216, 73, 61, 0.5);
  border-radius: 6px;
  background: rgba(216, 73, 61, 0.12);
}

.alert.success {
  border-color: rgba(86, 194, 113, 0.52);
  background: rgba(86, 194, 113, 0.13);
}

@media (max-width: 1180px) {
  body::before {
    background-position: center top;
  }

  body::after {
    background: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66)),
      radial-gradient(circle at 78% -12%, rgba(255, 153, 0, 0.16), transparent 30rem),
      radial-gradient(circle at 18% 14%, rgba(216, 73, 61, 0.12), transparent 26rem);
  }

  .dashboard-grid,
  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-layout,
  .week-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body::after {
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.68)),
      radial-gradient(circle at 78% -12%, rgba(255, 153, 0, 0.16), transparent 30rem),
      radial-gradient(circle at 18% 14%, rgba(216, 73, 61, 0.12), transparent 26rem);
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar {
    flex-direction: column;
  }

  .dashboard-grid,
  .invoice-form,
  .expense-form,
  .profile-grid,
  .money-list,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }
}

@media (orientation: portrait) {
  body::before {
    background-position: center top;
  }

  body::after {
    background: linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.7)),
      radial-gradient(circle at 78% -12%, rgba(255, 153, 0, 0.16), transparent 30rem),
      radial-gradient(circle at 18% 14%, rgba(216, 73, 61, 0.12), transparent 26rem);
  }
}

@media (min-aspect-ratio: 18 / 9) {
  body::before {
    background-position: center 42%;
  }

  body::after {
    background: linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.64)),
      radial-gradient(circle at 78% -12%, rgba(255, 153, 0, 0.16), transparent 30rem),
      radial-gradient(circle at 18% 14%, rgba(216, 73, 61, 0.12), transparent 26rem);
  }
}

/* Garage layout and components */

:root {
  --bg: #050506;
  --panel: #171717;
  --panel-2: #202020;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f7f5f0;
  --muted: #b8b2a8;
  --amber: #ff9d16;
  --amber-2: #ffc15a;
  --red: #d51f26;
  --red-2: #8c1218;
  --green: #4fce7b;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}

body::before {
  transform: none;
}

input,
select {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.72);
}

input:focus,
select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(213, 31, 38, 0.18);
}

.sidebar {
  border-right-color: rgba(213, 31, 38, 0.34);
}

.brand-badge {
  color: #fff;
}

.brand-row p,
.eyebrow,
.panel-head h3 {
  color: var(--amber-2);
}

.user-box {
  border-color: rgba(213, 31, 38, 0.34);
  border-left-color: var(--red);
}

.user-box strong {
  color: #fff;
}

.side-nav a.active {
  border-color: rgba(213, 31, 38, 0.38);
  border-left-color: var(--red);
  background: linear-gradient(90deg, rgba(213, 31, 38, 0.26), rgba(255, 255, 255, 0.04));
}

.side-nav a:hover {
  border-color: rgba(213, 31, 38, 0.38);
  background: rgba(213, 31, 38, 0.13);
}

.logout {
  color: #fff;
  border-color: rgba(213, 31, 38, 0.42);
  background: rgba(213, 31, 38, 0.08);
}

.top-context {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.top-context strong {
  color: #fff;
}

.top-context span {
  color: var(--muted);
  font-size: 14px;
}

.dashboard-grid article,
.panel,
.login-card {
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.94), rgba(12, 12, 12, 0.97));
}

.dashboard-grid article {
  border-left-color: var(--red);
}

.finance-grid article:nth-child(4),
.dashboard-grid article:nth-child(3) {
  border-left-color: var(--green);
}

.btn.primary {
  color: #fff;
}

.btn.danger {
  color: #fff;
  background: rgba(213, 31, 38, 0.2);
  border-color: rgba(213, 31, 38, 0.6);
}

.actions .btn {
  flex: 1 1 190px;
  min-height: 58px;
  font-size: 16px;
}

.invoice-board {
  margin-bottom: 16px;
}

.invoice-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  gap: 16px;
  align-items: start;
}

.invoice-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.invoice-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  border-left: 5px solid var(--red);
}

.invoice-hero h3 {
  margin: 0;
  font-size: 28px;
}

.invoice-section {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.96), rgba(12, 12, 12, 0.96));
  box-shadow: var(--shadow);
}

.invoice-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  border-left: 5px solid var(--red);
  background: linear-gradient(90deg, rgba(213, 31, 38, 0.2), rgba(255, 255, 255, 0.03));
}

.invoice-section summary::after {
  content: "+";
  color: var(--amber-2);
  font-size: 24px;
}

.invoice-section[open] summary::after {
  content: "-";
}

.form-grid,
.team-create-form,
.admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 16px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.custom-groups {
  display: grid;
  gap: 14px;
}

.custom-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.custom-group h4 {
  margin: 0;
  padding: 12px 14px;
  color: var(--amber-2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 16px;
}

.custom-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.custom-line span,
.product-card span {
  color: #fff;
  font-weight: 850;
}

.custom-line input {
  text-align: right;
}

.product-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.product-card small {
  color: var(--amber-2);
  font-weight: 900;
}

.product-card input {
  align-self: end;
  text-align: center;
}

.invoice-summary {
  position: sticky;
  top: 16px;
}

.summary-card {
  padding: 18px;
  border: 1px solid rgba(213, 31, 38, 0.44);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(33, 18, 18, 0.96), rgba(9, 9, 9, 0.98)),
    repeating-linear-gradient(135deg, rgba(213, 31, 38, 0.2) 0 12px, transparent 12px 24px);
  box-shadow: var(--shadow);
}

.summary-card > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-card > strong {
  display: block;
  margin: 10px 0 16px;
  color: #fff;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
}

.summary-lines {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.summary-lines div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-lines span {
  color: var(--muted);
}

.invoice-submit {
  width: 100%;
  min-height: 56px;
  font-size: 16px;
}

.doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
}

.profile-layout {
  display: grid;
  gap: 16px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 180px;
  border-left: 5px solid var(--red);
}

.profile-preview {
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid rgba(213, 31, 38, 0.72);
  background: linear-gradient(135deg, #161616, #080808);
  box-shadow: 0 0 26px rgba(213, 31, 38, 0.22);
}

.profile-preview img,
.profile-preview span {
  width: 100%;
  height: 100%;
}

.profile-preview img {
  display: block;
  object-fit: cover;
}

.profile-preview span {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 34px;
  font-weight: 950;
}

.profile-card h3 {
  margin: 0;
  font-size: 28px;
}

.profile-card p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.profile-form {
  display: grid;
  gap: 13px;
}

.file-drop {
  min-height: 102px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.admin-form label {
  grid-column: auto;
}

.admin-form .btn,
.team-create-form .btn {
  align-self: end;
  min-height: 42px;
}

.team-create-panel {
  border-left: 5px solid var(--red);
}

.doc-links,
.row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.doc-links a,
.doc-links span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.doc-links a {
  color: #fff;
  background: rgba(213, 31, 38, 0.22);
  border: 1px solid rgba(213, 31, 38, 0.45);
}

.doc-links span {
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.week-visual {
  border-left: 5px solid var(--red);
}

.week-bars {
  display: grid;
  gap: 12px;
}

.week-bar-row {
  display: grid;
  grid-template-columns: 170px minmax(120px, 1fr) 130px;
  align-items: center;
  gap: 12px;
}

.week-bar-row span {
  color: var(--muted);
  font-weight: 850;
}

.week-bar-row strong {
  text-align: right;
}

.week-bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.week-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.week-bar-track .green {
  background: linear-gradient(90deg, #28a75a, var(--green));
}

.week-bar-track .red {
  background: linear-gradient(90deg, var(--red-2), var(--red));
}

.week-bar-track .amber {
  background: linear-gradient(90deg, #b86700, var(--amber));
}

.login-card {
  border-top-color: var(--red);
}

@media (max-width: 1180px) {
  .invoice-workspace {
    grid-template-columns: 1fr;
  }

  .invoice-summary {
    position: sticky;
    bottom: 0;
    top: auto;
    z-index: 4;
  }
}

@media (max-width: 900px) {
  .form-grid,
  .team-create-form,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .summary-card {
    border-radius: 8px 8px 0 0;
  }

  .week-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .week-bar-row strong {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .topbar,
  .invoice-hero,
  .panel-head,
  .doc-card,
  .profile-card {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-head-meta {
    justify-content: flex-start;
  }

  .custom-line {
    grid-template-columns: 1fr;
  }

  .summary-card > strong {
    font-size: 34px;
  }
}

/* Cloture anticipee des paies du dimanche */

.pill.amber {
  color: var(--amber-2);
  border-color: rgba(255, 190, 70, 0.38);
  background: rgba(255, 190, 70, 0.08);
}

.payroll-closure-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 190, 70, 0.34);
  border-left: 4px solid var(--amber);
  border-radius: 7px;
  background: rgba(30, 23, 10, 0.94);
  box-shadow: var(--shadow);
}

.payroll-closure-banner > div,
.payroll-closure-control > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.payroll-closure-banner strong,
.payroll-closure-control strong {
  color: var(--amber-2);
}

.payroll-closure-banner span,
.payroll-closure-control span {
  color: var(--muted);
  line-height: 1.4;
}

.payroll-closure-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 190, 70, 0.24);
  border-radius: 7px;
  background: rgba(255, 190, 70, 0.055);
}

.payroll-closure-control.is-closed {
  border-color: rgba(86, 194, 113, 0.3);
  background: rgba(86, 194, 113, 0.065);
}

.payroll-closure-control.is-closed strong {
  color: var(--green);
}

.payroll-closure-control form {
  flex: 0 0 auto;
  margin: 0;
}

.payroll-closure-dialog {
  width: min(650px, calc(100vw - 32px));
}

@media (max-width: 720px) {
  .payroll-closure-banner,
  .payroll-closure-control {
    align-items: stretch;
    flex-direction: column;
  }

  .payroll-closure-control form,
  .payroll-closure-control .btn {
    width: 100%;
  }
}

/* Workshop and invoice components */

.sidebar > * {
  position: relative;
  z-index: 1;
}

.employee-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.time-clock-card {
  position: relative;
  overflow: hidden;
  border-left: 5px solid var(--red);
}

.time-clock-card::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: -78px;
  width: 190px;
  height: 190px;
  border: 24px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
}

.clock-face {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  min-height: 150px;
  margin-bottom: 14px;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 20% 20%, rgba(255, 157, 22, 0.14), transparent 11rem),
    linear-gradient(135deg, rgba(213, 31, 38, 0.22), rgba(0, 0, 0, 0.36));
}

.clock-face span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.clock-face strong {
  color: #fff;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
}

.clock-face small {
  color: var(--muted);
  font-weight: 750;
}

.service-actions {
  position: relative;
  z-index: 1;
}

.form-note {
  border: 1px solid rgba(255, 157, 22, 0.2);
  color: var(--muted);
  background: rgba(255, 157, 22, 0.06);
  font-weight: 750;
}

.custom-head {
  background: rgba(255, 255, 255, 0.035);
}

.custom-head span {
  color: var(--amber-2);
}

.service-grid {
  display: grid;
  gap: 10px;
}

.service-card b {
  color: var(--amber-2);
  font-size: 18px;
}

.week-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.week-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.week-hero::after {
  content: "";
  position: absolute;
  inset: 0;
}

.week-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 12px;
}

.week-hero h3 {
  margin: 0;
  line-height: 0.95;
}

.garage-cards article {
  min-height: 142px;
  border-radius: 12px;
  border-left-width: 5px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.garage-cards article:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 157, 22, 0.32);
}

.garage-visual {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.94), rgba(10, 10, 10, 0.97)),
    repeating-linear-gradient(135deg, rgba(255, 157, 22, 0.04) 0 12px, transparent 12px 24px);
}

textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 10, 10, 0.72);
  padding: 11px;
  font: inherit;
}

textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(213, 31, 38, 0.18);
  outline: none;
}

@media (max-width: 1180px) {
  .employee-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .employee-kpis,
  .service-grid,
  .service-grid.compact {
    grid-template-columns: 1fr;
  }

  .week-hero {
    min-height: 260px;
  }
}

/* Accounts, documents, tutorial and invoice clock */

.brand-badge {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  font-size: 26px;
  line-height: 1;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.atelier-week-nav {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 2px 0 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.atelier-week-nav .week-chip {
  flex: 0 0 104px;
}

.documents-kpi.doc-danger {
  border-color: rgba(232, 38, 49, 0.78);
}

.documents-kpi.doc-warning {
  border-color: rgba(255, 157, 22, 0.78);
}

.documents-kpi.doc-complete {
  border-color: rgba(39, 190, 108, 0.82);
}

.documents-kpi small {
  max-width: 100%;
  line-height: 1.35;
}

.document-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 7px;
}

.document-alert.doc-danger {
  border-color: rgba(232, 38, 49, 0.62);
  background: rgba(114, 8, 15, 0.34);
}

.document-alert.doc-warning {
  border-color: rgba(255, 157, 22, 0.62);
  background: rgba(113, 63, 0, 0.3);
}

.document-alert.doc-complete {
  border-color: rgba(39, 190, 108, 0.62);
  background: rgba(8, 91, 46, 0.28);
}

.document-alert span {
  color: #e2ddd5;
  text-align: right;
}

.invoice-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-left: 5px solid var(--red);
}

.invoice-clock-copy,
.invoice-clock-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.invoice-clock-copy div {
  display: grid;
  gap: 3px;
}

.invoice-clock-copy small {
  color: var(--muted);
}

.invoice-clock-actions .btn {
  min-height: 42px;
}

.team-status-card.is-you {
  border-color: rgba(255, 157, 22, 0.68);
  box-shadow: inset 4px 0 0 var(--amber), 0 12px 30px rgba(0, 0, 0, 0.22);
}

.tutorial-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 176px;
  border-left: 6px solid var(--red);
  background: linear-gradient(90deg, rgba(11, 11, 11, 0.96), rgba(11, 11, 11, 0.58)),
    url("garage-workshop-bg.png") center 52% / cover;
}

.tutorial-hero h3 {
  margin: 2px 0 8px;
  font-size: clamp(28px, 4vw, 48px);
}

.tutorial-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: #d3cdc3;
}

.tutorial-car {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  font-size: 38px;
}

.tutorial-grid {
  display: grid;
  margin-bottom: 14px;
}

.tutorial-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--red);
  background: linear-gradient(180deg, rgba(27, 27, 27, 0.9), rgba(7, 7, 7, 0.94));
}

.tutorial-number {
  color: var(--amber);
  font-size: 28px;
  font-weight: 950;
}

.tutorial-card h3 {
  margin: 18px 0 8px;
  font-size: 20px;
}

.tutorial-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tutorial-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tutorial-payment-card.immediate {
  border-left: 5px solid #27be6c;
}

.tutorial-payment-card.deferred {
  border-left: 5px solid var(--amber);
}

.partner-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.partner-name-list span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #f0ebe3;
  background: rgba(255, 255, 255, 0.045);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .tutorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .invoice-clock,
  .invoice-clock-copy,
  .invoice-clock-actions,
  .document-alert,
  .tutorial-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-clock-actions .btn {
    flex: 1 1 0;
  }

  .document-alert span {
    text-align: left;
  }

  .tutorial-grid,
  .tutorial-payment-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-card {
    min-height: 0;
  }
}

/* Application surfaces and responsive layouts */

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  border-radius: 8px;
  border-left: 4px solid transparent;
  background: rgba(255, 255, 255, 0.035);
}

.side-nav a.active,
.side-nav a:hover {
  border-left-color: var(--red);
  background: linear-gradient(90deg, rgba(214, 29, 38, 0.26), rgba(255, 157, 22, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.tool-avatar {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(214, 29, 38, 0.95), rgba(105, 10, 15, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.16) 0 6px, transparent 6px 12px);
}

.tool-metal-mark {
  display: grid;
  place-items: center;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.35), transparent 35%),
    #4b4b4b;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: inset 0 1px 8px rgba(255, 255, 255, 0.18), inset 0 -8px 18px rgba(0, 0, 0, 0.38);
}

.invoice-service-layout {
  display: grid;
  grid-template-columns: minmax(330px, 1.15fr) minmax(260px, 0.95fr) minmax(240px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.invoice-column {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.98), rgba(10, 10, 10, 0.98)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 14px);
  box-shadow: var(--shadow);
}

.invoice-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 14px;
  border-left: 5px solid var(--red);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(214, 29, 38, 0.24), rgba(255, 157, 22, 0.07));
}

.invoice-column-head h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.invoice-column-head span {
  color: var(--amber-2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.custom-groups {
  padding: 12px;
}

.custom-group {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.custom-group + .custom-group {
  margin-top: 10px;
}

.custom-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  color: var(--amber-2);
  cursor: pointer;
  font-weight: 950;
}

.custom-group summary::after {
  content: "+";
  color: var(--red-2);
  font-size: 20px;
}

.custom-group[open] summary::after {
  content: "-";
}

.custom-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.service-grid {
  grid-template-columns: 1fr;
  padding: 12px;
}

.service-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card {
  min-height: 116px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.service-card input {
  min-height: 40px;
}

.week-hero {
  border-radius: 14px;
}

.week-buttons {
  display: flex;
  flex-wrap: wrap;
}

.week-chip {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}

.week-chip strong {
  color: var(--amber-2);
  font-size: 17px;
}

.week-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.team-person strong {
  color: #fff;
  font-size: 15px;
}

.team-avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 157, 22, 0.72);
  object-fit: cover;
  box-shadow: 0 0 18px rgba(214, 29, 38, 0.22);
}

.doc-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
}

.doc-state {
  justify-content: center;
  text-align: center;
  border-radius: 8px !important;
}

.doc-state.ok {
  color: #dbffe4;
  border: 1px solid rgba(86, 194, 113, 0.52);
  background: rgba(86, 194, 113, 0.18);
}

.doc-state.missing {
  color: #ffe1df;
  border: 1px solid rgba(216, 73, 61, 0.55);
  background: rgba(216, 73, 61, 0.18);
}

@media (max-width: 1350px) {
  .invoice-service-layout {
    grid-template-columns: minmax(300px, 1fr) minmax(260px, 1fr);
  }

  .custom-column {
    grid-row: span 2;
  }
}

@media (max-width: 980px) {
  .invoice-service-layout,
  .service-grid.compact,
  .doc-links {
    grid-template-columns: 1fr;
  }

  .custom-column {
    grid-row: auto;
  }

  .week-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .week-buttons {
    grid-template-columns: 1fr;
  }

  .team-person {
    min-width: 0;
  }
}

/* Garage identity and operational controls */

.main {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(0, 0, 0, 0.12)),
    radial-gradient(ellipse at top right, rgba(20, 178, 210, 0.055), transparent 34rem);
}

.salary-card {
  position: relative;
}

.pay-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  margin-top: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.pay-state.paid {
  color: #dfffe8;
  border: 1px solid rgba(86, 194, 113, 0.68);
  background: rgba(86, 194, 113, 0.18);
}

.pay-state.unpaid {
  color: #ffe1df;
  border: 1px solid rgba(216, 73, 61, 0.72);
  background: rgba(216, 73, 61, 0.18);
}

.invoice-column > summary,
.custom-group > summary,
.service-group > summary {
  list-style: none;
}

.invoice-column > summary::-webkit-details-marker,
.custom-group > summary::-webkit-details-marker,
.service-group > summary::-webkit-details-marker {
  display: none;
}

.invoice-column > .invoice-column-head {
  cursor: pointer;
}

.invoice-column > .invoice-column-head::after {
  content: "+";
  color: var(--amber-2);
  font-size: 24px;
  font-weight: 950;
}

.invoice-column[open] > .invoice-column-head::after {
  content: "-";
}

.invoice-column-head.static::after {
  content: none;
}

.service-groups {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.service-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.service-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  color: var(--amber-2);
  cursor: pointer;
  font-weight: 950;
}

.service-group > summary::after {
  content: "+";
  color: var(--red-2);
  font-size: 20px;
}

.service-group[open] > summary::after {
  content: "-";
}

.service-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.service-line strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.service-line small {
  display: block;
  margin-top: 4px;
  color: var(--amber-2);
  font-weight: 900;
}

.service-line input {
  text-align: center;
}

.service-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.partner-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(145px, 0.5fr) minmax(130px, 0.35fr) minmax(240px, 1.2fr);
  gap: 9px;
}

.partner-row textarea {
  min-height: 58px;
  resize: vertical;
}

.partner-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.percent-field {
  position: relative;
  display: block;
}

.percent-field input {
  padding-right: 34px;
}

.percent-field span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 900;
}

.contract-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-width: 230px;
}

.contract-actions form {
  margin: 0;
}

@media (max-width: 720px) {
  .partner-row {
    grid-template-columns: 1fr;
  }

  .partner-head {
    display: none;
  }

  .service-line {
    grid-template-columns: 1fr;
  }
}

/* Sidebar, accounts and administrative documents */

.panel,
.dashboard-grid article,
.login-card {
  background: linear-gradient(180deg, rgba(29, 29, 29, 0.9), rgba(8, 8, 8, 0.94)),
    rgba(12, 12, 12, 0.88);
  backdrop-filter: blur(8px);
}

.topbar {
  backdrop-filter: blur(8px);
}

.week-layout {
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.05fr);
}

.week-layout .run-panel {
  grid-column: 1 / -1;
}

.run-form {
  display: grid;
  gap: 13px;
  align-items: end;
}

.run-form .form-note {
  margin: 0;
}

.salary-state-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.payment-date {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.invoice-detail-row {
  min-width: 210px;
}

.invoice-detail-row summary {
  cursor: pointer;
  color: #fff;
  font-weight: 950;
  list-style: none;
}

.invoice-detail-row summary::-webkit-details-marker {
  display: none;
}

.invoice-detail-row summary::after {
  content: " +";
  color: var(--amber-2);
}

.invoice-detail-row[open] summary::after {
  content: " -";
}

.invoice-detail-list {
  display: grid;
  gap: 8px;
  min-width: min(460px, 72vw);
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
}

.invoice-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.invoice-detail-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.invoice-detail-list span {
  color: #fff;
  font-weight: 800;
}

.invoice-detail-list b {
  color: var(--amber-2);
  white-space: nowrap;
}

.sale-editor-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(92vh, 980px);
  padding: 0;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(235, 38, 49, 0.55);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.78);
}

.sale-editor-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}

.invoice-shift-dialog {
  width: min(650px, calc(100vw - 32px));
}

.invoice-shift-content {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.invoice-shift-body {
  display: grid;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
  line-height: 1.6;
}

.invoice-shift-body p {
  margin: 0;
}

.invoice-shift-body strong {
  color: var(--amber-2);
}

.invoice-shift-footer {
  justify-content: flex-end;
}

.sale-editor-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(92vh, 980px);
}

.sale-editor-header,
.sale-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: #171717;
}

.sale-editor-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 5px 0 0 var(--red);
}

.sale-editor-header h3,
.sale-editor-section h4 {
  margin: 0;
}

.dialog-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: #090909;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.sale-editor-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 24px;
  overflow-y: auto;
  background: linear-gradient(rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.94)),
    url("garage-workshop-bg.png") center / cover fixed;
}

.sale-editor-section {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(15, 15, 15, 0.92);
}

.sale-editor-section h4 {
  margin-bottom: 13px;
  color: var(--amber-2);
  font-size: 17px;
}

.sale-editor-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.sale-editor-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
}

.sale-editor-group summary {
  padding: 11px 13px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.sale-editor-lines {
  display: grid;
  padding: 0 10px 10px;
}

.sale-editor-lines label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 105px;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 7px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sale-editor-lines label > span {
  color: #f1f1f1;
  font-weight: 750;
}

.sale-editor-lines small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.legacy-editor-list {
  display: grid;
  gap: 9px;
}

.legacy-editor-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(100px, 0.32fr)) 36px;
  gap: 9px;
  align-items: end;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
}

.legacy-editor-row.is-removed {
  opacity: 0.48;
  border-color: rgba(216, 73, 61, 0.48);
}

.legacy-editor-row.is-removed label {
  text-decoration: line-through;
}

.legacy-line-toggle {
  width: 36px;
  height: 36px;
  align-self: end;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(216, 73, 61, 0.58);
  border-radius: 50%;
  background: rgba(216, 73, 61, 0.16);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.legacy-line-toggle[aria-pressed="true"] {
  color: var(--green);
  border-color: rgba(86, 194, 113, 0.58);
  background: rgba(86, 194, 113, 0.12);
  transform: rotate(45deg);
}

.sale-editor-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sale-editor-footer > div:first-child {
  display: grid;
  gap: 2px;
}

.sale-editor-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sale-editor-footer strong {
  color: #fff;
  font-size: 25px;
}

.sale-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .sale-editor-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .sale-editor-form {
    max-height: calc(100dvh - 16px);
  }

  .sale-editor-header,
  .sale-editor-footer {
    padding: 14px;
  }

  .sale-editor-body {
    padding: 12px;
  }

  .sale-editor-groups,
  .legacy-editor-row {
    grid-template-columns: 1fr;
  }

  .sale-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .sale-editor-actions,
  .sale-editor-actions .btn {
    width: 100%;
  }
}

.former-team-panel > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 15px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.former-team-panel > details[open] > summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bank-delete-form {
  display: inline-flex;
}

.file-drop {
  position: relative;
  gap: 10px;
  color: #fff;
  border-color: rgba(255, 157, 22, 0.34);
  background: linear-gradient(135deg, rgba(214, 29, 38, 0.12), rgba(255, 157, 22, 0.06)),
    rgba(0, 0, 0, 0.24);
}

input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.42);
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #e7232b, #8f1118);
  padding: 6px 11px;
  font-weight: 900;
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
  min-height: 30px;
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #e7232b, #8f1118);
  padding: 6px 11px;
  font-weight: 900;
  cursor: pointer;
}

.material-column {
  grid-column: 1 / -1;
}

.material-column:not([open]) {
  max-width: 100%;
}

.team-create-form,
.expense-form,
.partner-row {
  align-items: end;
}

@media (max-width: 900px) {
  .week-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .bank-actions,
  .salary-state-form {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-actions .btn,
  .salary-state-form .btn {
    width: 100%;
  }
}

/* Sidebar and background */

body {
  background: #030303;
}

body::before {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.sidebar {
  background-size: cover;
  background-position: 49% top;
  background-repeat: no-repeat;
}

.side-nav a,
.logout,
.user-box {
  backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
  body::before {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.5;
  }

  .sidebar {
    background-size: cover;
    background-position: 50% top;
  }
}

/* Week dashboard and default profile */

.week-hero {
  border-left: 6px solid var(--red);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.36) 58%, rgba(0, 0, 0, 0.68)),
    linear-gradient(180deg, rgba(97, 7, 14, 0.26), rgba(0, 0, 0, 0.48)),
    url("garage-workshop-bg.png");
  background-size: cover;
  background-position: center 47%;
  background-repeat: no-repeat;
}

.week-hero::after {
  background: radial-gradient(circle at 82% 12%, rgba(20, 178, 210, 0.16), transparent 20rem),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.24));
}

.week-hero-content {
  min-height: inherit;
  max-width: 1180px;
  padding: clamp(24px, 3.2vw, 44px);
}

.week-hero h3 {
  max-width: 980px;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.58);
}

.week-chip {
  min-width: 112px;
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.78), rgba(6, 6, 6, 0.76));
  backdrop-filter: blur(5px);
}

.week-chip.active,
.week-chip:hover {
  border-color: rgba(214, 29, 38, 0.8);
  background: linear-gradient(135deg, rgba(214, 29, 38, 0.52), rgba(10, 10, 10, 0.72));
}

.tool-metal-mark {
  font-size: 0;
}

.tool-metal-mark::before {
  content: "\1F527";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 24px;
  line-height: 1;
  transform: rotate(-18deg);
  filter: grayscale(0.35) saturate(0.85) contrast(1.08);
}

.profile-preview .tool-metal-mark::before {
  font-size: 48px;
}

@media (max-width: 700px) {
  .week-hero {
    min-height: 240px;
    background-position: center center;
  }
}

/* Workshop background and weekly presence */

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  width: 292px;
  min-width: 292px;
  max-width: 292px;
}

.main {
  width: 100%;
  max-width: 100%;
}

.finance-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.presence-week-panel {
  border-left: 5px solid var(--red);
}

.presence-week-panel strong {
  color: #fff;
}

@media (max-width: 1180px) {
  .finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .finance-grid {
    grid-template-columns: 1fr;
  }
}

/* Navigation layout */

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) !important;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

.sidebar {
  box-sizing: border-box;
  inline-size: 292px !important;
  min-inline-size: 292px !important;
  max-inline-size: 292px !important;
  align-self: stretch;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(60, 4, 7, 0.5), rgba(4, 4, 5, 0.7) 34%, rgba(7, 5, 5, 0.86)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.6)),
    url("bennys-paleto-bg.png") center / cover;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-right: 1px solid rgba(255, 157, 22, 0.2);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.36)),
    linear-gradient(90deg, rgba(209, 31, 38, 0.18), transparent 42%);
}

.sidebar > * {
  max-width: 100%;
}

.brand-row,
.user-box,
.side-nav,
.side-nav a,
.logout {
  width: 100%;
}

.main {
  min-width: 0;
  overflow-x: hidden;
}

body::before {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.14) 48%, rgba(0, 0, 0, 0.46)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.46)),
    url("garage-workshop-bg.png") center / cover;
}

.panel,
.dashboard-grid article,
.login-card,
.topbar {
  background: linear-gradient(180deg, rgba(27, 27, 27, 0.74), rgba(7, 7, 7, 0.82)),
    rgba(10, 10, 10, 0.62);
  backdrop-filter: blur(8px);
}

.week-hero,
.week-visual {
  background: linear-gradient(90deg, rgba(15, 5, 5, 0.78), rgba(8, 8, 8, 0.44)),
    url("garage-workshop-bg.png") center / cover;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
    max-width: 100%;
    overflow-x: hidden;
  }

  .sidebar {
    position: relative;
    inline-size: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: none !important;
    min-height: auto;
  }
}

/* Sidebar fixed on desktop + compact workshop team cards */

@media (min-width: 901px) {
  .app-shell {
    display: block !important;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding-left: 292px;
    overflow: visible;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
  }

  .main {
    width: 100%;
    max-width: none;
  }

  @media (max-height: 760px) {
    .sidebar {
      overflow-y: auto;
    }
  }
}

.side-logo-art {
  display: block;
  width: min(150px, 64%);
  height: auto;
  margin: auto auto 14px;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.58));
  opacity: 0.92;
}

.team-status-panel {
  border-left: 5px solid var(--red);
}

.team-status-grid {
  display: grid;
}

.team-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "identity state"
    "phone time";
  gap: 8px 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid rgba(213, 31, 38, 0.72);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.34);
}

.team-status-card.online {
  border-left-color: var(--green);
  background: radial-gradient(circle at 92% 12%, rgba(86, 194, 113, 0.18), transparent 7rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.34);
}

.team-status-card > div {
  grid-area: identity;
  min-width: 0;
}

.team-status-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-status-card div span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-status-card a {
  grid-area: phone;
  overflow: hidden;
  color: var(--amber-2);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-status-card em {
  grid-area: time;
  justify-self: end;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
}

.team-status-card .pill {
  grid-area: state;
  justify-self: end;
  min-height: 24px;
  padding: 4px 7px;
  font-size: 10px;
}

.team-service-toggle {
  grid-area: state;
  justify-self: end;
  margin: 0;
}

.team-service-toggle .pill {
  border: 1px solid currentColor;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: filter 160ms ease, transform 160ms ease;
}

.team-service-toggle .pill:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
}

.team-service-toggle .pill:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.run-form {
  grid-template-columns: minmax(220px, 0.6fr) minmax(260px, 1fr) auto;
}

.partner-row {
  align-items: center;
}

@media (max-width: 1180px) {
  .run-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .team-status-grid {
    grid-template-columns: 1fr;
  }

  .side-logo-art {
    display: none;
  }
}

/* Keep all ten week selectors on one compact line at every width. */

.week-buttons {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100%;
  max-width: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(213, 31, 38, 0.72) rgba(0, 0, 0, 0.28);
}

.week-buttons .week-chip {
  flex: 0 0 104px;
  min-width: 104px;
}

/* Societe: chiffres partages et remunerations en lecture seule. */

.society-hero {
  border-left: 5px solid var(--red);
}

.society-finance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.society-finance-grid article {
  min-height: 126px;
}

.society-finance-grid article.tone-income {
  border-left-color: var(--green);
}

.society-finance-grid article.tone-expense {
  border-left-color: var(--red);
}

.society-finance-grid article.tone-salary {
  border-left-color: var(--amber);
}

.society-payroll-section {
  margin-top: 22px;
}

.society-payroll-group + .society-payroll-group {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(216, 73, 61, 0.42);
}

.society-payroll-group.former .society-section-head {
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  background: linear-gradient(90deg, rgba(216, 73, 61, 0.16), rgba(0, 0, 0, 0));
}

.society-payroll-group.former .society-section-head h3 {
  color: var(--amber-2);
}

.society-salary-empty {
  grid-column: 1 / -1;
  margin: 0;
}

.society-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.society-section-head h3 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 25px;
}

.society-salary-grid {
  display: grid;
}

.society-salary-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 4px solid rgba(213, 31, 38, 0.78);
  background: linear-gradient(145deg, rgba(34, 34, 34, 0.88), rgba(7, 7, 7, 0.92)),
    rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(8px);
}

.society-salary-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.society-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.society-person > div {
  min-width: 0;
}

.society-person strong,
.society-person span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.society-person strong {
  color: #fff;
  font-size: 15px;
}

.society-person span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.society-salary-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.society-salary-values > div {
  min-width: 0;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.society-salary-values span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.society-salary-values strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

.society-salary-values .salary-total strong {
  color: var(--amber-2);
}

@media (max-width: 1180px) {
  .society-finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .society-finance-grid,
  .society-salary-grid {
    grid-template-columns: 1fr;
  }

  .society-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Partner management: active companies stay editable without touching history. */

.partner-management {
  display: grid;
  gap: 16px;
}

.partner-management-head,
.partner-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.partner-management-head h3 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 28px;
}

.partner-active-grid {
  display: grid;
}

.partner-edit-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(32, 32, 32, 0.9), rgba(7, 7, 7, 0.94)),
    rgba(8, 8, 8, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.partner-delete {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #ff8d88;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.partner-delete input {
  width: 17px;
  height: 17px;
  accent-color: var(--red);
}

.partner-card-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, 0.72fr) minmax(120px, 0.45fr);
}

.partner-card-fields > label {
  min-width: 0;
}

.partner-card-fields .partner-address {
  grid-column: 1 / -1;
}

.partner-card-fields textarea {
  min-height: 82px;
  resize: vertical;
}

.partner-add-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(4, 4, 4, 0.76);
  box-shadow: var(--shadow);
}

.partner-add-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 0 15px;
  color: #fff;
  background: linear-gradient(90deg, rgba(213, 31, 38, 0.22), rgba(255, 157, 22, 0.06));
  cursor: pointer;
  list-style: none;
}

.partner-add-panel summary::-webkit-details-marker {
  display: none;
}

.partner-add-panel summary span {
  font-size: 16px;
  font-weight: 950;
}

.partner-add-panel summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.partner-add-panel[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.partner-add-list {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.partner-save-bar {
  padding: 13px 15px;
  border: 1px solid rgba(255, 157, 22, 0.18);
  border-radius: 10px;
  background: rgba(8, 8, 8, 0.84);
}

.partner-save-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.partner-empty {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .partner-active-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .partner-card-fields,
  .partner-row {
    grid-template-columns: 1fr;
  }

  .partner-card-fields .partner-address {
    grid-column: auto;
  }

  .partner-management-head,
  .partner-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .partner-save-bar .btn {
    width: 100%;
  }
}

/* Direction-only remuneration configuration. */

.configuration-page,
.configuration-form {
  display: grid;
}

.configuration-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(100deg, rgba(10, 10, 10, 0.96) 0%, rgba(21, 7, 8, 0.88) 58%, rgba(93, 13, 18, 0.48) 100%),
    url('garage-workshop-bg.png') center 45% / cover no-repeat;
  box-shadow: var(--shadow);
}

.configuration-hero h3 {
  margin: 3px 0 8px;
  color: #fff;
}

.configuration-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.configuration-access {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(255, 193, 90, 0.28);
  border-radius: 6px;
  color: var(--amber-2);
  background: rgba(10, 10, 10, 0.72);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.config-section {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.config-prime-section {
  border-left: 4px solid var(--amber);
  background: linear-gradient(105deg, rgba(45, 25, 5, 0.45), rgba(8, 8, 8, 0.9) 42%),
    rgba(8, 8, 8, 0.86);
}

.config-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.config-section-heading h3 {
  margin: 3px 0 6px;
  color: #fff;
  font-size: 22px;
}

.config-section-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.config-switch {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.44);
  cursor: pointer;
}

.config-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.config-switch-track {
  position: relative;
  width: 46px;
  height: 25px;
  flex: 0 0 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: #242424;
  transition: background 160ms ease, border-color 160ms ease;
}

.config-switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8d8d8d;
  transition: transform 160ms ease, background 160ms ease;
}

.config-switch input:checked + .config-switch-track {
  border-color: rgba(86, 194, 113, 0.5);
  background: rgba(38, 125, 62, 0.7);
}

.config-switch input:checked + .config-switch-track span {
  transform: translateX(21px);
  background: #fff;
}

.config-switch input:focus-visible + .config-switch-track {
  outline: 3px solid rgba(255, 193, 90, 0.28);
  outline-offset: 3px;
}

.config-switch strong {
  color: #fff;
  font-size: 13px;
}

.grade-rate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.grade-rate-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto 104px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: linear-gradient(100deg, rgba(28, 28, 28, 0.82), rgba(9, 9, 9, 0.92));
}

.grade-rate-identity {
  min-width: 0;
}

.grade-rate-identity strong,
.grade-rate-identity small {
  display: block;
}

.grade-rate-identity strong {
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grade-rate-identity small,
.grade-rate-rule {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.grade-rate-identity small {
  margin-top: 4px;
}

.grade-rate-field {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 193, 90, 0.25);
  border-radius: 6px;
  background: #070707;
}

.grade-rate-field input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 7px;
  border: 0;
  color: #fff;
  background: transparent;
  font-weight: 950;
  text-align: right;
}

.grade-rate-field input:focus {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 193, 90, 0.4);
}

.grade-rate-field b {
  color: var(--amber-2);
  font-size: 12px;
}

.configuration-save-bar {
  position: sticky;
  z-index: 5;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(216, 73, 61, 0.32);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
}

.configuration-save-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .grade-rate-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .configuration-hero,
  .config-section-heading,
  .configuration-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .configuration-hero {
    min-height: 0;
    padding: 20px;
  }

  .configuration-hero h3 {
    font-size: 26px;
  }

  .configuration-access,
  .config-switch {
    width: 100%;
  }

  .grade-rate-row {
    grid-template-columns: minmax(0, 1fr) 100px;
  }

  .grade-rate-rule {
    display: none;
  }

  .configuration-save-bar .btn {
    width: 100%;
  }
}

/* =========================================================
   BANQUE SEMAINE — DETAILS + EDITEUR FACTURE V2
   ========================================================= */

.bank-week-table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom-color: rgba(255, 157, 22, 0.14);
}

.bank-week-row td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.bank-date {
  white-space: nowrap;
}

.bank-employee {
  color: #fff;
  font-weight: 900;
}

.bank-type {
  color: #e8e3db;
  font-weight: 800;
}

.bank-amount strong {
  white-space: nowrap;
}

.bank-details-cell {
  min-width: 300px;
  vertical-align: top;
}

.bank-detail-row {
  min-width: 260px;
}

.bank-detail-row > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 900;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.bank-detail-row > summary::-webkit-details-marker {
  display: none;
}

.bank-detail-row > summary::after {
  content: "+";
  color: var(--amber-2);
  font-size: 18px;
  line-height: 1;
}

.bank-detail-row[open] > summary {
  color: var(--amber-2);
  border-color: rgba(255, 157, 22, 0.3);
  background: rgba(255, 157, 22, 0.08);
}

.bank-detail-row[open] > summary::after {
  content: "−";
}

/* Editeur complet ouvert depuis Banque semaine */

.bank-editor-dialog {
  width: min(1220px, calc(100vw - 28px));
  max-height: min(94vh, 1060px);
  border-color: rgba(255, 157, 22, 0.34);
}

.bank-editor-header {
  background: linear-gradient(90deg, rgba(213, 31, 38, 0.14), transparent 44%),
    #171717;
}

.bank-editor-header > div {
  min-width: 0;
}

.bank-editor-header small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bank-editor-body {
  gap: 16px;
}

.bank-editor-summary {
  border-color: rgba(255, 157, 22, 0.17);
}

.bank-price-help {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
  gap: 18px;
  align-items: center;
  border-color: rgba(86, 194, 113, 0.18);
  background: linear-gradient(135deg, rgba(86, 194, 113, 0.055), rgba(255, 157, 22, 0.04)),
    rgba(12, 12, 12, 0.94);
}

.bank-price-help h4 {
  margin-bottom: 6px;
}

.bank-price-help p,
.bank-section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
  font-weight: 700;
}

.bank-price-formula {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 11px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.bank-price-formula span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.bank-price-formula strong {
  color: #fff;
  font-size: 12px;
}

.bank-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.bank-section-heading h4 {
  margin-bottom: 4px;
}

.bank-product-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bank-product-lines label,
.bank-custom-lines label {
  min-height: 58px;
}

.bank-product-line > span,
.bank-custom-line > span {
  min-width: 0;
}

.bank-product-line strong,
.bank-custom-line strong {
  display: block;
  color: #fff;
  font-weight: 900;
}

.bank-product-line small,
.bank-custom-line small,
.bank-product-line em {
  display: block;
  margin-top: 3px;
}

.bank-product-line small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.bank-product-line em,
.bank-custom-line [data-bank-custom-price] {
  color: var(--amber-2);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.bank-product-line input,
.bank-custom-line input {
  text-align: right;
}

.bank-legacy-row,
.bank-new-line-row {
  grid-template-columns: minmax(220px, 1fr) minmax(90px, 0.28fr) minmax(120px, 0.36fr) minmax(120px, 0.36fr) 36px;
  padding: 11px;
  border-color: rgba(255, 157, 22, 0.12);
  background: rgba(0, 0, 0, 0.3);
}

.bank-legacy-row input[readonly],
.bank-new-line-row input[readonly] {
  color: var(--amber-2);
  border-color: rgba(255, 157, 22, 0.18);
  background: rgba(255, 157, 22, 0.055);
  font-weight: 900;
}

.bank-free-lines-section {
  border-style: dashed;
  border-color: rgba(255, 157, 22, 0.2);
}

.bank-editor-footer {
  align-items: center;
}

.bank-editor-totals {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px !important;
  flex: 1 1 auto;
}

.bank-editor-totals > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}

.bank-editor-totals span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.bank-editor-totals strong {
  color: #fff;
  font-size: 18px;
}

.bank-editor-totals > div:nth-child(2) strong {
  color: var(--red);
}

.bank-editor-totals > div:nth-child(3) strong {
  color: var(--green);
}

@media (max-width: 980px) {
  .bank-price-help,
  .bank-product-groups {
    grid-template-columns: 1fr;
  }

  .bank-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-editor-totals {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .bank-editor-totals,
  .bank-legacy-row,
  .bank-new-line-row {
    grid-template-columns: 1fr;
  }

  .bank-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-section-heading .btn {
    width: 100%;
  }

  .bank-editor-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }
}

/* =========================================================
   BANQUE SEMAINE — ALIGNEMENT FINAL
   Garde le design compact d'origine + petit + orange
   ========================================================= */

.bank-week-panel {
  overflow: visible;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.94), rgba(12, 12, 12, 0.97));
}

.bank-week-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.bank-week-table {
  width: 100%;
  min-width: 1320px;
  table-layout: fixed;
  border-collapse: collapse;
}

.bank-week-table thead th {
  padding: 13px 12px;
  color: var(--amber-2);
  background: rgba(255, 153, 0, 0.08);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
  vertical-align: middle;
}

.bank-week-table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  font-size: 14px;
}

.bank-week-row {
  transition: background 0.16s ease;
}

.bank-week-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.bank-date,
.bank-amount strong,
.bank-employee {
  white-space: nowrap;
}

.bank-type {
  white-space: normal;
  line-height: 1.25;
}

.bank-date {
  color: var(--text);
  font-weight: 750;
}

.bank-employee,
.bank-type {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.bank-amount strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.bank-details-cell {
  min-width: 0 !important;
  width: auto;
  vertical-align: middle !important;
}

.bank-detail-row,
.invoice-detail-row.bank-detail-row {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.bank-detail-row > summary,
.invoice-detail-row.bank-detail-row > summary {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

.bank-detail-row > summary::-webkit-details-marker,
.invoice-detail-row.bank-detail-row > summary::-webkit-details-marker {
  display: none;
}

.bank-detail-row > summary::after,
.invoice-detail-row.bank-detail-row > summary::after {
  content: " +";
  color: var(--amber-2);
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

.bank-detail-row[open] > summary,
.invoice-detail-row.bank-detail-row[open] > summary {
  color: #fff;
  border: 0;
  background: transparent;
}

.bank-detail-row[open] > summary::after,
.invoice-detail-row.bank-detail-row[open] > summary::after {
  content: " -";
  color: var(--amber-2);
}

.bank-detail-list,
.invoice-detail-list.bank-detail-list {
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: none;
}

.bank-detail-list > .bank-detail-line,
.invoice-detail-list.bank-detail-list > .bank-detail-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  min-height: 31px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bank-detail-list > .bank-detail-line:last-child,
.invoice-detail-list.bank-detail-list > .bank-detail-line:last-child {
  border-bottom: 0;
}

.bank-detail-list .bank-detail-line span,
.invoice-detail-list.bank-detail-list .bank-detail-line span {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-detail-list .bank-detail-line b,
.invoice-detail-list.bank-detail-list .bank-detail-line b {
  flex: 0 0 auto;
  color: var(--amber-2);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.bank-detail-list .bank-detail-info span,
.invoice-detail-list.bank-detail-list .bank-detail-info span {
  font-weight: 900;
}

.bank-detail-empty {
  margin: 0;
  padding: 10px 0;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 750;
}

.bank-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: nowrap;
}

.bank-actions form {
  margin: 0;
}

.bank-actions .btn {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .bank-week-table {
    min-width: 1180px;
  }

  .bank-actions {
    flex-direction: row;
    align-items: center;
  }

  .bank-actions .btn {
    width: auto;
  }
}

/* =========================================================
   FACTURATION - MATERIEL UNIQUEMENT
   ========================================================= */

.material-column .service-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.material-column .product-card.service-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name price"
    "qty qty";
  align-items: center;
  gap: 7px 10px;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 8px;
}

.material-column .product-card.service-card > span {
  grid-area: name;
  min-width: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.material-column .product-card.service-card > b {
  grid-area: price;
  margin: 0;
  color: var(--amber-2);
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
  text-align: right;
}

.material-column .product-card.service-card > input {
  grid-area: qty;
  width: 100%;
  min-height: 32px;
  height: 32px;
  padding: 4px 8px;
  align-self: center;
  text-align: center;
  font-size: 14px;
}

/* Ecran moyen */

@media (max-width: 1450px) {
  .material-column .service-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */

@media (max-width: 760px) {
  .material-column .service-grid.compact {
    grid-template-columns: 1fr;
  }

  .material-column .product-card.service-card {
    padding: 9px 10px;
  }

  .material-column .product-card.service-card > span,
  .material-column .product-card.service-card > b {
    font-size: 13px;
  }
}

/* =========================================================
   EQUIPE - CHANGEMENT DE GRADE
   ========================================================= */

.team-grade-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 157, 22, 0.2);
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 157, 22, 0.065);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.row-actions .team-grade-open {
  border-color: rgba(255, 157, 22, 0.46);
  color: var(--amber-2);
  background: rgba(255, 157, 22, 0.09);
}

.row-actions .team-grade-open:hover {
  border-color: rgba(255, 157, 22, 0.76);
  color: #fff;
  background: rgba(255, 157, 22, 0.16);
}

.team-grade-modal[hidden] {
  display: none !important;
}

.team-grade-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.team-grade-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
  cursor: default;
}

.team-grade-modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 157, 22, 0.38);
  border-top: 4px solid var(--amber);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(31, 31, 31, 0.995), rgba(9, 9, 9, 0.995));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.78);
  transform: translateY(8px) scale(0.985);
  transition: transform 0.15s ease;
}

.team-grade-modal-form {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.team-grade-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-grade-modal-head .eyebrow {
  margin-bottom: 5px;
}

.team-grade-modal-head h3 {
  margin: 0;
  color: #fff;
  font-size: 23px;
}

.team-grade-modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.team-grade-modal-close:hover {
  color: #fff;
  border-color: rgba(216, 73, 61, 0.5);
  background: rgba(216, 73, 61, 0.14);
}

.team-grade-modal-employee {
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.team-grade-modal-employee strong,
.team-grade-modal-employee span {
  display: block;
}

.team-grade-modal-employee strong {
  color: #fff;
  font-size: 16px;
}

.team-grade-modal-employee span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.team-grade-modal-employee b {
  color: var(--amber-2);
}

.team-grade-modal-field {
  gap: 8px;
}

.team-grade-modal-field select {
  width: 100%;
  min-height: 46px;
  border-color: rgba(255, 157, 22, 0.3);
  color: #fff;
  background: #111;
  font-weight: 850;
  cursor: pointer;
}

.team-grade-modal-field select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 157, 22, 0.13);
}

.team-grade-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.team-grade-modal-actions .btn {
  width: 100%;
}

@media (max-width: 620px) {
  .team-grade-modal {
    padding: 12px;
  }

  .team-grade-modal-form {
    padding: 16px;
  }

  .team-grade-modal-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   EQUIPE - MODAL GRADE SANS JAVASCRIPT
   ========================================================= */

.team-grade-modal-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.team-grade-modal-toggle:checked + .team-grade-modal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.row-actions .team-grade-open,
.team-grade-modal-close,
.team-grade-modal-cancel {
  cursor: pointer;
  user-select: none;
}

.team-grade-modal-cancel {
  width: 100%;
}

.team-grade-modal-backdrop {
  display: block;
}

/* =========================================================
   DOSSIER EMPLOYE - CONTRAT AUTOMATIQUE
   Mise en page compacte du formulaire contractuel
   ========================================================= */

.contract-profile-form {
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  align-items: start;
  gap: 16px 18px;
}

.contract-profile-form > .form-grid {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  padding: 0;
  align-self: start;
}

.contract-profile-actions {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 10px;
  align-self: start;
  min-width: 0;
}

.contract-profile-actions .form-note {
  margin: 0;
  padding: 10px 12px;
  min-height: 0;
  font-size: 13px;
  line-height: 1.45;
}

.contract-profile-actions .btn {
  width: 100%;
  min-height: 42px;
  margin: 0;
  align-self: start;
}

@media (max-width: 1100px) {
  .contract-profile-form {
    grid-template-columns: 1fr;
  }

  .contract-profile-form > .form-grid,
  .contract-profile-actions {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .contract-profile-form > .form-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ANCIENS EMPLOYES - ACTIONS + MODALE DE RUPTURE
   ========================================================= */

.former-actions-cell {
  min-width: 440px;
  vertical-align: middle;
}

.former-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.former-row-actions form {
  margin: 0;
}

.former-row-actions .btn {
  margin: 0;
  min-height: 36px;
  white-space: nowrap;
}

.former-account-deleted {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
}

.termination-editor-dialog {
  width: min(720px, calc(100vw - 32px));
}

.termination-editor-body {
  display: grid;
  gap: 18px;
  padding: 22px;
  overflow: auto;
}

.termination-editor-notice {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(235, 38, 49, 0.28);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  background: rgba(235, 38, 49, 0.07);
}

.termination-editor-notice span {
  color: var(--muted);
  line-height: 1.45;
}

.termination-editor-grid {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
}

.termination-reason-field {
  grid-column: 2;
}

.termination-reason-field textarea {
  min-height: 150px;
  resize: vertical;
}

@media (max-width: 980px) {
  .former-actions-cell {
    min-width: 320px;
  }

  .former-row-actions {
    align-items: stretch;
  }

  .termination-editor-grid {
    grid-template-columns: 1fr;
  }

  .termination-reason-field {
    grid-column: 1;
  }
}

/* =========================================================
   EQUIPE - ALIGNEMENT DES COLONNES / ACTIONS
   Correctif 2026-09-23
   ========================================================= */

.team-management-table th:nth-child(1),
.team-management-table td:nth-child(1) {
  width: 235px;
  min-width: 235px;
}

.team-management-table th:nth-child(2),
.team-management-table td:nth-child(2) {
  width: 125px;
  min-width: 125px;
}

.team-management-table th:nth-child(3),
.team-management-table td:nth-child(3) {
  width: 120px;
  min-width: 120px;
}

.team-management-table th:nth-child(4),
.team-management-table td:nth-child(4) {
  width: 95px;
  min-width: 95px;
}

.team-management-table .team-person {
  min-height: 46px;
}

.team-management-table .team-person > div:last-child {
  min-width: 0;
}

.team-management-table .team-grade-badge {
  justify-content: center;
}

.team-management-table .team-doc-links .doc-state {
  margin: 0;
}

/* Reserve la colonne Contrat pour Patron / Co-patron afin que
   Permis et Certificat restent toujours parfaitement alignes. */

.team-management-table .team-doc-links .doc-state.not-required {
  visibility: hidden;
  pointer-events: none;
}

.team-management-table .row-actions {
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: nowrap;
  margin: 0;
}

.team-management-table .row-actions > a,
.team-management-table .row-actions > label,
.team-management-table .row-actions > form,
.team-management-table .row-actions > details,
.team-management-table .row-actions > span {
  margin-top: 0;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.team-management-table .row-actions form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.team-management-table .row-actions .btn.small {
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}

/* Quand un formulaire Mettre a pied / Renvoyer est ouvert, il passe
   sous la ligne d'actions au lieu de decaler verticalement les boutons. */

.team-management-table .row-actions details[open] {
  position: relative;
}

@media (max-width: 1650px) {
  .team-management-table .row-actions {
    flex-wrap: wrap;
  }

  .team-management-table th:nth-child(6),
  .team-management-table td:nth-child(6) {
    min-width: 420px;
  }
}

/* =========================================================
   EQUIPE - DOCUMENTS TAILLE HARMONISEE / V5
   Meme hauteur visuelle que les autres boutons de la ligne.
   ========================================================= */

.team-management-table {
  min-width: 1690px;
}

.team-management-table th,
.team-management-table td {
  vertical-align: middle;
}

.team-management-table th:nth-child(5),
.team-management-table td:nth-child(5) {
  width: 555px;
  min-width: 555px;
}

.team-management-table th:nth-child(6),
.team-management-table td:nth-child(6) {
  min-width: 580px;
}

.team-management-table .team-doc-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 8px;
  width: 100%;
  align-items: center;
}

.team-management-table .team-doc-links .doc-state {
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 900;
  border-radius: 6px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.team-management-table .team-documents-cell {
  padding-right: 12px;
}

/* Les actions restent sur la meme hauteur que les documents. */

.team-management-table .row-actions {
  min-height: 34px;
  gap: 6px;
}

.team-management-table .row-actions .btn.small {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1.1;
}

@media (max-width: 1750px) {
  .team-management-table {
    min-width: 1640px;
  }

  .team-management-table th:nth-child(5),
  .team-management-table td:nth-child(5) {
    width: 525px;
    min-width: 525px;
  }

  .team-management-table .team-doc-links {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 7px;
  }
}

/* =========================================================
   EQUIPE - CENTRE DE SANCTIONS
   Avertissement / mise a pied / renvoi / suppression
   ========================================================= */

.team-management-table th:nth-child(6),
.team-management-table td:nth-child(6) {
  min-width: 430px !important;
}

.sanction-history-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 5px;
  padding: 3px 8px;
  border: 1px solid rgba(223, 158, 45, .55);
  border-radius: 999px;
  background: rgba(223, 158, 45, .11);
  color: #f3c260;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
}

.sanction-history-badge:hover {
  background: rgba(223, 158, 45, .18);
  border-color: rgba(243, 194, 96, .85);
}

.btn.warning,
.sanction-warning-card .btn {
  border-color: rgba(223, 158, 45, .7);
  background: rgba(122, 80, 10, .45);
  color: #ffe0a2;
}

.sanctions-dialog {
  width: min(980px, calc(100vw - 34px));
  max-width: 980px;
  max-height: 90vh;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 14px;
  background: #101010;
  color: var(--text, #eee);
  overflow: hidden;
}

.sanctions-dialog::backdrop {
  background: rgba(0, 0, 0, .74);
  backdrop-filter: blur(3px);
}

.sanctions-dialog-shell {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.sanctions-dialog-header {
  flex: 0 0 auto;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sanctions-dialog-header h3 {
  margin: 2px 0 4px;
}

.sanctions-dialog-header .muted {
  display: block;
  max-width: 700px;
  margin-top: 4px;
}

.sanctions-dialog-body {
  overflow: auto;
  padding: 18px 20px 22px;
}

.sanction-actions-section > h4,
.sanction-history-section h4 {
  margin: 0 0 12px;
}

.sanction-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sanction-action-card {
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  overflow: hidden;
}

.sanction-action-card > summary {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.sanction-action-card > summary::-webkit-details-marker {
  display: none;
}

.sanction-action-card > summary strong {
  font-size: 14px;
}

.sanction-action-card > summary span {
  color: var(--muted, #aaa);
  font-size: 12px;
  line-height: 1.3;
}

.sanction-warning-card {
  border-color: rgba(223, 158, 45, .32);
}

.sanction-suspension-card {
  border-color: rgba(203, 67, 82, .32);
}

.sanction-termination-card {
  border-color: rgba(200, 43, 55, .44);
}

.sanction-delete-card {
  border-color: rgba(200, 43, 55, .62);
}

.sanction-form,
.sanction-action-card > form,
.sanction-current-state {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.sanction-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.sanction-form input[type="date"],
.sanction-form input[type="datetime-local"],
.sanction-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.sanction-form textarea {
  min-height: 94px;
  resize: vertical;
}

.sanction-public-toggle {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 700 !important;
  color: var(--muted, #bbb);
}

.sanction-public-toggle input {
  width: auto !important;
  margin: 0;
}

.sanction-current-state {
  margin: 0 14px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(203, 67, 82, .10);
  border: 1px solid rgba(203, 67, 82, .30);
}

.sanction-current-state span {
  color: var(--muted, #bbb);
  font-size: 12px;
}

.sanction-history-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.sanction-history-head,
.sanction-history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sanction-history-list {
  display: grid;
  gap: 10px;
}

.sanction-history-item {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-left-width: 4px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .025);
}

.sanction-history-item.sanction-type-warning {
  border-left-color: #c99631;
}

.sanction-history-item.sanction-type-suspension {
  border-left-color: #b43b49;
}

.sanction-history-item.sanction-type-termination {
  border-left-color: #8f1d26;
}

.sanction-history-title > div {
  display: grid;
  gap: 2px;
}

.sanction-history-title strong {
  font-size: 14px;
}

.sanction-history-title > div > span {
  color: var(--muted, #aaa);
  font-size: 11px;
}

.sanction-reason,
.sanction-reason-private,
.sanction-actor {
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.sanction-reason-private {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted, #aaa);
  font-style: italic;
}

.sanction-clean-form {
  margin-top: 10px;
}

.sanction-clean-form .btn {
  border-color: rgba(255, 255, 255, .16);
  color: #d0d0d0;
}

.sanction-empty {
  padding: 16px;
}

@media (max-width: 760px) {
  .sanctions-dialog {
    width: calc(100vw - 16px);
    max-height: 94vh;
  }

  .sanction-actions-grid {
    grid-template-columns: 1fr;
  }

  .sanctions-dialog-body {
    padding: 14px;
  }
}

/* =========================================================
   EQUIPE / SANCTIONS V2
   - Aere les trois documents sans les agrandir excessivement.
   - Vue Equipe publique minimale pour tous les salaries.
   ========================================================= */

.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) th:nth-child(5),
.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) td:nth-child(5) {
  width: 580px;
  min-width: 580px;
}

.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) .team-doc-links {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 14px;
}

.team-management-table:not(.team-management-table-public) .team-documents-cell {
  padding-left: 10px;
  padding-right: 18px;
}

/* Vue lecture seule accessible a tous : aucune donnee administrative
   sensible, uniquement equipe + presence de sanctions. */

.team-management-table.team-management-table-public {
  min-width: 860px;
  width: 100%;
  table-layout: fixed;
}

.team-management-table-public th:nth-child(1),
.team-management-table-public td:nth-child(1) {
  width: 36%;
  min-width: 280px;
}

.team-management-table-public th:nth-child(2),
.team-management-table-public td:nth-child(2) {
  width: 22%;
  min-width: 170px;
}

.team-management-table-public th:nth-child(3),
.team-management-table-public td:nth-child(3) {
  width: 17%;
  min-width: 130px;
}

.team-management-table-public th:nth-child(4),
.team-management-table-public td:nth-child(4) {
  width: 25%;
  min-width: 190px;
}

.team-public-sanctions-cell .sanction-history-badge {
  margin-top: 0;
}

@media (max-width: 1750px) {
  .team-management-table:not(.team-management-table-public) th:nth-child(5),
  .team-management-table:not(.team-management-table-public) td:nth-child(5) {
    width: 560px;
    min-width: 560px;
  }

  .team-management-table:not(.team-management-table-public) .team-doc-links {
    gap: 12px;
  }
}

/* =========================================================
   EQUIPE / DOCUMENTS V5
   Harmonise les boutons des employes actifs avec ceux des
   anciens employes : meme presence visuelle, plus d'espace.
   ========================================================= */

.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) th:nth-child(5),
.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) td:nth-child(5) {
  width: 900px !important;
  min-width: 900px !important;
}

.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) .team-doc-links {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(280px, 1fr)) !important;
  gap: 14px !important;
  width: 100%;
  align-items: center;
}

.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) .team-doc-links .doc-state {
  min-width: 0 !important;
  min-height: 28px !important;
  height: auto !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) .team-documents-cell {
  padding-left: 12px !important;
  padding-right: 20px !important;
}

@media (max-width: 1850px) {
  .team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) th:nth-child(5),
  .team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) td:nth-child(5) {
    width: 810px !important;
    min-width: 810px !important;
  }

  .team-management-table:not(.team-management-table-public):not(.team-management-table-compact-docs) .team-doc-links {
    grid-template-columns: repeat(3, minmax(250px, 1fr)) !important;
    gap: 12px !important;
  }
}

/* =========================================================
   Warning sanctions - Atelier + Societe / Equipe atelier
   ========================================================= */

.employee-sanction-warning {
  display: inline-flex !important;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: 6px !important;
  padding: 3px 8px;
  border: 1px solid rgba(223, 158, 45, .62);
  border-radius: 999px;
  background: rgba(223, 158, 45, .13);
  line-height: 1.1;
  white-space: nowrap !important;
  overflow: visible !important;
}

.team-status-card.has-sanction {
  border-color: rgba(223, 158, 45, .30);
  box-shadow: inset 0 0 0 1px rgba(223, 158, 45, .05);
}

.team-status-card.has-sanction:not(.online) {
  border-left-color: rgba(223, 158, 45, .90);
}

.society-salary-card.has-sanction {
  border-color: rgba(223, 158, 45, .30);
  box-shadow: inset 0 0 0 1px rgba(223, 158, 45, .05);
}

.society-person .employee-sanction-warning {
  margin-top: 6px !important;
}

/* =========================================================
   V8 - Warning sanction plus visible (Atelier + Societe)
   ========================================================= */

.employee-sanction-warning {
  padding: 5px 10px !important;
  border: 2px solid #f2b22f !important;
  background: #d99000 !important;
  color: #160e00 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  letter-spacing: .15px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 12px rgba(217, 144, 0, .28);
  text-shadow: none !important;
}

.team-status-card.has-sanction,
.society-salary-card.has-sanction {
  border-color: rgba(242, 178, 47, .68) !important;
  box-shadow: inset 0 0 0 1px rgba(242, 178, 47, .14), 0 0 10px rgba(217, 144, 0, .10) !important;
}

/* =========================================================
   V9 - Badges sanctions adaptes selon la taille des cartes
   ========================================================= */

/* Carte large : Societe > Remunerations de la semaine */

.society-salary-card .employee-sanction-warning {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 6px !important;
  padding: 4px 9px !important;
  border: 1px solid #ffd064 !important;
  border-radius: 999px !important;
  background: #f2a900 !important;
  color: #171000 !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: 0 2px 8px rgba(242, 169, 0, .22) !important;
}

/* Petite carte : Equipe atelier (Atelier / Societe) */

.team-status-card .employee-sanction-warning {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 4px !important;
  padding: 3px 7px !important;
  border: 1px solid #f3b62e !important;
  border-radius: 999px !important;
  background: #d99100 !important;
  color: #120c00 !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: 0 1px 5px rgba(217, 145, 0, .20) !important;
}

/* Evite que le contenu gauche des petites cartes pousse le reste hors carte. */

.team-status-card > div:first-child {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.team-status-card > div:first-child > strong,
.team-status-card > div:first-child > span:not(.employee-sanction-warning) {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Le warning reste visible mais ne doit jamais agrandir la carte. */

.team-status-card.has-sanction {
  overflow: hidden !important;
}

/* =========================================================
   V12 - Espacement Societe : Equipe atelier / Partenariats
   ========================================================= */

.society-payroll-section + .panel {
  margin-top: 28px !important;
}

/* =========================================================
   V13 - RIB employe
   ========================================================= */

.employee-rib-panel .employee-rib-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.employee-rib-panel .employee-rib-form label {
  margin: 0;
}

.employee-rib-panel .employee-rib-form input {
  width: 100%;
}

.employee-rib-readonly {
  max-width: 760px;
}

.employee-rib-readonly strong {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .employee-rib-panel .employee-rib-form {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   V14 - RIB des anciens employes (Direction uniquement)
   ========================================================= */

.former-rib-cell {
  min-width: 250px;
}

.former-rib-form {
  display: grid;
  grid-template-columns: minmax(125px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 240px;
}

.former-rib-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 9px;
  font-weight: 700;
  letter-spacing: .02em;
}

.former-rib-form .btn {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .former-rib-form {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   V16 - RIB compact dans Gestion equipe
   Vraie seconde ligne sous le numero, sans chevauchement.
   ========================================================= */

.team-management-table:not(.team-management-table-public) th:nth-child(3),
.team-management-table:not(.team-management-table-public) td:nth-child(3) {
  width: 145px;
  min-width: 145px;
}

.team-management-table .team-phone-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  line-height: 1.2;
  min-width: 0;
}

.team-management-table .team-phone-stack > :first-child {
  display: block;
  white-space: normal;
  line-height: 1.25;
}

.team-management-table .team-rib-inline {
  display: block;
  margin-top: 6px;
  color: #d9a53b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* Un peu d'air vertical uniquement sur les cellules contenant numero + RIB. */

.team-management-table td:nth-child(3) {
  padding-top: 9px;
  padding-bottom: 9px;
}

@media (max-width: 1750px) {
  .team-management-table:not(.team-management-table-public) th:nth-child(3),
  .team-management-table:not(.team-management-table-public) td:nth-child(3) {
    width: 135px;
    min-width: 135px;
  }
}

/* Pagination des historiques */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.pagination-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pagination-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.page-button,
.page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.page-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: #f2f2f2;
}

.page-button:hover {
  border-color: rgba(238, 35, 44, 0.7);
  background: rgba(238, 35, 44, 0.13);
}

.page-button.active {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.page-direction {
  min-width: 82px;
}

.page-gap {
  color: var(--muted);
}

/* Ajout d'un employe replie par defaut */

.team-create-panel > summary {
  list-style: none;
}

.team-create-panel > summary::-webkit-details-marker {
  display: none;
}

.team-create-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  cursor: pointer;
}

.team-create-summary > div {
  min-width: 0;
}

.team-create-summary h3 {
  margin: 3px 0 0;
  color: var(--amber-2);
  font-size: 20px;
}

.team-create-summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  margin-left: auto;
  border: 0;
  border-radius: 0;
  color: var(--amber-2);
  background: transparent;
  box-shadow: none;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.team-create-panel[open] .team-create-summary::after {
  content: "-";
}

.team-create-panel[open] .team-create-form,
.team-create-panel[open] > .alert {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Documents compacts pour les vues de gestion */

.team-management-table.team-management-table-compact-docs {
  width: 100%;
  min-width: 1180px;
  table-layout: fixed;
}

.team-management-table-compact-docs th:nth-child(1),
.team-management-table-compact-docs td:nth-child(1) {
  width: 15% !important;
  min-width: 0 !important;
}

.team-management-table-compact-docs th:nth-child(2),
.team-management-table-compact-docs td:nth-child(2) {
  width: 10% !important;
  min-width: 0 !important;
}

.team-management-table-compact-docs th:nth-child(3),
.team-management-table-compact-docs td:nth-child(3) {
  width: 11% !important;
  min-width: 0 !important;
}

.team-management-table-compact-docs th:nth-child(4),
.team-management-table-compact-docs td:nth-child(4) {
  width: 8% !important;
  min-width: 0 !important;
}

.team-management-table-compact-docs th:nth-child(5),
.team-management-table-compact-docs td:nth-child(5) {
  width: 12% !important;
  min-width: 0 !important;
}

.team-management-table-compact-docs th:nth-child(6),
.team-management-table-compact-docs td:nth-child(6) {
  width: 44% !important;
  min-width: 0 !important;
}

.team-management-table-compact-docs .row-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.team-management-table-compact-docs .row-actions > a,
.team-management-table-compact-docs .row-actions > label,
.team-management-table-compact-docs .row-actions > form,
.team-management-table-compact-docs .row-actions > details,
.team-management-table-compact-docs .row-actions > button,
.team-management-table-compact-docs .row-actions > span,
.team-management-table-compact-docs .row-actions > form > button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.team-doc-summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.team-doc-summary strong {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 11px;
}

.team-doc-summary.complete,
.documents-dialog-progress.complete {
  border-color: rgba(56, 185, 100, 0.6);
  background: rgba(34, 123, 67, 0.28);
}

.team-doc-summary.partial,
.documents-dialog-progress.partial {
  border-color: rgba(236, 165, 48, 0.68);
  background: rgba(170, 103, 18, 0.28);
}

.team-doc-summary.missing,
.documents-dialog-progress.missing {
  border-color: rgba(232, 55, 61, 0.68);
  background: rgba(153, 28, 34, 0.3);
}

.documents-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 24px));
}

.documents-dialog-shell {
  display: grid;
  min-height: 0;
}

.documents-dialog-header {
  padding: 18px 20px;
}

.documents-dialog-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 22px;
}

.documents-dialog-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 6px;
}

.documents-dialog-progress span {
  font-weight: 800;
}

.documents-dialog-progress strong {
  font-size: 20px;
}

.documents-dialog-list {
  display: grid;
  gap: 8px;
}

.documents-dialog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 9px 10px 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.documents-dialog-item > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.document-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(56, 185, 100, 0.13);
}

.documents-dialog-item.unavailable .document-status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(232, 55, 61, 0.13);
}

.document-missing-label {
  color: #ef7b80;
  font-size: 12px;
  font-weight: 900;
}

/* Registres actifs et archives volontairement separes */

.employee-document-group.active {
  border-left: 3px solid rgba(86, 194, 113, 0.72);
}

.employee-document-group.former,
.government-former-employees {
  border-left: 3px solid rgba(216, 73, 61, 0.72);
}

.pill.orange {
  color: var(--amber-2);
  border-color: rgba(255, 153, 0, 0.42);
}

/* RUN et impot occupent ensemble la largeur disponible. */

.week-finance-controls {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.week-finance-controls .run-panel {
  grid-column: auto;
}

.week-finance-controls .run-form {
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
}

/* Vue de gestion : davantage d'air et des commandes mieux centrees. */

@media (min-width: 1400px) {
  .team-management-table-compact-docs th,
  .team-management-table-compact-docs td {
    padding: 11px 18px;
    text-align: center;
  }

  .team-management-table-compact-docs .team-person {
    min-height: 46px;
    text-align: left;
  }

  .team-management-table-compact-docs .team-phone-stack {
    align-items: center;
  }

  .team-management-table-compact-docs .team-doc-summary {
    min-height: 34px;
    padding: 6px 12px;
  }

  .team-management-table-compact-docs .row-actions {
    gap: 14px;
    min-height: 36px;
  }

  .team-management-table-compact-docs .row-actions .btn.small {
    min-width: 96px;
    min-height: 34px;
    height: auto;
    padding: 0 16px;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-links {
    justify-content: flex-start;
    width: 100%;
  }

  .team-create-summary {
    flex-wrap: wrap;
  }

  .team-create-summary .pill {
    margin-left: 0;
  }

  .week-finance-controls {
    grid-template-columns: 1fr;
  }

  .week-finance-controls .run-form {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 701px) and (max-width: 1180px) {
  .week-finance-controls {
    grid-template-columns: 1fr;
  }

  .week-finance-controls .run-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .team-management-table-compact-docs .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Finitions interface : sanctions, partenaires et formulaires
   ========================================================= */

.employee-sanction-warning:is(button) {
  appearance: none;
  cursor: pointer !important;
  font-family: inherit;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.employee-sanction-warning:is(button):hover {
  background: #ffc043 !important;
  border-color: #ffe0a0 !important;
  box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.28) !important;
  transform: translateY(-1px);
}

.employee-sanction-warning:is(button):focus-visible {
  outline: 3px solid rgba(255, 208, 100, 0.46);
  outline-offset: 2px;
}

.sanction-visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sanction-visibility-row form {
  margin: 0;
}

.partner-collapsible-card {
  padding: 0 !important;
  overflow: hidden;
}

.partner-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.partner-collapsible-summary::-webkit-details-marker,
.config-group-summary::-webkit-details-marker {
  display: none;
}

.partner-summary-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.partner-summary-main strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-summary-main small {
  color: var(--muted);
  font-weight: 750;
}

.partner-summary-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.partner-summary-toggle,
.config-group-meta b {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--amber-2);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  transition: transform 160ms ease;
}

.partner-collapsible-card[open] .partner-summary-toggle,
.config-group[open] .config-group-meta b {
  transform: rotate(45deg);
}

.partner-collapsible-card[open] .partner-collapsible-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 153, 0, 0.055);
}

.partner-collapsible-summary:hover,
.partner-collapsible-summary:focus-visible {
  background: rgba(255, 153, 0, 0.08);
}

.partner-collapsible-summary:focus-visible {
  outline: 2px solid rgba(255, 193, 90, 0.55);
  outline-offset: -2px;
}

.partner-collapsible-content {
  display: grid;
}

.partner-card-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.partner-contract-mode-form,
.partner-contract-upload-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.partner-contract-mode-form .btn,
.partner-contract-upload-form .btn {
  width: auto;
  min-width: 170px;
  min-height: 40px;
}

.partner-contract-content .money-list {
  margin: 0;
}

/* Les groupes restent lisibles sans empiler visuellement des cartes. */

.config-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-left: 3px solid rgba(235, 36, 45, 0.86);
  border-radius: 7px;
  background: rgba(8, 10, 10, 0.82);
}

.config-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.config-group-summary:hover,
.config-group-summary:focus-visible,
.config-group[open] > .config-group-summary {
  background: rgba(255, 153, 0, 0.07);
}

.config-group-summary:focus-visible {
  outline: 2px solid rgba(255, 193, 90, 0.55);
  outline-offset: -2px;
}

.config-group-summary > span:first-child {
  display: grid;
  gap: 4px;
}

.config-group-summary small {
  color: var(--amber-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.config-group-summary strong {
  color: #fff;
}

.config-group-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.config-group-body {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.config-group-body > .config-section {
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.config-group-body > .config-section:last-child {
  border-bottom: 0;
}

.config-signatures-group {
  margin-top: 14px;
}

.administrative-documents-panel .doc-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.administrative-documents-panel .doc-card {
  min-height: 78px;
  padding: 12px 14px;
}

.administrative-documents-panel .doc-card .btn {
  min-width: 92px;
  justify-content: center;
}

.documents-upload-form {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.documents-upload-form .file-drop {
  min-height: 82px;
}

.documents-upload-submit {
  grid-column: 1 / -1;
  justify-self: end;
  width: auto !important;
  min-width: 240px;
}

.profile-layout > .profile-card {
  align-self: stretch;
  height: auto;
}

.partner-management + .partner-contracts-panel {
  border-top: 2px solid rgba(255, 193, 90, 0.42);
}

.customer-activity-panel {
  margin-bottom: 16px;
  border-left: 4px solid var(--amber);
}

.society-collapsible-section {
  padding: 0;
  overflow: hidden;
}

.society-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  transition: background-color 160ms ease;
}

.society-collapsible-summary::-webkit-details-marker {
  display: none;
}

.society-collapsible-summary:hover,
.society-collapsible-summary:focus-visible,
.society-collapsible-section[open] > .society-collapsible-summary {
  background: rgba(255, 153, 0, 0.06);
}

.society-collapsible-summary:focus-visible {
  outline: 2px solid var(--amber-2);
  outline-offset: -2px;
}

.society-collapsible-summary .eyebrow {
  margin: 0;
}

.society-collapsible-summary h3 {
  margin: 3px 0 0;
  color: var(--amber-2);
}

.society-collapsible-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.society-collapsible-marker {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--amber-2);
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
}

.society-collapsible-marker::before {
  content: "+";
}

.society-collapsible-section[open] .society-collapsible-marker::before {
  content: "-";
}

.society-collapsible-content {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.society-collapsible-content > .form-note,
.society-collapsible-content > .alert,
.society-collapsible-content > .table-wrap {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .society-collapsible-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .society-collapsible-meta {
    width: 100%;
    justify-content: space-between;
  }
}

.customer-activity-table {
  min-width: 860px;
  table-layout: fixed;
}

.customer-activity-table thead tr:first-child th:not(:first-child) {
  border-bottom: 1px solid rgba(255, 193, 90, 0.22);
  color: var(--amber-2);
}

.customer-activity-table thead tr:nth-child(2) th {
  color: var(--muted);
  font-size: 11px;
}

.customer-activity-table th,
.customer-activity-table td {
  text-align: center;
  vertical-align: middle;
}

.customer-activity-table tbody tr.is-today {
  background: rgba(255, 153, 0, 0.07);
}

.customer-activity-table tbody td:first-child strong,
.customer-activity-table tbody td:first-child small {
  display: block;
}

.customer-activity-table tbody td:first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.activity-count {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
  font-weight: 950;
}

.activity-count.repair {
  border-color: rgba(231, 35, 43, 0.42);
  background: rgba(231, 35, 43, 0.12);
}

.activity-count.customization {
  border-color: rgba(255, 193, 90, 0.45);
  color: var(--amber-2);
  background: rgba(255, 153, 0, 0.1);
}

.activity-count.electronic-key {
  border-color: rgba(33, 206, 225, 0.38);
  color: #9beef5;
  background: rgba(33, 206, 225, 0.09);
}

.activity-count.company {
  border-style: dashed;
}

.customer-activity-table tfoot th,
.customer-activity-table tfoot td {
  border-top: 1px solid rgba(255, 193, 90, 0.32);
  color: var(--amber-2);
  font-weight: 950;
}

@media (max-width: 900px) {
  .profile-layout > .profile-card {
    height: auto;
  }
}

@media (max-width: 720px) {
  .partner-collapsible-summary,
  .config-group-summary,
  .sanction-visibility-row {
    align-items: flex-start;
  }

  .partner-collapsible-summary,
  .config-group-summary {
    flex-wrap: wrap;
  }

  .partner-contract-mode-form,
  .partner-contract-upload-form {
    grid-template-columns: 1fr;
  }

  .partner-contract-mode-form .btn,
  .partner-contract-upload-form .btn,
  .documents-upload-submit {
    width: 100% !important;
    min-width: 0;
  }

  .sanction-visibility-row {
    flex-direction: column;
  }
}

/* =========================================================
   COHERENCE VISUELLE GLOBALE
   Une derniere couche commune pour calmer les ecrans denses,
   harmoniser les composants et conserver le garage visible.
   ========================================================= */

:root {
  --surface-main: rgba(15, 16, 16, 0.88);
  --surface-raised: rgba(24, 24, 23, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --border-main: rgba(255, 255, 255, 0.105);
  --border-warm: rgba(255, 193, 90, 0.22);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
}

html {
  scrollbar-color: rgba(216, 73, 61, 0.72) rgba(0, 0, 0, 0.28);
}

body {
  line-height: 1.45;
}

body::before {
  filter: saturate(1.04) contrast(1.03) brightness(0.96);
  opacity: 0.9;
}

body::after {
  background: radial-gradient(circle at 88% 8%, rgba(24, 172, 192, 0.07), transparent 25rem),
    radial-gradient(circle at 8% 5%, rgba(213, 31, 38, 0.1), transparent 27rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.24));
}

.main {
  padding: 22px;
}

.main > * {
  min-width: 0;
}

.topbar {
  min-height: 94px;
  padding: 18px 20px;
  border: 1px solid var(--border-main);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(25, 25, 24, 0.9), rgba(8, 9, 9, 0.9));
  box-shadow: var(--shadow-soft);
}

.topbar h2 {
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0;
}

.top-context {
  min-width: 210px;
  padding: 11px 14px;
  border-color: var(--border-main);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
}

.panel,
.dashboard-grid article,
.login-card,
.configuration-hero,
.config-group,
.partner-edit-card {
  border-color: var(--border-main);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(27, 27, 26, 0.86), rgba(8, 9, 9, 0.9)),
    var(--surface-main);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(7px);
}

.panel {
  padding: 16px;
  margin-bottom: 14px;
}

.panel-head {
  align-items: center;
  min-height: 38px;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.panel-head h3,
.society-section-head h3 {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0;
}

.dashboard-grid,
.finance-grid,
.society-finance-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}

.dashboard-grid article,
.society-finance-grid article {
  min-height: 108px;
  padding: 14px 15px;
  border-left-width: 3px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.23);
}

.dashboard-grid span,
.dashboard-grid small {
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-grid strong {
  margin: 8px 0 5px;
  font-size: 27px;
}

.pill {
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
  line-height: 1.15;
}

.btn {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.15;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: #e52a31;
  background: #d51f26;
  box-shadow: 0 7px 18px rgba(213, 31, 38, 0.2);
}

.btn.primary:hover:not(:disabled) {
  border-color: #f34b51;
  background: #e32931;
}

.btn.small {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

input,
select,
textarea {
  min-height: 40px;
  padding: 8px 10px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(3, 4, 4, 0.68);
  font-size: 14px;
}

textarea {
  line-height: 1.45;
}

label {
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
}

.form-grid,
.team-create-form,
.admin-form,
.expense-form {
  gap: 12px;
}

.form-note {
  padding: 11px 13px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: rgba(2, 3, 3, 0.22);
  scrollbar-color: rgba(216, 73, 61, 0.7) rgba(0, 0, 0, 0.25);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom-color: rgba(255, 255, 255, 0.065);
  line-height: 1.35;
}

th {
  color: var(--amber-2);
  background: rgba(67, 47, 21, 0.5);
  font-size: 10px;
  letter-spacing: 0;
}

tbody tr {
  transition: background-color 140ms ease;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

tbody tr:hover {
  background: rgba(255, 193, 90, 0.035);
}

.actions,
.row-actions,
.bank-actions,
.contract-actions {
  gap: 8px;
}

.week-hero,
.configuration-hero,
.tutorial-hero {
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.week-hero {
  min-height: 210px;
  margin-bottom: 14px;
}

.week-hero h3 {
  font-size: 38px;
  letter-spacing: 0;
}

.week-buttons {
  gap: 7px;
}

.week-chip {
  min-height: 54px;
  border-radius: 6px;
}

.work-layout,
.week-layout,
.profile-layout {
  gap: 14px;
}

.profile-layout {
  grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1.28fr);
  align-items: start;
}

.profile-layout > .profile-card {
  min-height: 190px;
}

.doc-grid,
.profile-grid,
.money-list {
  gap: 9px;
}

.doc-grid article,
.profile-grid div,
.money-list div {
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.team-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 9px;
}

.team-status-card {
  min-height: 100px;
  padding: 12px;
  border-radius: 7px;
}

.society-salary-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
}

.society-salary-card {
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.23);
}

.partner-active-grid {
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 11px;
}

.partner-collapsible-summary {
  min-height: 58px;
  padding: 12px 14px;
}

.partner-collapsible-content {
  gap: 12px;
  padding: 12px 14px 14px;
}

.partner-card-fields {
  gap: 10px;
}

.partner-management + .partner-contracts-panel {
  margin-top: 28px;
}

.configuration-page,
.configuration-form {
  gap: 12px;
}

.configuration-hero {
  min-height: 126px;
  padding: 18px 20px;
}

.configuration-hero h3 {
  margin-bottom: 5px;
  font-size: 28px;
}

.config-group-summary {
  min-height: 62px;
  padding: 12px 15px;
}

.config-group-summary strong {
  font-size: 17px;
}

.config-group-body {
  padding: 0 14px 8px;
}

.config-group-body > .config-section {
  padding: 16px 2px;
}

.tutorial-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 11px;
}

.tutorial-card {
  min-height: 0;
  padding: 16px;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.tutorial-payment-grid {
  gap: 12px;
}

.sale-editor-dialog,
.team-grade-modal-card {
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.66);
}

.sale-editor-header,
.documents-dialog-header {
  padding: 15px 18px;
}

.sale-editor-actions,
.sale-editor-footer {
  padding: 13px 18px;
}

.society-collapsible-summary {
  min-height: 64px;
  padding: 13px 16px;
}

.society-collapsible-summary h3 {
  font-size: 20px;
}

.society-collapsible-content {
  padding: 0 16px 16px;
}

.customer-activity-panel {
  border-left-color: var(--red);
}

.activity-count {
  min-width: 38px;
  min-height: 29px;
  padding: 5px 8px;
  border-radius: 6px;
}

.login-shell {
  width: 100%;
  max-width: 430px;
  min-width: 0;
}

.login-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 24px;
  border-top: 3px solid var(--red);
}

.login-form {
  gap: 13px;
}

.login-form input,
.login-form button {
  width: 100%;
  min-width: 0;
}

@media (min-width: 2200px) {
  .main {
    padding: 28px;
  }

  .dashboard-grid,
  .finance-grid,
  .society-finance-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 1200px) {
  .dashboard-grid,
  .finance-grid,
  .society-finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-active-grid {
    grid-template-columns: 1fr;
  }

  .profile-layout,
  .work-layout,
  .week-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .main {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: 0;
    padding: 16px;
  }

  .topbar h2 {
    font-size: 31px;
  }

  .top-context {
    width: 100%;
    min-width: 0;
  }

  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-head-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-layout > .profile-card {
    min-height: 160px;
  }

  .partner-card-fields {
    grid-template-columns: 1fr;
  }

  .partner-card-fields .partner-address {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 10px;
  }

  .topbar h2 {
    font-size: 27px;
  }

  .dashboard-grid,
  .finance-grid,
  .society-finance-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 13px;
  }

  .panel-head h3,
  .society-section-head h3 {
    font-size: 18px;
  }

  .partner-active-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions,
  .contract-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions .btn,
  .contract-actions .btn,
  .contract-actions form,
  .contract-actions form .btn {
    width: 100%;
  }

  .society-collapsible-meta,
  .partner-summary-side,
  .config-group-meta {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Renonciation volontaire aux primes */

.bonus-waiver-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 9px;
}

.bonus-waiver-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.bonus-waiver-option:hover {
  border-color: rgba(255, 190, 70, 0.5);
  background: rgba(255, 190, 70, 0.055);
}

.bonus-waiver-option.is-selected {
  border-color: rgba(255, 190, 70, 0.62);
  background: rgba(255, 190, 70, 0.09);
}

.bonus-waiver-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--amber);
}

.bonus-waiver-option > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.bonus-waiver-option strong,
.bonus-waiver-option small,
.bonus-waiver-option em {
  overflow-wrap: anywhere;
}

.bonus-waiver-option small {
  color: var(--muted);
}

.bonus-waiver-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.bonus-waiver-option.is-selected em {
  color: var(--amber);
}

.bonus-waiver-public-panel {
  border-left: 3px solid var(--amber);
}

.bonus-waiver-explanation {
  max-width: 920px;
  margin: 0 0 13px;
  color: var(--muted);
  line-height: 1.5;
}

.bonus-waiver-public-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 9px;
}

.bonus-waiver-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 190, 70, 0.25);
  border-radius: 7px;
  background: rgba(255, 190, 70, 0.055);
}

.bonus-waiver-person > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.bonus-waiver-person > div:last-child {
  align-items: flex-end;
  text-align: right;
}

.bonus-waiver-person span,
.bonus-waiver-person small {
  color: var(--muted);
}

.bonus-waiver-person > div:last-child strong {
  color: var(--amber);
}

.bonus-waiver-pill,
.bonus-waiver-inline,
.bonus-waiver-state {
  border-color: rgba(255, 190, 70, 0.52) !important;
  background: rgba(255, 190, 70, 0.12) !important;
  color: #ffd071 !important;
}

.bonus-waiver-inline {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 3px 7px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.society-salary-card.bonus-waived,
.dashboard-grid article.bonus-waived {
  border-left-color: var(--amber);
}

.society-salary-values small,
.bonus-waiver-table-note {
  display: block;
  margin-top: 3px;
  color: #ffd071;
  font-size: 11px;
  font-weight: 750;
}

.bonus-waiver-empty {
  margin: 0;
}

@media (max-width: 620px) {
  .bonus-waiver-options,
  .bonus-waiver-public-list {
    grid-template-columns: 1fr;
  }

  .bonus-waiver-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .bonus-waiver-option em {
    grid-column: 2;
    text-align: left;
  }
}

/* =========================================================
   DIRECTION - CORRECTIONS LS CONFIDENTIAL
   Comparaison en lecture seule + corrections sur clic explicite
   ========================================================= */

.page-corrections .main {
  min-width: 0;
}

.correction-week-nav {
  margin-bottom: 18px;
}

.correction-presence-panel .panel-head,
.correction-run-panel .panel-head,
.correction-inspector .panel-head {
  align-items: flex-start;
  gap: 16px;
}

.correction-inspector,
.correction-presence-panel,
.correction-run-panel,
.correction-empty-state {
  margin-top: 16px;
}

.correction-inspector-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.correction-inspector-meta > span {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  min-width: 0;
}

.correction-inspector-meta strong {
  color: var(--muted, #9ea5b7);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.correction-inspector-meta span {
  overflow-wrap: anywhere;
}

.correction-debug-details {
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(0,0,0,.14);
}

.correction-debug-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 13px;
  font-weight: 700;
}

.correction-debug-details > summary::-webkit-details-marker {
  display: none;
}

.correction-debug-details > summary::after {
  content: "+";
  float: right;
  color: var(--muted, #9ea5b7);
}

.correction-debug-details[open] > summary::after {
  content: "−";
}

.correction-path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 13px 13px;
}

.correction-path-list code {
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255,255,255,.05);
  color: #d5d9e7;
  overflow-wrap: anywhere;
}

.correction-raw-preview {
  max-height: 440px;
  overflow: auto;
  margin: 0;
  padding: 13px;
  border-top: 1px solid rgba(255,255,255,.08);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: .78rem;
  line-height: 1.45;
  color: #d6d9e3;
  background: #08090d;
}

.correction-import-probe {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.correction-employee-list {
  display: grid;
  gap: 10px;
}

.correction-employee {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  overflow: clip;
}

.correction-employee.has-difference {
  border-color: rgba(220, 163, 67, .34);
}

.correction-employee.is-synced {
  border-color: rgba(66, 171, 115, .28);
}

.correction-employee.no-source {
  border-color: rgba(205, 71, 85, .28);
}

.correction-employee > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) repeat(3, minmax(120px, .7fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  transition: background .15s ease;
}

.correction-employee > summary::-webkit-details-marker {
  display: none;
}

.correction-employee > summary:hover,
.correction-employee[open] > summary {
  background: rgba(255,255,255,.035);
}

.correction-person,
.correction-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.correction-person strong {
  font-size: .98rem;
  overflow-wrap: anywhere;
}

.correction-person span,
.correction-metric span {
  color: var(--muted, #9da4b5);
  font-size: .75rem;
}

.correction-metric strong {
  font-size: .9rem;
}

.correction-difference strong {
  font-variant-numeric: tabular-nums;
}

.correction-state {
  justify-self: end;
  white-space: nowrap;
}

.correction-employee-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.12);
}

.correction-run-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.correction-run-kpis article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}

.correction-run-kpis article > span,
.correction-run-kpis article > small {
  color: var(--muted, #9da4b5);
}

.correction-run-kpis article > strong {
  font-size: 1.35rem;
}

.correction-run-breakdown {
  margin-bottom: 14px;
}

.correction-run-person {
  display: inline-block;
  margin: 2px 10px 2px 0;
  white-space: nowrap;
}

.correction-empty-state {
  text-align: center;
  padding-top: 34px;
  padding-bottom: 34px;
}

.correction-empty-state h3 {
  margin: 5px 0 8px;
}

.correction-empty-state p:last-child {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted, #9da4b5);
}

@media (max-width: 1180px) {
  .correction-inspector-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .correction-employee > summary {
    grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(105px, .8fr)) auto;
  }

  .correction-employee > summary .correction-metric:nth-of-type(3) {
    display: none;
  }
}

@media (max-width: 760px) {
  .correction-inspector-meta,
  .correction-run-kpis {
    grid-template-columns: 1fr;
  }

  .correction-employee > summary {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .correction-person {
    grid-column: 1 / -1;
  }

  .correction-state {
    justify-self: start;
  }
}

/* Corrections LS v2 - lecture automatique de la page Services */

.correction-reader-diagnostic {
  margin-top: 16px;
}

.correction-reader-diagnostic .panel-head {
  align-items: flex-start;
  gap: 16px;
}

.correction-reader-table code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.correction-reader-table td:first-child {
  min-width: 320px;
}

.alert.warning {
  border-color: rgba(255, 190, 70, .42);
  background: rgba(255, 190, 70, .09);
}

.alert.neutral {
  border-color: rgba(124, 146, 184, .34);
  background: rgba(124, 146, 184, .08);
}

@media (max-width: 760px) {
  .correction-reader-table td:first-child {
    min-width: 220px;
  }
}

/* Corrections LS - lecture via session navigateur */

/* Corrections LS - synchronisation automatique via extension navigateur */

.correction-extension-state {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,190,70,.35);
  background: rgba(255,190,70,.08);
  color: var(--muted, #b8bdc9);
  font-weight: 700;
}

.correction-extension-state[data-state="ready"] {
  border-color: rgba(86,194,113,.45);
  background: rgba(86,194,113,.10);
  color: #c9f2d2;
}

.correction-extension-state[data-state="working"] {
  border-color: rgba(124,146,184,.45);
  background: rgba(124,146,184,.10);
  color: #d8e1f3;
}

.correction-extension-state[data-state="success"] {
  border-color: rgba(86,194,113,.52);
  background: rgba(86,194,113,.13);
  color: #d8f6df;
}

.correction-extension-state[data-state="error"] {
  border-color: rgba(216,73,61,.52);
  background: rgba(216,73,61,.12);
  color: #ffd4cf;
}

.correction-extension-button {
  width: fit-content;
  min-width: 260px;
}

.correction-extension-button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.correction-extension-button.extension-ready:disabled {
  opacity: .75;
}

@media (max-width: 700px) {
  .correction-extension-button {
    width: 100%;
    min-width: 0;
  }
}

/* Corrections LS - diagnostic des jours presents sur une seule source */

/* Compta / LS Confidential */

.compta-sync-panel,
.compta-presence-panel,
.compta-run-panel,
.compta-empty-state {
  border-color: rgba(255, 153, 0, 0.16);
}

.compta-sync-panel {
  margin-top: 16px;
  background: linear-gradient(180deg, rgba(255,153,0,.035), rgba(255,255,255,.012)),
    var(--panel);
}

.compta-sync-panel .panel-head {
  align-items: center;
}

.compta-sync-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compta-sync-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.compta-sync-status-row .correction-extension-state {
  flex: 0 1 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.compta-last-sync {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compta-presence-panel {
  margin-top: 16px;
}

.compta-run-panel {
  margin-top: 16px;
}

.compta-unmatched {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.compta-unmatched span {
  padding: 5px 8px;
  border: 1px solid rgba(216,73,61,.28);
  border-radius: 999px;
  color: #efb0aa;
  background: rgba(216,73,61,.08);
  font-size: 12px;
  font-weight: 800;
}

.compta-employee-list {
  margin-top: 12px;
}

.compta-employee {
  background: linear-gradient(90deg, rgba(255,153,0,.018), transparent 36%),
    rgba(255,255,255,.015);
}

.compta-employee > summary {
  min-height: 68px;
}

.compta-employee-body {
  padding: 0;
  background: rgba(0,0,0,.16);
}

.compta-timeline {
  position: relative;
  padding: 16px 16px 16px 18px;
}

.compta-timeline::before {
  content: "";
  position: absolute;
  left: 55px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255,153,0,.42), rgba(255,255,255,.06));
}

.compta-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 10px;
}

.compta-timeline-item:last-child {
  padding-bottom: 0;
}

.compta-timeline-marker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 15px;
}

.compta-timeline-marker::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 31px;
  width: 9px;
  height: 9px;
  border: 2px solid #171717;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(255,153,0,.18);
}

.compta-timeline-item.is-same .compta-timeline-marker::after {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(86,194,113,.16);
}

.compta-timeline-item.is-local-only .compta-timeline-marker::after {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(216,73,61,.16);
}

.compta-timeline-item.is-source-only .compta-timeline-marker::after {
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(101,167,255,.16);
}

.compta-timeline-marker span {
  display: inline-block;
  min-width: 42px;
  padding: 4px 6px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  color: var(--muted);
  background: #111;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.compta-timeline-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
}

.compta-timeline-item.is-different .compta-timeline-content {
  border-color: rgba(255,153,0,.24);
}

.compta-timeline-item.is-same .compta-timeline-content {
  border-color: rgba(86,194,113,.18);
}

.compta-timeline-item.is-local-only .compta-timeline-content {
  border-color: rgba(216,73,61,.20);
}

.compta-timeline-item.is-source-only .compta-timeline-content {
  border-color: rgba(101,167,255,.22);
}

.compta-entry-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compta-entry-lane {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(0,0,0,.22);
}

.compta-entry-lane.ls {
  background: rgba(101,167,255,.045);
}

.compta-entry-source {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.compta-entry-lane strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.compta-entry-lane strong span {
  color: var(--muted);
}

.compta-entry-lane.ls strong {
  color: #d8e7ff;
}

.compta-entry-lane small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.compta-entry-lane .muted {
  color: #666;
}

.compta-entry-action {
  min-width: 92px;
  display: flex;
  justify-content: flex-end;
}

.compta-entry-action form {
  margin: 0;
}

.compta-entry-action .btn {
  min-width: 86px;
}

.compta-run-details {
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.compta-run-details > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.compta-run-details .correction-run-breakdown {
  margin-top: 12px;
}

.compta-run-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 1040px) {
  .compta-timeline-content {
    grid-template-columns: 1fr;
  }

  .compta-entry-action {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .compta-sync-panel .panel-head,
  .compta-sync-status-row {
    align-items: stretch;
    flex-direction: column;
  }

  .compta-sync-actions,
  .compta-sync-actions .btn {
    width: 100%;
  }

  .compta-timeline {
    padding-left: 10px;
  }

  .compta-timeline::before {
    display: none;
  }

  .compta-timeline-item {
    grid-template-columns: 1fr;
  }

  .compta-timeline-marker {
    padding-top: 0;
  }

  .compta-timeline-marker::after {
    display: none;
  }

  .compta-entry-compare {
    grid-template-columns: 1fr;
  }

  .compta-entry-lane {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .compta-entry-action,
  .compta-entry-action form,
  .compta-entry-action .btn {
    width: 100%;
  }
}

/* =========================================================
   COMPTA LS v1.7 - meme direction artistique que le site
   ========================================================= */

.page-corrections .compta-sync-panel,
.page-corrections .compta-presence-panel,
.page-corrections .compta-run-panel,
.page-corrections .compta-empty-state {
  border-color: var(--border-main);
  background: linear-gradient(180deg, rgba(27, 27, 26, 0.86), rgba(8, 9, 9, 0.9)),
    var(--surface-main);
}

.page-corrections .compta-sync-panel {
  margin-top: 16px;
}

.page-corrections .compta-extension-download {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
}

.page-corrections .compta-extension-download:hover {
  border-color: rgba(213, 31, 38, 0.48);
  background: rgba(213, 31, 38, 0.11);
}

.page-corrections .compta-employee {
  border-color: var(--border-main);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 24, 23, 0.76), rgba(10, 10, 10, 0.82)),
    var(--surface-main);
  box-shadow: none;
}

.page-corrections .compta-employee.has-difference {
  border-color: rgba(213, 31, 38, 0.30);
}

.page-corrections .compta-employee.is-synced {
  border-color: rgba(86, 194, 113, 0.24);
}

.page-corrections .compta-employee.no-source {
  border-color: var(--border-main);
}

.page-corrections .compta-employee > summary {
  position: relative;
  min-height: 62px;
  padding: 11px 52px 11px 13px;
  border-radius: 8px;
}

.page-corrections .compta-employee > summary:hover,
.page-corrections .compta-employee[open] > summary {
  background: rgba(255, 255, 255, 0.032);
}

/* Petit + identique aux volets du reste du site. */

.page-corrections .compta-employee > summary::after {
  content: "+";
  position: absolute;
  right: 13px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-main);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.page-corrections .compta-employee > summary:hover::after,
.page-corrections .compta-employee[open] > summary::after {
  border-color: rgba(213, 31, 38, 0.55);
  color: #fff;
  background: rgba(213, 31, 38, 0.16);
}

.page-corrections .compta-employee[open] > summary::after {
  content: "−";
}

.page-corrections .compta-employee-body {
  border-top-color: var(--border-main);
  background: rgba(0, 0, 0, 0.17);
}

.page-corrections .compta-timeline::before {
  background: linear-gradient(180deg, rgba(213, 31, 38, 0.42), rgba(255, 255, 255, 0.055));
}

.page-corrections .compta-timeline-marker::after {
  border-color: #171717;
  background: #d51f26;
  box-shadow: 0 0 0 2px rgba(213, 31, 38, 0.16);
}

.page-corrections .compta-timeline-item.is-same .compta-timeline-marker::after {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(86, 194, 113, 0.14);
}

.page-corrections .compta-timeline-item.is-local-only .compta-timeline-marker::after,
.page-corrections .compta-timeline-item.is-source-only .compta-timeline-marker::after,
.page-corrections .compta-timeline-item.is-different .compta-timeline-marker::after {
  background: #d51f26;
  box-shadow: 0 0 0 2px rgba(213, 31, 38, 0.16);
}

.page-corrections .compta-timeline-marker span {
  border-color: var(--border-main);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(12, 12, 12, 0.94);
}

.page-corrections .compta-timeline-content {
  border-color: var(--border-main);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.page-corrections .compta-timeline-item.is-different .compta-timeline-content,
.page-corrections .compta-timeline-item.is-local-only .compta-timeline-content,
.page-corrections .compta-timeline-item.is-source-only .compta-timeline-content {
  border-color: rgba(213, 31, 38, 0.24);
}

.page-corrections .compta-timeline-item.is-same .compta-timeline-content {
  border-color: rgba(86, 194, 113, 0.17);
}

.page-corrections .compta-entry-lane,
.page-corrections .compta-entry-lane.ls {
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.23);
}

.page-corrections .compta-entry-lane.ls strong {
  color: var(--text);
}

.page-corrections .compta-entry-source {
  color: var(--muted);
}

.page-corrections .compta-run-details {
  border-top-color: var(--border-main);
}

.page-corrections .compta-run-details > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding-right: 38px;
  list-style: none;
  color: var(--text);
}

.page-corrections .compta-run-details > summary::-webkit-details-marker {
  display: none;
}

.page-corrections .compta-run-details > summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-main);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
}

.page-corrections .compta-run-details[open] > summary::after {
  content: "−";
  border-color: rgba(213, 31, 38, 0.55);
  color: #fff;
  background: rgba(213, 31, 38, 0.16);
}

@media (max-width: 760px) {
  .page-corrections .compta-employee > summary {
    padding-right: 48px;
  }

  .page-corrections .compta-sync-actions .compta-extension-download {
    width: 100%;
  }
}

/* =========================================================
   CHECKING v1.14 - selection multiple Opera / Chromium
   ========================================================= */

.page-corrections .checking-batch-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 16px 0;
  margin: 0;
}

.page-corrections .checking-select-all {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

/* Les styles generaux du site donnent width:100% et min-height:40px aux inputs.
   On les neutralise explicitement pour les cases Checking. */

.page-corrections .checking-select-all input[type="checkbox"],
.page-corrections .checking-row-select input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: static;
  display: inline-block;
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  padding: 0 !important;
  margin: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 3px;
  background: rgba(255,255,255,.025);
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  vertical-align: middle;
}

.page-corrections .checking-select-all input[type="checkbox"]:checked,
.page-corrections .checking-row-select input[type="checkbox"]:checked {
  border-color: rgba(213,31,38,.9);
  background: #d51f26;
  box-shadow: inset 0 0 0 3px #171717;
}

.page-corrections .checking-select-all input[type="checkbox"]:indeterminate {
  border-color: rgba(213,31,38,.9);
  background: linear-gradient(#d51f26,#d51f26) center / 8px 2px no-repeat,
    #171717;
}

.page-corrections .checking-select-all input[type="checkbox"]:focus-visible,
.page-corrections .checking-row-select input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(213,31,38,.62);
  outline-offset: 2px;
}

.page-corrections .checking-row-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 32px;
  margin: 0 2px 0 0;
  cursor: pointer;
}

/* v1.11 utilisait un span comme faux carre ; le vrai checkbox est maintenant
   suffisamment petit et fiable, donc ce decor n'est plus necessaire. */

.page-corrections .checking-row-select > span {
  display: none;
}

.page-corrections .checking-batch-bar .btn[disabled] {
  opacity: .45;
  cursor: default;
}

.page-corrections .checking-batch-bar [data-checking-batch-count] {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  font-size: 11px;
  font-weight: 900;
}

.page-corrections .compta-entry-action {
  align-items: center;
  gap: 5px;
}

@media (max-width: 760px) {
  .page-corrections .checking-batch-bar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 10px 0;
  }

  .page-corrections .checking-batch-bar .btn {
    width: 100%;
  }

  .page-corrections .checking-select-all {
    min-height: 34px;
  }
}

/* v1.16 - semaine suivante en préparation */

.week-chip.future-staging {
  border-color: rgba(255, 153, 0, 0.48);
  background: linear-gradient(180deg, rgba(255, 153, 0, 0.10), rgba(255, 153, 0, 0.035));
}

.week-chip.future-staging strong {
  color: var(--amber-2);
}

.future-week-notice,
.payroll-forward-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.future-week-notice strong,
.payroll-forward-notice strong {
  color: var(--amber-2);
}

.future-week-notice .btn,
.payroll-forward-notice .btn {
  margin-left: auto;
}

@media (max-width: 760px) {
  .future-week-notice .btn,
  .payroll-forward-notice .btn {
    width: 100%;
    margin-left: 0;
  }
}

/* =============================================================
   SOCIÉTÉ / CADENCE DE L'ATELIER — panneau compact et lisible
   Le détail quotidien est accessible sans ajouter un 2e tableau
   visible en permanence sous le récapitulatif clients.
   ============================================================= */

.customer-activity-panel .society-collapsible-content > .table-wrap {
  margin-top: 17px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, .09);
  background: rgba(5, 7, 7, .52);
}

.customer-activity-panel .customer-activity-table:not(.activity-frequency-table) thead tr:first-child th {
  padding-block: 13px;
  background: rgba(87, 59, 23, .27);
  font-size: 11px;
  letter-spacing: .015em;
}

.customer-activity-panel .customer-activity-table:not(.activity-frequency-table) thead tr:nth-child(2) th {
  padding-block: 10px;
  font-size: 10px;
  letter-spacing: .05em;
}

.customer-activity-panel .customer-activity-table:not(.activity-frequency-table) thead tr:first-child th:nth-child(2) {
  box-shadow: inset 0 2px 0 rgba(232, 78, 90, .60);
}

.customer-activity-panel .customer-activity-table:not(.activity-frequency-table) thead tr:first-child th:nth-child(3) {
  box-shadow: inset 0 2px 0 rgba(255, 190, 79, .68);
}

.customer-activity-panel .customer-activity-table:not(.activity-frequency-table) thead tr:first-child th:nth-child(4) {
  box-shadow: inset 0 2px 0 rgba(63, 190, 202, .60);
}

.customer-activity-panel .customer-activity-table:not(.activity-frequency-table) tbody td {
  padding-block: 12px;
}

.customer-activity-panel .customer-activity-table tbody td:first-child strong {
  color: #f7f4ee;
  font-size: 13px;
  font-weight: 900;
}

.customer-activity-rhythm {
  margin-top: 19px;
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, .095);
  border-radius: 10px;
  background: radial-gradient(ellipse at 100% 0%, rgba(255, 170, 67, .045), transparent 50%),
    linear-gradient(180deg, rgba(27, 26, 24, .72), rgba(7, 9, 9, .78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.activity-rhythm-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-bottom: 17px;
}

.activity-rhythm-heading-copy {
  min-width: 0;
}

.activity-rhythm-heading .eyebrow {
  margin: 0 0 3px;
  color: var(--amber-2);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .055em;
}

.activity-rhythm-heading h4 {
  margin: 0;
  color: #f5f3ed;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 900;
  line-height: 1.25;
}

.activity-rhythm-subtitle {
  margin: 5px 0 0;
  color: #a9aca9;
  font-size: 12px;
  line-height: 1.45;
}

.activity-rhythm-opening {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 189, 90, .18);
  border-radius: 8px;
  background: rgba(255, 189, 90, .055);
}

.activity-rhythm-opening svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  color: var(--amber-2);
}

.activity-rhythm-opening div {
  display: grid;
  gap: 2px;
}

.activity-rhythm-opening small {
  color: #aaa9a3;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.activity-rhythm-opening strong {
  color: #ffcd76;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.activity-frequency-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.activity-frequency-card {
  --rhythm-accent: #f38b94;
  --rhythm-tint: rgba(226, 74, 85, .085);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 19px;
  min-width: 0;
  min-height: 166px;
  padding: 17px 17px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 9px;
  background: radial-gradient(ellipse at 95% 0%, var(--rhythm-tint), transparent 63%),
    linear-gradient(135deg, rgba(33, 32, 31, .88), rgba(10, 12, 12, .9));
  transition: border-color .18s ease, background .18s ease;
}

.activity-frequency-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--rhythm-accent);
  opacity: .88;
}

.activity-frequency-card.repair {
  --rhythm-accent: #ff8b96;
  --rhythm-tint: rgba(231, 52, 68, .13);
}

.activity-frequency-card.customization {
  --rhythm-accent: #ffcd75;
  --rhythm-tint: rgba(244, 170, 46, .13);
}

.activity-frequency-card.electronic-key {
  --rhythm-accent: #8bdee8;
  --rhythm-tint: rgba(35, 180, 201, .12);
}

.activity-frequency-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.activity-frequency-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #e9e6df;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.activity-frequency-title i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--rhythm-accent);
  box-shadow: 0 0 0 4px var(--rhythm-tint);
}

.activity-frequency-count {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .095);
  border-radius: 999px;
  color: #b9b7b0;
  background: rgba(0, 0, 0, .22);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.activity-frequency-metric {
  display: grid;
  gap: 5px;
}

.activity-frequency-metric > span {
  color: #a8aaa8;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.activity-frequency-metric > strong {
  color: var(--rhythm-accent);
  font-size: clamp(28px, 2.6vw, 37px);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

.activity-frequency-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #949a95;
}

.activity-frequency-footer-line {
  width: 18px;
  height: 2px;
  flex: 0 0 18px;
  border-radius: 2px;
  background: var(--rhythm-accent);
  opacity: .7;
}

.activity-frequency-card-footer small {
  font-size: 10px;
  font-weight: 750;
  line-height: 1.3;
}

/* Le détail quotidien est replié par défaut pour limiter la hauteur. */

.activity-rhythm-daily {
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 8px;
  background: rgba(0, 0, 0, .23);
}

.activity-rhythm-daily-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 65px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  transition: background-color 150ms ease;
}

.activity-rhythm-daily-summary::-webkit-details-marker {
  display: none;
}

.activity-rhythm-daily-summary::marker {
  content: "";
}

.activity-rhythm-daily-summary:hover,
.activity-rhythm-daily[open] > .activity-rhythm-daily-summary {
  background: rgba(255, 255, 255, .032);
}

.activity-rhythm-daily-summary:focus-visible {
  outline: 2px solid var(--amber-2);
  outline-offset: -3px;
}

.activity-rhythm-daily-label {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.activity-rhythm-daily-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(255, 193, 90, .16);
  border-radius: 7px;
  color: var(--amber-2);
  background: rgba(255, 193, 90, .06);
}

.activity-rhythm-daily-icon svg {
  width: 19px;
  height: 19px;
}

.activity-rhythm-daily-label > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.activity-rhythm-daily-label strong {
  color: #f0eee9;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.activity-rhythm-daily-label small {
  color: #999d9a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.activity-rhythm-daily-action {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: #c8c7c0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.activity-rhythm-daily-action b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 6px;
  color: var(--amber-2);
  background: rgba(255, 255, 255, .035);
  font-size: 20px;
  font-weight: 750;
  line-height: 1;
  transition: transform 150ms ease;
}

.activity-rhythm-daily[open] .activity-rhythm-daily-action b {
  transform: rotate(45deg);
}

.activity-rhythm-daily-body {
  padding: 0 12px 12px;
}

.activity-rhythm-table-wrap {
  margin: 0;
  overflow-x: auto;
  border-radius: 7px;
  border-color: rgba(255, 255, 255, .065);
  background: rgba(2, 4, 4, .5);
}

.activity-frequency-table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
  border-collapse: collapse;
}

.activity-frequency-table th,
.activity-frequency-table td {
  padding: 11px 14px;
  text-align: center;
  vertical-align: middle;
}

.activity-frequency-table th:first-child,
.activity-frequency-table td:first-child {
  width: 31%;
  text-align: left;
}

.activity-frequency-table thead th {
  padding-block: 12px;
  color: #dbd4c6;
  background: rgba(85, 59, 25, .21);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-frequency-table thead th:nth-child(2) {
  color: #ffa7ae;
}

.activity-frequency-table thead th:nth-child(3) {
  color: #ffcf76;
}

.activity-frequency-table thead th:nth-child(4) {
  color: #9de0e8;
}

.activity-frequency-table tbody td {
  border-color: rgba(255, 255, 255, .06);
}

.activity-frequency-table tbody td:first-child strong {
  display: block;
  color: #f1efe9;
  font-size: 12px;
  font-weight: 900;
}

.activity-frequency-table tbody td:first-child small,
.activity-frequency-table tfoot th:first-child small {
  display: block;
  margin-top: 3px;
  color: #929793;
  font-size: 10px;
  font-weight: 700;
}

.activity-frequency-table tbody tr.is-today {
  background: rgba(255, 193, 90, .05);
}

.activity-frequency-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.activity-frequency-value.repair {
  color: #ffb6bd;
  border-color: rgba(225, 64, 79, .21);
  background: rgba(225, 64, 79, .09);
}

.activity-frequency-value.customization {
  color: #ffd084;
  border-color: rgba(255, 187, 76, .23);
  background: rgba(255, 187, 76, .085);
}

.activity-frequency-value.electronic-key {
  color: #a0e6ed;
  border-color: rgba(57, 181, 201, .24);
  background: rgba(57, 181, 201, .09);
}

.activity-frequency-empty {
  color: #606763;
  font-weight: 750;
}

.activity-frequency-table tfoot {
  background: rgba(255, 193, 90, .055);
}

.activity-frequency-table tfoot th,
.activity-frequency-table tfoot td {
  padding-block: 12px;
  border-top: 1px solid rgba(255, 193, 90, .17);
  color: #f1eee7;
}

.activity-frequency-table tfoot th strong {
  font-weight: 950;
}

.activity-frequency-total {
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.activity-frequency-total.repair {
  color: #ffb6bd;
}

.activity-frequency-total.customization {
  color: #ffd084;
}

.activity-frequency-total.electronic-key {
  color: #a0e6ed;
}

.activity-rhythm-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 13px 2px 0;
  color: #8f9690;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}

.activity-rhythm-info-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  color: #a5a9a3;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  font-weight: bold;
  line-height: 1;
}

@media (max-width: 1050px) {
  .activity-frequency-cards {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }
}

@media (max-width: 680px) {
  .customer-activity-rhythm {
    padding: 13px;
    margin-top: 14px;
  }

  .activity-rhythm-heading {
    align-items: flex-start;
  }

  .activity-rhythm-opening {
    width: 100%;
  }

  .activity-frequency-cards {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .activity-frequency-card {
    min-height: 145px;
    gap: 12px;
  }

  .activity-frequency-metric > strong {
    font-size: 32px;
  }

  .activity-rhythm-daily-summary {
    align-items: flex-start;
  }

  .activity-rhythm-daily-action {
    font-size: 0;
    gap: 0;
  }

  .activity-rhythm-daily-action b {
    font-size: 20px;
  }

  .activity-rhythm-daily-body {
    padding: 0 8px 8px;
  }
}

/* Suspension, remuneration totals and read-only weekly layout. */

.suspension-global-banner {
  background: #421117;
  border: 1px solid #a93643;
  color: #ffe0e3;
  padding: 14px 16px;
  border-radius: 12px;
  margin: 0 0 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.suspension-global-banner strong {
  color: #fff;
}

.suspension-global-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.suspension-global-item {
  display: inline-flex;
  gap: 7px;
  align-items: flex-start;
  flex-direction: column;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .92rem;
}

.suspension-lock {
  max-width: 760px;
  margin: 40px auto;
  text-align: center;
  border: 1px solid #a93643 !important;
  box-shadow: 0 20px 60px rgba(87,10,20,.28);
}

.suspension-lock-mark {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background: #5b111a;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  border: 2px solid #b94350;
}

.suspension-lock h3 {
  font-size: 1.7rem;
  margin-bottom: 8px;
  color: #ffbfc6;
}

.suspension-lock .suspension-reason {
  margin: 18px auto 0;
  padding: 14px 16px;
  max-width: 600px;
  background: rgba(169,54,67,.12);
  border: 1px solid rgba(169,54,67,.35);
  border-radius: 10px;
  text-align: left;
}

tr.is-suspended {
  background: rgba(169,54,67,.08);
}

.suspension-badge {
  display: block;
  width: max-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #8d202d;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}

.suspension-global-reason {
  font-size: .8rem;
  opacity: .92;
  max-width: 520px;
}

.suspension-row-reason {
  display: block;
  max-width: 420px;
  margin-top: 5px;
  color: #e9a6ad;
}

/* Alignement des totaux de paie et du solde final, sans changement de calcul. */

.society-salary-card {
  display: flex;
  flex-direction: column;
}

.society-salary-card .society-salary-values {
  margin-bottom: 13px;
}

.society-salary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 12px 2px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.society-salary-total span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
}

.society-salary-total strong {
  color: var(--amber-2);
  font-size: 20px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.week-company-money-list > .week-balance-total {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  border-color: rgba(255, 192, 82, 0.32);
  background: linear-gradient(100deg, rgba(255, 192, 82, 0.09), rgba(0, 0, 0, 0.22));
}

.week-company-money-list > .week-balance-total strong {
  margin-top: 0;
  color: var(--amber-2);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Sans formulaire de saisie (Gouvernement / accès lecture seule),
         les informations financières occupent réellement toute la largeur. */

.week-layout.week-layout-infos-only {
  grid-template-columns: minmax(0, 1fr);
}

.week-layout.week-layout-infos-only > .panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.week-layout.week-layout-infos-only .week-company-money-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1450px) {
  .week-layout.week-layout-infos-only .week-company-money-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .week-layout.week-layout-infos-only .week-company-money-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .society-salary-total span {
    font-size: 14px;
  }

  .society-salary-total strong {
    font-size: 18px;
  }

  .week-company-money-list > .week-balance-total strong {
    font-size: 19px;
  }
}

.week-company-money-list > .week-balance-total.is-negative {
  border-color: rgba(216, 73, 61, 0.45);
}

.week-company-money-list > .week-balance-total.is-negative strong {
  color: var(--red);
}

@media (max-width: 520px) {
  .week-company-money-list > .week-balance-total {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

.bank-columns-editable > col:nth-child(1) {
  width: 9%;
}

.bank-columns-editable > col:nth-child(2) {
  width: 14%;
}

.bank-columns-editable > col:nth-child(3) {
  width: 12%;
}

.bank-columns-editable > col:nth-child(4) {
  width: 18%;
}

.bank-columns-editable > col:nth-child(5) {
  width: 25%;
}

.bank-columns-editable > col:nth-child(6) {
  width: 10%;
}

.bank-columns-editable > col:nth-child(7) {
  width: 12%;
}

.bank-columns-readonly > col:nth-child(1) {
  width: 10%;
}

.bank-columns-readonly > col:nth-child(2) {
  width: 16%;
}

.bank-columns-readonly > col:nth-child(3) {
  width: 14%;
}

.bank-columns-readonly > col:nth-child(4) {
  width: 20%;
}

.bank-columns-readonly > col:nth-child(5) {
  width: 30%;
}

.bank-columns-readonly > col:nth-child(6) {
  width: 10%;
}

/* Shared view classes replacing static HTML style attributes. */

.impersonation-return-form {
  display: inline-block;
  margin-left: 10px;
}

.suspension-end-date {
  margin-top: 14px;
}

.suspension-lock .suspension-help {
  margin-top: 18px;
}

.contract-signature-status {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contract-signature-status .contract-signature-filename {
  margin: 0;
}

.contract-signature-warning {
  margin-top: 8px;
  margin-bottom: 0;
}

.contract-signature-empty {
  margin-top: 8px;
}

.contract-history-delete {
  margin: 0;
}

.tutorial-actions {
  margin-top: 16px;
}

.tutorial-note {
  margin-top: 14px;
}

.week-bar-track > i {
  width: var(--bar-width, 0%);
}
