@charset "UTF-8";
.dark {
  --md-sys-color-primary: rgb(131 210 228);
  --md-sys-color-surface-tint: rgb(131 210 228);
  --md-sys-color-on-primary: rgb(0 54 63);
  --md-sys-color-primary-container: rgb(0 78 90);
  --md-sys-color-on-primary-container: rgb(165 238 255);
  --md-sys-color-secondary: rgb(178 203 209);
  --md-sys-color-on-secondary: rgb(28 52 57);
  --md-sys-color-secondary-container: rgb(51 74 80);
  --md-sys-color-on-secondary-container: rgb(205 231 238);
  --md-sys-color-tertiary: rgb(189 197 235);
  --md-sys-color-on-tertiary: rgb(39 47 77);
  --md-sys-color-tertiary-container: rgb(61 69 101);
  --md-sys-color-on-tertiary-container: rgb(220 225 255);
  --md-sys-color-error: rgb(255 180 171);
  --md-sys-color-on-error: rgb(105 0 5);
  --md-sys-color-error-container: rgb(147 0 10);
  --md-sys-color-on-error-container: rgb(255 218 214);
  --md-sys-color-background: rgb(14 20 22);
  --md-sys-color-on-background: rgb(222 227 229);
  --md-sys-color-surface: rgb(14 20 22);
  --md-sys-color-on-surface: rgb(222 227 229);
  --md-sys-color-surface-variant: rgb(63 72 75);
  --md-sys-color-on-surface-variant: rgb(191 200 203);
  --md-sys-color-outline: rgb(137 146 149);
  --md-sys-color-outline-variant: rgb(63 72 75);
  --md-sys-color-shadow: rgb(0 0 0);
  --md-sys-color-scrim: rgb(0 0 0);
  --md-sys-color-inverse-surface: rgb(222 227 229);
  --md-sys-color-inverse-on-surface: rgb(43 49 51);
  --md-sys-color-inverse-primary: rgb(0 104 119);
  --md-sys-color-primary-fixed: rgb(165 238 255);
  --md-sys-color-on-primary-fixed: rgb(0 31 37);
  --md-sys-color-primary-fixed-dim: rgb(131 210 228);
  --md-sys-color-on-primary-fixed-variant: rgb(0 78 90);
  --md-sys-color-secondary-fixed: rgb(205 231 238);
  --md-sys-color-on-secondary-fixed: rgb(5 31 36);
  --md-sys-color-secondary-fixed-dim: rgb(178 203 209);
  --md-sys-color-on-secondary-fixed-variant: rgb(51 74 80);
  --md-sys-color-tertiary-fixed: rgb(220 225 255);
  --md-sys-color-on-tertiary-fixed: rgb(17 26 55);
  --md-sys-color-tertiary-fixed-dim: rgb(189 197 235);
  --md-sys-color-on-tertiary-fixed-variant: rgb(61 69 101);
  --md-sys-color-surface-dim: rgb(14 20 22);
  --md-sys-color-surface-bright: rgb(52 58 60);
  --md-sys-color-surface-container-lowest: rgb(9 15 17);
  --md-sys-color-surface-container-low: rgb(23 29 30);
  --md-sys-color-surface-container: rgb(27 33 34);
  --md-sys-color-surface-container-high: rgb(37 43 44);
  --md-sys-color-surface-container-highest: rgb(48 54 55);
}

.light {
  --md-sys-color-primary: rgb(0 104 119);
  --md-sys-color-surface-tint: rgb(0 104 119);
  --md-sys-color-on-primary: rgb(255 255 255);
  --md-sys-color-primary-container: rgb(165 238 255);
  --md-sys-color-on-primary-container: rgb(0 78 90);
  --md-sys-color-secondary: rgb(75 98 104);
  --md-sys-color-on-secondary: rgb(255 255 255);
  --md-sys-color-secondary-container: rgb(205 231 238);
  --md-sys-color-on-secondary-container: rgb(51 74 80);
  --md-sys-color-tertiary: rgb(85 93 126);
  --md-sys-color-on-tertiary: rgb(255 255 255);
  --md-sys-color-tertiary-container: rgb(220 225 255);
  --md-sys-color-on-tertiary-container: rgb(61 69 101);
  --md-sys-color-error: rgb(186 26 26);
  --md-sys-color-on-error: rgb(255 255 255);
  --md-sys-color-error-container: rgb(255 218 214);
  --md-sys-color-on-error-container: rgb(147 0 10);
  --md-sys-color-background: rgb(245 250 252);
  --md-sys-color-on-background: rgb(23 29 30);
  --md-sys-color-surface: rgb(245 250 252);
  --md-sys-color-on-surface: rgb(23 29 30);
  --md-sys-color-surface-variant: rgb(219 228 231);
  --md-sys-color-on-surface-variant: rgb(63 72 75);
  --md-sys-color-outline: rgb(111 121 123);
  --md-sys-color-outline-variant: rgb(191 200 203);
  --md-sys-color-shadow: rgb(0 0 0);
  --md-sys-color-scrim: rgb(0 0 0);
  --md-sys-color-inverse-surface: rgb(43 49 51);
  --md-sys-color-inverse-on-surface: rgb(236 242 243);
  --md-sys-color-inverse-primary: rgb(131 210 228);
  --md-sys-color-primary-fixed: rgb(165 238 255);
  --md-sys-color-on-primary-fixed: rgb(0 31 37);
  --md-sys-color-primary-fixed-dim: rgb(131 210 228);
  --md-sys-color-on-primary-fixed-variant: rgb(0 78 90);
  --md-sys-color-secondary-fixed: rgb(205 231 238);
  --md-sys-color-on-secondary-fixed: rgb(5 31 36);
  --md-sys-color-secondary-fixed-dim: rgb(178 203 209);
  --md-sys-color-on-secondary-fixed-variant: rgb(51 74 80);
  --md-sys-color-tertiary-fixed: rgb(220 225 255);
  --md-sys-color-on-tertiary-fixed: rgb(17 26 55);
  --md-sys-color-tertiary-fixed-dim: rgb(189 197 235);
  --md-sys-color-on-tertiary-fixed-variant: rgb(61 69 101);
  --md-sys-color-surface-dim: rgb(213 219 221);
  --md-sys-color-surface-bright: rgb(245 250 252);
  --md-sys-color-surface-container-lowest: rgb(255 255 255);
  --md-sys-color-surface-container-low: rgb(239 244 246);
  --md-sys-color-surface-container: rgb(233 239 240);
  --md-sys-color-surface-container-high: rgb(228 233 235);
  --md-sys-color-surface-container-highest: rgb(222 227 229);
}

:root {
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

:root {
  --font-family: 'Roboto', sans-serif;
  --text-sm: 12px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
}

:root {
  --focus-ring: 0 0 0 2px rgba(45, 98, 139, 0.2);
}

/* LIGHT THEME */
.light {
  --primary: var(--md-sys-color-primary);
  --on-primary: var(--md-sys-color-on-primary);
  --primary-container: var(--md-sys-color-primary-container);
  --secondary: var(--md-sys-color-secondary);
  --on-secondary: var(--md-sys-color-on-secondary);
  --tertiary: var(--md-sys-color-tertiary);
  --error: var(--md-sys-color-error);
  --on-error: var(--md-sys-color-on-error);
  --background: var(--md-sys-color-background);
  --on-background: var(--md-sys-color-on-background);
  --surface: var(--md-sys-color-surface);
  --on-surface: var(--md-sys-color-on-surface);
  --surface-variant: var(--md-sys-color-surface-variant);
  --on-surface-variant: var(--md-sys-color-on-surface-variant);
  --outline: var(--md-sys-color-outline);
  --outline-variant: var(--md-sys-color-outline-variant);
  /* BONUS (ultra utile) */
  --surface-low: var(--md-sys-color-surface-container-low);
  --surface: var(--md-sys-color-surface-container);
  --surface-high: var(--md-sys-color-surface-container-high);
}

.dark {
  --primary: var(--md-sys-color-primary);
  --on-primary: var(--md-sys-color-on-primary);
  --primary-container: var(--md-sys-color-primary-container);
  --secondary: var(--md-sys-color-secondary);
  --on-secondary: var(--md-sys-color-on-secondary);
  --tertiary: var(--md-sys-color-tertiary);
  --error: var(--md-sys-color-error);
  --on-error: var(--md-sys-color-on-error);
  --background: var(--md-sys-color-background);
  --on-background: var(--md-sys-color-on-background);
  --surface: var(--md-sys-color-surface);
  --on-surface: var(--md-sys-color-on-surface);
  --surface-variant: var(--md-sys-color-surface-variant);
  --on-surface-variant: var(--md-sys-color-on-surface-variant);
  --outline: var(--md-sys-color-outline);
  --outline-variant: var(--md-sys-color-outline-variant);
  --surface-low: var(--md-sys-color-surface-container-low);
  --surface: var(--md-sys-color-surface-container);
  --surface-high: var(--md-sys-color-surface-container-high);
}

.m-btn {
  --btn-bg: var(--primary);
  --btn-color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: var(--text-md);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.1s ease, background 0.2s ease;
  /* Hover */
}
.m-btn:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}
.m-btn {
  /* Active */
}
.m-btn:active {
  transform: scale(0.98);
}
.m-btn {
  /* Focus (accessibilité) */
}
.m-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.m-btn {
  /* Ripple */
}
.m-btn::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 120%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: inherit;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.6s ease;
}
.m-btn:active::after {
  transform: scale(1);
  opacity: 1;
  transition: 0s;
}
.m-btn {
  /* Disabled */
}
.m-btn:disabled, .m-btn.is-disabled {
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  cursor: not-allowed;
  box-shadow: none;
}

/* PRIMARY (default) */
.m-btn--primary {
  --btn-bg: var(--primary);
  --btn-color: var(--on-primary);
}

/* SECONDARY */
.m-btn--secondary {
  --btn-bg: var(--secondary);
  --btn-color: var(--on-secondary);
}

/* OUTLINE */
.m-btn--outline {
  --btn-bg: transparent;
  --btn-color: var(--primary);
  border: 1px solid var(--outline);
}

/* TEXT */
.m-btn--text {
  --btn-bg: transparent;
  --btn-color: var(--primary);
}

.m-btn__icon {
  display: flex;
  align-items: center;
  font-size: 16px;
}

.m-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  /* LABEL */
}
.m-field__label {
  font-size: var(--text-sm);
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}
.m-field {
  /* INPUT */
}
.m-field__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-size: var(--text-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.m-field__input::-moz-placeholder {
  color: var(--on-surface-variant);
  opacity: 0.6;
}
.m-field__input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.6;
}
.m-field__input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  outline: none;
}
.m-field {
  /* HELPER TEXT */
}
.m-field__helper {
  font-size: var(--text-sm);
  color: var(--on-surface-variant);
}
.m-field {
  /* ERROR TEXT */
}
.m-field__error {
  font-size: var(--text-sm);
  color: var(--error);
  display: none;
}
.m-field {
  /* STATES */
  /* Focus state (label) */
}
.m-field__input:focus ~ .m-field__label {
  color: var(--primary);
}
.m-field {
  /* ERROR */
}
.m-field.is-error .m-field__input {
  border-color: var(--error);
}
.m-field.is-error .m-field__error {
  display: block;
}
.m-field {
  /* DISABLED */
}
.m-field.is-disabled .m-field__input {
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  cursor: not-allowed;
}

.m-field--floating {
  position: relative;
}
.m-field--floating .m-field__input {
  width: 100%;
  padding: 20px 12px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-size: var(--text-md);
}
.m-field--floating .m-field__input:focus {
  border-color: var(--primary);
  outline: none;
}
.m-field--floating .m-field__label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%) scale(1);
  transform-origin: left center;
  color: var(--on-surface-variant);
  font-size: var(--text-md);
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), color 0.2s ease, top 0.2s ease;
}
.m-field--floating {
  /* État actif */
}
.m-field--floating .m-field__input:not(:-moz-placeholder) + .m-field__label {
  top: 6px;
  transform: translateY(0) scale(0.85);
  color: var(--primary);
}
.m-field--floating .m-field__input:focus + .m-field__label,
.m-field--floating .m-field__input:not(:placeholder-shown) + .m-field__label {
  top: 6px;
  transform: translateY(0) scale(0.85);
  color: var(--primary);
}

.m-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--on-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--outline-variant);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
  /* STRUCTURE */
}
.m-card__header {
  padding: 16px;
  font-weight: 600;
  font-size: var(--text-lg);
}
.m-card__content {
  padding: 16px;
  font-size: var(--text-md);
}
.m-card__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--outline-variant);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Elevated (Material style) */
.m-card--elevated {
  border: none;
  box-shadow: var(--shadow-1);
}
.m-card--elevated:hover {
  box-shadow: var(--shadow-2);
}

/* Outlined (default clean SaaS) */
.m-card--outlined {
  border: 1px solid var(--outline-variant);
}

/* Filled (subtle background) */
.m-card--filled {
  background: var(--surface-low);
}

.m-card--interactive {
  cursor: pointer;
}
.m-card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.m-card--interactive:active {
  transform: translateY(0);
  box-shadow: var(--shadow-1);
}

.m-card--compact .m-card__header,
.m-card--compact .m-card__content,
.m-card--compact .m-card__footer {
  padding: 8px 12px;
}

/* ========================================
   WINDOWS
======================================== */
.windows-container {
  flex: 1;
  overflow: hidden;
}
.windows-container .window {
  display: none;
  flex-direction: column;
  height: 100%;
  background: var(--surface-low);
  position: relative;
}
.windows-container .window.active {
  display: flex;
}
.windows-container .window .window-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.windows-container .window .window-footer::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent);
  background: linear-gradient(to top, color-mix(in srgb, var(--surface) 82%, transparent), transparent);
  pointer-events: none;
}
.windows-container .window .window-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--outline-variant);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
  z-index: 5;
}
.windows-container .window .window-footer .footer-info {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
}
.windows-container .window .window-footer .footer-actions {
  display: flex;
  gap: 10px;
}
.windows-container .window .window-footer .btn {
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.windows-container .window .window-footer {
  /* Secondary */
}
.windows-container .window .window-footer .btn-secondary {
  background: var(--surface-variant);
  color: var(--on-surface-variant);
}
.windows-container .window .window-footer .btn-secondary:hover {
  background: color-mix(in srgb, var(--surface-variant) 72%, var(--on-surface) 8%);
}
.windows-container .window .window-footer {
  /* Danger */
}
.windows-container .window .window-footer .btn-danger {
  background: color-mix(in srgb, var(--error) 14%, var(--surface));
  color: var(--error);
}
.windows-container .window .window-footer .btn-danger:hover {
  background: color-mix(in srgb, var(--error) 22%, var(--surface));
}
.windows-container .window .window-footer {
  /* Light */
}
.windows-container .window .window-footer .btn-light {
  margin-top: 10px;
  align-self: flex-end;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.windows-container .window .window-footer .btn-light:hover {
  filter: brightness(0.94);
}
.windows-container .window .window-footer {
  /* Outline */
}
.windows-container .window .window-footer .btn-outline {
  background: var(--surface);
  color: var(--on-surface);
  border-color: var(--outline);
}
.windows-container .window .window-footer .btn-outline:hover {
  background: var(--surface-variant);
}
.windows-container .window .window-footer {
  /* Primary */
}
.windows-container .window .window-footer .btn-primary {
  background: var(--secondary);
  color: var(--on-secondary);
}
.windows-container .window .window-footer .btn-primary:hover {
  filter: brightness(0.94);
}
.windows-container .window .window-footer {
  /* Disabled */
}
.windows-container .window .window-footer .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.windows-container .window .window-footer .btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.window-btn {
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
}

.window-btn:hover {
  filter: brightness(0.94);
}

.flex-table-container {
  --row-height: 60px;
  --cell-padding-y: 17px;
  --cell-padding-x: 10px;
  --font-size: 14px;
  --icon-size: 1rem;
  --table-height: 300px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: var(--table-height);
  overflow: hidden;
  font-size: var(--font-size);
}

/* Layout général */
body {
  background-color: var(--surface-low);
}

/* =========================
   HEADER + FOOTER + ROW BASE
========================= */
.flex-table-header,
.flex-table-footer,
.flex-row {
  display: grid;
  grid-template-columns: 50px 2fr 2fr 1fr 1fr 80px;
  align-items: center;
}

/* =========================
   HEADER
========================= */
.flex-table-header {
  background: color-mix(in srgb, var(--primary) 92%, var(--surface));
  color: var(--on-primary);
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 2;
  width: calc(100% - 15px);
}
.flex-table-header .cell {
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.sort-icon {
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.6;
}

/* =========================
   FOOTER
========================= */
.flex-table-footer {
  background: var(--surface);
  font-weight: bold;
  position: sticky;
  bottom: 0;
  z-index: 2;
  width: calc(100% - 15px);
}

/* =========================
   BODY
========================= */
.flex-table-body {
  display: grid;
  overflow-y: auto;
  scrollbar-gutter: stable;
  grid-auto-rows: var(--row-height);
}

/* =========================
   ROWS
========================= */
.flex-row {
  border-bottom: 1px solid var(--outline-variant);
  min-height: var(--row-height);
  color: var(--on-surface);
}
.flex-row:nth-child(even) {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.flex-row:hover {
  background: color-mix(in srgb, var(--primary-container) 50%, transparent);
}
.flex-row.select-row {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  cursor: pointer;
}
.flex-row.select-row.selected {
  background-color: color-mix(in srgb, var(--primary-container) 75%, transparent);
}

/* =========================
   CELLS
========================= */
.cell {
  border-right: 1px solid var(--outline-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--cell-padding-y) var(--cell-padding-x);
  height: 100%;
}
.cell:first-child {
  border-left: 1px solid var(--outline-variant);
}
.cell.left {
  justify-content: flex-start;
  text-align: left;
}
.cell.center {
  justify-content: center;
  text-align: center;
}
.cell.right {
  justify-content: flex-end;
  text-align: right;
}

/* =========================
   ACTIONS
========================= */
.actions {
  display: flex;
  gap: 8px;
}

.action-icon {
  font-size: var(--icon-size);
  color: var(--on-surface-variant);
  margin: 0 5px;
  cursor: pointer;
  transition: color 0.2s;
}
.action-icon.edit:hover {
  color: var(--primary);
}
.action-icon.delete:hover {
  color: var(--error);
}

.btn-action {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--on-surface-variant);
  transition: 0.2s;
}
.btn-action:hover {
  color: var(--primary);
  transform: scale(1.15);
}

/* =========================
   SIZE VARIANTS
========================= */
.table-small {
  --row-height: 38px;
  --cell-padding-y: 10px;
  --font-size: 12px;
  --icon-size: 0.9rem;
  --table-height: 220px;
}

.table-medium {
  --row-height: 48px;
  --cell-padding-y: 11px;
  --font-size: 13px;
  --icon-size: 0.95rem;
  --table-height: 260px;
}

.table-large {
  --row-height: 65px;
  --cell-padding-y: 20px;
  --font-size: 15px;
  --icon-size: 1.1rem;
  --table-height: 340px;
}

/* =========================
   LOADER + SENTINEL
========================= */
.table-loader {
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.table-sentinel {
  height: 1px;
}

/* =========================
   SEARCH
========================= */
.dt-search-wrapper {
  margin-bottom: 12px;
  display: flex;
  justify-content: flex-end;
}
.dt-search-wrapper .dt-search-input {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  min-width: 220px;
  font-size: var(--text-md);
  transition: all 0.2s ease;
}
.dt-search-wrapper .dt-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group * {
  box-sizing: border-box;
}
.form-group .required {
  color: var(--error);
  margin-left: 4px;
  font-weight: 600;
  font-size: 0.85em;
  vertical-align: top;
  opacity: 0.85;
}
.form-group .form-field {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 150px;
  margin-bottom: 5px;
}
.form-group .form-field input,
.form-group .form-field select,
.form-group .form-field textarea,
.form-group .form-field .custom-multi-select {
  width: 100%;
  padding: 18px 12px 8px 12px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  outline: none;
  background: var(--surface);
  color: var(--on-surface);
  resize: vertical;
}
.form-group .form-field input:is(.custom-multi-select),
.form-group .form-field select:is(.custom-multi-select),
.form-group .form-field textarea:is(.custom-multi-select),
.form-group .form-field .custom-multi-select:is(.custom-multi-select) {
  padding-left: 0;
  padding-right: 0;
  padding-top: 22px;
}
.form-group .form-field input:focus,
.form-group .form-field select:focus,
.form-group .form-field textarea:focus,
.form-group .form-field .custom-multi-select:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.form-group .form-field input:not(:-moz-placeholder) + label, .form-group .form-field select:not(:-moz-placeholder) + label, .form-group .form-field textarea:not(:-moz-placeholder) + label, .form-group .form-field .custom-multi-select:not(:-moz-placeholder) + label {
  top: 4px;
  left: 10px;
  font-size: var(--text-sm);
  color: var(--primary);
  background: transparent;
  padding: 0 4px;
}
.form-group .form-field input:focus + label, .form-group .form-field input:not(:placeholder-shown) + label,
.form-group .form-field select:focus + label,
.form-group .form-field select:not(:placeholder-shown) + label,
.form-group .form-field textarea:focus + label,
.form-group .form-field textarea:not(:placeholder-shown) + label,
.form-group .form-field .custom-multi-select:focus + label,
.form-group .form-field .custom-multi-select:not(:placeholder-shown) + label {
  top: 4px;
  left: 10px;
  font-size: var(--text-sm);
  color: var(--primary);
  background: transparent;
  padding: 0 4px;
}
.form-group .form-field input:is(.custom-multi-select) + label,
.form-group .form-field select:is(.custom-multi-select) + label,
.form-group .form-field textarea:is(.custom-multi-select) + label,
.form-group .form-field .custom-multi-select:is(.custom-multi-select) + label {
  padding: 0;
  left: 0;
}
.form-group .form-field input:required + label,
.form-group .form-field select:required + label,
.form-group .form-field textarea:required + label,
.form-group .form-field .custom-multi-select:required + label {
  padding: 0 4px;
}
.form-group .form-field input:required + label::before,
.form-group .form-field select:required + label::before,
.form-group .form-field textarea:required + label::before,
.form-group .form-field .custom-multi-select:required + label::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 5px;
  height: 5px;
  right: -5px;
  color: var(--error);
  background-color: var(--error);
}
.form-group .form-field textarea {
  padding-top: 18px;
}
.form-group .form-field input[type=color] {
  min-height: 56px;
  padding: 10px;
  cursor: pointer;
}
.form-group .form-field input[type=color]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.form-group .form-field input[type=color]::-webkit-color-swatch {
  border: none;
  border-radius: calc(var(--radius-md) - 4px);
}
.form-group .form-field input[type=color]::-moz-color-swatch {
  border: none;
  border-radius: calc(var(--radius-md) - 4px);
}
.form-group .form-field input[type=color] + label {
  top: 4px;
  left: 10px;
  font-size: var(--text-sm);
  color: var(--primary);
  background: transparent;
  padding: 0 4px;
}
.form-group .form-field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 30px;
}
.form-group .form-field label {
  position: absolute;
  left: 12px;
  top: 14px;
  color: var(--on-surface-variant);
  font-size: var(--text-md);
  pointer-events: none;
  transition: all 0.2s ease;
  background: transparent;
  z-index: 10;
}
.form-group .form-field.checkbox-field {
  flex-direction: row;
  align-items: center;
}
.form-group .form-field.checkbox-field input[type=checkbox] {
  margin-right: 10px;
  width: auto;
  height: auto;
  padding: 0;
}
.form-group .form-field.checkbox-field label {
  position: static;
  font-size: var(--text-md);
  color: var(--on-surface);
  margin: 0;
}

.toast-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-inverse);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.toast-alert.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-alert i {
  font-size: 18px;
}

.toast-ok {
  background: var(--color-success);
}

.toast-error {
  background: var(--color-error);
}

.toast-warning {
  background: var(--color-warning);
  color: var(--color-text);
}

.toast-info {
  background: var(--color-primary);
}

.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.confirm-overlay .confirm-box {
  padding: 24px 28px;
  border-radius: 12px;
  min-width: 320px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  color: var(--color-text-inverse);
  font-family: sans-serif;
}
.confirm-overlay .confirm-box .confirm-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.confirm-overlay .confirm-box .confirm-message {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 24px;
}
.confirm-overlay .confirm-box i {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}
.confirm-overlay .confirm-box .message {
  margin-bottom: 24px;
  font-size: 16px;
  font-weight: 500;
}
.confirm-overlay .confirm-box .btn-container {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.confirm-overlay .confirm-box .btn-container .btn {
  padding: 10px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 80px;
  outline: none;
}
.confirm-overlay .confirm-box .btn-container .btn-yes {
  background-color: currentColor;
  color: var(--color-text-inverse);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.confirm-overlay .confirm-box .btn-container .btn-yes:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.confirm-overlay .confirm-box .btn-container .btn-no {
  background-color: rgba(0, 0, 0, 0.25);
  color: var(--color-text-inverse);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.confirm-overlay .confirm-box .btn-container .btn-no:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.confirm-overlay .confirm-box.ok {
  background: var(--color-success);
}
.confirm-overlay .confirm-box.ok .btn-container .btn-yes {
  color: var(--color-success);
  background: var(--color-white);
}
.confirm-overlay .confirm-box.error {
  background: var(--color-error);
}
.confirm-overlay .confirm-box.error .btn-container .btn-yes {
  color: var(--color-error);
  background: var(--color-white);
}
.confirm-overlay .confirm-box.warning {
  background: var(--color-warning);
  color: var(--color-text);
}
.confirm-overlay .confirm-box.warning .btn-container .btn-yes {
  color: var(--color-warning);
  background: var(--color-white);
}
.confirm-overlay .confirm-box.info {
  background: var(--color-primary);
}
.confirm-overlay .confirm-box.info .btn-container .btn-yes {
  color: var(--color-primary);
  background: var(--color-white);
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-input-wrapper {
  position: relative;
}
.custom-select-input-wrapper > input {
  cursor: pointer;
}

.custom-select input {
  width: 100%;
  padding: 10px 38px 10px 12px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--on-surface);
  font-size: var(--text-md);
}

.custom-select-option {
  padding: 8px 12px;
  cursor: pointer;
}

.custom-select-option:hover {
  background: var(--surface-variant);
}

.custom-select-option.active {
  background: var(--primary);
  color: var(--on-primary);
}

.custom-select-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
  color: var(--on-surface-variant);
}

.custom-select-chevron {
  transition: transform 0.2s ease;
}

.custom-select-chevron.open {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 10px 24px rgba(27, 39, 51, 0.12);
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}
.custom-select-dropdown.active {
  display: block;
}

.custom-select-option {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}
.custom-select-option:hover {
  background: var(--surface-variant);
}

.custom-select-empty {
  padding: 8px 12px;
  color: var(--on-surface-variant);
  font-size: 13px;
}

.custom-select-validator {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

.custom-select.disabled input {
  background-color: var(--surface-variant);
  cursor: not-allowed;
}

.custom-select.disabled {
  opacity: 0.7;
}

.custom-multi-select {
  position: relative;
  font-size: 14px;
}

.cms-label {
  min-height: 42px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  cursor: pointer;
  align-items: center;
}

.cms-badge {
  background: color-mix(in srgb, var(--primary-container) 70%, transparent);
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.cms-search {
  flex: 1 1 140px;
  min-width: 140px;
  border: none !important;
  outline: none;
  background: transparent;
  color: var(--on-surface);
  font-size: var(--text-md);
  padding: 4px 8px !important;
}

.cms-search::-moz-placeholder {
  color: var(--on-surface-variant);
}

.cms-search::placeholder {
  color: var(--on-surface-variant);
}

.cms-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  z-index: 10;
}

.cms-dropdown.open {
  display: block;
}

.cms-option {
  padding: 10px 14px;
  cursor: pointer;
}

.cms-option:hover {
  background: var(--surface-variant);
}

.cms-option.selected {
  background: color-mix(in srgb, var(--primary-container) 75%, transparent);
  font-weight: 500;
}

.cms-remove {
  margin-left: 6px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0.6;
}

.cms-remove:hover {
  opacity: 1;
}

.cms-empty {
  padding: 10px;
}

.cms-option.active {
  background: color-mix(in srgb, var(--primary-container) 75%, transparent);
}

.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.2s ease;
}

.loader-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.topbar-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-400));
  z-index: 9999;
  transition: width 0.3s ease, opacity 0.2s ease;
  opacity: 0;
}

.topbar-loader.active {
  opacity: 1;
}

/* ========================================
   VARIABLES
======================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: #0f172a;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #000 !important;
  -webkit-transition: background-color 9999s ease-in-out 0s;
  transition: background-color 9999s ease-in-out 0s;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
:root {
  /* ===== PRIMARY (bleu) ===== */
  --color-primary-50: #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;
  --color-primary-1000: #172554;
  /* ===== SUCCESS ===== */
  --color-success-500: #10b981;
  /* ===== WARNING ===== */
  --color-warning-500: #f59e0b;
  /* ===== ERROR ===== */
  --color-error-500: #ef4444;
  /* ===== NEUTRAL ===== */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-700: #374151;
  --color-gray-900: #111827;
  /* ===== SEMANTIC (ULTRA IMPORTANT) ===== */
  --color-bg: var(--color-white);
  --color-surface: var(--color-gray-50);
  --color-text: var(--color-gray-900);
  --color-text-muted: var(--color-gray-500);
  --color-text-inverse: var(--color-white);
  --color-border: var(--color-gray-200);
  --color-primary: var(--color-primary-500);
  --color-primary-hover: var(--color-primary-600);
  --color-success: var(--color-success-500);
  --color-warning: var(--color-warning-500);
  --color-error: var(--color-error-500);
  --color-button-bg: var(--color-primary-600);
  --color-button-text: var(--color-white);
  --color-link: var(--color-primary-600);
}

[data-theme=orepas] {
  /* ===== PRIMARY (ORANGE) ===== */
  --color-primary-50: #fff7ed;
  --color-primary-100: #ffedd5;
  --color-primary-200: #fed7aa;
  --color-primary-300: #fdba74;
  --color-primary-400: #fb923c;
  --color-primary-500: #ea7009;
  --color-primary-600: #c25e07;
  --color-primary-700: #9a4a05;
  --color-primary-800: #7a3b04;
  --color-primary: var(--color-primary-500);
  --color-primary-hover: var(--color-primary-600);
  /* ===== SECONDARY (GREEN) ===== */
  --color-secondary-50: #f4fbe8;
  --color-secondary-100: #e6f5d0;
  --color-secondary-200: #cceaa3;
  --color-secondary-300: #b3df75;
  --color-secondary-400: #99d448;
  --color-secondary-500: #4d7918;
  --color-secondary-600: #3f6314;
  --color-secondary-700: #314d10;
  --color-secondary-800: #263d0c;
  --color-secondary: var(--color-secondary-500);
  --color-secondary-hover: var(--color-secondary-600);
  /* ===== SEMANTIC OVERRIDE ===== */
  --color-link: var(--color-secondary);
}

/* ========================================
   SIDEBAR
======================================== */
.sidebar {
  width: 260px;
  background: color-mix(in srgb, var(--secondary) 72%, #1b1211);
  color: color-mix(in srgb, var(--on-secondary) 78%, white 10%);
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.sidebar .sidebar-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar .brand-logo {
  width: 36px;
  height: 36px;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 10px;
}
.sidebar .brand-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--on-secondary);
  letter-spacing: 0.5px;
}
.sidebar .nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: color-mix(in srgb, var(--on-secondary) 52%, transparent);
  margin: 20px 0 10px;
}
.sidebar .nav-group {
  margin-bottom: 12px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.sidebar .nav-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--on-secondary) 78%, white 10%);
}
.sidebar .nav-group-header:hover i:first-child {
  opacity: 1;
}
.sidebar .nav-group-header i:first-child {
  font-size: 1.1rem;
  opacity: 0.85;
}
.sidebar .nav-group-content {
  height: 0;
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar .nav-group.open .group-arrow {
  transform: rotate(90deg);
}
.sidebar .nav-group.open .toggle-icon {
  transform: rotate(180deg);
  transition: transform 0.25s ease;
}
.sidebar .nav-item {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--on-secondary);
  transition: all 0.2s ease;
  width: 90%;
}
.sidebar .nav-item:hover {
  background: color-mix(in srgb, var(--secondary) 84%, black 12%);
  transform: translateX(4px);
}
.sidebar .nav-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ========================================
   GLOBAL LAYOUT
======================================== */
.app {
  display: flex;
  height: 100vh;
}

/* ========================================
   MAIN AREA
======================================== */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--background);
}

/* ========================================
   TOPBAR
======================================== */
.topbar {
  height: 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--outline-variant);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  gap: 20px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-variant);
  color: var(--on-surface);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.topbar-notifications i {
  font-size: 18px;
}
.topbar-notifications:hover, .topbar-notifications.is-active {
  background: var(--secondary);
  color: var(--on-secondary);
}

.topbar-notifications__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--error);
  color: var(--on-error);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.topbar-notifications__badge.is-hidden {
  display: none;
}

.notifications-dropdown {
  position: relative;
}

.notifications-dropdown__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-width: min(380px, 100vw - 40px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  border: 1px solid var(--outline-variant);
  overflow: hidden;
  display: none;
  z-index: 110;
}
.notifications-dropdown__menu.show {
  display: block;
}

.notifications-dropdown__panel {
  display: flex;
  flex-direction: column;
}

.notifications-dropdown__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--outline-variant);
}

.notifications-dropdown__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--on-surface);
}

.notifications-dropdown__subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--on-surface-variant);
}

.notifications-dropdown__mark-all {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.notifications-dropdown__mark-all.is-disabled, .notifications-dropdown__mark-all:disabled {
  color: var(--on-surface-variant);
  cursor: default;
  opacity: 0.6;
}

.notifications-dropdown__list {
  max-height: 420px;
  overflow-y: auto;
}

.notifications-dropdown__loading,
.notifications-dropdown__empty {
  padding: 20px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--on-surface-variant);
}

.notification-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 82%, transparent);
}
.notification-item:last-child {
  border-bottom: none;
}
.notification-item.is-unread {
  background: color-mix(in srgb, var(--surface-variant) 72%, transparent);
}
.notification-item.is-clickable {
  cursor: pointer;
}
.notification-item.is-clickable:hover {
  background: color-mix(in srgb, var(--surface-variant) 88%, transparent);
}

.notification-item__content {
  min-width: 0;
  flex: 1;
}
.notification-item__content h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface);
}
.notification-item__content p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--on-surface);
}

.notification-item__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.notification-item__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 11px;
  color: var(--on-surface-variant);
}

.notification-item__action {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
  flex-shrink: 0;
}

.desktop-order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}
.desktop-order-summary dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--on-surface-variant);
}
.desktop-order-summary dd {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
}

.desktop-order-lines {
  width: 100%;
  border-collapse: collapse;
}
.desktop-order-lines th,
.desktop-order-lines td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  font-size: 13px;
}
.desktop-order-lines th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--on-surface-variant);
}

/* ========================================
   USER BADGE & DROPDOWN
======================================== */
.user-dropdown {
  position: relative;
}
.user-dropdown .user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-variant);
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
}
.user-dropdown .user-avatar {
  width: 34px;
  height: 34px;
  background: var(--secondary);
  color: var(--on-secondary);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.user-dropdown .user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.user-dropdown .user-info .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
}
.user-dropdown .user-info .user-role {
  font-size: 11px;
  color: var(--on-surface-variant);
}
.user-dropdown .dropdown-arrow {
  font-size: 10px;
  color: var(--on-surface-variant);
  transition: transform 0.2s ease;
}
.user-dropdown .dropdown-arrow.rotate {
  transform: rotate(180deg);
}
.user-dropdown .dropdown-menu {
  position: absolute;
  top: 60px;
  right: 0;
  background: var(--surface);
  min-width: 200px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  display: none;
  animation: fadeIn 0.15s ease-in-out;
  align-self: start;
  z-index: 100;
}
.user-dropdown .dropdown-menu.show {
  display: block;
}
.user-dropdown .dropdown-menu .dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  text-decoration: none;
  color: var(--on-surface);
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.user-dropdown .dropdown-menu .dropdown-item:hover {
  background: var(--surface-variant);
}
.user-dropdown .dropdown-menu .dropdown-item.logout {
  color: var(--error);
}

.logout-link {
  font-size: 14px;
  text-decoration: none;
  color: var(--error);
}

/* ========================================
   PAGE CONTENT
======================================== */
.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--background);
}

/* ========================================
   TABS
======================================== */
.tabs-bar {
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--outline-variant);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.tab:hover {
  background: color-mix(in srgb, var(--surface-variant) 82%, var(--on-surface) 6%);
}
.tab.active {
  background: transparent;
  border-bottom: 2px solid var(--primary);
  color: var(--on-surface);
}
.tab.active:hover {
  background: var(--surface);
  box-shadow: none;
}
.tab-close {
  font-size: 12px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.tab-close:hover {
  opacity: 1;
}

.tab-dirty-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  display: none;
}

.tab-close {
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.6;
}

/* Etat modifié */
.tab.dirty .tab-dirty-indicator {
  display: block;
}

.tab.dirty .tab-close {
  display: none;
}

/* Hover = montrer la croix */
.tab.dirty:hover .tab-dirty-indicator {
  display: none;
}

.tab.dirty:hover .tab-close {
  display: block;
}

.auth-page--desktop .auth-submit--loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0.92;
}

.auth-page--desktop .auth-submit__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  animation: auth-spin 0.7s linear infinite;
}

.auth-page--desktop .login-container {
  max-width: 440px;
  border: 1px solid rgba(114, 120, 126, 0.18);
  box-shadow: 0 18px 44px rgba(27, 39, 51, 0.16);
}

.auth-page--desktop .auth-intro {
  margin-bottom: 16px;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

.auth-page--desktop .auth-link-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.auth-page--desktop .auth-link {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-page--desktop .auth-link:hover {
  text-decoration: underline;
}

.auth-page--desktop .auth-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
  background: rgba(17, 17, 17, 0.04);
  color: #3d3d3d;
}

.auth-page--desktop .auth-message:empty {
  display: none;
}

.auth-page--desktop .auth-message--error {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.auth-page--desktop .auth-message--success {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.auth-page--admin .login-container {
  display: none;
}

.admin-auth-shell {
  width: min(100%, 440px);
  padding: 24px;
  position: relative;
  z-index: 1;
}

.admin-auth-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  padding: 32px 28px 24px;
}

.admin-auth-panel__eyebrow {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.admin-auth-panel h1 {
  margin: 0 0 10px;
  text-align: left;
  font-size: 34px;
  line-height: 1.05;
  color: #111827;
}

.admin-auth-panel__intro {
  margin: 0 0 22px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.admin-auth-form {
  display: grid;
  gap: 16px;
}

.admin-auth-form__field {
  display: grid;
  gap: 8px;
}

.admin-auth-form__field label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.admin-auth-form__field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 15px;
  color: #111827;
}

.admin-auth-form__field input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.admin-auth-form__submit {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.admin-auth-panel__links {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

.admin-auth-panel__link {
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.admin-auth-panel__link:hover {
  text-decoration: underline;
}

.admin-auth-panel__message {
  margin-top: 16px;
}

.admin-dashboard {
  background: #f5f6f8;
}

.admin-dashboard .sidebar--admin {
  background: #ffffff;
  border-right: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.04);
}

.admin-dashboard .sidebar--admin .sidebar-header {
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.admin-dashboard .sidebar--admin .brand {
  gap: 14px;
}

.admin-dashboard .sidebar--admin .brand-logo--admin {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex: 0 0 42px;
}

.admin-dashboard .sidebar--admin .brand-name {
  color: #111827;
  font-weight: 700;
}

.admin-dashboard .sidebar--admin .nav-group-header,
.admin-dashboard .sidebar--admin .nav-item {
  color: #4b5563;
}

.admin-dashboard .sidebar--admin .nav-item.is-disabled {
  opacity: 0.54;
  cursor: default;
}

.admin-dashboard .sidebar--admin .nav-item.is-disabled:hover {
  background: transparent;
}

.admin-dashboard .sidebar--admin .nav-item:hover {
  color: #ffffff;
}

.admin-dashboard .topbar--admin {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(14px);
}

.admin-dashboard .topbar--admin .topbar-left,
.admin-dashboard .topbar--admin .user-name,
.admin-dashboard .topbar--admin .user-role {
  color: #111827;
}

.admin-dashboard .desktop-home__hero--admin {
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.admin-dashboard .desktop-home__cards--admin {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-dashboard .desktop-home-card--admin {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
}

.admin-dashboard .desktop-home-card--admin h2 {
  color: #111827;
}

.admin-dashboard .desktop-home-card--admin p {
  color: #4b5563;
}

.order-progress-card {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 22px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(114, 120, 126, 0.12);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  padding-bottom: 0;
}

.order-progress {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.order-progress__step {
  display: grid;
  flex: 1 0 120px;
  min-width: 120px;
  align-items: center;
  text-align: center;
  grid-template-rows: 32px auto;
  transition: opacity 180ms ease;
}

.order-progress__step--actionable {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.order-progress__step--actionable:hover .order-progress__label {
  color: #8a94a6;
}

.order-progress__step--actionable:focus-visible {
  outline: none;
}

.order-progress__step--actionable:focus-visible .order-progress__dot {
  box-shadow: 0 0 0 6px rgba(109, 74, 255, 0.12);
}

.order-progress__step--actionable:hover .order-progress__dot {
  background: #d9dee8;
  border-color: #d9dee8;
}

.order-progress__rail {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding-top: 4px;
}

.order-progress__connector {
  flex: 1 1 auto;
  height: 2px;
  background: #d7dbe4;
  border-radius: 999px;
  border-top: 2px dashed #d7dbe4;
}

.order-progress__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  background: #eceff4;
  border: 2px solid #eceff4;
  color: transparent;
  flex: 0 0 auto;
  transition: all 220ms ease;
}

.order-progress__label {
  margin-top: 10px;
  min-height: 36px;
  font-size: 13px;
  line-height: 1.35;
  color: #8a94a6;
  transition: color 220ms ease, transform 220ms ease;
}

.order-progress__step--completed .order-progress__dot {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.order-progress__step--completed .order-progress__connector--before,
.order-progress__step--completed .order-progress__connector--after {
  background: #16a34a;
  border-top: none;
}

.order-progress__step--completed .order-progress__label {
  color: #1f2937;
}

.order-progress__step--current .order-progress__dot {
  width: 24px;
  height: 24px;
  background: #6D4AFF;
  border-color: #6D4AFF;
  box-shadow: 0 0 0 6px rgba(109, 74, 255, 0.12), 0 10px 24px rgba(109, 74, 255, 0.24);
  animation: order-progress-pulse 1.8s ease-in-out infinite;
}

.order-progress__step--current .order-progress__connector--before {
  background: #16a34a;
  border-top: none;
}

.order-progress__step--current .order-progress__label {
  color: #111827;
  font-weight: 700;
  transform: scale(1.03);
}

.order-progress__step--upcoming .order-progress__dot {
  background: #eceff4;
  border-color: #eceff4;
}

.order-progress__step--upcoming .order-progress__connector {
  background: transparent;
  border-top: 2px dashed #d7dbe4;
}

.order-progress-card__note {
  margin-top: 14px;
  font-size: 13px;
  color: #7b8190;
}

.order-progress__check {
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

@keyframes order-progress-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
.desktop-home,
.desktop-module {
  padding: 24px;
}

.desktop-home__hero,
.desktop-module__hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(114, 120, 126, 0.14);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.desktop-home__eyebrow,
.desktop-module__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--md-sys-color-secondary);
  margin-bottom: 8px;
}

.desktop-home__hero h1,
.desktop-module__hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.1;
}

.desktop-home__hero p,
.desktop-module__hero p {
  margin: 0;
  max-width: 720px;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-home__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.desktop-home__user {
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.desktop-inline-note {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-home__cards,
.desktop-kpis {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.desktop-home-card,
.desktop-kpi,
.desktop-table-card,
.desktop-empty-state {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(114, 120, 126, 0.16);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(27, 39, 51, 0.08);
}

.desktop-home-card,
.desktop-kpi,
.desktop-empty-state {
  padding: 20px;
}

.desktop-home-card h2,
.desktop-empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.desktop-home-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.desktop-home-card p,
.desktop-empty-state p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-home-card--push {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, var(--secondary) 10%, transparent));
}

.desktop-home-card__icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.desktop-home-card__cta {
  margin-top: 16px;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  cursor: pointer;
}

.desktop-home-card__secondary {
  margin-top: 12px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.desktop-home-card__secondary--compact {
  width: 100%;
  justify-content: center;
}

.desktop-home-card__cta:disabled {
  opacity: 0.6;
  cursor: wait;
}

.desktop-home-card__hint {
  margin-top: 12px !important;
  font-size: 13px;
}

.desktop-home-card__hint--ios {
  color: var(--primary) !important;
}

.desktop-home-card--pending {
  display: flex;
  flex-direction: column;
}

.desktop-home-pending-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.desktop-home-pending-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(45, 98, 139, 0.05);
  border: 1px solid rgba(114, 120, 126, 0.12);
}

.desktop-home-pending-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.desktop-home-pending-item__top strong {
  font-size: 14px;
}

.desktop-home-pending-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}

.desktop-kpi span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-sys-color-secondary);
  margin-bottom: 10px;
}

.desktop-kpi strong {
  font-size: 28px;
  line-height: 1;
}

.desktop-table-card {
  overflow: hidden;
  padding: 10px;
}

.desktop-table {
  width: 100%;
  border-collapse: collapse;
}

.desktop-table thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-sys-color-secondary);
  background: rgba(45, 98, 139, 0.06);
  padding: 14px 18px;
}

.desktop-table tbody td {
  padding: 16px 18px;
  border-top: 1px solid rgba(114, 120, 126, 0.14);
  color: var(--md-sys-color-on-surface);
}

.desktop-table tbody tr:hover {
  background: rgba(45, 98, 139, 0.04);
}

.desktop-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.desktop-badge.is-accent {
  background: rgba(45, 98, 139, 0.12);
  color: rgb(45, 98, 139);
}

.desktop-badge.is-success {
  background: rgba(30, 130, 76, 0.14);
  color: rgb(28, 112, 66);
}

.desktop-badge.is-muted {
  background: rgba(114, 120, 126, 0.12);
  color: rgb(83, 88, 95);
}

.desktop-price-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-price-input {
  width: 110px;
  padding: 8px 10px;
  border: 1px solid rgba(114, 120, 126, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.desktop-price-readonly {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-client-form-panel {
  padding: 8px;
}

.desktop-client-form-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.desktop-client-form-panel__header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.desktop-client-form-panel__header p {
  margin: 0;
  max-width: 760px;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-client-form-panel__badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-client-approval-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 18px;
  background: rgba(255, 248, 230, 0.9);
  border: 1px solid rgba(186, 145, 36, 0.22);
  border-radius: 16px;
}

.desktop-client-approval-bar__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(133, 95, 7);
}

.desktop-client-approval-bar__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-client-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.desktop-client-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.desktop-client-form__section {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(114, 120, 126, 0.16);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(27, 39, 51, 0.06);
  padding: 20px;
}

.desktop-client-form__section h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.desktop-client-form__row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.desktop-client-form__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.desktop-client-form__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.desktop-client-form__status-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(45, 98, 139, 0.06);
  border: 1px solid rgba(45, 98, 139, 0.12);
}

.desktop-client-form__status-card strong {
  font-size: 20px;
}

.desktop-client-form__status-card small,
.desktop-client-form__status-label {
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-client-form__status-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.desktop-client-form__section > .form-group,
.desktop-client-form__section > .desktop-client-form__row:last-child {
  margin-bottom: 0;
}

.desktop-client-form__actions {
  display: flex;
  justify-content: flex-end;
}

.desktop-account-form-panel {
  padding: 8px;
}

.desktop-account-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.desktop-account-readonly {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.desktop-account-readonly__item,
.desktop-account-address-resume {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(45, 98, 139, 0.05);
  border: 1px solid rgba(45, 98, 139, 0.12);
}

.desktop-account-readonly__item span,
.desktop-account-address-resume span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desktop-account-readonly__item strong,
.desktop-account-address-resume strong {
  font-size: 15px;
}

.desktop-account-users-section {
  grid-column: 1/-1;
}

.desktop-account-users-card {
  padding: 0;
  overflow: hidden;
  margin-top: 12px;
}

.desktop-account-linked-groups {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.desktop-account-linked-group {
  border: 1px solid rgba(114, 120, 126, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.desktop-account-linked-group__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.desktop-account-linked-group__summary::-webkit-details-marker {
  display: none;
}

.desktop-account-linked-group__summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 0.24s ease;
  margin-left: auto;
  flex: 0 0 auto;
}

.desktop-account-linked-group[open] .desktop-account-linked-group__summary {
  border-bottom: 1px solid rgba(114, 120, 126, 0.14);
}

.desktop-account-linked-group[open] .desktop-account-linked-group__summary::after {
  transform: rotate(225deg);
}

.desktop-account-linked-group__content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.desktop-account-linked-group__content > * {
  overflow: hidden;
}

.desktop-account-linked-group[open] .desktop-account-linked-group__content {
  grid-template-rows: 1fr;
}

.desktop-account-linked-group .desktop-empty-state,
.desktop-account-linked-group .desktop-account-users-card {
  margin-top: 0;
}

.desktop-account-user-create {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(114, 120, 126, 0.14);
}

.desktop-account-user-create__head {
  margin-bottom: 16px;
}

.desktop-account-user-create__head h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.desktop-account-user-create__head p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-account-user-form__actions {
  display: flex;
  justify-content: flex-end;
}

.desktop-account-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.desktop-account-user-delete {
  background: rgb(154, 45, 45);
}

.desktop-account-user-delete[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.desktop-account-user-modal[hidden] {
  display: none;
}

.desktop-account-user-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.desktop-account-user-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(2px);
}

.desktop-account-user-modal__dialog {
  position: relative;
  width: min(720px, 100vw - 48px);
  margin: 8vh auto 0;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(16, 24, 40, 0.24);
  border: 1px solid rgba(114, 120, 126, 0.12);
}

.desktop-account-user-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.desktop-approval-btn.is-success {
  background: rgb(28, 112, 66);
}

.desktop-approval-btn.is-danger {
  background: rgb(154, 45, 45);
}

.desktop-approval-btn.is-muted {
  background: rgb(83, 88, 95);
}

.desktop-table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 320px);
  gap: 16px;
  padding: 20px 20px 0;
}

.desktop-table-toolbar__search,
.desktop-table-toolbar__filter {
  margin: 0;
}

.desktop-product-form-panel {
  padding: 8px;
}

.desktop-product-form-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.desktop-product-form-panel__header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.desktop-product-form-panel__header p {
  margin: 0;
  max-width: 760px;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-product-form-panel__badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-product-form,
.desktop-product-form__section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.desktop-product-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.desktop-product-form__section {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(114, 120, 126, 0.16);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(27, 39, 51, 0.06);
  padding: 20px;
}

.desktop-product-form__section h2,
.desktop-product-form__section-head h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.desktop-product-form__section-head p,
.desktop-product-form__hint {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-product-form__row {
  display: grid;
  gap: 16px;
}

.desktop-product-form__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.desktop-product-image-uploader {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 5px;
}

.desktop-product-image-uploader__input {
  display: none;
}

.desktop-product-image-uploader__dropzone {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px dashed rgba(45, 98, 139, 0.35);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(45, 98, 139, 0.08), rgba(226, 233, 240, 0.6));
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.desktop-product-image-uploader__dropzone:hover,
.desktop-product-image-uploader__dropzone.is-dragover {
  border-color: rgba(45, 98, 139, 0.8);
  box-shadow: 0 16px 28px rgba(45, 98, 139, 0.14);
  transform: translateY(-1px);
}

.desktop-product-image-uploader__dropzone.is-uploading {
  opacity: 0.72;
  pointer-events: none;
}

.desktop-product-image-uploader__preview-wrap {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(114, 120, 126, 0.12);
}

.desktop-product-image-uploader__preview {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

.desktop-product-image-uploader__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desktop-product-image-uploader__content strong {
  font-size: 16px;
}

.desktop-product-image-uploader__content p,
.desktop-product-image-uploader__content span {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-product-form__actions {
  display: flex;
  justify-content: flex-end;
}

.window-btn--secondary {
  background: rgba(45, 98, 139, 0.08);
  color: var(--md-sys-color-secondary);
  border: 1px solid rgba(45, 98, 139, 0.18);
}

.desktop-link-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--md-sys-color-secondary);
  font-weight: 600;
  cursor: pointer;
}

.desktop-product-pricing-table {
  border: 1px solid rgba(114, 120, 126, 0.16);
  border-radius: 16px;
  overflow: hidden;
}

.desktop-product-pricing-table__head,
.desktop-product-pricing-table__row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 180px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}

.desktop-product-pricing-table__head {
  background: rgba(45, 98, 139, 0.06);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-sys-color-secondary);
}

.desktop-product-pricing-table__row {
  border-top: 1px solid rgba(114, 120, 126, 0.12);
}

.desktop-product-pricing-table__empty {
  padding: 18px;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-product-packagings {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.desktop-product-packagings__empty {
  padding: 18px;
  border: 1px dashed rgba(114, 120, 126, 0.2);
  border-radius: 16px;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

.desktop-product-packaging-card {
  border: 1px solid rgba(114, 120, 126, 0.16);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.88);
  box-shadow: 0 10px 30px rgba(27, 39, 51, 0.05);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.desktop-product-packaging-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.desktop-product-packaging-card__head h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.desktop-product-packaging-card__head p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-product-packaging-card__grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

.desktop-product-packaging-card__grid--variant {
  grid-template-columns: 0.75fr 1.15fr 0.8fr 0.7fr;
}

.desktop-delivery-zone-form-panel {
  padding: 8px;
}

.desktop-delivery-zone-form-panel__header,
.desktop-delivery-zone-form-panel__badges,
.desktop-delivery-zone-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.desktop-delivery-zone-form-panel__header {
  margin-bottom: 20px;
}

.desktop-delivery-zone-form__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.desktop-delivery-zone-form__section {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(114, 120, 126, 0.16);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(27, 39, 51, 0.08);
  padding: 20px;
}

.desktop-delivery-zone-form__section h2 {
  margin: 0 0 18px;
  font-size: 18px;
}

.desktop-delivery-zone-form__row {
  display: grid;
  gap: 16px;
}

.desktop-delivery-zone-form__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.desktop-delivery-zone-form textarea {
  min-height: 270px;
  resize: vertical;
}

.desktop-delivery-zone-form__hint {
  margin-top: 10px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
}

.desktop-smart-reminder-panel {
  padding: 8px;
}

.desktop-smart-reminder-panel__hero,
.desktop-smart-reminder-panel__badges,
.desktop-smart-reminder-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.desktop-smart-reminder-panel__hero {
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(45, 98, 139, 0.12), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(114, 120, 126, 0.14);
}

.desktop-smart-reminder-form__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.desktop-smart-reminder-form__columns {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 18px;
  margin-top: 18px;
}

.desktop-smart-reminder-form__hint {
  margin: 8px 0 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
}

#smart-reminder-clients-preview {
  min-width: 0;
}

.desktop-smart-reminder-clients__head {
  margin-bottom: 16px;
}

.desktop-smart-reminder-clients__head h2 {
  margin: 0 0 6px;
}

.desktop-smart-reminder-clients__head p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-smart-reminder-clients-card {
  padding: 0;
  overflow: hidden;
}

.desktop-smart-reminder-clients-table {
  width: 100%;
  border-collapse: collapse;
}

.desktop-smart-reminder-clients-table th,
.desktop-smart-reminder-clients-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(114, 120, 126, 0.12);
  vertical-align: middle;
}

.desktop-smart-reminder-clients-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-secondary);
  background: rgba(248, 250, 252, 0.9);
}

.desktop-smart-reminder-clients-table td {
  font-size: 14px;
}

.desktop-smart-reminder-clients-table tbody tr:last-child td {
  border-bottom: none;
}

.desktop-smart-reminder-clients-table td strong {
  font-size: 14px;
}

.desktop-empty-state--compact {
  padding: 24px;
}

#smart-reminder-clients-preview.is-loading {
  opacity: 0.65;
  transition: opacity 0.18s ease;
}

.desktop-delivery-zone-city-search__results,
.desktop-delivery-zone-selected-cities {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.desktop-delivery-zone-city-search__results {
  margin-top: 8px;
}

.desktop-delivery-zone-city-search__result,
.desktop-delivery-zone-city-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(114, 120, 126, 0.16);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.desktop-delivery-zone-city-search__result {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.desktop-delivery-zone-city-search__result strong,
.desktop-delivery-zone-city-pill span {
  color: var(--on-surface);
  font-weight: 600;
}

.desktop-delivery-zone-city-search__result span {
  color: var(--on-surface-variant);
  font-size: 13px;
}

.desktop-delivery-zone-city-pill__remove {
  border: none;
  background: transparent;
  color: var(--on-surface-variant);
  cursor: pointer;
}

.desktop-delivery-zone-city-search__empty,
.desktop-delivery-zone-selected-empty {
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-variant) 65%, transparent);
  color: var(--on-surface-variant);
  font-size: 13px;
}

.desktop-delivery-zone-selected-empty.is-hidden {
  display: none;
}

.desktop-table-card.delivery-zone {
  padding: 18px;
}

.desktop-order-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.desktop-order-status-btn,
.desktop-order-quick-action {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.desktop-order-quick-action {
  margin-right: 6px;
}

.desktop-order-status-btn--accent,
.desktop-order-quick-action--accent {
  background: rgba(45, 98, 139, 0.12);
  color: rgb(45, 98, 139);
}

.desktop-order-status-btn--success,
.desktop-order-quick-action--success {
  background: rgba(30, 130, 76, 0.14);
  color: rgb(28, 112, 66);
}

.desktop-order-status-btn--danger,
.desktop-order-quick-action--danger {
  background: rgba(186, 26, 26, 0.12);
  color: rgb(150, 24, 24);
}

.desktop-orders-table {
  --row-height: 62px;
}

.desktop-orders-table .actions {
  justify-content: center;
  align-items: center;
}

.desktop-orders-table .quick-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.desktop-orders-table .btn-action {
  flex-shrink: 0;
}

.desktop-order-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(45, 98, 139, 0.12), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(114, 120, 126, 0.14);
}

.desktop-order-hero__main h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.desktop-order-hero__main p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-order-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.desktop-order-hero__meta {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 12px;
  font-weight: 600;
}

.desktop-order-hero__aside {
  min-width: 240px;
}

.desktop-order-hero__aside-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-sys-color-secondary);
}

.desktop-order-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.desktop-order-kpi {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(114, 120, 126, 0.14);
}

.desktop-order-kpi span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-sys-color-secondary);
}

.desktop-order-kpi strong {
  font-size: 18px;
  line-height: 1.35;
}

.desktop-order-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.desktop-order-summary--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.desktop-order-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.desktop-order-section-head h2 {
  margin: 0 0 6px;
}

.desktop-order-section-head p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
}

.desktop-order-lines-card {
  padding: 8px 0 0;
}

.desktop-order-lines__product strong {
  display: block;
  font-size: 14px;
}

@media (max-width: 1200px) {
  .desktop-home__cards,
  .desktop-kpis,
  .desktop-account-kpis,
  .desktop-account-readonly,
  .desktop-client-form__grid,
  .desktop-product-form__grid,
  .desktop-delivery-zone-form__grid,
  .desktop-smart-reminder-form__grid,
  .desktop-smart-reminder-form__columns,
  .desktop-table-toolbar,
  .desktop-order-kpis,
  .desktop-order-layout {
    grid-template-columns: 1fr;
  }
  .desktop-client-form__row--2,
  .desktop-client-form__row--3,
  .desktop-product-form__row--2,
  .desktop-delivery-zone-form__row--3 {
    grid-template-columns: 1fr;
  }
  .desktop-product-image-uploader__dropzone {
    grid-template-columns: 1fr;
  }
  .desktop-product-pricing-table__head,
  .desktop-product-pricing-table__row {
    grid-template-columns: 1.6fr 1fr 1fr 160px;
  }
  .desktop-product-packaging-card__grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .desktop-home-card__header,
  .desktop-client-form-panel__header,
  .desktop-client-approval-bar,
  .desktop-product-form-panel__header,
  .desktop-delivery-zone-form-panel__header,
  .desktop-delivery-zone-form-panel__badges,
  .desktop-smart-reminder-panel__hero,
  .desktop-smart-reminder-panel__badges,
  .desktop-order-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .desktop-product-pricing-table__head {
    display: none;
  }
  .desktop-product-pricing-table__row {
    grid-template-columns: 1fr;
  }
  .desktop-product-packaging-card__head {
    flex-direction: column;
    align-items: stretch;
  }
  .desktop-order-summary--grid {
    grid-template-columns: 1fr;
  }
}/*# sourceMappingURL=dashboardAdmin.css.map */
