@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply bg-neutral-25 text-neutral-800 font-sans text-[13.5px];
  }

  h1, h2, h3, h4, h5, h6 {
    @apply text-neutral-900;
  }
}

/* Auth pages (Delta Force): ink title, underlined link that turns lime on hover. */
.auth-title {
  @apply mt-1 mb-10 text-3xl font-bold text-brand-ink;
}

.auth-link {
  @apply text-[13px] font-medium text-neutral-700 underline decoration-neutral-400 underline-offset-2 transition-colors hover:text-[#A3B339] hover:decoration-[#A3B339];
}

.auth-card {
  width: 100%;
  border: 1px solid #ECECE7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(14, 17, 16, 0.04);
  padding: 24px;
}

.auth-card .auth-title,
.auth-card .page-title {
  margin: 0 0 22px;
}

.auth-card .field {
  margin: 0 0 14px;
}

.auth-card .input {
  width: 100%;
}

/* Logos in table cells: one same-sized box whatever the uploaded image size. */
.table-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.loading{
  @apply hidden;
}

.sending .loading{
  @apply inline-block;
}

/* Spinner sized to the badge text and tinted like it. */
.sending .loading svg {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  vertical-align: -1px;
}

.sending .loading rect {
  fill: currentColor;
}

@layer components {
  .title{
    @apply mb-6 text-[26px] font-bold text-neutral-900;
  }

  .page-kicker {
    @apply text-xs font-bold tracking-[0.08em] uppercase text-neutral-500;
  }

  .page-title {
    @apply text-[26px] font-bold leading-[1.15] text-neutral-900;
  }

  /* Delta Force buttons (ui_kits/web_app .btn): 9px 14px padding, 15px line-height (= icon size)
     and a 1px border on every variant → same ≈34px height everywhere; hover one
     step darker, press one more step + 1px down; 15px icons. */
  .btn-primary {
    @apply inline-flex items-center justify-center gap-2 text-[13.5px] font-semibold leading-[15px] py-[9px] px-[14px] rounded-control border transition-[background-color,border-color,box-shadow,transform] duration-[120ms] ease-out outline-none focus:outline-none focus-visible:ring-[3px] focus-visible:ring-focus active:translate-y-px cursor-pointer text-brand-ink bg-brand-lime border-[#A3B339] shadow-[0_1px_0_rgba(0,0,0,0.04),inset_0_1px_0_rgba(255,255,255,0.25)] hover:bg-[#A3B339] active:bg-[#889732];
  }

  .btn-secondary {
    @apply inline-flex items-center justify-center gap-2 text-[13.5px] font-semibold leading-[15px] py-[9px] px-[14px] rounded-control border transition-[background-color,border-color,box-shadow,transform] duration-[120ms] ease-out outline-none focus:outline-none focus-visible:ring-[3px] focus-visible:ring-focus active:translate-y-px cursor-pointer text-neutral-900 bg-white border-neutral-200 shadow-xs hover:bg-neutral-25 active:bg-neutral-50;
  }

  .btn-ghost {
    @apply inline-flex items-center justify-center gap-2 text-[13.5px] font-semibold leading-[15px] py-[9px] px-[14px] rounded-control border transition-[background-color,border-color,box-shadow,transform] duration-[120ms] ease-out outline-none focus:outline-none focus-visible:ring-[3px] focus-visible:ring-focus active:translate-y-px cursor-pointer text-neutral-700 bg-transparent border-transparent hover:bg-neutral-50 active:bg-neutral-100;
  }

  .btn-danger {
    @apply inline-flex items-center justify-center gap-2 text-[13.5px] font-semibold leading-[15px] py-[9px] px-[14px] rounded-control border transition-[background-color,border-color,box-shadow,transform] duration-[120ms] ease-out outline-none focus:outline-none focus-visible:ring-[3px] focus-visible:ring-focus active:translate-y-px cursor-pointer text-white bg-danger border-[#A82C24] shadow-xs hover:bg-[#af2e26] active:bg-[#9F271E];
  }

  .btn-primary .lucide,
  .btn-secondary .lucide,
  .btn-ghost .lucide,
  .btn-danger .lucide {
    width: 15px;
    height: 15px;
  }

  .btn-primary:disabled,
  .btn-secondary:disabled,
  .btn-ghost:disabled,
  .btn-danger:disabled,
  .btn-primary[disabled],
  .btn-secondary[disabled],
  .btn-ghost[disabled],
  .btn-danger[disabled],
  .btn-primary.disabled,
  .btn-secondary.disabled,
  .btn-ghost.disabled,
  .btn-danger.disabled {
    @apply opacity-40 shadow-none;
    cursor: not-allowed;
  }

  .btn-primary:disabled,
  .btn-primary[disabled],
  .btn-primary.disabled {
    @apply bg-neutral-200 text-neutral-400 border-neutral-200;
  }

  .btn-danger:disabled,
  .btn-danger[disabled],
  .btn-danger.disabled {
    @apply bg-neutral-200 text-neutral-400 border-neutral-200;
  }

  .checkbox {
    @apply mr-1 text-brand-lime bg-white border border-neutral-300 rounded focus:ring-[3px] focus:ring-focus;
  }

  .dropdown-link {
    @apply block w-full px-4 py-2 text-sm font-normal text-neutral-700 bg-transparent whitespace-nowrap hover:bg-neutral-100;
  }

  .badge {
    @apply inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-semibold border;
  }

  .badge-dot {
    @apply w-1.5 h-1.5 rounded-full;
  }

  /* Delta Force badge tones (ui_kits/web_app/styles.css). */
  .badge-success { background: #E6F4EA; color: #1F6E3A; border-color: #BFE0CB; }
  .badge-warning { background: #FCF3DD; color: #8E5F0F; border-color: #ECD7A0; }
  .badge-danger  { background: #FBE7E5; color: #9F271E; border-color: #EFBEB9; }
  .badge-info    { background: #E5EFF9; color: #1E4F86; border-color: #BCD3EC; }
  .badge-neutral { background: #F4F4F1; color: #36362F; border-color: #DDDDD6; }
  .badge-brand   { background: #F2F6D6; color: #5E6A1A; border-color: #E4ECAA; }
  .badge-success .badge-dot { background: #2F8F4F; }
  .badge-warning .badge-dot { background: #C2841A; }
  .badge-danger .badge-dot  { background: #C8362D; }
  .badge-info .badge-dot    { background: #2C6DB5; }
  .badge-neutral .badge-dot { background: #9A9A90; }

  /* Delta Force KPI card. */
  .kpi {
    @apply flex flex-col gap-1.5 rounded-card border border-neutral-100 bg-white p-[18px] shadow-xs;
  }

  .kpi-label {
    @apply text-xs font-semibold uppercase tracking-[0.08em] text-neutral-500;
  }

  .kpi-value {
    @apply text-[28px] font-bold leading-tight tracking-[-0.018em] text-neutral-900 tabular-nums;
  }

  .kpi-value.is-unavailable {
    @apply text-[13.5px] font-medium tracking-normal text-neutral-500;
  }

  .kpi-delta {
    @apply flex items-center gap-1 whitespace-nowrap text-xs font-semibold;
  }

  .kpi-delta.up { color: #1F6E3A; }
  .kpi-delta.down { color: #9F271E; }
  .kpi-delta .lucide { width: 13px; height: 13px; }
  .kpi-delta .sub { @apply ml-1 font-normal text-neutral-500; }

  /* Delta Force chip (segmented filter). */
  .chip {
    @apply inline-flex items-center gap-1.5 rounded-full border border-neutral-200 bg-white px-[11px] py-[5px] text-[12.5px] font-medium text-neutral-700 hover:bg-neutral-25;
  }

  .chip.active {
    @apply border-brand-ink bg-brand-ink text-neutral-50;
  }

  /* Advanced table (Blocks::ItemTableComponent): header and rows share one
     grid (subgrid), so content-sized columns (refs, amounts, dates, status)
     line up across every row. Detail panes span the full width. */
  .adv-table {
    display: grid;
    grid-template-columns: var(--adv-cols);
  }

  .adv-table > .adv-row {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }

  .adv-table > .adv-full {
    grid-column: 1 / -1;
  }

  @supports not (grid-template-columns: subgrid) {
    .adv-table { display: block; }
    .adv-table > .adv-row { grid-template-columns: var(--adv-cols); }
  }

  /* Delta Force detail pane (key/value layout of Blocks::ItemTableComponent). */
  .detail-group-title {
    @apply mb-1.5 pt-3 text-[10.5px] font-bold uppercase tracking-[0.1em] text-neutral-500;
  }

  .is-kv-details .detail-pane-kv,
  .is-kv-details [data-advanced-table-target="row"]:has(+ .detail-pane-kv:not(.hidden)) {
    box-shadow: inset 3px 0 0 #BBCB44;
  }

  .is-kv-details [data-advanced-table-target="row"]:has(+ .detail-pane-kv:not(.hidden)) {
    @apply border-b-transparent bg-neutral-25;
  }

  /* Groups side by side (kit .detail-pane), then the Actions column. */
  /* Each group is capped at 420px so a value stays next to its label instead
     of being pushed to the far right of a wide row. */
  .detail-pane-grid {
    @apply grid gap-x-10 gap-y-6 md:grid-cols-[repeat(2,minmax(0,420px))];
  }

  @media (min-width: 1024px) {
    .detail-pane-grid {
      grid-template-columns: repeat(var(--detail-groups), minmax(0, 420px)) var(--detail-actions);
    }
  }

  /* Kit .kv line: 12.5px, 4px vertical padding, dashed hairline. */
  .kv-line {
    @apply flex min-w-0 items-baseline justify-between gap-4 border-b border-dashed border-neutral-100 py-1 text-[12.5px];
  }

  .kv-line:last-child {
    @apply border-b-0;
  }

  /* Kit .chev-btn: "+" closed, ink circle with lime "−" when open. */
  .is-kv-details [data-advanced-table-target="icon"].rotate-45 {
    transform: none;
  }

  .is-kv-details .chev-minus {
    display: none;
  }

  .is-kv-details [data-advanced-table-target="row"]:has(+ .detail-pane-kv:not(.hidden)) [data-action="advanced-table#toggle"] {
    @apply border-brand-ink bg-brand-ink text-brand-lime;
  }

  .is-kv-details [data-advanced-table-target="row"]:has(+ .detail-pane-kv:not(.hidden)) [data-advanced-table-target="icon"] {
    display: none;
  }

  .is-kv-details [data-advanced-table-target="row"]:has(+ .detail-pane-kv:not(.hidden)) .chev-minus {
    display: inline-flex;
  }

  /* Below lg the table scrolls horizontally (min-w 720px): keep the pane
     pinned to the visible card width (viewport − page padding − borders). */
  @media (max-width: 1023px) {
    .detail-pane-kv {
      position: sticky;
      left: 0;
      width: calc(100vw - 66px);
    }
  }

  /* Delta Force timeline (ui_kits/web_app .timeline / .tl-*). */
  .timeline {
    @apply flex flex-col py-1;
  }

  .tl-item {
    @apply relative flex gap-3.5 py-2;
  }

  .tl-dot {
    @apply z-[1] flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2 border-neutral-200 bg-white;
  }

  .tl-dot.done {
    @apply border-[#A3B339] bg-brand-lime text-brand-ink;
  }

  .tl-dot .lucide {
    width: 12px;
    height: 12px;
  }

  .tl-line {
    @apply absolute bottom-[-8px] left-[11px] top-8 w-0.5 bg-neutral-200;
  }

  .tl-item.done .tl-line {
    @apply bg-brand-lime;
  }

  .tl-item:last-child .tl-line {
    display: none;
  }

  .tl-meta {
    @apply flex min-w-0 flex-1 flex-col gap-0.5 pt-0.5;
  }

  .tl-title {
    @apply text-[13.5px] font-semibold text-neutral-900;
  }

  .tl-sub {
    @apply text-xs tabular-nums text-neutral-500;
  }

  .row-avatar {
    @apply inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-[11px] font-bold;
    background: #F2F6D6;
    color: #5E6A1A;
  }

  .card-surf {
    @apply bg-white border border-neutral-100 rounded-card shadow-xs;
  }

  .stat-label {
    @apply text-xs font-bold tracking-[0.08em] uppercase text-neutral-500;
  }

  .stat-card {
    @apply min-h-[136px] p-[18px];
  }

  .stat-value {
    @apply text-[25px] font-extrabold leading-[1.15] text-neutral-900 tabular-nums;
  }

  .stat-note {
    @apply text-[12.5px] text-neutral-500;
  }

  .table-footer {
    @apply flex flex-wrap items-center justify-between gap-3.5 w-full px-4 py-3 bg-white text-[13.5px] text-neutral-600;
  }

  @media (max-width: 640px) {
    .table-footer {
      @apply flex-col items-stretch gap-3;
    }

    .table-footer-page-size,
    .table-footer-pages {
      @apply flex flex-wrap items-center justify-between gap-2;
    }

    .table-footer-pages {
      @apply justify-center;
    }

    .pagy-nav {
      @apply flex-wrap justify-center;
    }
  }
}

.initiated, .project_status {
  @apply inline-flex items-center rounded-full border px-2 py-1 font-bold;
  border-color: var(--neutral-200, #DDDDD6);
  background: var(--neutral-50, #F4F4F1);
  color: var(--neutral-500, #74746A);
  font-size: 11.5px;
  line-height: 1;
}

/* Delta Force status tones (kit TxStatus): green only once the money has
   arrived; in-flight = warning, approved-not-sent = info. */
.validated, .pending, .sending {
  @apply inline-flex items-center rounded-full border px-2 py-1 font-bold;
  border-color: rgba(194, 132, 26, 0.24);
  background: rgba(194, 132, 26, 0.12);
  color: #C2841A;
  font-size: 11.5px;
  line-height: 1;
}

.rejected, .failed {
  @apply inline-flex items-center rounded-full border px-2 py-1 font-bold;
  border-color: rgba(200, 54, 45, 0.24);
  background: rgba(200, 54, 45, 0.12);
  color: #C8362D;
  font-size: 11.5px;
  line-height: 1;
}

.sended, .retrieved, .success {
  @apply inline-flex items-center rounded-full border px-2 py-1 font-bold;
  border-color: rgba(47, 143, 79, 0.24);
  background: rgba(47, 143, 79, 0.12);
  color: #2F8F4F;
  font-size: 11.5px;
  line-height: 1;
}

.approved {
  @apply inline-flex items-center rounded-full border px-2 py-1 font-bold;
  border-color: rgba(44, 109, 181, 0.24);
  background: rgba(44, 109, 181, 0.12);
  color: #2C6DB5;
  font-size: 11.5px;
  line-height: 1;
}

/* For transaction / airtime groups "approved" is the final, successful step. */
.approved.is-final-status {
  border-color: rgba(47, 143, 79, 0.24);
  background: rgba(47, 143, 79, 0.12);
  color: #2F8F4F;
}

@layer utilities {
  .table {
    @apply items-center w-full bg-transparent border-collapse;
  }

  .table-header {
    @apply px-4 py-3 text-[11px] font-semibold tracking-[0.08em] text-left text-neutral-500 align-middle border-b border-neutral-200 whitespace-nowrap uppercase;
  }

  .table-col {
    @apply px-4 py-3.5 text-[13.5px] font-normal text-left align-middle border-b border-neutral-100 whitespace-nowrap tabular-nums;
  }

  /* Simple tables (Blocks::ItemTableComponent without detail pane): long
     column titles may wrap so the table fits the card instead of scrolling
     ("NOMBRE DE / BÉNÉFICIAIRE"). */
  .table-simple .table-header {
    @apply whitespace-normal leading-[1.35];
  }

  @media (min-width: 1280px) {
    .table-col {
      max-width: 220px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .table-col:has(> div.whitespace-pre-wrap) {
      max-width: 280px;
      overflow: visible;
      text-overflow: clip;
    }

    .table-col:has(> input, > select, > .dropdown, > .relative) {
      max-width: none;
      overflow: visible;
    }
  }

  tbody tr:hover {
    @apply bg-neutral-25;
  }

  .label {
    @apply block mb-2 text-sm font-medium leading-5 text-neutral-600;
  }

  /* Delta Force input (kit: 14px text, 10px 12px padding → 38px, hairline
     border, inset shadow, lime focus halo). Choices.js widgets match it in
     choices.css. */
  .input {
    @apply h-[38px] border appearance-none border-neutral-200 rounded-control w-full py-2 px-3 text-[14px] text-neutral-800 leading-5 shadow-[inset_0_1px_2px_rgba(14,17,16,0.04)] placeholder:text-[#9A9A90] focus:outline-none focus:bg-white focus:border-[#A3B339] focus:ring-[3px] focus:ring-focus;
  }

  textarea.input {
    @apply h-auto min-h-[76px];
  }

  .input:disabled,
  .input[disabled],
  .input.disabled,
  select.input:disabled,
  select.input[disabled] {
    @apply bg-neutral-100 text-neutral-400 border-neutral-200 placeholder:text-neutral-300 shadow-none;
    cursor: not-allowed;
  }

  fieldset:disabled .input {
    @apply bg-neutral-100 text-neutral-400;
    cursor: not-allowed;
  }

  /* Choices.js wrappers: only grey the widget when it is actually disabled.
     Never target .choices unscoped, or every active dropdown turns grey. */
  .choices.is-disabled,
  .choices.is-disabled .choices__inner,
  .choices.is-disabled .choices__innerText,
  .choices:has(select:disabled),
  .choices:has(select:disabled) .choices__inner,
  .choices:has(select:disabled) .choices__innerText,
  .choices[data-disabled],
  .choices[data-disabled] .choices__inner,
  .choices[data-disabled] .choices__innerText,
  .select2-container--disabled .select2-selection--default,
  .select2-container .select2-selection--disabled {
    @apply bg-neutral-100 border-neutral-200 text-neutral-400;
    cursor: not-allowed;
  }

  .choices.is-disabled .choices__list--dropdown,
  .choices:has(select:disabled) .choices__list--dropdown,
  .choices[data-disabled] .choices__list--dropdown {
    @apply hidden;
  }

  .choices__list--dropdown .choices__item--selectable:hover {
    @apply bg-neutral-50;
  }

  .select.input:disabled,
  .select.input[disabled],
  .select.input.disabled {
    @apply bg-neutral-100 text-neutral-400 border-neutral-200;
    cursor: not-allowed;
    -webkit-appearance: none;
    appearance: none;
  }

  fieldset:disabled select.select,
  fieldset:disabled .choices__list--dropdown {
    @apply cursor-not-allowed;
  }

  fieldset:disabled .btn-primary,
  fieldset:disabled .btn-secondary,
  fieldset:disabled .btn-ghost,
  fieldset:disabled .btn-danger {
    @apply opacity-40 shadow-none;
    cursor: not-allowed;
    pointer-events: none;
  }

  fieldset:disabled label {
    @apply text-neutral-400;
  }

  .card-dashed {
    @apply bg-neutral-50 fill-brand-lime hover:fill-neutral-500 text-center flex justify-center items-center p-6 mb-4 rounded-card hover:bg-white flex-col border-dashed border border-neutral-300 hover:border-brand-lime;
  }

  .card-dashed .lucide {
    @apply h-8 w-8 text-brand-lime;
  }

  /* External link next to a reference (12px, like the previous text-xs glyph). */
  .ref-link .lucide {
    @apply inline h-3 w-3 align-baseline;
  }

  .card-dashed:hover .lucide {
    @apply text-neutral-500;
  }
}

.text-color-primary {
  @apply text-brand-lime;
}

.table thead {
  @apply bg-neutral-50;
}

.filter-menu-panel {
  @apply max-w-[calc(100vw-2rem)];
}

/* Table cards clip their content (overflow-hidden, rounded corners). While a
   filter panel or a dropdown is open, let it overflow so its last options
   (e.g. "Personnalisée" in the date filter) stay reachable on short cards. */
.card-surf.overflow-hidden:has(.filter-menu-panel:not(.hidden)),
.card-surf.overflow-hidden:has(.choices.is-open),
.card-surf.overflow-hidden:has([data-controller="flatpickr"]:hover),
.card-surf.overflow-hidden:has(.details-popover[open]) {
  overflow: visible;
}

/* "Voir" popover (shared/_details) opened inside a truncated table cell: let
   it escape the cell so the whole content is readable. */
.truncate:has(> .details-popover[open]),
.truncate:has(.details-popover[open]) {
  overflow: visible;
}

@media (min-width: 1024px) {
  .overflow-x-auto:has(.details-popover[open]) {
    overflow: visible;
  }
}

/* Right-aligned values (e.g. group detail card): open towards the left. */
.text-right .details-popover-panel {
  left: auto;
  right: 0;
}

/* Key/value lines of the detail pane: the popover spans the group column
   under the line, so it always stays inside the card. */
.kv-line {
  position: relative;
}

.kv-line .details-popover {
  position: static;
}

.kv-line .details-popover-panel {
  left: 0;
  right: 0;
  width: auto;
}

.filter-menu-panel form.flex {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  align-items: start;
}

.filter-menu-panel form.flex .field {
  width: 100%;
}

.filter-menu-panel form.flex .btn-primary {
  grid-column: 1 / -1;
  justify-self: end;
  height: 38px;
}

/* Below xl the "Filtres" button sits on the left of its toolbar: open the
   panel towards the right and keep it inside the content area. */
@media (min-width: 641px) and (max-width: 1279px) {
  .filter-align-start .filter-menu-panel {
    left: 0;
    right: auto;
    width: min(920px, calc(100vw - 96px));
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .filter-align-start .filter-menu-panel {
    width: min(920px, calc(100vw - 336px));
  }
}

@media (max-width: 640px) {
  .filter-menu-root {
    position: static;
  }

  .filter-menu-panel {
    @apply left-4 right-auto w-[calc(100vw-2rem)] max-h-[75vh] overflow-y-auto;
  }

  .filter-menu-panel form.flex {
    grid-template-columns: 1fr;
  }
}

.pagy-nav, .pagy-nav-js {
  @apply flex space-x-2;
}

.pagination {
  display: flex;
  justify-content: end
}

.pagy-nav .page a,
.pagy-nav .page.active,
.pagy-nav .page.prev.disabled,
.pagy-nav .page.next.disabled,
.pagy-nav-js .page a,
.pagy-nav-js .page.active,
.pagy-nav-js .page.prev.disabled,
.pagy-nav-js .page.next.disabled {
  @apply block px-3 py-1 text-sm font-semibold text-neutral-600 bg-white border border-neutral-200 rounded-control;

  &:hover{
    @apply bg-neutral-50;
  }

  &:active{
    @apply text-brand-ink bg-neutral-100;
  }
}


.pagy-nav .page.prev.disabled,
.pagy-nav .page.next.disabled,
.pagy-nav-js .page.prev.disabled,
.pagy-nav-js .page.next.disabled {
  @apply text-neutral-300 cursor-default border-neutral-100;

  &:hover {
    @apply text-neutral-300 bg-white;
  }

  &:active {
    @apply text-neutral-300 bg-white;
  }
}

.pagy-nav .page.active,
.pagy-nav-js .page.active {
  @apply text-white cursor-default border-[#9CA3AF] bg-[#9CA3AF];

  &:hover {
    @apply text-white bg-[#9CA3AF];
  }

  &:active {
    @apply text-white bg-[#9CA3AF];
  }
}

.pagy-nav .page.next.disabled,
.pagy-nav .page.prev.disabled {
  @apply hidden;
}

.pagy-combo-nav-js {
  @apply flex px-3 py-1 text-sm font-semibold text-neutral-600 bg-white border border-neutral-200 rounded-full max-w-max;
}

.pagy-combo-nav-js .pagy-combo-input {
  @apply bg-neutral-50 px-2 rounded-sm
}

.pagy-combo-nav-js .page.prev,
.pagy-combo-nav-js .page.next {
  &:hover {
    @apply text-neutral-900;
  }

  &:active {
    @apply text-neutral-900;
  }
}

.pagy-combo-nav-js .page.prev.disabled,
.pagy-combo-nav-js .page.next.disabled {
  @apply text-neutral-300 cursor-default;
}

/* Table footer pagination: size select left, pages right (i-money design) */
.table-footer-page-size {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.table-footer-page-size span {
  white-space: nowrap;
  font-size: 13px;
  color: #5E5C4E;
}

.table-footer-select {
  height: 32px;
  min-width: 64px;
  border: 1px solid #DDDDD6;
  border-radius: 8px;
  background-color: #FAFAF8;
  color: #36362F;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 0 28px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235E5C4E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.table-footer-select:hover {
  border-color: #C8C8BF;
}

.table-footer-select:focus {
  outline: none;
  border-color: #BBCB44;
  box-shadow: 0 0 0 3px rgba(187, 203, 68, 0.35);
}

.table-footer-top {
  border-bottom: 1px solid #ECECE7;
}

.table-footer-bottom {
  border-top: 1px solid #ECECE7;
}

.table-footer:first-of-type {
  border-bottom: 1px solid #ECECE7;
}

.table-footer:last-of-type {
  border-top: 1px solid #ECECE7;
}

.table-footer-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* Pagy nav: compact rounded buttons matching i-money screenshot */
.table-footer .pagy-nav,
.table-footer .pagy-nav-js {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.table-footer .pagy-nav .page,
.table-footer .pagy-nav-js .page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #F3F4F6;
  color: #4B5563;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.table-footer .pagy-nav .page svg,
.table-footer .pagy-nav-js .page svg {
  display: inline-block;
  width: 14px;
  height: 14px;
}

/* Text-only items (current page, gap, disabled prev/next) */
.table-footer .pagy-nav .page:not(:has(a)),
.table-footer .pagy-nav-js .page:not(:has(a)) {
  padding: 0 6px;
}

/* Clickable pages */
.table-footer .pagy-nav .page a,
.table-footer .pagy-nav-js .page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 6px;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}

/* Hover on clickable page buttons */
.table-footer .pagy-nav .page:has(a):hover,
.table-footer .pagy-nav-js .page:has(a):hover {
  background: #E5E7EB;
  color: #111827;
}

/* Active page pill: medium gray (#9CA3AF) + white text */
.table-footer .pagy-nav .page.active {
  background: #9CA3AF;
  border-color: #9CA3AF;
  color: #fff;
}

/* Gap (ellipsis) is quiet and borderless */
.table-footer .pagy-nav .page.gap,
.table-footer .pagy-nav-js .page.gap {
  background: transparent;
  border-color: transparent;
  color: #9CA3AF;
  min-width: auto;
}

/* Disabled prev/next: light soft gray background with muted chevron */
.table-footer .pagy-nav .page.prev.disabled,
.table-footer .pagy-nav .page.next.disabled,
.table-footer .pagy-nav-js .page.prev.disabled,
.table-footer .pagy-nav-js .page.next.disabled {
  background: #F3F4F6;
  border-color: transparent;
  color: #C4C8D0;
  cursor: default;
}


/* Delta Force summary stat cards (grid of KPI cards above tables) */
.summary-stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 20px;
}

.summary-stat-card {
  min-height: 86px;
  padding: 14px 16px;
}

.summary-stat-card .summary-label {
  @apply text-[11px] font-extrabold uppercase tracking-[0.08em] text-neutral-500;
}

.summary-stat-card .summary-value {
  @apply text-[19px] font-extrabold text-brand-ink;
  line-height: 1.2;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}

/* Keep the boundary chevrons visible (greyed) — overrides the global
   `.pagy-nav .page.prev/next.disabled { @apply hidden }` so "< 1 >" always
   shows both chevrons even on the first/last (or single) page. */
.table-footer .pagy-nav .page.prev.disabled,
.table-footer .pagy-nav .page.next.disabled {
  display: inline-flex;
}

/* ==========================================================================
   iMoney shell (Delta Force): sidebar + topbar + page
   ========================================================================== */

.lucide {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.imoney-shell {
  min-height: 100vh;
  background: #FAFAF8;
}

@media (min-width: 1024px) {
  .imoney-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

.imoney-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #fff;
  border-right: 1px solid #ECECE7;
  padding: 20px 14px;
}

.imoney-sidebar nav,
.imoney-main-nav {
  flex: 1;
  min-height: 0;
}

.imoney-main-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

.imoney-nav-scroll {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.imoney-nav-scroll::-webkit-scrollbar {
  width: 6px;
}

.imoney-nav-scroll::-webkit-scrollbar-thumb {
  background: #DDDDD6;
  border-radius: 999px;
}

.imoney-nav-bottom {
  position: relative;
  z-index: 60;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  overflow: visible;
}

.imoney-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-bottom: 1px solid #ECECE7;
  padding: 0 28px;
}

.imoney-page {
  margin: 0 auto;
  padding: 28px 32px 48px;
}

/* Delta Force — data-table cards (financial back-office).
   Full-bleed table cards that span the whole content area.
   Scoped to main.imoney-page; form-only cards are handled separately. */
main.imoney-page div.bg-white.rounded-xl:has(table.table) {
  max-width: 100%;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ECECE7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(14, 17, 16, 0.04);
}

/* Toolbar / filters row: right-aligned, hairline divider, no stray margins. */
main.imoney-page div.bg-white.rounded-xl:has(table.table) > .flex.justify-end,
main.imoney-page div.bg-white.rounded-xl:has(table.table) > .flex.justify-between {
  justify-content: flex-end;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #ECECE7;
}

/* Horizontal scroll wrapper around the table. */
main.imoney-page div.bg-white.rounded-xl:has(table.table) div:has(> table.table) {
  overflow-x: auto;
}

/* Table stretches to fill the card width. */
main.imoney-page div.bg-white.rounded-xl:has(table.table) table.table {
  min-width: 100%;
}

/* Allow cells to wrap so the table can spread across the full screen. */
main.imoney-page div.bg-white.rounded-xl:has(table.table) .table-col {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Delta Force — form cards (financial back-office).
   Auto-upgrades white form cards to full-width centered Delta Force cards.
   Scoped to main.imoney-page and skips cards that contain a data table. */
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #ECECE7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(14, 17, 16, 0.04);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0 10px;
  align-content: start;
}

/* Every card child (and, once the form dissolves, every form child) spans
   the full card width by default. */
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > *,
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > form > * {
  grid-column: 1 / -1;
  min-width: 0;
}

/* The form itself dissolves so its children join the card grid. */
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > form {
  display: contents;
}

/* Title spacing. */
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > .title,
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > form > .title {
  margin: 0 0 20px;
}

/* Full-width fields. */
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) select,
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) textarea,
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) .choices {
  width: 100%;
}

/* Action footer: [Annuler (ghost)] [Enregistrer (primary)] grouped on the
   right, under a hairline divider. Without a cancel link, the submit spans
   the whole row so the divider stays full width. */
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > form > div:has(> input[type="submit"], > button[type="submit"]),
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > div:last-child:has(> a.btn-ghost) {
  display: flex;
  justify-content: flex-end;
  grid-row: 99;
  margin: 12px 0 0;
  padding-top: 16px;
  border-top: 1px solid #ECECE7;
}

main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > form > div:has(> input[type="submit"], > button[type="submit"]) {
  grid-column: 1 / -1;
}

main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)):has(> div:last-child > a.btn-ghost) > form > div:has(> input[type="submit"], > button[type="submit"]) {
  grid-column: 3;
}

/* Cancel cell covers the column gap so the divider has no break. */
main.imoney-page div.bg-white.rounded-xl:has(form):not(:has(table.table)) > div:last-child:has(> a.btn-ghost) {
  grid-column: 1 / 3;
  margin-right: -10px;
  padding-right: 10px;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  color: #74746A;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.menu-link:hover,
.menu-link:focus {
  background: #F4F4F1;
  color: #0E1110;
  outline: none;
}

.menu-link.active {
  background: rgba(187, 203, 68, 0.16);
  color: #0E1110;
  font-weight: 700;
}

.menu-link .lucide {
  color: currentColor;
}

.nav-group {
  border-top: 1px solid #ECECE7;
  padding-top: 7px;
}

.nav-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.nav-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 25px;
  cursor: pointer;
  list-style: none;
  padding: 0 6px;
  color: #74746A;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-group-summary::-webkit-details-marker {
  display: none;
}

.nav-group-summary:hover,
.nav-group-summary:focus {
  color: #0E1110;
  outline: none;
}

.nav-group-chevron {
  width: 13px;
  height: 13px;
  transition: transform 120ms ease;
}

.nav-group[open] .nav-group-chevron {
  transform: rotate(90deg);
}

.nav-group-label {
  margin-bottom: 8px;
  padding: 0 8px;
  color: #74746A;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-menu-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 1px solid #ECECE7;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 1px 1px rgba(14, 17, 16, 0.04);
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

.profile-menu-button:hover,
.profile-menu-button:focus {
  border-color: #DDDDD6;
  box-shadow: 0 2px 6px 0 rgba(14, 17, 16, 0.08);
  outline: none;
}

.input-leading-icon {
  padding-left: 38px;
}

/* Mobile drawer (lateral) */
.mobile-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: 264px;
  max-width: 82vw;
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid #ECECE7;
  padding: 20px 14px;
  transform: translateX(-100%);
  transition: transform 200ms ease;
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(14, 17, 16, 0.4);
}

@media (min-width: 1024px) {
  .mobile-drawer,
  .mobile-drawer-overlay {
    display: none !important;
  }
}

/* Delta Force — tooltips */
.tooltip {
  position: relative;
}

.tooltip .tooltiptext {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease 0.3s, visibility 0.3s ease 0.3s;
  background-color: rgb(145, 145, 145);
  color: #1e1d1d;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 1;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  transition-delay: .2s;
}

/* Confirmation modal (data-turbo-confirm), Delta Force: radius 20px (xl),
   shadow lg, flat ink overlay at 45%, 200ms ease-out, no bounce. */
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(14, 17, 16, 0.16);
  animation: confirm-dialog-in 200ms ease-out;
}

.confirm-dialog::backdrop {
  background: rgba(14, 17, 16, 0.45);
}

.confirm-dialog-body {
  padding: 24px;
}

.confirm-dialog-title {
  @apply mb-2 text-base font-semibold text-neutral-900;
}

.confirm-dialog-message {
  @apply mb-5 text-sm leading-relaxed text-neutral-600;
}

.confirm-dialog-actions {
  @apply flex justify-end gap-2;
}

@keyframes confirm-dialog-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Invalid field (Rails wraps it in .field_with_errors), Delta Force "is-error":
   danger border + light 3px danger halo, also while focused. */
.field_with_errors .input,
.field_with_errors input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.field_with_errors select,
.field_with_errors textarea,
.field_with_errors .choices__inner,
.field_with_errors .input:focus,
.field_with_errors .choices.is-focused .choices__inner {
  border-color: #C8362D;
  box-shadow: 0 0 0 3px rgba(200, 54, 45, 0.18);
}

/* Flash notifications (shared/_flashes), Delta Force semantic tones,
   14px radius and lg shadow (README: "lg for modals/toasts"). */
.flash-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(14, 17, 16, 0.16);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.flash-danger  { background: #FBE7E5; color: #9F271E; border-color: #EFBEB9; }
.flash-success { background: #E6F4EA; color: #1F6E3A; border-color: #BFE0CB; }

.flash-toast-close {
  color: inherit;
  opacity: 0.7;
  transition: opacity 120ms ease-out;
}

.flash-toast-close:hover {
  opacity: 1;
}

.choices{position:relative;overflow:hidden;margin-bottom:24px;font-size:16px}.choices:focus{outline:0}.choices:last-child{margin-bottom:0}.choices.is-open{overflow:visible}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.25}.choices[data-type*=select-one] .choices__button:focus,.choices[data-type*=select-one] .choices__button:hover{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #00bcd4}.choices[data-type*=select-one] .choices__item[data-value=""] .choices__button{display:none}.choices[data-type*=select-one]::after{content:"";height:0;width:0;border-style:solid;border-color:#333 transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open::after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]::after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0-4px 0 8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=text] .choices__button:focus,.choices[data-type*=text] .choices__button:hover{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown,.choices__list[aria-expanded]{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility}.is-active.choices__list--dropdown,.is-active.choices__list[aria-expanded]{visibility:visible}.is-open .choices__list--dropdown,.is-open .choices__list[aria-expanded]{border-color:#b7b7b7}.is-flipped .choices__list--dropdown,.is-flipped .choices__list[aria-expanded]{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list,.choices__list[aria-expanded] .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item,.choices__list[aria-expanded] .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item,[dir=rtl] .choices__list[aria-expanded] .choices__item{text-align:right}@media (min-width:640px){.choices__list--dropdown .choices__item--selectable,.choices__list[aria-expanded] .choices__item--selectable{padding-right:100px}.choices__list--dropdown .choices__item--selectable::after,.choices__list[aria-expanded] .choices__item--selectable::after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable,[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable::after,[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable::after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted::after,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;-webkit-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus,.choices__input:focus{outline:0}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}.choices__input::-webkit-search-cancel-button,.choices__input::-webkit-search-decoration,.choices__input::-webkit-search-results-button,.choices__input::-webkit-search-results-decoration{display:none}.choices__input::-ms-clear,.choices__input::-ms-reveal{display:none;width:0;height:0}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5}

.choices__list{
  left: -.5px;
}

/* Delta Force — same control as .input: 14px text, 38px high, 12px side
   padding, #DDDDD6 hairline border, inset shadow, lime focus halo. */
.choices {
  width: 100%;
  margin-bottom: 0;
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
}

.choices::placeholder {
  font-size: 14px;
  color: #9A9A90;
}

.choices__inner {
  display: flex;
  align-items: center;
  min-height: 38px;
  background: #fff;
  border: 1px solid #DDDDD6;
  border-radius: 10px;
  padding: 4px 34px 4px 12px;
  font-size: 14px;
  line-height: 20px;
  color: #22221D;
  box-shadow: inset 0 1px 2px rgba(14, 17, 16, 0.04);
}

.choices[data-type*="select-one"] .choices__inner {
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.choices__list--single {
  padding: 0;
}

.choices__placeholder {
  opacity: 1;
  color: #9A9A90;
}

.choices__input,
.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
  font-size: 14px;
}

.is-focused .choices__inner,
.is-open .choices__inner {
  border-color: #A3B339;
  box-shadow: inset 0 1px 2px rgba(14, 17, 16, 0.04), 0 0 0 3px rgba(187, 203, 68, 0.35);
}

.is-open .choices__inner {
  border-radius: 10px 10px 0 0;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
  border: 1px solid #DDDDD6;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 2px 6px 0 rgba(14, 17, 16, 0.08);
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
  background-color: #F5F5F1;
}

.choices__list--multiple .choices__item {
  background-color: #EDEDE7;
  border: 1px solid #E2E1D8;
  color: #2B2A22;
  border-radius: 9999px;
}

.choices__list--multiple .choices__item.is-highlighted {
  background-color: #E2E1D8;
  border: 1px solid #CFCEC1;
}

.choices__item--selectable {
  padding-right: 0 !important;
}

/* ---------------------------------------------------------------------------
   Delta Force — Choices.js overrides scoped to the filter panel.
   Keeps multi-selects compact (36px control), warm hairline border, 10px
   radius, lime-tinted tags, and a clean inline remove (×) button.
   --------------------------------------------------------------------------- */
.filter-menu-panel .field {
  min-height: 38px;
}

.filter-menu-panel .input,
.filter-menu-panel .choices {
  height: 38px;
}

.filter-menu-panel .choices {
  padding: 0;
  border: 1px solid #DDDDD6;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(14, 17, 16, 0.04);
  font-size: 14px;
  line-height: 1.35;
}

.filter-menu-panel .choices.is-open {
  z-index: 35;
  overflow: visible;
}

.filter-menu-panel .choices.is-focused,
.filter-menu-panel .choices.is-open {
  border-color: #BBCB44;
  box-shadow: 0 0 0 3px rgba(187, 203, 68, 0.35);
}

.filter-menu-panel .choices__inner {
  display: flex;
  align-items: center;
  min-height: 36px;
  height: 36px;
  padding: 7px 34px 7px 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.filter-menu-panel .choices__list--single {
  padding: 0;
}

.filter-menu-panel .choices__list--multiple {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 18px;
  overflow: hidden;
  white-space: nowrap;
}

.filter-menu-panel .choices__list--multiple .choices__item {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
  margin: 0;
  padding: 2px 20px 2px 7px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(187, 203, 68, 0.35);
  background: rgba(187, 203, 68, 0.16);
  color: #0E1110;
}

.filter-menu-panel .choices[data-type*="select-multiple"] .choices__button {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  min-width: 10px;
  overflow: hidden;
  margin: 0;
  padding-left: 10px;
  border-left: 0;
  opacity: 0.55;
  text-indent: -9999px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.filter-menu-panel .choices[data-type*="select-multiple"] .choices__button:hover,
.filter-menu-panel .choices[data-type*="select-multiple"] .choices__button:focus {
  opacity: 1;
}

.filter-menu-panel .choices__input,
.filter-menu-panel .choices__input--cloned {
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #0E1110;
  font-size: 14px;
  line-height: 18px;
}

.filter-menu-panel .choices__list--dropdown,
.filter-menu-panel .choices__list[aria-expanded] {
  z-index: 40;
  top: calc(100% + 6px);
  margin-top: 0;
  border: 1px solid #EDEDE7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 6px 0 rgba(14, 17, 16, 0.08);
  overflow: hidden;
  word-break: normal;
}

.filter-menu-panel .choices__list--dropdown .choices__list,
.filter-menu-panel .choices__list[aria-expanded] .choices__list {
  max-height: 220px;
}

.filter-menu-panel .choices__list--dropdown .choices__item,
.filter-menu-panel .choices__list[aria-expanded] .choices__item {
  padding: 9px 12px;
  color: #454338;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
}

.filter-menu-panel .choices__list--dropdown .choices__item--selectable.is-highlighted,
.filter-menu-panel .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
  background: #F5F5F1;
  color: #0E1110;
}

.filter-menu-panel select.input[multiple] {
  height: 36px;
  min-height: 36px;
  overflow: hidden;
}

/* Full-width multi-selects (many possible values) grow vertically. */
.filter-menu-panel .filter-field-full .choices[data-type*="select-multiple"] {
  height: auto;
  min-height: 36px;
}

.filter-menu-panel .filter-field-full .choices[data-type*="select-multiple"] .choices__inner {
  height: auto;
  min-height: 34px;
  align-items: flex-start;
  padding-bottom: 6px;
}

.filter-menu-panel .filter-field-full .choices[data-type*="select-multiple"] .choices__list--multiple {
  flex-wrap: wrap;
  max-height: 92px;
  overflow-y: auto;
  white-space: normal;
}

.filter-menu-panel .filter-field-full .choices[data-type*="select-multiple"] .choices__list--multiple .choices__item {
  max-width: 180px;
}

.filter-menu-panel .btn-primary,
.filter-menu-panel .btn-secondary {
  height: 36px;
  min-height: 36px;
}
.data-table {
  margin: auto;
}

table.pdf {
  width: 100%;
  table-layout: fixed;
}

table.pdf th,
table.pdf td {
  word-break: break-word;
}

table.pdf, th.pdf, td.pdf {
  border: 1px solid black;
  border-collapse: collapse;
}

.pdf-title {
  text-align: center;
  font-weight: bold;
  font-size: 150%;
  margin: 50px 20px;
}

.pdf-title- {
  text-align: center;
  font-weight: bold;
  font-size: 150%;
  margin-bottom: 100px;
  color: white;
}

.pdf-logo {
  width: 100%;
  margin-bottom: 150px;
}

.pdf-logo .left {
  float: left;
}

.account_logo {
  width: 5em; height: 5em; margin: 4px;
}

.pdf-logo .right {
  float: right;
}

.pdf-logo .right img {
  width: auto;
  height: 48px;
}

.logo-partner {
  text-align: left;
}

.data-table.pdf {
  width: 100%;
  border-collapse: collapse;
  max-width: 1200px;
  margin: auto; 
}

.data-table.pdf th.pdf {
  font-weight: bold;
  padding: 10px;
  font-size: 14px;
  background-color: #f2f2f2;
  word-wrap: break-word;
  text-align: left;
}

.data-table.pdf td.pdf {
  padding: 10px;
  font-size: 14px;
  word-wrap: break-word;
  text-align: left;
}

.td-border {
  border-bottom: 1px solid gray;
  text-align: right;
  vertical-align: middle;
  color: #0f0101; 
}

.td-font {
  font-weight: bold;
  border-bottom: 1px solid gray;
  color: #0f0101;
}

.td-center-text {
  width: 80%;
  text-align: center;
}

#myTable {
  background-color: #e3f6e8;
  width: 100%;
}

.title.m-0.account-title {
  text-decoration: underline;
}

.whidth{
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
}

.margin{
  margin: 20px auto;
  width: 100%;
  max-width: 1200px;
}

.second-table-container {
  width: 100%;
  margin-top: 40px;
}

.qrcode {
  width: 140px !important;
  height: 100px !important;
  position: absolute;
  right: 10px;
  top: 90px;
}

html {
  position: relative;
  font-size: 16px;
}

body {
  letter-spacing: 0;
  font-family: "Open Sans", sans-serif;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  color: #0E1110;
  font-weight: 600;
}

p {
  line-height: 1.7;
}

* {
  outline: 0 !important
}

a {
  transition: all 0.3s ease-in-out;
}

.loader-v1 {
  border: 6px solid #f8f6f1;
  border-top: 6px solid #f05152;
  border-bottom: 6px solid #f05152;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.form-img-preview {
  max-width: 350px;
}

.form-img-preview img {
  max-width: 100px;
}


.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: left;
}
.center-table {
  width: 60%;
  margin: 0 auto;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
 
