/*
  Unified module skin (loaded after page-level CSS by assets/js/main.js)
  Goal: keep a consistent chapter/list/modal look across all pages.
*/

:root{
  --unified-content-max:1480px;
  --unified-radius:14px;
  --unified-radius-sm:10px;
  --unified-shadow:0 10px 22px rgba(8, 31, 37, .09);
  --unified-table-max-h:460px;
  --unified-table-fz:13px;
  --unified-table-fz-mobile:13px;
  --unified-table-th-fz:13px;
  --unified-table-cell-pad:8px 10px;
  --unified-table-th-pad:8px 8px;
  --unified-font-family:var(--font-ui, "Manrope", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif);
  --unified-base-fz:15.7px;
  --unified-base-lh:1.28;
  --a2z-field-label-fz:12px;
  --a2z-field-label-weight:900;
  --a2z-field-control-fz:13.1px;
  --a2z-field-control-min-h:34px;
  --a2z-field-control-pad-y:6px;
  --a2z-field-control-pad-x:10px;
  --a2z-field-hint-fz:12px;
  --a2z-field-button-fz:12px;
}

html,
body{
  overflow-x:hidden;
}

/* One central content width for all module pages */
.main > .a2z-stack{
  width:min(var(--unified-content-max), calc(100vw - var(--sidebar-width) - 44px), 100%);
  margin-left:auto;
  margin-right:auto;
}

.main > .a2z-stack > .card.card--chapter{
  width:100%;
  margin:0;
}

/* Neutralize per-page wrappers so all cards inherit the same width/positioning */
.card.card--chapter.exploitant-create-wrap,
.card.card--chapter.exvv-wrap,
.card.card--chapter.ops-wrap,
.card.card--chapter.portage-wrap,
.card.card--chapter.cgp-wrap,
.card.card--chapter.home-dashboard,
.card.card--chapter.subs-wrap,
.card.card--chapter.users-wrap,
.card.card--chapter.ippvl-wrap,
.card.card--chapter.ippv-wrap,
.card.card--chapter.cgpv-wrap,
.card.card--chapter.spaces-wrap,
.card.card--chapter.invest-wrap,
.card.card--chapter.cgpk-wrap,
.card.card--chapter.portage-subs-wrap,
.card.card--chapter.cgp-create-wrap,
.card.card--chapter.calc-wrap,
.card.card--chapter.import-wrap,
.card.card--chapter.exvc-wrap{
  max-width:none !important;
  width:100% !important;
  margin:0 !important;
}

.a2z-stack.cabinet-page,
.a2z-stack.cabinet-clients-page,
.a2z-stack.invest-page{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
}

.card.card--chapter{
  border-radius:var(--unified-radius);
  box-shadow:var(--unified-shadow);
}

.card.card--chapter > .card__head{
  padding:8px 10px;
}

.card.card--chapter > .card__body{
  padding:8px 10px 10px;
}

.card.card--chapter .ops-body,
.card.card--chapter .portage-body,
.card.card--chapter .cgp-body,
.card.card--chapter .invest-body,
.card.card--chapter .admin-body,
.card.card--chapter .portage-subs-body,
.card.card--chapter .cabinet-body{
  gap:10px !important;
}

.card.card--chapter .card__title{
  font-size:15px;
  line-height:1.2;
}

.card.card--chapter .card__subtitle{
  font-size:11.8px;
}

.card.card--chapter .btn,
.card.card--chapter .a2z-btn{
  min-height:32px;
  border-radius:var(--unified-radius-sm);
  font-size:12.4px;
  line-height:1.1;
}

.card.card--chapter .btn--icon{
  width:32px;
  min-width:32px;
  padding:0;
}

/* Global list-page action rows (create/import/export/delete groups) */
.card.card--chapter .ops-meta__right,
.card.card--chapter .portage-meta__right,
.card.card--chapter .subs-meta__right,
.card.card--chapter .cgp-meta__right,
.card.card--chapter .users-meta__right,
.card.card--chapter .ippvl-meta__right,
.card.card--chapter .ippv-meta__right,
.card.card--chapter .cgpv-meta__right,
.card.card--chapter .exvv-meta__right,
.card.card--chapter .spaces-meta__right{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

/* Exploitants list: keep impersonation + bulk actions on one aligned line */
.card.card--chapter .exploitant-validated__meta{
  align-items:center !important;
  margin-top:0 !important;
}

.card.card--chapter .exploitant-validated__meta > .exploitant-validated__meta-actions{
  display:flex !important;
  align-items:flex-end !important;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:nowrap !important;
  min-width:0;
  flex:1 1 auto;
}

.card.card--chapter .exploitant-impersonation{
  display:flex;
  align-items:flex-end;
  flex-wrap:nowrap;
  gap:10px;
  min-width:0;
  flex:1 1 560px;
}

.card.card--chapter .exploitant-impersonation__field{
  min-width:220px;
  max-width:280px;
}

.card.card--chapter .exploitant-validated__count{
  display:inline-flex;
  align-items:center;
  min-height:34px;
}

.card.card--chapter .exploitant-impersonation__select,
.card.card--chapter .exploitant-impersonation__btn,
.card.card--chapter .exploitant-validated__bulk-actions .btn{
  min-height:34px !important;
}

/* Primary text actions in list toolbars (Créer / Importer only) */
.card.card--chapter .a2z-main-action-btn,
.card.card--chapter .exploitant-validated__bulk-actions .a2z-main-action-btn{
  min-height:34px !important;
  padding:0 12px !important;
  border-radius:10px !important;
  font-size:12.2px !important;
  line-height:1 !important;
  font-weight:700 !important;
}

/* Inline list filters placed next to main actions */
.card.card--chapter .a2z-main-action-filter{
  min-height:34px !important;
  border-radius:10px !important;
  padding:0 10px !important;
  font-size:12.2px !important;
  line-height:1 !important;
}

.card.card--chapter .exploitant-validated__bulk-actions{
  display:flex;
  align-items:flex-end;
  gap:10px;
  flex-wrap:nowrap;
}

.card.card--chapter .exploitant-validated__row-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.card.card--chapter .ops-meta,
.card.card--chapter .portage-meta,
.card.card--chapter .cgp-meta{
  margin-top:0 !important;
}

/* Keep edit-by-row behavior in exploitants list */
#btnEditExploitant{
  display:none !important;
}

/* List filters: align exploitants look with operations list */
.card.card--chapter .ops-toolbar,
.card.card--chapter .portage-toolbar,
.card.card--chapter .subs-toolbar,
.card.card--chapter .cgp-toolbar,
.card.card--chapter .users-toolbar,
.card.card--chapter .ippvl-toolbar,
.card.card--chapter .ippv-toolbar,
.card.card--chapter .cgpv-toolbar,
.card.card--chapter .exvv-toolbar,
.card.card--chapter .spaces-search{
  border:1px solid rgba(11,27,58,.11);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 18px rgba(9,20,41,.06);
}

.card.card--chapter .exploitant-validated__tools{
  display:grid !important;
  grid-template-columns:minmax(340px, 1fr) minmax(220px, auto) auto;
  gap:12px !important;
  align-items:end !important;
  border:1px solid rgba(11,27,58,.11);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 18px rgba(9,20,41,.06);
  padding:12px;
}

.card.card--chapter .ops-search,
.card.card--chapter .portage-search,
.card.card--chapter .subs-search,
.card.card--chapter .cgp-search,
.card.card--chapter .users-search,
.card.card--chapter .ippvl-search,
.card.card--chapter .ippv-search,
.card.card--chapter .cgpv-search,
.card.card--chapter .exvv-search,
.card.card--chapter .spaces-search-box{
  min-height:36px;
  border:1px solid var(--line);
  border-radius:10px;
}

.card.card--chapter .ops-search:focus-within,
.card.card--chapter .portage-search:focus-within,
.card.card--chapter .subs-search:focus-within,
.card.card--chapter .cgp-search:focus-within,
.card.card--chapter .users-search:focus-within,
.card.card--chapter .ippvl-search:focus-within,
.card.card--chapter .ippv-search:focus-within,
.card.card--chapter .cgpv-search:focus-within,
.card.card--chapter .exvv-search:focus-within,
.card.card--chapter .spaces-search-box:focus-within{
  border-color:rgba(var(--red-rgb), .58);
  box-shadow:0 0 0 3px rgba(var(--red-rgb), .12);
}

.card.card--chapter .ops-search input[type="search"],
.card.card--chapter .portage-search input[type="search"],
.card.card--chapter .subs-search input[type="search"],
.card.card--chapter .cgp-search input[type="search"],
.card.card--chapter .users-search input[type="search"],
.card.card--chapter .ippvl-search input[type="search"],
.card.card--chapter .ippv-search input[type="search"],
.card.card--chapter .cgpv-search input[type="search"],
.card.card--chapter .exvv-search input[type="search"],
.card.card--chapter .spaces-search-box input[type="search"],
.card.card--chapter input.exploitant-validated__search[type="search"]{
  font-size:13px !important;
  font-weight:500 !important;
  color:var(--navy) !important;
}

.card.card--chapter .exploitant-validated__search,
.card.card--chapter .exploitant-validated__status{
  min-height:34px !important;
  border:1px solid var(--line) !important;
  border-radius:10px !important;
  padding:0 10px !important;
  font-size:13px !important;
  font-weight:500 !important;
  color:var(--navy) !important;
  background:#fff !important;
}

.card.card--chapter .exploitant-validated__status.a2z-main-action-filter{
  min-height:34px !important;
}

.card.card--chapter .exploitant-validated__search::placeholder{
  color:rgba(11,27,58,.42);
}

.card.card--chapter .exploitant-validated__search:focus,
.card.card--chapter .exploitant-validated__status:focus{
  border-color:rgba(var(--red-rgb), .58) !important;
  box-shadow:0 0 0 3px rgba(var(--red-rgb), .12) !important;
  outline:none !important;
}

/* Tables: single source of truth for all list/table pages. */
:is(.a2z-table-wrap, .exploitant-validated__table, .admin-table-wrap, .portal-table-wrap, .pp-followup-table-wrap, .import-lines-scroll){
  border-radius:12px;
  box-shadow:0 8px 18px rgba(8, 31, 37, .08);
  border:1px solid rgba(11,27,58,.12);
  max-height:var(--unified-table-max-h);
  max-width:100%;
  min-width:0;
  overflow-y:auto !important;
  overflow-x:auto !important;
  background:#fff !important;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table){
  width:100% !important;
  max-width:100% !important;
  min-width:100% !important;
  table-layout:fixed !important;
  border-collapse:separate;
  border-spacing:0;
  font-family:var(--unified-font-family) !important;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) thead th{
  position:relative !important;
  top:auto;
  z-index:auto;
  font-size:var(--unified-table-th-fz) !important;
  font-weight:700 !important;
  padding:var(--unified-table-th-pad) !important;
  letter-spacing:.1px !important;
  white-space:normal !important;
  overflow:visible;
  text-overflow:clip;
  line-height:1.2;
  text-align:center !important;
  vertical-align:middle !important;
  color:#fff !important;
  background:linear-gradient(90deg, var(--navy), var(--navy-2)) !important;
  border-bottom:1px solid rgba(255,255,255,.42) !important;
  border-right:1px solid rgba(255,255,255,.42) !important;
  font-family:var(--unified-font-family) !important;
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
  hyphens:none;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) thead th:last-child{
  border-right:0 !important;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) tbody td{
  font-size:var(--unified-table-fz) !important;
  font-weight:500 !important;
  padding:var(--unified-table-cell-pad) !important;
  line-height:1.3 !important;
  border-bottom:1px solid rgba(18,56,64,.07) !important;
  border-right:1px solid rgba(18,56,64,.07) !important;
  text-align:left !important;
  font-family:var(--unified-font-family) !important;
  overflow-wrap:anywhere;
  word-break:break-word;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) thead th[data-col-type="status"],
:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) thead th[data-col-type="action"]{
  text-align:center !important;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) tbody td:last-child{
  border-right:0 !important;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) tbody tr:nth-child(even) td{
  background:linear-gradient(180deg, rgba(11,27,58,.018), rgba(11,27,58,.008)) !important;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) tbody tr:hover td{
  background:rgba(var(--red-rgb), .055) !important;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) :is(
  .td-right,
  .a2z-td--money,
  .a2z-td--action,
  [data-col-type="action"],
  [data-col-type="status"],
  [data-col-type="id"],
  [data-col-type="money"],
  [data-col-type="number"],
  [class*="col-money"],
  [class*="col-montant"],
  [class*="col-total"],
  [class*="col-value"],
  [class*="col-prix"],
  [class*="col-amount"],
  [class*="col-rate"],
  [class*="col-taux"],
  [class*="col-count"],
  [class*="col-qty"],
  [class*="col-quantite"],
  [class*="col-users"],
  [class*="col-part"],
  [class*="col-id"],
  [class*="col-actions-total"],
  .a2z-td--id,
  [class*="col-check"],
  [class$="-col-check"],
  .a2z-te-col-select
){
  text-align:center !important;
  font-variant-numeric:tabular-nums;
}

:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) .a2z-td--action > *,
:is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) [data-col-type="action"] > *{
  margin-left:auto;
  margin-right:auto;
}

@media (max-width:1080px){
  .card.card--chapter .exploitant-validated__meta > .exploitant-validated__meta-actions{
    flex-wrap:wrap !important;
  }

  .card.card--chapter .exploitant-validated__tools{
    grid-template-columns:1fr;
  }
  :is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) thead th{
    font-size:var(--unified-table-th-fz) !important;
    padding:7px 6px !important;
  }
  :is(.a2z-table, .exploitant-validated__table table, .portal-table, .admin-table, .pp-followup-table, .import-lines-table, .op-indirect__schedule-table, table.a2z-te-table) tbody td{
    font-size:var(--unified-table-fz) !important;
    padding:7px 6px !important;
  }
}

.a2z-input-with-suffix{
  position:relative;
  display:flex;
  align-items:center;
  width:100%;
}

.a2z-input-with-suffix input{
  width:100%;
  padding-right:58px !important;
}

.a2z-input-with-suffix__unit{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  font-size:11.6px;
  font-weight:700;
  color:rgba(11,27,58,.7);
  pointer-events:none;
  white-space:nowrap;
}

/* File picker button: shared style across pages */
.card--chapter input[type="file"]::file-selector-button,
.a2z-dialog__card input[type="file"]::file-selector-button{
  appearance:none;
  border:1px solid rgba(16,124,140,.34);
  background:linear-gradient(180deg, rgba(16,124,140,.15), rgba(16,124,140,.08));
  color:var(--navy);
  font-weight:600;
  border-radius:10px;
  font-size:12px;
  padding:6px 10px;
  margin-right:10px;
  cursor:pointer;
  transition:filter .15s ease, transform .15s ease;
}

.card--chapter input[type="file"]::file-selector-button:hover,
.a2z-dialog__card input[type="file"]::file-selector-button:hover{
  filter:brightness(1.05);
}

.card--chapter input[type="file"]::file-selector-button:active,
.a2z-dialog__card input[type="file"]::file-selector-button:active{
  transform:translateY(1px);
}

/* Unified section blocks (volets/panels) */
.card--chapter .a2z-volet{
  border:1px solid rgba(16,124,140,.24) !important;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(16,124,140,.06), rgba(16,124,140,.03));
  overflow:hidden;
}

.card--chapter .a2z-volet__head{
  background:rgba(16,124,140,.12) !important;
  border-bottom:1px solid rgba(16,124,140,.22) !important;
  padding:10px 12px !important;
}

.card--chapter .a2z-volet__title{
  font-size:14.6px !important;
  font-weight:900 !important;
  line-height:1.15;
}

.card--chapter .a2z-volet__body{
  padding:12px !important;
}

/* Unified form controls in chapter cards and modals */
.card--chapter input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="search"]),
.card--chapter select,
.card--chapter textarea,
.a2z-dialog__card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="search"]),
.a2z-dialog__card select,
.a2z-dialog__card textarea{
  min-height:var(--a2z-field-control-min-h);
  border-radius:11px !important;
  border:1px solid var(--line) !important;
  padding:var(--a2z-field-control-pad-y) var(--a2z-field-control-pad-x) !important;
  font-size:var(--a2z-field-control-fz) !important;
  color:var(--text);
  background:#fff;
}

.card--chapter textarea,
.a2z-dialog__card textarea{
  min-height:80px;
  resize:vertical;
}

.card--chapter input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="search"]):focus,
.card--chapter select:focus,
.card--chapter textarea:focus,
.a2z-dialog__card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="search"]):focus,
.a2z-dialog__card select:focus,
.a2z-dialog__card textarea:focus{
  border-color:rgba(var(--red-rgb), .56) !important;
  box-shadow:0 0 0 3px rgba(var(--red-rgb), .12) !important;
  outline:none;
}

/* Dialog internals: exploitant-driven shared shell */
.a2z-dialog__card{
  border-radius:18px;
  width:min(1220px, calc(100vw - 28px)) !important;
  max-width:calc(100vw - 20px) !important;
  overflow:hidden !important;
  border:1px solid rgba(11,27,58,.12) !important;
  background:#fff !important;
  box-shadow:0 24px 60px rgba(5,18,37,.24) !important;
}

.a2z-dialog__head{
  min-height:58px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 18px !important;
  background:linear-gradient(90deg, var(--navy), var(--navy-2));
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.18) !important;
  text-align:left !important;
}

.a2z-dialog__head > *{
  min-width:0;
}

.a2z-dialog__head > :first-child{
  margin-right:auto;
  text-align:left !important;
}

.a2z-dialog__title{
  margin:0 auto 0 0;
  font-size:18px;
  font-weight:900;
  line-height:1.2;
  color:inherit;
  text-align:left !important;
}

.a2z-dialog__head :is(h1, h2, h3, h4){
  margin:0;
  text-align:left !important;
}

.a2z-dialog__head .hint,
.a2z-dialog__head .muted,
.a2z-dialog__head p{
  color:rgba(255,255,255,.88) !important;
  font-size:12px !important;
  font-weight:700 !important;
}

.a2z-dialog__body{
  padding:14px 16px 16px !important;
  max-width:100%;
  overflow-x:hidden !important;
  background:#fff;
  display:grid;
  gap:12px;
}

.a2z-dialog__body > *{
  max-width:100%;
  min-width:0;
}

.a2z-dialog__actions{
  padding:12px 16px 16px !important;
  gap:10px !important;
  align-items:center !important;
  border-top:1px solid rgba(8,31,37,.14);
  background:#fff;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__card{
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
  max-height:calc(100dvh - 12px) !important;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__card > form,
dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__card > .a2z-dialog__form{
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
  flex:1 1 auto !important;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__body{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-gutter:stable both-edges;
  scrollbar-color:rgba(8,31,37,.28) transparent;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__body::-webkit-scrollbar{
  width:10px;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__body::-webkit-scrollbar-track{
  background:transparent;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__body::-webkit-scrollbar-thumb{
  background:rgba(8,31,37,.24);
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__body::-webkit-scrollbar-thumb:hover{
  background:rgba(8,31,37,.34);
  background-clip:padding-box;
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .a2z-dialog__actions{
  position:sticky;
  bottom:0;
  z-index:4;
  flex:0 0 auto;
  margin-top:auto;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(8px);
}

dialog.a2z-dialog[data-a2z-form-modal="1"] .invest-edit-actions{
  position:sticky;
  bottom:0;
  z-index:3;
  margin:0 -2px;
  padding:12px 2px 4px;
  background:linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.94) 28%, rgba(255,255,255,.98) 100%);
}

.a2z-dialog__section-stack{
  display:grid;
  gap:12px;
}

.a2z-dialog__body .a2z-table-wrap,
.a2z-dialog__body .exploitant-validated__table{
  max-width:100%;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}

.card--chapter .a2z-form__grid,
.a2z-dialog__card .a2z-form__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:10px 12px;
  align-items:start;
}

.card--chapter .a2z-form__grid .a2z-field,
.a2z-dialog__card .a2z-form__grid .a2z-field{
  min-width:0;
  width:100%;
}

/* Reusable compact-width helpers for dense create/edit forms. */
.a2z-form__grid .a2z-field[class*="a2z-field--fit-"]{
  justify-self:start;
}
.a2z-form__grid .a2z-field--fit-id{
  width:min(100%, 12ch);
  max-width:12ch;
}
.a2z-form__grid .a2z-field--fit-rate{
  width:min(100%, 13ch);
  max-width:13ch;
}
.a2z-form__grid .a2z-field--fit-money{
  width:min(100%, 18ch);
  max-width:18ch;
}
.a2z-form__grid .a2z-field--fit-short{
  width:min(100%, 20ch);
  max-width:20ch;
}
.a2z-form__grid .a2z-field--fit-select{
  width:min(100%, 24ch);
  max-width:24ch;
}
.a2z-form__grid .a2z-field--fit-default{
  width:min(100%, 22ch);
  max-width:22ch;
}
.a2z-form__grid .a2z-field--fit-wide{
  grid-column:span 2;
  width:100%;
  max-width:none;
}
.a2z-form__grid .a2z-field--fit-full{
  grid-column:1 / -1;
  width:100%;
  max-width:none;
}

.a2z-dialog__card label,
.a2z-dialog__card .a2z-field label,
.a2z-dialog__card .admin-field__label,
.a2z-dialog__card .cgp-field-label,
.a2z-dialog__card .cgp-form-field > span,
.a2z-dialog__card .cabinet-dialog__body label > span,
.a2z-dialog__card .cabinet-team-card label > span{
  font-size:var(--a2z-field-label-fz) !important;
  font-weight:var(--a2z-field-label-weight) !important;
  color:var(--navy) !important;
  letter-spacing:.1px;
}

.a2z-dialog__card .hint,
.a2z-dialog__card .muted,
.a2z-dialog__card small{
  font-size:var(--a2z-field-hint-fz) !important;
  line-height:1.35 !important;
}

.a2z-dialog__card .btn,
.a2z-dialog__card .a2z-btn{
  min-height:34px !important;
  padding:7px 11px !important;
  border-radius:10px !important;
  font-size:var(--a2z-field-button-fz) !important;
  line-height:1.2 !important;
}

.a2z-currency-switch{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.a2z-currency-switch__label{
  font-size:11px;
  font-weight:900;
  letter-spacing:.14px;
  text-transform:uppercase;
  color:var(--navy);
}

.a2z-currency-switch__buttons{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border-radius:999px;
  border:1px solid rgba(11,27,58,.12);
  background:rgba(11,27,58,.05);
}

.a2z-currency-switch__btn{
  appearance:none;
  border:0;
  border-radius:999px;
  min-height:28px;
  padding:0 10px;
  background:transparent;
  color:rgba(11,27,58,.7);
  font-size:11px;
  font-weight:900;
  letter-spacing:.12px;
  line-height:1;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease;
}

.a2z-currency-switch__btn:hover{
  color:var(--navy);
}

.a2z-currency-switch__btn.is-active{
  background:linear-gradient(180deg, rgba(var(--red-rgb), .96), rgba(var(--red-rgb), .84));
  color:#fff;
  box-shadow:0 8px 16px rgba(var(--red-rgb), .22);
}

.a2z-currency-switch__hint{
  width:100%;
  margin:0;
  font-size:11px;
  font-weight:700;
  line-height:1.3;
  color:rgba(11,27,58,.68);
}

.card--chapter .a2z-volet,
.a2z-dialog__card .a2z-volet{
  border:1px solid rgba(16,124,140,.24) !important;
  border-radius:16px !important;
  background:linear-gradient(180deg, rgba(16,124,140,.06), rgba(16,124,140,.03)) !important;
  overflow:hidden;
}

.card--chapter .a2z-volet__head,
.a2z-dialog__card .a2z-volet__head{
  background:rgba(16,124,140,.12) !important;
  border-bottom:1px solid rgba(16,124,140,.22) !important;
  padding:10px 12px !important;
}

.card--chapter .a2z-volet__title,
.a2z-dialog__card .a2z-volet__title{
  font-size:15px !important;
  font-weight:900 !important;
  line-height:1.2;
  color:var(--navy);
}

.card--chapter .a2z-volet__body,
.a2z-dialog__card .a2z-volet__body{
  padding:12px !important;
}

.a2z-dialog__card table th,
.a2z-dialog__card table td{
  font-size:var(--unified-table-fz) !important;
  line-height:1.2 !important;
}

.a2z-dialog__card table th{
  text-align:center !important;
}

.a2z-dialog__head .a2z-dialog__close{
  background:var(--red) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.7) !important;
  border-radius:10px !important;
  min-height:34px !important;
  padding:7px 11px !important;
}

.a2z-dialog__body .a2z-accordion__toggle{
  width:100%;
  text-align:left;
  border:1px solid rgba(16,124,140,.24);
  border-radius:16px 16px 0 0;
  background:rgba(16,124,140,.12);
  color:var(--navy);
  padding:10px 12px;
  font-size:15px;
  font-weight:900;
}

.a2z-dialog__body .a2z-accordion__panel{
  margin-top:0 !important;
  border:1px solid rgba(16,124,140,.24);
  border-top:0;
  border-radius:0 0 16px 16px;
  background:linear-gradient(180deg, rgba(16,124,140,.06), rgba(16,124,140,.03));
  padding:12px !important;
}

.a2z-dialog__body .invest-flow-step,
.a2z-dialog__body .validation-review-card,
.a2z-dialog__body .validation-review-doc-volet,
.a2z-dialog__body .cgp-step,
.a2z-dialog__body .cgp-contact-card,
.a2z-dialog__body .cgp-kyc-card,
.a2z-dialog__body .cabinet-team-card,
.a2z-dialog__body .cabinet-dialog__summary{
  border-radius:16px !important;
  border:1px solid rgba(16,124,140,.24) !important;
  background:linear-gradient(180deg, rgba(16,124,140,.06), rgba(16,124,140,.03)) !important;
  box-shadow:none !important;
}

.a2z-dialog__body .invest-flow-step__summary{
  padding:10px 12px !important;
  background:rgba(16,124,140,.12) !important;
  border-bottom:1px solid rgba(16,124,140,.22);
  color:var(--navy) !important;
  font-size:13px !important;
  font-weight:900 !important;
}

.a2z-dialog__body .invest-flow-step__body{
  padding:12px !important;
}

.a2z-dialog__body .cgp-step{
  padding:12px !important;
}

.a2z-dialog__body .cgp-step__title,
.a2z-dialog__body .validation-review-card__title,
.a2z-dialog__body .cabinet-team-card h4{
  font-size:15px !important;
  font-weight:900 !important;
  color:var(--navy) !important;
  text-transform:none !important;
}

/* Documents exploitant: compact review card when opening a dossier */
#exvvReviewDialog .a2z-dialog__card{
  width:min(1080px, calc(100vw - 28px)) !important;
  max-height:calc(100vh - 34px) !important;
}

#exvvReviewDialog .a2z-dialog__body{
  padding:8px 10px 10px !important;
  gap:8px !important;
}

#exvvReviewDialog .exvv-review-top{
  padding:7px 9px !important;
  gap:7px !important;
}

#exvvReviewDialog .exvv-review-grid{
  gap:8px !important;
  grid-template-columns:minmax(240px, .95fr) minmax(320px, 1.35fr) !important;
}

#exvvReviewDialog .exvv-review-card{
  padding:8px !important;
  gap:7px !important;
}

#exvvReviewDialog .exvv-doc-preview{
  min-height:220px !important;
}

#exvvReviewDialog .exvv-doc-preview iframe{
  min-height:340px !important;
}

#exvvReviewDialog .exvv-doc-preview img{
  max-height:360px !important;
}

#exvvReviewDialog .exvv-summary{
  padding:6px 8px !important;
  gap:6px !important;
}

#exvvReviewDialog .exvv-summary-grid{
  gap:6px !important;
}

#exvvReviewDialog .exvv-summary-cell{
  padding:7px 8px !important;
  font-size:12px !important;
}

#exvvReviewDialog .exvv-doc-volet{
  padding:7px !important;
  gap:7px !important;
}

#exvvReviewDialog #exvvDocMeta{
  font-size:12px !important;
  line-height:1.25 !important;
}

#exvvReviewDialog .exvv-doc-actions{
  gap:6px !important;
}

#exvvReviewDialog .exvv-doc-actions .btn,
#exvvReviewDialog .exvv-doc-status-actions .btn{
  min-height:30px !important;
  padding:5px 9px !important;
  font-size:12px !important;
}

#exvvReviewDialog .exvv-doc-status-list{
  gap:5px !important;
}

#exvvReviewDialog .exvv-doc-status-item{
  padding:5px 7px !important;
  gap:6px !important;
}

#exvvReviewDialog .exvv-admin-upload{
  padding:8px !important;
  gap:6px !important;
}

#exvvReviewDialog .exvv-refuse-box{
  padding:8px !important;
  gap:6px !important;
}

#exvvReviewDialog .exvv-refuse-box textarea{
  min-height:72px !important;
  padding:8px 9px !important;
}

#exploitantsDocsDialog .a2z-dialog__card{
  width:min(980px, calc(100vw - 28px)) !important;
  max-height:calc(100vh - 36px) !important;
}

#exploitantsDocsDialog .a2z-dialog__body{
  padding:8px 10px 10px !important;
  gap:8px !important;
}

#exploitantsDocsDialog .exploitant-docs-toolbar{
  padding:7px 9px !important;
  gap:7px !important;
}

#exploitantsDocsDialog .exploitant-docs-meta{
  padding:8px 10px !important;
  font-size:12px !important;
}

#exploitantsDocsDialog .exploitant-docs-preview{
  min-height:220px !important;
}

#exploitantsDocsDialog .exploitant-docs-preview iframe{
  min-height:320px !important;
}

#exploitantsDocsDialog .exploitant-docs-preview img{
  max-height:340px !important;
}
