/*
 * LEO design system
 * Theme enterprise: surfaces neutres, actions nettes, densite lisible.
 * Le fichier surcharge Tabler progressivement afin de moderniser l'app sans
 * modifier la logique metier ni imposer un build Tailwind immediat.
 */
:root {
    --leo-bg: #f4f6f8;
    --leo-bg-deep: #111827;
    --leo-panel: #ffffff;
    --leo-panel-tint: #f8fafc;
    --leo-primary: #1d4ed8;
    --leo-primary-hover: #1e40af;
    --leo-primary-soft: #dbeafe;
    --leo-accent: #b45309;
    --leo-accent-soft: #fef3c7;
    --leo-text: #172033;
    --leo-muted: #667085;
    --leo-border: #d9e1ea;
    --leo-danger: #b42318;
    --leo-success: #027a48;
    --leo-warning: #b54708;
    --leo-radius: 0.5rem;
    --leo-radius-sm: 0.375rem;
    --leo-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --leo-shadow-md: 0 8px 20px rgba(16, 24, 40, 0.10);
    --leo-ring: 0 0 0 0.2rem rgba(29, 78, 216, 0.16);
}

html {
    background: var(--leo-bg);
}

body {
    min-height: 100vh;
    background: var(--leo-bg);
    color: var(--leo-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
}

a {
    color: var(--leo-primary);
}

a:hover {
    color: var(--leo-primary-hover);
}

.page {
    background: transparent;
}

.container-xl,
.container-tight {
    max-width: none;
    width: 100%;
}

.page-body {
    margin-top: 0;
    padding: 0.875rem 0 2rem;
}

.page-header {
    margin: 0;
    padding: 1.125rem 0 0.75rem;
}

.page-title {
    align-items: center;
    color: #111827;
    display: flex;
    font-size: 1.25rem;
    font-weight: 700;
    gap: 0.625rem;
    letter-spacing: 0;
}

/* Navigation enterprise: contraste fort, peu d'effets, orientation rapide. */
.navbar {
    min-height: 3.75rem;
    background: #111827;
    border-bottom: 1px solid #253044;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.16);
    overflow: visible;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.navbar .container-xl {
    max-width: none;
    min-height: 3.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    height: 2.375rem;
    width: 2.375rem;
}

.navbar-toggler:focus {
    box-shadow: var(--leo-ring);
}

.navbar-brand,
.navbar-brand-autodark {
    align-items: center;
    color: #ffffff;
    display: inline-flex;
    gap: 0.625rem;
    font-weight: 800;
    letter-spacing: 0;
}

.navbar-brand {
    margin-right: 1.25rem;
    min-height: 3.75rem;
}

.navbar .text-muted,
.navbar .nav-link .text-muted {
    color: #cbd5e1 !important;
}

.navbar .dropdown > .nav-link {
    color: #d6dce7;
}

.leo-shell-nav {
    align-items: center;
    gap: 0.125rem;
}

.leo-brand-icon {
    background: #2563eb;
    border-radius: var(--leo-radius-sm);
    color: #ffffff;
    flex: 0 0 auto;
    height: 1.875rem;
    padding: 0.35rem;
    width: 1.875rem;
}

.leo-icon {
    flex: 0 0 auto;
    height: 1rem;
    stroke-width: 2;
    width: 1rem;
}

.leo-user-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    color: #f8fafc;
    flex: 0 0 auto;
    height: 2.25rem;
    padding: 0.5rem;
    width: 2.25rem;
}

.leo-shell-actions {
    align-items: center;
    gap: 0.5rem;
}

.leo-notification-trigger {
    position: relative;
}

.leo-notification-badge {
    align-items: center;
    background: var(--leo-accent);
    border: 2px solid #111827;
    border-radius: 9999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.6875rem;
    font-weight: 800;
    height: 1.25rem;
    justify-content: center;
    min-width: 1.25rem;
    padding: 0 0.25rem;
    position: absolute;
    right: -0.35rem;
    top: -0.35rem;
}

.leo-notification-menu {
    max-height: min(30rem, calc(100vh - 5rem));
    min-width: 22rem;
    overflow: auto;
    padding: 0.5rem;
}

.leo-notification-menu-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
}

.leo-notification-menu-header strong {
    color: #111827;
    font-size: 0.9375rem;
}

.leo-notification-menu-empty {
    color: var(--leo-muted);
    font-size: 0.875rem;
    padding: 0.75rem;
}

.leo-notification-menu-item {
    align-items: flex-start;
    border-radius: var(--leo-radius-sm);
    gap: 0.625rem;
    white-space: normal;
}

.leo-notification-menu-item span {
    display: grid;
    gap: 0.125rem;
    min-width: 0;
}

.leo-notification-menu-item small {
    color: var(--leo-muted);
    display: -webkit-box;
    font-size: 0.75rem;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.leo-notification-menu-item em { display:block; margin-top:.2rem; color:#76839a; font-size:.68rem; font-style:normal; }
.leo-notification-menu-item.is-urgent { border-left:3px solid #d63939; }
.leo-notification-menu-item.is-important { border-left:3px solid #f59f00; }

.leo-notification-command,.leo-action-brief { border:1px solid #dce3ee; border-radius:18px; background:linear-gradient(135deg,#fff 0%,#f5f8ff 100%); padding:1.35rem; box-shadow:0 12px 30px rgba(30,55,90,.06); }
.leo-action-brief { padding:.75rem 1rem; border-radius:14px; box-shadow:none; }
.leo-notification-command { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.leo-notification-command h2,.leo-action-brief h2 { margin:.15rem 0 .25rem; font-size:1.35rem; }
.leo-notification-command p,.leo-action-brief p { margin:0; color:#667085; }
.leo-notification-summary { display:flex; gap:.65rem; }
.leo-notification-summary>div { min-width:88px; padding:.8rem; text-align:center; border-radius:14px; background:#fff; border:1px solid #e3e8f0; }
.leo-notification-summary strong,.leo-notification-summary span { display:block; }
.leo-notification-summary strong { font-size:1.35rem; color:#182433; }
.leo-notification-summary .is-danger strong { color:#d63939; }
.leo-notification-tabs { gap:.35rem; }
.leo-notification-tabs .nav-link { border:1px solid #dce3ee; background:#fff; color:#475467; }
.leo-notification-tabs .nav-link span { margin-left:.3rem; padding:.05rem .4rem; border-radius:999px; background:#edf1f7; font-size:.72rem; }
.leo-notification-tabs .nav-link.active { color:#fff; background:#206bc4; }
.leo-notification-tabs .nav-link.active span { background:rgba(255,255,255,.2); }
.leo-notification-inbox { overflow:hidden; border-radius:16px; }
.leo-notification-card { display:grid; grid-template-columns:48px minmax(0,1fr) minmax(210px,auto); gap:1rem; align-items:center; padding:1.15rem 1.25rem; border-left:4px solid transparent!important; }
.leo-notification-card.is-urgent { border-left-color:#d63939!important; }
.leo-notification-card.is-important { border-left-color:#f59f00!important; }
.leo-notification-card.is-info { border-left-color:#4299e1!important; }
.leo-notification-card.is-unread { background:#f7faff; }
.leo-notification-card.is-resolved { opacity:.7; background:#fafafa; }
.leo-notification-card-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; background:#edf3fb; color:#206bc4; }
.leo-notification-card-icon svg { width:21px; height:21px; }
.leo-notification-card-meta { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; color:#7b8798; font-size:.72rem; }
.leo-notification-card-content h3 { margin:.4rem 0 .2rem; font-size:1rem; }
.leo-notification-card-content p { margin:0; color:#667085; font-size:.86rem; }
.leo-notification-card-content small { color:#7b8798; }
.leo-notification-card-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.45rem; }
.leo-notification-empty { padding:3.5rem; display:flex; flex-direction:column; align-items:center; gap:.5rem; color:#667085; }
.leo-notification-empty svg { width:36px; height:36px; color:#2fb344; }
.leo-notification-empty strong { color:#182433; font-size:1rem; }
.leo-action-brief-head { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.leo-action-brief-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.5rem; margin-top:.55rem; }
.leo-action-brief-item { position:relative; display:grid; grid-template-columns:30px minmax(0,1fr) 16px; gap:.5rem; align-items:center; padding:.55rem .65rem; border:1px solid #e1e7f0; border-radius:10px; background:#fff; color:inherit; text-decoration:none; }
.leo-action-brief-item:hover { border-color:#9dbce2; box-shadow:0 8px 20px rgba(32,107,196,.1); color:inherit; }
.leo-action-brief-item>span { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:#edf3fb; color:#206bc4; }
.leo-action-brief-item>span svg { width:15px; height:15px; }
.leo-action-brief-item.is-urgent>span { background:#fce8e8; color:#d63939; }
.leo-action-brief-item.is-important>span { background:#fff1cc; color:#b87800; }
.leo-action-brief-item small,.leo-action-brief-item strong,.leo-action-brief-item p { display:block; }
.leo-action-brief-item small { color:#7b8798; font-size:.65rem; }
.leo-action-brief-item strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; margin:0; font-size:.78rem; }
.leo-action-brief-item small { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.leo-action-brief-item p { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:.72rem; }
.leo-action-brief-item>i { align-self:center; color:#98a2b3; }
.leo-action-brief-empty { margin-top:1rem; display:flex; gap:.5rem; align-items:center; color:#2fb344; font-weight:600; }
.leo-notification-bulkbar { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:.7rem 1.25rem; background:#f7f9fc; border-bottom:1px solid #e6eaf0; }
.leo-notification-bulkbar .form-check { margin:0; }
.leo-notification-bulkbar small { color:#7b8798; }
.leo-notification-card { position:relative; }
.leo-notification-card:has(.leo-notification-card-check) { grid-template-columns:28px 48px minmax(0,1fr) minmax(210px,auto); }
.leo-notification-card-check { display:grid; place-items:center; align-self:center; }
.leo-notification-datatable { margin:0!important; }
.leo-notification-datatable thead th { padding:.65rem .75rem; font-size:.7rem; text-transform:uppercase; letter-spacing:.035em; color:#667085; background:#f8fafc; }
.leo-notification-datatable tbody td { padding:.55rem .75rem; vertical-align:middle; }
.leo-notification-row { border-left:3px solid transparent; }
.leo-notification-row.is-urgent { border-left-color:#d63939; }
.leo-notification-row.is-important { border-left-color:#f59f00; }
.leo-notification-row.is-info { border-left-color:#4299e1; }
.leo-notification-row.is-unread td { background:#f7faff; }
.leo-notification-row.is-resolved { opacity:.72; }
.leo-notification-cell-title { display:flex; align-items:center; gap:.55rem; min-width:220px; }
.leo-notification-cell-title>i { flex:0 0 auto; color:#206bc4; }
.leo-notification-cell-title span,.leo-notification-cell-title strong,.leo-notification-cell-title small { display:block; }
.leo-notification-cell-title strong { max-width:380px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; }
.leo-notification-cell-title small { color:#7b8798; font-size:.68rem; }
.leo-notification-detail-row td { padding:0!important; background:#f8fafc!important; }
.leo-notification-detail-panel { display:flex; justify-content:space-between; align-items:center; gap:1.25rem; padding:1rem 1.25rem 1rem 3rem; border-left:3px solid #206bc4; }
.leo-notification-detail-panel h4 { margin:.35rem 0 .2rem; font-size:.95rem; }
.leo-notification-detail-panel p { margin:0; max-width:820px; color:#526071; font-size:.82rem; }
.leo-notification-detail-panel small { color:#7b8798; }
.leo-notification-detail-actions { display:flex; flex:0 0 auto; align-items:center; gap:.4rem; }
.leo-notification-row.is-details-open .js-notification-details { background:#e7f0fb; }

@media (max-width: 991px) {
    .leo-action-brief-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .leo-notification-card { grid-template-columns:44px minmax(0,1fr); }
    .leo-notification-card:has(.leo-notification-card-check) { grid-template-columns:28px 44px minmax(0,1fr); }
    .leo-notification-card:has(.leo-notification-card-check) .leo-notification-card-actions { grid-column:3; }
    .leo-notification-card-actions { grid-column:2; justify-content:flex-start; }
    .leo-notification-detail-panel { align-items:flex-start; flex-direction:column; padding-left:1.25rem; }
}
@media (max-width: 767px) {
    .leo-notification-command,.leo-action-brief-head { align-items:flex-start; flex-direction:column; }
    .leo-action-brief-grid { grid-template-columns:1fr; }
    .leo-notification-summary { width:100%; }
    .leo-notification-summary>div { flex:1; min-width:0; }
    .leo-notification-card { grid-template-columns:1fr; }
    .leo-notification-card:has(.leo-notification-card-check) { grid-template-columns:28px minmax(0,1fr); }
    .leo-notification-card:has(.leo-notification-card-check) .leo-notification-card-icon { display:none; }
    .leo-notification-card:has(.leo-notification-card-check) .leo-notification-card-actions { grid-column:2; }
    .leo-notification-card-icon { display:none; }
    .leo-notification-card-actions { grid-column:1; justify-content:stretch; }
    .leo-notification-card-actions .btn { width:100%; }
    .leo-notification-detail-actions { width:100%; flex-direction:column; align-items:stretch; }
    .leo-notification-detail-actions .btn { width:100%; }
}

.leo-supplier-command {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.leo-supplier-command h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0.125rem 0;
}

.leo-supplier-command p {
    color: var(--leo-muted);
    margin: 0;
}

.leo-supplier-kpi-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-supplier-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.125rem;
    min-height: 5.75rem;
    padding: 0.875rem 1rem;
}

.leo-supplier-kpi.is-primary {
    border-left: 4px solid var(--leo-primary);
}

.leo-supplier-kpi span {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.leo-supplier-kpi strong {
    color: #111827;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.leo-supplier-kpi small {
    color: var(--leo-muted);
}

.leo-supplier-schedule-card {
    overflow: hidden;
    border: 1px solid rgba(98, 105, 118, .16);
    box-shadow: 0 10px 30px rgba(31, 41, 55, .06);
}

.leo-supplier-schedule-card > .card-header {
    min-height: 74px;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(32, 107, 196, .055), rgba(255, 255, 255, 0));
}

.leo-schedule-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.leo-schedule-total small,
.leo-schedule-date small {
    color: var(--tblr-secondary);
    font-size: .7rem;
}

.leo-schedule-total strong {
    color: var(--tblr-primary);
    font-size: 1rem;
}

.leo-supplier-schedule-table {
    min-width: 920px;
    margin-bottom: 0;
}

.leo-supplier-schedule-table thead th {
    padding-top: .8rem;
    padding-bottom: .8rem;
    color: var(--tblr-secondary);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
    background: rgba(98, 105, 118, .035);
}

.leo-supplier-schedule-table tbody td {
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.leo-supplier-schedule-table tbody tr {
    transition: background-color .15s ease, box-shadow .15s ease;
}

.leo-supplier-schedule-table tbody tr.is-overdue {
    box-shadow: inset 3px 0 0 var(--tblr-danger);
}

.leo-supplier-schedule-table tbody tr.is-next-due {
    box-shadow: inset 3px 0 0 var(--tblr-primary);
    background: rgba(32, 107, 196, .025);
}

.leo-schedule-index {
    width: 52px;
    text-align: center;
}

.leo-schedule-index span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    color: var(--tblr-secondary);
    font-size: .72rem;
    font-weight: 700;
    background: rgba(98, 105, 118, .08);
}

.leo-schedule-date {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.leo-schedule-date > div {
    display: flex;
    flex-direction: column;
}

.leo-schedule-date-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--tblr-primary);
    background: rgba(32, 107, 196, .1);
}

.leo-schedule-reminder {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--tblr-secondary);
}

.leo-schedule-reminder .leo-icon,
.leo-schedule-date-icon .leo-icon,
.leo-schedule-action .leo-icon {
    width: 16px;
    height: 16px;
}

.leo-schedule-amount {
    color: var(--tblr-body-color);
    white-space: nowrap;
}

.leo-schedule-amount small {
    color: var(--tblr-secondary);
    font-size: .7rem;
    font-weight: 700;
}

.leo-schedule-action {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.supplier-lines-total {
    align-items: center;
    background: var(--leo-panel-tint);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
    padding: 0.75rem;
}

.leo-supplier-lines {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    overflow: hidden;
}

.leo-supplier-lines-head {
    align-items: center;
    background: var(--leo-panel-tint);
    border-bottom: 1px solid var(--leo-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.875rem 1rem;
}

.leo-supplier-lines-table-wrap {
    margin: 0;
}

.leo-supplier-lines-table {
    margin-bottom: 0;
}

.leo-supplier-lines-table thead th {
    background: #f8fafc;
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.leo-supplier-lines-table td {
    vertical-align: middle;
}

.leo-supplier-line-col-description {
    min-width: 24rem;
}

.leo-supplier-line-col-number {
    width: 8rem;
}

.leo-supplier-line-col-tax {
    width: 6rem;
}

.leo-supplier-line-col-total {
    width: 9rem;
}

.leo-supplier-line-col-action {
    width: 3.5rem;
}

.leo-supplier-tax-toggle {
    align-items: center;
    display: inline-flex;
    gap: 0.375rem;
    justify-content: center;
    margin: 0;
    min-width: 4.5rem;
}

.leo-supplier-tax-toggle .form-check-label {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.leo-supplier-lines-table .js-supplier-line-total {
    color: #111827;
    white-space: nowrap;
}

.supplier-lines-total span {
    color: var(--leo-muted);
    display: inline-grid;
    gap: 0.125rem;
    min-width: 8rem;
}

.supplier-lines-total strong {
    color: #111827;
    font-size: 1rem;
}

.supplier-lines-total .is-grand-total {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: var(--leo-radius-sm);
    color: #027a48;
    padding: 0.5rem 0.75rem;
}

.supplier-lines-total .is-grand-total strong {
    color: #027a48;
    font-size: 1.125rem;
}

.leo-supplier-profile-hero,
.leo-supplier-contract-hero,
.leo-supplier-purchase-hero {
    align-items: flex-end;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-left: 4px solid var(--leo-primary);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.leo-supplier-profile-main h2,
.leo-supplier-contract-hero h2,
.leo-supplier-purchase-main h2 {
    color: #111827;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0.125rem 0;
}

.leo-supplier-profile-main p,
.leo-supplier-contract-hero p,
.leo-supplier-purchase-main p {
    color: var(--leo-muted);
    margin: 0.375rem 0 0;
}

.leo-supplier-profile-meta {
    align-items: center;
    color: var(--leo-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.leo-supplier-profile-meta span:not(.badge)::after {
    color: #cbd5e1;
    content: "·";
    margin-left: 0.5rem;
}

.leo-supplier-profile-meta span:not(.badge):last-of-type::after {
    content: "";
    margin: 0;
}

.leo-supplier-profile-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-supplier-purchase-main {
    min-width: 0;
}

.leo-purchase-layout {
    align-items: flex-start;
}

.leo-purchase-main-stack,
.leo-purchase-side-stack {
    display: grid;
    gap: 1rem;
}

.leo-purchase-side-stack {
    position: sticky;
    top: 5rem;
}

.leo-purchase-progress-card .card-body {
    padding: 1.125rem;
}

.leo-purchase-card-header {
    align-items: flex-start;
    min-height: 4.75rem;
    padding: 1rem 1.125rem;
}

.leo-purchase-card-header .card-title {
    font-size: 1rem;
    font-weight: 800;
}

.leo-purchase-lines-card,
.leo-purchase-payments-card,
.leo-purchase-side-card {
    overflow: hidden;
}

.leo-purchase-lines-card .table-responsive,
.leo-purchase-payments-card .table-responsive {
    min-height: 13rem;
    overflow: auto;
}

.leo-purchase-lines-card .table-responsive {
    max-height: 33rem;
}

.leo-purchase-payments-card .table-responsive {
    max-height: 25rem;
}

.leo-purchase-side-card .card-body {
    padding: 1rem 1.125rem 1.125rem;
}

.leo-purchase-contact-card {
    min-height: 13.5rem;
}

.leo-supplier-kpi.is-attention {
    border-left: 4px solid #f59e0b;
}

.leo-supplier-kpi.is-settled,
.leo-supplier-kpi.is-success {
    border-left: 4px solid #12b76a;
}

.leo-supplier-kpi.is-warning {
    border-left: 4px solid #f59e0b;
}

.leo-supplier-kpi.is-danger {
    border-left: 4px solid #f04438;
}

.leo-purchase-payment-progress {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.875rem 1rem;
}

.leo-purchase-payment-progress div {
    display: grid;
    gap: 0.125rem;
}

.leo-purchase-payment-progress span,
.leo-payment-modal-summary span {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leo-purchase-payment-progress strong {
    color: #111827;
    font-size: 1rem;
}

.leo-purchase-payment-progress small {
    color: var(--leo-primary);
    font-weight: 800;
}

.leo-purchase-timeline {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leo-purchase-timeline-step {
    background: var(--leo-panel-tint);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    display: grid;
    gap: 0.25rem;
    min-height: 5.625rem;
    padding: 0.75rem;
    position: relative;
}

.leo-purchase-timeline-step span {
    background: #cbd5e1;
    border-radius: 999px;
    height: 0.625rem;
    width: 0.625rem;
}

.leo-purchase-timeline-step strong {
    color: #111827;
    font-size: 0.875rem;
}

.leo-purchase-timeline-step small {
    color: var(--leo-muted);
}

.leo-purchase-timeline-step.is-done span {
    background: #12b76a;
}

.leo-purchase-timeline-step.is-active span,
.leo-purchase-timeline-step.is-pending span {
    background: #f59e0b;
}

.leo-purchase-timeline-step.is-danger span {
    background: #f04438;
}

.leo-purchase-lines-table thead th,
.leo-purchase-payments-table thead th {
    background: #f8fafc;
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.leo-purchase-lines-table {
    min-width: 48rem;
}

.leo-purchase-payments-table {
    min-width: 44rem;
}

.leo-purchase-lines-table tbody td,
.leo-purchase-payments-table tbody td {
    height: 3.625rem;
}

.leo-purchase-lines-table td:first-child strong {
    color: #111827;
    display: block;
    max-width: 28rem;
    overflow-wrap: anywhere;
}

.leo-purchase-lines-table tfoot th {
    background: #ffffff;
}

.leo-purchase-lines-table tfoot tr:last-child th {
    background: #ecfdf3;
    color: #027a48;
    font-size: 1rem;
}

.leo-payment-modal-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leo-payment-modal-summary div {
    background: var(--leo-panel-tint);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    display: grid;
    gap: 0.125rem;
    padding: 0.75rem;
}

.leo-payment-modal-summary strong {
    color: #111827;
    font-size: 1rem;
}

.leo-payment-modal-summary .is-due {
    background: #fff7ed;
    border-color: #fed7aa;
}

.leo-payment-modal-summary .is-due strong {
    color: #c2410c;
}

.leo-supplier-panel,
.leo-supplier-form-card,
.leo-supplier-contract-summary {
    border: 1px solid var(--leo-border);
    box-shadow: var(--leo-shadow-sm);
}

.leo-supplier-definition {
    display: grid;
    gap: 0.625rem;
    margin: 0;
}

.leo-supplier-definition div {
    border-bottom: 1px solid #eef2f6;
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.625rem;
}

.leo-supplier-definition div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.leo-supplier-definition dt {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.leo-supplier-definition dd {
    color: #111827;
    margin: 0;
    overflow-wrap: anywhere;
}

.leo-supplier-note {
    background: var(--leo-panel-tint);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    color: var(--leo-muted);
    margin-top: 1rem;
    padding: 0.75rem;
}

.leo-supplier-empty {
    align-items: flex-start;
    display: grid;
    gap: 0.375rem;
    justify-items: start;
    padding: 1rem;
}

.leo-supplier-empty strong {
    color: #111827;
}

.leo-supplier-empty span {
    color: var(--leo-muted);
}

.leo-supplier-contract-summary {
    position: sticky;
    top: 5rem;
}

.leo-supplier-context-preview {
    background: var(--leo-panel-tint);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    display: grid;
    gap: 0.125rem;
    margin-bottom: 0.875rem;
    padding: 0.875rem;
}

.leo-supplier-context-preview span,
.leo-supplier-preview-grid span,
.leo-supplier-preview-next span {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.leo-supplier-context-preview strong {
    color: #111827;
    font-size: 1rem;
}

.leo-supplier-context-preview small {
    color: var(--leo-muted);
}

.leo-supplier-preview-grid {
    display: grid;
    gap: 0.625rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.leo-supplier-preview-grid div,
.leo-supplier-preview-next {
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    display: grid;
    gap: 0.125rem;
    padding: 0.75rem;
}

.leo-supplier-preview-grid strong,
.leo-supplier-preview-next strong {
    color: #111827;
    font-weight: 800;
}

.leo-supplier-preview-next {
    margin-top: 0.75rem;
}

.leo-supplier-preview-next small {
    color: var(--leo-muted);
}

.leo-supplier-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.leo-supplier-preview-list span {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #3730a3;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 991.98px) {
    .leo-supplier-command {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-supplier-profile-hero,
    .leo-supplier-contract-hero,
    .leo-supplier-purchase-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-supplier-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-supplier-contract-summary {
        position: static;
    }

    .leo-supplier-purchase-hero .leo-supplier-profile-actions {
        justify-content: flex-start;
    }

    .leo-purchase-side-stack {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .leo-supplier-kpi-grid {
        grid-template-columns: 1fr;
    }

    .leo-supplier-lines-head {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-supplier-lines-table,
    .leo-supplier-lines-table thead,
    .leo-supplier-lines-table tbody,
    .leo-supplier-lines-table tr,
    .leo-supplier-lines-table td {
        display: block;
        width: 100%;
    }

    .leo-supplier-lines-table thead {
        display: none;
    }

    .leo-supplier-lines-table tr {
        border-bottom: 1px solid var(--leo-border);
        padding: 0.75rem;
    }

    .leo-supplier-lines-table td {
        border: 0;
        padding: 0.375rem 0;
    }

    .leo-supplier-lines-table td::before {
        color: var(--leo-muted);
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 800;
        margin-bottom: 0.25rem;
        text-align: left;
        text-transform: uppercase;
    }

    .leo-supplier-lines-table td:last-child::before {
        display: none;
    }

    .supplier-lines-total {
        justify-content: stretch;
    }

    .supplier-lines-total span {
        min-width: 100%;
    }

    .leo-purchase-timeline,
    .leo-payment-modal-summary {
        grid-template-columns: 1fr;
    }

    .leo-purchase-lines-table,
    .leo-purchase-lines-table thead,
    .leo-purchase-lines-table tbody,
    .leo-purchase-lines-table tr,
    .leo-purchase-lines-table td,
    .leo-purchase-payments-table,
    .leo-purchase-payments-table thead,
    .leo-purchase-payments-table tbody,
    .leo-purchase-payments-table tr,
    .leo-purchase-payments-table td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .leo-purchase-lines-table thead,
    .leo-purchase-payments-table thead {
        display: none;
    }

    .leo-purchase-lines-table tr,
    .leo-purchase-payments-table tr {
        border-bottom: 1px solid var(--leo-border);
        display: grid;
        gap: 0.25rem;
        padding: 0.75rem;
    }

    .leo-purchase-lines-table td,
    .leo-purchase-payments-table td {
        border: 0;
        height: auto;
        padding: 0.375rem 0;
        text-align: left !important;
    }

    .leo-purchase-lines-table td::before,
    .leo-purchase-payments-table td::before {
        color: var(--leo-muted);
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 800;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
    }

    .leo-purchase-lines-table tfoot,
    .leo-purchase-payments-table tfoot {
        display: block;
    }

    .leo-purchase-card-header {
        min-height: auto;
        padding: 0.875rem 1rem;
    }

    .leo-purchase-lines-card .table-responsive,
    .leo-purchase-payments-card .table-responsive {
        max-height: none;
        min-height: 0;
    }
}

.hr-retro-warning { align-items:center; background:#fffbeb; border:1px solid #fde68a; border-radius:11px; display:flex; gap:.85rem; padding:.9rem 1rem; }
.hr-retro-warning > span { align-items:center; background:#fef3c7; border-radius:8px; color:#b45309; display:flex; height:40px; justify-content:center; min-width:40px; }
.hr-retro-warning p { color:#78716c; font-size:.72rem; margin:.15rem 0 0; }
.hr-retro-agent { align-items:center; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; display:flex; gap:.7rem; margin-top:1rem; padding:.8rem; }
.hr-retro-agent > div { display:flex; flex-direction:column; min-width:0; }
.hr-retro-agent small,.hr-retro-agent b { color:#64748b; font-size:.68rem; font-weight:500; }
.hr-retro-table td:nth-child(3) { display:flex; flex-direction:column; }
.hr-retro-table td:nth-child(3) small { color:#64748b; }
.hr-retro-table tr.is-disabled { background:#f8fafc; opacity:.68; }
@media(max-width:575.98px){.hr-retro-warning{align-items:flex-start}.hr-retro-table{min-width:760px}}
.leo-payroll-register-table { min-width:820px; }
.leo-payroll-register-table th,.leo-payroll-register-table td { padding-bottom:.55rem; padding-top:.55rem; }
.leo-payroll-register-table .leo-col-expand { padding-left:.65rem; width:42px; }
.leo-payroll-register-table td.text-end small { color:#64748b; display:block; font-size:.62rem; }
.leo-payroll-agent { align-items:center; display:flex; gap:.6rem; }
.leo-payroll-agent > div { display:flex; flex-direction:column; line-height:1.25; }
.leo-payroll-agent small { color:#64748b; font-size:.64rem; }
.leo-payroll-detail-panel { align-items:center; background:#f8fafc; border-left:3px solid #2563eb; display:flex; gap:1rem; justify-content:space-between; padding:.9rem 1rem; }
.leo-payroll-detail-grid { display:grid; flex:1; gap:.7rem 1.4rem; grid-template-columns:repeat(4,minmax(130px,1fr)); }
.leo-payroll-detail-grid > div { display:flex; flex-direction:column; }
.leo-payroll-detail-grid span { color:#64748b; font-size:.62rem; text-transform:uppercase; }
.leo-payroll-detail-grid strong { color:#1e293b; font-size:.75rem; }
.leo-payroll-register-table tr.is-details-open { background:#eff6ff; }
@media(max-width:991.98px){.leo-payroll-detail-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}.leo-payroll-detail-panel{align-items:flex-start;flex-direction:column}}
.hr-directory-table.is-compact { min-width:850px; }
.hr-directory-table.is-compact th,.hr-directory-table.is-compact td { padding-bottom:.52rem; padding-top:.52rem; }
.hr-directory-table.is-compact th:nth-child(1),.hr-directory-table.is-compact td:nth-child(1){padding-left:.65rem;text-align:left;width:42px}
.hr-directory-table.is-compact th:nth-child(2),.hr-directory-table.is-compact td:nth-child(2){width:28%}
.hr-directory-table.is-compact th:nth-child(3),.hr-directory-table.is-compact td:nth-child(3){width:21%}
.hr-directory-table.is-compact th:nth-child(4),.hr-directory-table.is-compact td:nth-child(4){text-align:right;width:18%}
.hr-directory-table.is-compact th:nth-child(5),.hr-directory-table.is-compact td:nth-child(5),.hr-directory-table.is-compact th:nth-child(6),.hr-directory-table.is-compact td:nth-child(6){text-align:center;width:11%}
.hr-directory-table.is-compact th:nth-child(7),.hr-directory-table.is-compact td:nth-child(7){text-align:center;width:6%}
.leo-employee-detail-panel { align-items:center;background:#f8fafc;border-left:3px solid #2563eb;display:flex;gap:1rem;justify-content:space-between;padding:.9rem 1rem; }
.leo-employee-detail-grid { display:grid;flex:1;gap:.7rem 1.4rem;grid-template-columns:repeat(4,minmax(130px,1fr)); }
.leo-employee-detail-grid>div { display:flex;flex-direction:column;min-width:0; }
.leo-employee-detail-grid span { color:#64748b;font-size:.62rem;text-transform:uppercase; }
.leo-employee-detail-grid strong { color:#1e293b;font-size:.75rem;overflow-wrap:anywhere; }
.hr-directory-table.is-compact tr.is-details-open { background:#eff6ff; }
@media(max-width:991.98px){.leo-employee-detail-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}.leo-employee-detail-panel{align-items:flex-start;flex-direction:column}}
.hr-cycle-history-table { min-width:920px; }
.hr-cycle-history-table td { padding-bottom:.7rem; padding-top:.7rem; }
.hr-cycle-history-table td:first-child { min-width:155px; }
.hr-cycle-history-table td:first-child>small,.hr-cycle-history-table td.text-end small { color:#94a3b8; display:block; font-size:.61rem; }
.hr-cycle-totals { display:flex; flex-direction:column; gap:.55rem; }
.hr-cycle-total-currency { align-items:flex-start; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; display:flex; gap:.6rem; padding:.55rem .65rem; }
.hr-cycle-total-grid { display:grid; flex:1; gap:.35rem .75rem; grid-template-columns:repeat(4,minmax(85px,1fr)); }
.hr-cycle-total-grid>div { display:flex; flex-direction:column; }
.hr-cycle-total-grid small { color:#64748b; font-size:.58rem; font-weight:700; text-transform:uppercase; }
.hr-cycle-total-grid strong { color:#1e293b; font-size:.7rem; white-space:nowrap; }
@media(max-width:1199.98px){.hr-cycle-total-grid{grid-template-columns:repeat(2,minmax(100px,1fr))}}
.hr-cycle-history-table.is-wide { min-width:1050px; }
.hr-payroll-overall { border-top:3px solid #2563eb; }
.hr-payroll-overall-grid { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); }
.hr-payroll-overall-currency { background:#f8fafc; border:1px solid #dbe4ee; border-radius:10px; padding:1rem; }
.hr-payroll-overall-head { align-items:center; display:flex; justify-content:space-between; margin-bottom:.8rem; }
.hr-payroll-overall-head small { color:#64748b; font-size:.65rem; }
.hr-payroll-overall-metrics { display:grid; gap:.65rem; grid-template-columns:repeat(3,1fr); }
.hr-payroll-overall-metrics>div { border-right:1px solid #e2e8f0; display:flex; flex-direction:column; padding-right:.65rem; }
.hr-payroll-overall-metrics>div:last-child { border-right:0; padding-right:0; }
.hr-payroll-overall-metrics span { color:#64748b; font-size:.61rem; font-weight:700; text-transform:uppercase; }
.hr-payroll-overall-metrics strong { color:#172033; font-size:1rem; margin-top:.18rem; white-space:nowrap; }
.hr-payroll-overall-metrics strong small { font-size:.62rem; }
@media(max-width:575.98px){.hr-payroll-overall-grid,.hr-payroll-overall-metrics{grid-template-columns:1fr}.hr-payroll-overall-metrics>div{border-bottom:1px solid #e2e8f0;border-right:0;padding-bottom:.55rem}.hr-payroll-overall-metrics>div:last-child{border-bottom:0;padding-bottom:0}}
.hr-payroll-export-menu { max-height:360px; min-width:285px; overflow-y:auto; }
.hr-payroll-export-menu .dropdown-item { display:flex; flex-direction:column; }
.hr-payroll-export-menu .dropdown-item span { font-weight:700; }
.hr-payroll-export-menu .dropdown-item small { color:#64748b; font-size:.63rem; }

/* Human resources & payroll */
.hr-card { border: 0; box-shadow: 0 8px 30px rgba(15,23,42,.06); }
.hr-kpi-grid { display: grid; gap: 1rem; grid-template-columns: repeat(4,minmax(0,1fr)); }
.hr-kpi { align-items: center; background: #fff; border: 1px solid #e8edf4; border-radius: 12px; display: flex; gap: 1rem; min-height: 126px; padding: 1.25rem; }
.hr-kpi-icon { align-items: center; border-radius: 10px; display: flex; height: 48px; justify-content: center; min-width: 48px; }
.hr-kpi-icon svg { height: 22px; width: 22px; }
.hr-kpi div { display: flex; flex-direction: column; min-width: 0; }
.hr-kpi small,.hr-mini-kpi small { color: #64748b; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hr-kpi strong { color: #0f172a; font-size: 1.55rem; line-height: 1.35; white-space: nowrap; }
.hr-kpi strong sup { color: #94a3b8; font-size: .55rem; font-weight: 500; }
.hr-kpi strong.hr-money-lines { font-size: 1rem; white-space: normal; }
.hr-kpi span { color: #64748b; font-size: .73rem; }
.hr-trend { align-items: flex-end; display: flex; gap: 1rem; height: 235px; justify-content: space-around; }
.hr-trend-col { align-items: center; display: flex; flex: 1; flex-direction: column; gap: .6rem; min-width: 0; }
.hr-trend-values { align-items: flex-end; display: flex; gap: 4px; height: 195px; }
.hr-trend-values span { border-radius: 5px 5px 2px 2px; display: block; min-width: 18px; }
.hr-trend-values .is-net,.hr-legend .is-net { background: #206bc4; }
.hr-trend-values .is-charge,.hr-legend .is-charge { background: #f59f00; }
.hr-trend-col small { color: #64748b; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-legend { display: flex; gap: 1.25rem; justify-content: center; margin-top: .75rem; }
.hr-legend span { align-items: center; color: #64748b; display: flex; font-size: .72rem; gap: .4rem; }
.hr-legend i { border-radius: 50%; display: inline-block; height: 8px; width: 8px; }
.hr-cycle-status h3 { margin: .75rem 0 1.5rem; }
.hr-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: .5rem; }
.hr-summary-list { border-top: 1px solid #edf1f5; margin-top: 1.5rem; padding-top: .75rem; }
.hr-summary-list div { display: flex; justify-content: space-between; padding: .55rem 0; }
.hr-summary-list span { color: #64748b; }
.hr-kpi-grid-5 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.hr-mini-kpi { background: #fff; border: 1px solid #e8edf4; border-radius: 10px; display: flex; flex-direction: column; padding: 1rem 1.1rem; }
.hr-mini-kpi strong { color: #0f172a; font-size: 1.1rem; margin-top: .3rem; }
.hr-mini-kpi.is-highlight { background: #eff6ff; border-color: #bfdbfe; }
.hr-stepper { background: #fff; border: 1px solid #e8edf4; border-radius: 12px; display: grid; grid-template-columns: repeat(4,1fr); padding: 1rem; }
.hr-step { align-items: center; display: flex; gap: .7rem; position: relative; }
.hr-step:not(:last-child):after { background: #dbe3ec; content: ''; height: 2px; position: absolute; right: 12px; top: 19px; width: 30%; }
.hr-step > span { align-items: center; background: #eef2f7; border-radius: 50%; color: #64748b; display: flex; font-weight: 700; height: 38px; justify-content: center; min-width: 38px; }
.hr-step.is-done > span { background: #dcfce7; color: #15803d; }
.hr-step.is-current > span { background: #206bc4; color: #fff; box-shadow: 0 0 0 5px #dbeafe; }
.hr-step div { display: flex; flex-direction: column; }
.hr-step small { color: #94a3b8; }
.hr-status-dot { background: #94a3b8; border-radius: 50%; display: inline-block; height: 8px; margin-right: .5rem; width: 8px; }
.hr-status-dot.is-approved,.hr-status-dot.is-partially_paid { background: #f59f00; }
.hr-status-dot.is-paid,.hr-status-dot.is-closed { background: #22c55e; }
.hr-status-dot.is-calculated { background: #206bc4; }
.hr-info-box { align-items: flex-start; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; color: #64748b; display: flex; font-size: .75rem; gap: .65rem; padding: .8rem; }
.hr-info-box svg { flex: 0 0 17px; height: 17px; width: 17px; }
.hr-sticky { position: sticky; top: 1rem; }
.hr-payslip { border: 0; box-shadow: 0 12px 40px rgba(15,23,42,.08); overflow: hidden; }
.hr-payslip-head { align-items: flex-start; background: linear-gradient(125deg,#0f2747,#1d4f87); color: #fff; display: flex; justify-content: space-between; padding: 2rem; }
.hr-payslip-head small { color: #93c5fd; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hr-payslip-head h2 { margin: .45rem 0 .2rem; }
.hr-payslip-head .text-end { display: flex; flex-direction: column; gap: .7rem; }
.hr-payslip-body { padding: 2rem; }
.hr-payslip-grid { border-bottom: 1px solid #e8edf4; display: grid; gap: 1rem; grid-template-columns: repeat(4,1fr); padding-bottom: 1.35rem; }
.hr-payslip-grid div { display: flex; flex-direction: column; }
.hr-payslip-grid small { color: #94a3b8; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.hr-slip-section { border: 1px solid #e8edf4; border-radius: 9px; height: 100%; overflow: hidden; }
.hr-slip-section h4 { background: #f8fafc; font-size: .78rem; margin: 0; padding: .8rem 1rem; text-transform: uppercase; }
.hr-slip-section > div { display: flex; font-size: .78rem; justify-content: space-between; padding: .7rem 1rem; }
.hr-slip-section .is-total { background: #f8fafc; border-top: 1px solid #e8edf4; }
.hr-net-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; display: flex; flex-direction: column; margin-top: 1.25rem; padding: 1.25rem; text-align: right; }
.hr-net-box > span { color: #1d4ed8; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.hr-net-box strong { color: #0f2747; font-size: 2rem; }
.hr-net-box div { color: #64748b; font-size: .75rem; }
.hr-employer-charges { border-top: 1px dashed #cbd5e1; margin-top: 1.5rem; padding-top: 1rem; }
.hr-employer-charges h4 { color: #64748b; font-size: .7rem; text-transform: uppercase; }
.hr-employer-charges span { color: #64748b; font-size: .75rem; margin-right: 1.25rem; }
.hr-charge-box { align-items: center; background: #fffaf0; border: 1px solid #fde7b2; border-radius: 10px; display: flex; justify-content: space-between; padding: 1rem; }
.hr-charge-box > div { display: flex; flex-direction: column; }
.hr-charge-box span,.hr-charge-box small { color: #64748b; }
.hr-charge-box strong { color: #92400e; font-size: 1.2rem; }
.hr-charge-box details { position: relative; }
.hr-charge-box summary { list-style: none; }
.hr-charge-form { background: #fff; border: 1px solid #dce4ef; border-radius: 9px; box-shadow: 0 12px 35px rgba(15,23,42,.15); display: grid; gap: .6rem; padding: 1rem; position: absolute; right: 0; top: 2.2rem; width: 300px; z-index: 10; }
.hr-charge-form label { color: #64748b; font-size: .68rem; font-weight: 700; }
.hr-budget-banner { align-items: center; border: 1px solid; border-radius: 11px; display: flex; gap: 1rem; padding: 1rem 1.2rem; }
.hr-budget-banner > span { align-items: center; border-radius: 9px; display: flex; height: 42px; justify-content: center; min-width: 42px; }
.hr-budget-banner svg { height: 20px; width: 20px; }
.hr-budget-banner strong { color: #0f172a; }
.hr-budget-banner p { color: #64748b; font-size: .78rem; margin: .15rem 0 0; }
.hr-budget-banner.is-forecast { background: #faf5ff; border-color: #e9d5ff; }
.hr-budget-banner.is-forecast > span { background: #f3e8ff; color: #7e22ce; }
.hr-budget-banner.is-actual { background: #eff6ff; border-color: #bfdbfe; }
.hr-budget-banner.is-actual > span { background: #dbeafe; color: #1d4ed8; }
.hr-budget-total { border: 0; box-shadow: 0 8px 30px rgba(15,23,42,.06); }
.hr-budget-total h3 { font-size: .9rem; margin: .65rem 0 0; }
.hr-currency-pill { background: #e8f1fc; border-radius: 999px; color: #1d4f87; display: inline-block; font-size: .7rem; font-weight: 800; padding: .25rem .6rem; }
.hr-budget-rate { align-items: center; background: #dcfce7; border-radius: 50%; color: #15803d; display: flex; font-size: .78rem; font-weight: 800; height: 44px; justify-content: center; width: 44px; }
.hr-budget-main { display: flex; flex-direction: column; margin: 1.1rem 0; }
.hr-budget-main small { color: #64748b; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.hr-budget-main strong { color: #0f172a; font-size: 1.5rem; }
.hr-budget-metrics { display: grid; gap: .7rem 1rem; grid-template-columns: repeat(2,1fr); }
.hr-budget-metrics div { border-top: 1px solid #edf1f5; display: flex; flex-direction: column; padding-top: .55rem; }
.hr-budget-metrics span { color: #64748b; font-size: .68rem; }
.hr-budget-table td > small,.hr-budget-table td div > small { color: #64748b; display: block; font-size: .68rem; }
.hr-budget-table th { white-space: nowrap; }
.hr-employee-hero { background: linear-gradient(120deg,#0f2747,#1e5d99); border-radius: 12px; box-shadow: 0 12px 35px rgba(15,39,71,.16); color: #fff; padding: 1.25rem; }
.hr-employee-facts { display: grid; gap: 1rem; grid-template-columns: repeat(5,1fr); }
.hr-employee-facts > div { border-right: 1px solid rgba(255,255,255,.15); display: flex; flex-direction: column; padding: .25rem 1rem; }
.hr-employee-facts > div:first-child { padding-left: 0; }
.hr-employee-facts > div:last-child { border-right: 0; }
.hr-employee-facts small { color: #93c5fd; font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hr-employee-facts strong { font-size: .9rem; margin-top: .3rem; }
.hr-employee-facts span { color: #bfdbfe; font-size: .68rem; }
.hr-agent-summary { border: 0; box-shadow: 0 8px 30px rgba(15,23,42,.06); }
.hr-agent-summary h3 { color: #64748b; font-size: .76rem; margin: .7rem 0 0; }
.hr-agent-rate { align-items: center; background: #dcfce7; border-radius: 50%; color: #15803d; display: flex; height: 44px; justify-content: center; width: 44px; }
.hr-agent-summary-main { display: flex; flex-direction: column; margin: 1rem 0; }
.hr-agent-summary-main small { color: #64748b; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.hr-agent-summary-main strong { color: #0f172a; font-size: 1.35rem; }
.hr-agent-slip { align-items: center; display: grid; gap: .8rem; grid-template-columns: minmax(0,1fr) auto 18px; padding: 1rem 1.25rem; }
.hr-agent-slip > div { display: flex; flex-direction: column; }
.hr-agent-slip > div:nth-child(2) { text-align: right; }
.hr-agent-slip span { color: #64748b; font-size: .7rem; }
.hr-agent-slip svg { color: #94a3b8; height: 16px; width: 16px; }
.hr-empty-state { align-items: center; color: #64748b; display: flex; flex-direction: column; gap: .35rem; justify-content: center; min-height: 150px; padding: 2rem; text-align: center; }
.hr-empty-state svg { color: #94a3b8; height: 28px; width: 28px; }
.hr-empty-state strong { color: #334155; }
.hr-empty-state span { font-size: .75rem; }
@media(max-width:991.98px){.hr-employee-facts{grid-template-columns:repeat(2,1fr)}.hr-employee-facts>div{border-right:0;padding:.4rem 0}}
.hr-reference-guide { align-items: center; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; display: flex; gap: .9rem; padding: 1rem; }
.hr-reference-guide > span { align-items: center; background: #dbeafe; border-radius: 8px; color: #1d4ed8; display: flex; height: 38px; justify-content: center; min-width: 38px; }
.hr-reference-guide svg { height: 18px; width: 18px; }
.hr-reference-guide p { color: #64748b; font-size: .75rem; margin: .15rem 0 0; }
.hr-reference-row { align-items: center; display: flex; gap: .75rem; justify-content: space-between; }
.hr-reference-edit { align-items: center; display: flex; flex: 1; gap: .3rem; }
.hr-reference-meta { align-items: center; display: flex; gap: .55rem; }
.hr-reference-meta small { color: #64748b; white-space: nowrap; }
.hr-ref-page-header { background: linear-gradient(180deg,#f8fbff 0%,transparent 100%); padding-bottom: .5rem; }
.hr-ref-overview { align-items: center; background: linear-gradient(120deg,#0f2747,#1d5790); border-radius: 14px; box-shadow: 0 12px 32px rgba(15,39,71,.15); color: #fff; display: flex; gap: 1.5rem; justify-content: space-between; padding: 1.25rem 1.4rem; }
.hr-ref-overview-copy { align-items: center; display: flex; gap: 1rem; max-width: 670px; }
.hr-ref-overview-copy p { color: #bfdbfe; font-size: .76rem; margin: .2rem 0 0; }
.hr-ref-overview-icon { align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 11px; display: flex; height: 48px; justify-content: center; min-width: 48px; }
.hr-ref-overview-icon svg { height: 22px; width: 22px; }
.hr-ref-overview-stats { display: flex; gap: .75rem; }
.hr-ref-overview-stats > div { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; display: flex; flex-direction: column; min-width: 105px; padding: .65rem .8rem; }
.hr-ref-overview-stats span { color: #bfdbfe; font-size: .62rem; }
.hr-ref-overview-stats strong { font-size: 1.15rem; }
.hr-ref-workspace { background: #fff; border: 1px solid #e3eaf2; border-radius: 14px; box-shadow: 0 10px 32px rgba(15,23,42,.05); overflow: visible; }
.hr-ref-tabs { background: #f8fafc; border-bottom: 1px solid #e3eaf2; border-radius: 14px 14px 0 0; display: flex; gap: .5rem; padding: .7rem .8rem 0; }
.hr-ref-tab { align-items: center; background: transparent; border: 0; border-bottom: 3px solid transparent; color: #64748b; display: flex; gap: .65rem; min-width: 230px; padding: .65rem .8rem .8rem; text-align: left; }
.hr-ref-tab:hover { color: #206bc4; }
.hr-ref-tab.is-active { border-bottom-color: #206bc4; color: #0f172a; }
.hr-ref-tab-icon { align-items: center; border-radius: 8px; display: flex; height: 34px; justify-content: center; min-width: 34px; }
.hr-ref-tab-icon svg { height: 16px; width: 16px; }
.hr-ref-tab > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.hr-ref-tab small { color: #94a3b8; font-size: .65rem; }
.hr-ref-tab > b { align-items: center; background: #e8eef5; border-radius: 999px; display: flex; font-size: .65rem; height: 24px; justify-content: center; min-width: 24px; }
.hr-ref-tab.is-active > b { background: #dbeafe; color: #1d4ed8; }
.hr-ref-panel { display: none; padding: 1.25rem; }
.hr-ref-panel.is-active { display: block; }
.hr-ref-panel-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 1rem; }
.hr-ref-panel-head h3 { color: #0f172a; font-size: 1.15rem; margin: .1rem 0; }
.hr-ref-panel-head p { color: #64748b; font-size: .74rem; margin: 0; }
.hr-ref-eyebrow { color: #206bc4; font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.hr-ref-panel-count { align-items: flex-end; display: flex; flex-direction: column; }
.hr-ref-panel-count strong { color: #0f172a; font-size: 1.25rem; }
.hr-ref-panel-count span { color: #94a3b8; font-size: .65rem; }
.hr-ref-action-grid { display: grid; gap: 1rem; grid-template-columns: 1.45fr 1fr; }
.hr-ref-create-card,.hr-ref-search-card { border: 1px solid #e3eaf2; border-radius: 10px; padding: 1rem; }
.hr-ref-create-card { background: #f8fbff; }
.hr-ref-create-label { align-items: center; display: flex; gap: .65rem; margin-bottom: .8rem; }
.hr-ref-create-label > span { align-items: center; background: #dbeafe; border-radius: 8px; color: #1d4ed8; display: flex; height: 34px; justify-content: center; width: 34px; }
.hr-ref-create-label svg { height: 16px; width: 16px; }
.hr-ref-create-label div { display: flex; flex-direction: column; }
.hr-ref-create-label small { color: #64748b; font-size: .65rem; }
.hr-ref-create-form { display: flex; gap: .55rem; }
.hr-ref-create-form .input-icon { flex: 1; }
.hr-ref-search-card { background: #fff; }
.hr-ref-filter-row { display: flex; gap: .35rem; margin-top: .65rem; }
.hr-ref-filter-row button { background: #f1f5f9; border: 0; border-radius: 999px; color: #64748b; font-size: .65rem; padding: .3rem .65rem; }
.hr-ref-filter-row button.is-active { background: #dbeafe; color: #1d4ed8; font-weight: 700; }
.hr-ref-list-head { color: #94a3b8; display: grid; font-size: .62rem; font-weight: 700; grid-template-columns: minmax(0,1fr) 250px; letter-spacing: .05em; margin-top: 1.2rem; padding: 0 1rem .5rem; text-transform: uppercase; }
.hr-ref-list { border: 1px solid #e3eaf2; border-radius: 10px; overflow: visible; }
.hr-ref-item { align-items: center; border-bottom: 1px solid #edf1f5; display: grid; gap: 1rem; grid-template-columns: minmax(0,1fr) 250px auto; min-height: 72px; padding: .8rem 1rem; }
.hr-ref-item:last-of-type { border-bottom: 0; }
.hr-ref-item[hidden] { display: none; }
.hr-ref-item-main { align-items: center; display: flex; gap: .75rem; }
.hr-ref-item-main > div { display: flex; flex-direction: column; }
.hr-ref-item-main small { color: #94a3b8; font-size: .64rem; }
.hr-ref-item-icon { align-items: center; border-radius: 8px; display: flex; height: 36px; justify-content: center; min-width: 36px; }
.hr-ref-item-icon svg { height: 16px; width: 16px; }
.hr-ref-item-icon.is-active { background: #e8f1fc; color: #206bc4; }
.hr-ref-item-icon.is-inactive { background: #f1f5f9; color: #94a3b8; }
.hr-ref-item-usage,.hr-ref-item-actions { align-items: center; display: flex; gap: .45rem; }
.hr-ref-item-usage .badge { align-items: center; display: inline-flex; gap: .25rem; }
.hr-ref-item-usage svg { height: 12px; width: 12px; }
.hr-ref-item-actions details { position: relative; }
.hr-ref-item-actions summary { list-style: none; }
.hr-ref-item-actions summary::-webkit-details-marker { display: none; }
.hr-ref-edit-popover { background: #fff; border: 1px solid #dce4ef; border-radius: 10px; box-shadow: 0 14px 38px rgba(15,23,42,.16); padding: 1rem; position: absolute; right: 0; top: 2.4rem; width: 300px; z-index: 20; }
.hr-ref-edit-popover > small { color: #64748b; display: block; font-size: .65rem; margin: .15rem 0 .7rem; }
.hr-ref-no-results { align-items: center; color: #64748b; display: none; flex-direction: column; gap: .3rem; justify-content: center; min-height: 160px; padding: 2rem; }
.hr-ref-no-results.is-visible { display: flex; }
.hr-ref-no-results svg { color: #94a3b8; height: 26px; width: 26px; }
.hr-ref-no-results span { font-size: .7rem; }
@media(max-width:991.98px){.hr-ref-overview{align-items:flex-start;flex-direction:column}.hr-ref-action-grid{grid-template-columns:1fr}.hr-ref-item{grid-template-columns:minmax(0,1fr) auto}.hr-ref-item-usage{grid-column:1}.hr-ref-list-head{display:none}}
@media(max-width:575.98px){.hr-ref-overview-stats{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.hr-ref-overview-stats>div{min-width:0}.hr-ref-tabs{overflow-x:auto}.hr-ref-tab{min-width:210px}.hr-ref-panel{padding:.8rem}.hr-ref-create-form{flex-direction:column}.hr-ref-item{align-items:flex-start;grid-template-columns:1fr}.hr-ref-item-actions{grid-column:1}.hr-ref-item-usage{flex-wrap:wrap}.hr-ref-edit-popover{left:0;right:auto;width:min(300px,85vw)}}
.leo-swal-popup { border-radius: 16px !important; box-shadow: 0 24px 70px rgba(15,23,42,.22) !important; padding: 1.5rem !important; }
.leo-swal-popup .swal2-title { color: #0f172a; font-size: 1.3rem; }
.leo-swal-popup .swal2-html-container { color: #64748b; font-size: .82rem; line-height: 1.55; }
.leo-swal-popup .swal2-actions { gap: .5rem; }
.leo-swal-popup .swal2-styled { border-radius: 8px !important; box-shadow: none !important; font-weight: 700; padding: .65rem 1rem; }
.leo-swal-loading .swal2-loader { border-color: #206bc4 transparent #206bc4 transparent; height: 3rem; width: 3rem; }
.leo-swal-loader-copy { color: #64748b; font-size: .75rem; margin-top: .6rem; }
.hr-directory-header { background: linear-gradient(180deg,#f8fbff,transparent); }
.hr-directory-kpis { display: grid; gap: 1rem; grid-template-columns: repeat(4,1fr); }
.hr-directory-kpi { align-items: center; background: #fff; border: 1px solid #e3eaf2; border-radius: 12px; color: inherit; display: flex; gap: .9rem; min-height: 108px; padding: 1rem; text-decoration: none; transition: transform .15s ease,box-shadow .15s ease; }
.hr-directory-kpi:hover { box-shadow: 0 10px 25px rgba(15,23,42,.08); color: inherit; transform: translateY(-2px); }
.hr-directory-kpi > span { align-items: center; border-radius: 10px; display: flex; height: 44px; justify-content: center; min-width: 44px; }
.hr-directory-kpi > span svg { height: 20px; width: 20px; }
.hr-directory-kpi > div { display: flex; flex-direction: column; }
.hr-directory-kpi small { color: #64748b; font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.hr-directory-kpi strong { color: #0f172a; font-size: 1.55rem; line-height: 1.25; }
.hr-directory-kpi p { color: #94a3b8; font-size: .65rem; margin: 0; }
.hr-directory-kpi.is-total > span { background: #dbeafe; color: #1d4ed8; }
.hr-directory-kpi.is-active > span { background: #dcfce7; color: #15803d; }
.hr-directory-kpi.is-paused > span { background: #fef3c7; color: #b45309; }
.hr-directory-kpi.is-departed > span { background: #f1f5f9; color: #64748b; }
.hr-directory-filter { border: 0; box-shadow: 0 8px 28px rgba(15,23,42,.06); }
.hr-directory-search { display: flex; gap: .6rem; }
.hr-directory-search .input-icon { flex: 1; }
.hr-directory-filter-grid { display: grid; gap: .7rem; grid-template-columns: repeat(4,1fr); margin-top: .9rem; }
.hr-directory-filter-grid .form-label { color: #64748b; font-size: .65rem; font-weight: 700; }
.hr-directory-filter-foot { align-items: center; border-top: 1px solid #edf1f5; display: flex; justify-content: space-between; margin-top: 1rem; padding-top: .8rem; }
.hr-directory-filter-foot > span { color: #64748b; font-size: .7rem; }
.hr-directory-payroll { border: 0; box-shadow: 0 8px 28px rgba(15,23,42,.06); }
.hr-directory-currency { align-items: center; border-bottom: 1px solid #edf1f5; display: flex; gap: .8rem; padding: .65rem 0; }
.hr-directory-currency:first-child { padding-top: 0; }
.hr-directory-currency:last-child { border-bottom: 0; padding-bottom: 0; }
.hr-directory-currency > div { display: flex; flex-direction: column; }
.hr-directory-currency strong { color: #0f172a; }
.hr-directory-currency small { color: #64748b; font-size: .65rem; }
.hr-directory-warning,.hr-directory-ready { align-items: center; display: flex; gap: .6rem; }
.hr-directory-warning { background: #fff7ed; color: #9a3412; }
.hr-directory-ready { background: #f0fdf4; color: #15803d; }
.hr-directory-warning svg,.hr-directory-ready svg { height: 18px; width: 18px; }
.hr-directory-warning span { display: flex; flex-direction: column; }
.hr-directory-warning small { color: #b45309; font-size: .62rem; }
.hr-directory-mini-empty { align-items: center; color: #94a3b8; display: flex; flex-direction: column; gap: .4rem; justify-content: center; min-height: 100px; }
.hr-directory-table thead th { color: #64748b; font-size: .64rem; letter-spacing: .04em; white-space: nowrap; }
.hr-directory-table td { font-size: .76rem; }
.hr-directory-person { align-items: center; display: flex; gap: .65rem; min-width: 210px; }
.hr-directory-person > div { display: flex; flex-direction: column; }
.hr-directory-person a { color: #0f172a; font-weight: 700; text-decoration: none; }
.hr-directory-person a:hover { color: #206bc4; }
.hr-directory-person span,.hr-directory-table td > span,.hr-directory-table td > small { color: #64748b; font-size: .65rem; }
.hr-record-quality { align-items: center; border-radius: 999px; display: inline-flex; font-size: .65rem; font-weight: 700; gap: .3rem; padding: .3rem .55rem; white-space: nowrap; }
.hr-record-quality svg { height: 13px; width: 13px; }
.hr-record-quality.is-complete { background: #dcfce7; color: #15803d; }
.hr-record-quality.is-incomplete { background: #fef3c7; color: #b45309; }
.hr-directory-empty { align-items: center; display: flex; flex-direction: column; min-height: 290px; padding: 3rem 1rem; text-align: center; }
.hr-directory-empty > span { align-items: center; background: #eff6ff; border-radius: 50%; color: #206bc4; display: flex; height: 62px; justify-content: center; width: 62px; }
.hr-directory-empty svg { height: 28px; width: 28px; }
.hr-directory-empty h3 { color: #0f172a; margin: 1rem 0 .3rem; }
.hr-directory-empty p { color: #64748b; font-size: .78rem; margin: 0 0 1rem; max-width: 420px; }
@media(max-width:991.98px){.hr-directory-kpis{grid-template-columns:repeat(2,1fr)}.hr-directory-filter-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:575.98px){.hr-directory-kpis,.hr-directory-filter-grid{grid-template-columns:1fr}.hr-directory-search{flex-direction:column}.hr-directory-filter-foot{align-items:flex-start;flex-direction:column;gap:.6rem}.hr-directory-filter-foot .btn-list,.hr-directory-filter-foot .btn{width:100%}}

/* Compact employee ledger — aligned with treasury account movement tables */
.hr-directory-table-card > .card-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 64px;
}
.hr-directory-table-card > .card-header .badge { flex: 0 0 auto; }
.hr-directory-table-card > .table-responsive { overflow-x: auto; }
.hr-directory-table-card .dropdown-menu {
    box-shadow: 0 14px 34px rgba(15,23,42,.16);
    z-index: 1060;
}
.hr-directory-actions-portal {
    display: block !important;
    margin: 0 !important;
    min-width: 220px;
    z-index: 10050 !important;
}
@media(min-width:1200px){
    .hr-directory-table-card,
    .hr-directory-table-card > .table-responsive {
        overflow: visible;
    }
}
.hr-directory-table {
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    min-width: 1040px;
    table-layout: fixed;
    width: 100%;
}
.hr-directory-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #dfe7f0;
    color: #64748b;
    font-size: .61rem;
    font-weight: 800;
    height: 38px;
    letter-spacing: .055em;
    padding: .45rem .65rem;
    text-transform: uppercase;
    vertical-align: middle;
}
.hr-directory-table tbody tr { transition: background-color .12s ease; }
.hr-directory-table tbody tr:hover { background: #f8fbff; }
.hr-directory-table tbody td {
    border-bottom: 1px solid #edf1f5;
    color: #334155;
    height: 58px;
    line-height: 1.2;
    padding: .42rem .65rem;
    vertical-align: middle;
}
.hr-directory-table tbody td:nth-child(2),
.hr-directory-table tbody td:nth-child(3),
.hr-directory-table tbody td:nth-child(4) {
    display: table-cell !important;
}
.hr-directory-table tbody tr:last-child td { border-bottom: 0; }
.hr-directory-table th:nth-child(1),.hr-directory-table td:nth-child(1) { width: 23%; }
.hr-directory-table th:nth-child(2),.hr-directory-table td:nth-child(2) { width: 19%; }
.hr-directory-table th:nth-child(3),.hr-directory-table td:nth-child(3) { width: 11%; }
.hr-directory-table th:nth-child(4),.hr-directory-table td:nth-child(4) { text-align: right; width: 15%; }
.hr-directory-table th:nth-child(5),.hr-directory-table td:nth-child(5) { text-align: center; width: 13%; }
.hr-directory-table th:nth-child(6),.hr-directory-table td:nth-child(6) { text-align: center; width: 12%; }
.hr-directory-table th:nth-child(7),.hr-directory-table td:nth-child(7) { text-align: center; width: 7%; }
.hr-directory-table .hr-directory-person { gap: .55rem; min-width: 0; }
.hr-directory-table .hr-directory-person .avatar {
    font-size: .67rem;
    height: 32px;
    min-width: 32px;
    width: 32px;
}
.hr-directory-table .hr-directory-person > div { min-width: 0; }
.hr-directory-table .hr-directory-person a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hr-directory-table .hr-directory-person span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hr-directory-table td:nth-child(2) strong,
.hr-directory-table td:nth-child(2) span,
.hr-directory-table td:nth-child(2) small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hr-directory-table td:nth-child(2) strong { color: #0f172a; font-size: .72rem; }
.hr-directory-table td:nth-child(2) span { color: #475569; margin-top: .08rem; }
.hr-directory-table td:nth-child(2) small { color: #94a3b8; margin-top: .08rem; }
.hr-directory-table td:nth-child(3) .badge { align-self: flex-start; font-size: .61rem; }
.hr-directory-table td:nth-child(3) small { display: block; margin-top: .18rem; white-space: nowrap; }
.hr-directory-table td:nth-child(4) strong {
    color: #0f172a;
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.hr-directory-table td:nth-child(4) span { display: block; margin-top: .15rem; }
.hr-directory-table .hr-record-quality { font-size: .6rem; justify-content: center; padding: .27rem .48rem; }
.hr-directory-table td:nth-child(6) > .badge { font-size: .61rem; min-width: 68px; }
.hr-directory-table td:nth-child(7) .dropdown { display: inline-block; }
.hr-directory-table td:nth-child(7) .btn {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 32px;
}
.hr-directory-table td:nth-child(7) .btn:hover { background: #eff6ff; border-color: #bfdbfe; color: #206bc4; }
.hr-directory-table td:nth-child(7) .dropdown-menu { min-width: 210px; text-align: left; }
.hr-directory-table td:nth-child(7) .dropdown-item { font-size: .72rem; }
.hr-directory-table + .dataTables_wrapper,
.hr-directory-table .dataTables_wrapper { font-size: .7rem; }
@media(max-width:1199.98px){.hr-directory-table{min-width:980px}.hr-directory-table th:nth-child(5),.hr-directory-table td:nth-child(5){width:11%}}
.hr-employee-form-header { background: linear-gradient(180deg,#f8fbff,transparent); }
.hr-employee-wizard-nav { border: 0; box-shadow: 0 10px 30px rgba(15,23,42,.07); position: sticky; top: 1rem; }
.hr-wizard-nav-head { align-items: center; display: flex; gap: .7rem; }
.hr-wizard-nav-head > div { display: flex; flex-direction: column; }
.hr-wizard-nav-head small { color: #64748b; font-size: .67rem; }
.hr-wizard-progress { background: #e8eef5; border-radius: 999px; height: 4px; margin: 1rem 0; overflow: hidden; }
.hr-wizard-progress span { background: linear-gradient(90deg,#206bc4,#4f8ed8); display: block; height: 100%; transition: width .25s ease; }
.hr-employee-wizard-nav nav { display: grid; gap: .35rem; }
.hr-employee-wizard-nav nav button { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 9px; color: #64748b; display: grid; gap: .65rem; grid-template-columns: 30px minmax(0,1fr) 16px; padding: .65rem; text-align: left; }
.hr-employee-wizard-nav nav button:hover { background: #f8fafc; }
.hr-employee-wizard-nav nav button > span { align-items: center; background: #eef2f7; border-radius: 50%; display: flex; font-size: .68rem; font-weight: 800; height: 30px; justify-content: center; }
.hr-employee-wizard-nav nav button > div { display: flex; flex-direction: column; }
.hr-employee-wizard-nav nav button small { color: #94a3b8; font-size: .62rem; }
.hr-employee-wizard-nav nav button > svg { color: transparent; height: 15px; width: 15px; }
.hr-employee-wizard-nav nav button.is-active { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.hr-employee-wizard-nav nav button.is-active > span { background: #206bc4; color: #fff; }
.hr-employee-wizard-nav nav button.is-done > span { background: #dcfce7; color: #15803d; }
.hr-employee-wizard-nav nav button.is-done > svg { color: #22c55e; }
.hr-wizard-help { align-items: flex-start; background: #f8fafc; border-radius: 8px; color: #64748b; display: flex; gap: .55rem; margin-top: 1rem; padding: .7rem; }
.hr-wizard-help svg { flex: 0 0 auto; height: 16px; width: 16px; }
.hr-wizard-help p { font-size: .64rem; margin: 0; }
.hr-employee-step { border: 0; box-shadow: 0 10px 30px rgba(15,23,42,.07); display: none; }
.hr-employee-step.is-active { animation: hrStepIn .2s ease; display: block; }
@keyframes hrStepIn { from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none} }
.hr-step-heading { align-items: center; display: flex; gap: .8rem; }
.hr-step-heading > span { align-items: center; border-radius: 9px; display: flex; height: 40px; justify-content: center; min-width: 40px; }
.hr-step-heading svg { height: 19px; width: 19px; }
.hr-step-heading > div { display: flex; flex-direction: column; }
.hr-step-heading > div > small { color: #206bc4; font-size: .61rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.hr-step-heading .card-title { margin: .05rem 0; }
.hr-step-heading p { color: #64748b; font-size: .68rem; margin: 0; }
.hr-form-section-title { align-items: center; display: flex; justify-content: space-between; margin-bottom: .75rem; }
.hr-form-section-title strong { color: #0f172a; font-size: .78rem; }
.hr-form-section-title span { color: #94a3b8; font-size: .63rem; }
.hr-form-divider { border-top: 1px solid #edf1f5; margin: 1.25rem 0; }
.hr-employee-step .form-label { color: #475569; font-size: .68rem; font-weight: 700; }
.hr-employee-step .form-hint { color: #94a3b8; font-size: .62rem; }
.hr-wizard-actions { align-items: center; display: flex; gap: .7rem; justify-content: flex-end; }
.hr-wizard-actions > span { color: #94a3b8; font-size: .63rem; margin-right: auto; }
.hr-salary-mode { display: grid; gap: .8rem; grid-template-columns: repeat(2,1fr); }
.hr-salary-mode label { align-items: center; border: 1px solid #dce4ef; border-radius: 10px; cursor: pointer; display: flex; gap: .8rem; padding: .9rem; transition: border-color .15s ease,background .15s ease; }
.hr-salary-mode label:hover { border-color: #93c5fd; }
.hr-salary-mode label.is-selected { background: #eff6ff; border-color: #60a5fa; box-shadow: 0 0 0 2px #dbeafe; }
.hr-salary-mode input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.hr-salary-mode label > span { align-items: center; background: #f1f5f9; border-radius: 8px; display: flex; height: 38px; justify-content: center; min-width: 38px; }
.hr-salary-mode label.is-selected > span { background: #dbeafe; color: #1d4ed8; }
.hr-salary-mode label > div { display: flex; flex-direction: column; }
.hr-salary-mode label small { color: #64748b; font-size: .64rem; }
.hr-final-review { align-items: center; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 9px; display: flex; gap: .7rem; margin-top: 1.25rem; padding: .8rem; }
.hr-final-review > span { align-items: center; background: #dcfce7; border-radius: 8px; color: #15803d; display: flex; height: 36px; justify-content: center; min-width: 36px; }
.hr-final-review p { color: #64748b; font-size: .65rem; margin: .1rem 0 0; }
@media(max-width:1199.98px){.hr-employee-wizard-nav{position:static}.hr-employee-wizard-nav nav{grid-template-columns:repeat(3,1fr)}.hr-wizard-help{display:none}}
@media(max-width:575.98px){.hr-employee-wizard-nav nav{grid-template-columns:1fr}.hr-salary-mode{grid-template-columns:1fr}.hr-form-section-title{align-items:flex-start;flex-direction:column}.hr-wizard-actions{align-items:stretch;flex-direction:column}.hr-wizard-actions>span{display:none}.hr-wizard-actions .btn{width:100%}}
.hr-recalculation-banner { align-items: center; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 11px; display: flex; gap: .85rem; padding: .9rem 1rem; }
.hr-recalculation-banner > span { align-items: center; background: #dbeafe; border-radius: 8px; color: #1d4ed8; display: flex; height: 38px; justify-content: center; min-width: 38px; }
.hr-recalculation-banner > span svg { height: 18px; width: 18px; }
.hr-recalculation-banner > div { flex: 1; }
.hr-recalculation-banner p { color: #64748b; font-size: .7rem; margin: .1rem 0 0; }
.hr-recalculation-locked { align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 9px; color: #64748b; display: flex; gap: .65rem; padding: .75rem .9rem; }
.hr-recalculation-locked > svg { height: 18px; width: 18px; }
.hr-recalculation-locked > span { display: flex; flex-direction: column; }
.hr-recalculation-locked small { color: #94a3b8; font-size: .65rem; }
@media(max-width:767.98px){.hr-recalculation-banner{align-items:flex-start;flex-direction:column}.hr-recalculation-banner form,.hr-recalculation-banner .btn{width:100%}}
.hr-batch-entry { align-items: center; background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 10px; display: flex; gap: .75rem; padding: .8rem .9rem; }
.hr-batch-entry > span { align-items: center; background: #f3e8ff; border-radius: 8px; color: #7e22ce; display: flex; height: 36px; justify-content: center; min-width: 36px; }
.hr-batch-entry > div { display: flex; flex: 1; flex-direction: column; }
.hr-batch-entry small { color: #64748b; font-size: .66rem; }
.hr-batch-header { background: linear-gradient(180deg,#faf7ff,transparent); }
.hr-batch-notice { align-items: center; background: linear-gradient(120deg,#3b1764,#6d28a8); border-radius: 12px; box-shadow: 0 10px 30px rgba(88,28,135,.16); color: #fff; display: flex; gap: .85rem; padding: 1rem 1.15rem; }
.hr-batch-notice > span { align-items: center; background: rgba(255,255,255,.13); border-radius: 9px; display: flex; height: 40px; justify-content: center; min-width: 40px; }
.hr-batch-notice > div { flex: 1; }
.hr-batch-notice p { color: #e9d5ff; font-size: .7rem; margin: .1rem 0 0; }
.hr-batch-notice > b { background: rgba(255,255,255,.12); border-radius: 999px; font-size: .68rem; padding: .4rem .7rem; }
.hr-batch-common { align-items: end; background: #f8fafc; border-bottom: 1px solid #e3eaf2; display: grid; gap: .65rem; grid-template-columns: minmax(210px,1fr) 150px 150px minmax(170px,1fr) auto; padding: .75rem 1rem; }
.hr-batch-common-title { align-items: center; display: flex; gap: .6rem; }
.hr-batch-common-title > span { align-items: center; background: #e8f1fc; border-radius: 7px; color: #206bc4; display: flex; height: 32px; justify-content: center; min-width: 32px; }
.hr-batch-common-title > div { display: flex; flex-direction: column; }
.hr-batch-common-title small { color: #64748b; font-size: .6rem; }
.hr-batch-common label { color: #64748b; font-size: .61rem; font-weight: 700; }
.hr-batch-table-wrap { overflow-x: auto; }
.hr-batch-table { margin: 0; min-width: 1250px; table-layout: fixed; }
.hr-batch-table thead th { background: #f8fafc; color: #64748b; font-size: .61rem; letter-spacing: .04em; padding: .5rem .55rem; text-transform: uppercase; white-space: nowrap; }
.hr-batch-table tbody td { font-size: .7rem; padding: .48rem .55rem; vertical-align: middle; }
.hr-batch-table tbody tr.is-selected { background: #faf5ff; box-shadow: inset 3px 0 #9333ea; }
.hr-batch-table th:nth-child(1){width:55px}.hr-batch-table th:nth-child(2){width:230px}.hr-batch-table th:nth-child(3),.hr-batch-table th:nth-child(4),.hr-batch-table th:nth-child(5){width:105px}.hr-batch-table th:nth-child(6){width:170px}.hr-batch-table th:nth-child(7){width:135px}.hr-batch-table th:nth-child(8){width:130px}.hr-batch-table th:nth-child(9){width:175px}
.hr-batch-agent { align-items: center; display: flex; gap: .55rem; }
.hr-batch-agent > div { display: flex; flex-direction: column; min-width: 0; }
.hr-batch-agent strong { color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-batch-agent small,.hr-batch-table td > small { color: #64748b; font-size: .6rem; }
.hr-batch-summary { border: 0; box-shadow: 0 10px 30px rgba(15,23,42,.08); position: sticky; top: 1rem; }
.hr-batch-selected { align-items: center; background: #f8fafc; border-radius: 8px; display: flex; justify-content: space-between; padding: .7rem; }
.hr-batch-selected span { color: #64748b; font-size: .68rem; }
.hr-batch-selected strong { align-items: center; background: #dbeafe; border-radius: 50%; color: #1d4ed8; display: flex; height: 30px; justify-content: center; width: 30px; }
.hr-batch-totals { margin-top: .8rem; }
.hr-batch-totals > div { border-bottom: 1px solid #edf1f5; display: flex; flex-direction: column; padding: .65rem 0; }
.hr-batch-totals span { color: #64748b; font-size: .62rem; text-transform: uppercase; }
.hr-batch-totals strong { color: #0f172a; font-size: 1rem; }
.hr-batch-impact { align-items: center; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; color: #15803d; display: flex; gap: .55rem; margin-top: .8rem; padding: .65rem; }
.hr-batch-impact svg { height: 17px; width: 17px; }
.hr-batch-impact span { display: flex; flex-direction: column; }
.hr-batch-impact small { color: #16a34a; font-size: .6rem; }
@media(max-width:1199.98px){.hr-batch-common{grid-template-columns:repeat(2,1fr)}.hr-batch-common-title{grid-column:1/-1}.hr-batch-summary{position:static}}
@media(max-width:575.98px){.hr-batch-notice{align-items:flex-start;flex-direction:column}.hr-batch-common{grid-template-columns:1fr}.hr-batch-entry{align-items:flex-start;flex-direction:column}.hr-batch-entry .btn{width:100%}}
@media(max-width:991.98px){.hr-kpi-grid,.hr-kpi-grid-5{grid-template-columns:repeat(2,1fr)}.hr-stepper{grid-template-columns:repeat(2,1fr);gap:1rem}.hr-step:after{display:none}.hr-sticky{position:static}}
@media(max-width:575.98px){.hr-kpi-grid,.hr-kpi-grid-5,.hr-payslip-grid{grid-template-columns:1fr}.hr-stepper{grid-template-columns:1fr}.hr-payslip-head{flex-direction:column;gap:1rem}.hr-payslip-head .text-end{text-align:left!important}.hr-payslip-body{padding:1rem}}
@media print{
    @page { size:A4 portrait; margin:8mm; }
    .hr-payslip,.hr-payslip * { visibility:visible!important; }
    .hr-payslip { border:1px solid #b8c1cc!important; border-radius:0!important; box-shadow:none!important; color:#111827; font-size:8.5pt; inset:0; margin:0!important; overflow:visible; position:absolute; width:100%; }
    .hr-payslip::before { background:#fff; border-bottom:1px solid #64748b; color:#475569; content:"BELEJ-CONSULTING\A Conseil · Gestion · Services aux entreprises    |    b2b@belej-consulting.com\A Bureaux : Kolwezi, Lualaba · Lubumbashi, Haut-Katanga · RD Congo"; display:block; font-size:7.5pt; line-height:1.35; padding:4mm 7mm 3mm; white-space:pre-line; }
    .hr-payslip::after { background:#fff; border-top:1px solid #94a3b8; color:#475569; content:"VALIDATION DU BULLETIN\A\A\A\A Ressources humaines __________________     Finance __________________     Agent __________________\A\A Document confidentiel · BELEJ-CONSULTING"; display:block; font-size:7.5pt; line-height:1.55; margin:0 7mm; min-height:27mm; padding:3mm 0 2mm; white-space:pre-line; }
    .hr-payslip-head { align-items:center; background:#fff!important; border-bottom:1px solid #cbd5e1; color:#111827!important; padding:4mm 7mm; }
    .hr-payslip-head small { font-size:0; }
    .hr-payslip-head small::after { color:#475569; content:"BULLETIN DE PAIE"; font-size:7pt; letter-spacing:.08em; }
    .hr-payslip-head h2 { color:#111827; font-size:14pt; margin:1mm 0 0; }
    .hr-payslip-head span { color:#475569; }
    .hr-payslip-head .text-end { gap:1.5mm; }
    .hr-payslip-head .badge { background:#fff!important; border:1px solid #94a3b8; color:#334155!important; }
    .hr-payslip-body { padding:5mm 7mm 3mm; }
    .hr-payslip-grid { gap:4mm; padding-bottom:3mm; }
    .hr-payslip-grid small { font-size:6.5pt; }
    .hr-payslip-body>.row { margin-top:3mm!important; --tblr-gutter-x:3mm; }
    .hr-slip-section { border-color:#cbd5e1; border-radius:0; }
    .hr-slip-section h4 { background:#fff!important; border-bottom:1px solid #cbd5e1; font-size:7pt; padding:2mm 3mm; }
    .hr-slip-section>div { font-size:8pt; padding:1.6mm 3mm; }
    .hr-slip-section .is-total { background:#fff!important; border-top:1px solid #64748b; }
    .hr-net-box { background:#fff!important; border:1.5px solid #334155; border-radius:0; margin-top:3mm; padding:3mm 4mm; }
    .hr-net-box>span { color:#475569; font-size:6.5pt; }
    .hr-net-box strong { color:#111827; font-size:16pt; }
    .hr-net-box div { font-size:7pt; }
    .hr-employer-charges { margin-top:3mm; padding-top:2mm; }
    .hr-employer-charges h4 { font-size:6.5pt; margin-bottom:1mm; }
    .hr-employer-charges span { font-size:7pt; margin-right:4mm; }
    .hr-payslip .row,.hr-payslip [class*="col-"] { break-inside:avoid; }
    .hr-slip-section,.hr-net-box,.hr-employer-charges { break-inside:avoid; page-break-inside:avoid; }
    .hr-payslip,.hr-payslip::before,.hr-payslip::after { break-inside:avoid; page-break-inside:avoid; }
    .page-body { margin:0; padding:0; }
    body { background:#fff!important; }
}

.nav-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    color: #d6dce7;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 650;
    gap: 0.5rem;
    margin: 0;
    min-height: 2.375rem;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-link.active,
.nav-item.active > .nav-link {
    background: #ffffff;
    border-color: #ffffff;
    color: #111827;
}

.nav-link.active .leo-icon,
.nav-item.active > .nav-link .leo-icon {
    color: var(--leo-primary);
}

.leo-shell-icon-button {
    align-items: center;
    height: 2.375rem;
    justify-content: center;
    padding: 0;
    width: 2.375rem;
}

.leo-user-trigger {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
    display: inline-flex;
    gap: 0.625rem;
    min-height: 2.625rem;
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
}

.leo-user-trigger:hover,
.leo-user-trigger:focus {
    background: rgba(255, 255, 255, 0.10);
}

.navbar .dropdown-menu {
    margin-top: 0.55rem;
    max-height: min(28rem, calc(100vh - 5rem));
    min-width: 18rem;
    overflow: auto;
    padding: 0.625rem;
    z-index: 1060;
}

.navbar .dropdown-menu::before {
    background: #ffffff;
    border-left: 1px solid var(--leo-border);
    border-top: 1px solid var(--leo-border);
    content: "";
    height: 0.625rem;
    left: 1rem;
    position: absolute;
    top: -0.35rem;
    transform: rotate(45deg);
    width: 0.625rem;
}

.navbar .dropdown-menu-end::before {
    left: auto;
    right: 1.35rem;
}

.navbar .dropdown-menu[data-bs-popper] {
    left: 0;
    top: 100%;
}

.navbar .dropdown-menu-end[data-bs-popper] {
    left: auto;
    right: 0;
}

.navbar .dropdown-item {
    border-radius: var(--leo-radius-sm);
    font-weight: 600;
    min-height: 3.25rem;
    padding: 0.625rem;
    white-space: normal;
}

.dropdown-menu {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-md);
    z-index: 1060;
}

.dropdown-item {
    align-items: center;
    color: var(--leo-text);
    display: flex;
    gap: 0.75rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #f1f5f9;
    color: var(--leo-primary-hover);
}

.dropdown-item.active,
.dropdown-item:active {
    background: #eff6ff;
    color: var(--leo-primary-hover);
}

.leo-shell-menu {
    min-width: 20rem;
    padding: 0.5rem;
}

.leo-shell-menu-heading {
    border-bottom: 1px solid var(--leo-border);
    margin: 0 0 0.375rem;
    padding: 0.25rem 0.375rem 0.75rem;
}

.leo-shell-menu-section {
    align-items: center;
    color: #475467;
    display: flex;
    font-size: 0.6875rem;
    font-weight: 900;
    gap: 0.5rem;
    letter-spacing: 0.04em;
    margin: 0.5rem 0 0.25rem;
    padding: 0 0.375rem;
    text-transform: uppercase;
}

.leo-shell-menu-section::after {
    background: #e4e7ec;
    content: "";
    flex: 1 1 auto;
    height: 1px;
}

.leo-shell-menu-heading span,
.leo-shell-menu-text strong {
    color: #111827;
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}

.leo-shell-menu-heading small,
.leo-shell-menu-text small {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 0.125rem;
}

.leo-shell-menu-icon {
    align-items: center;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
    border-radius: var(--leo-radius-sm);
    color: var(--leo-muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.125rem;
    justify-content: center;
    width: 2.125rem;
}

.dropdown-item.active .leo-shell-menu-icon {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: var(--leo-primary);
}

.leo-shell-menu-text {
    display: grid;
    min-width: 0;
}

.leo-user-menu {
    min-width: 16rem;
}

.leo-user-menu-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem 0.25rem;
}

.leo-user-menu-header span {
    display: grid;
    min-width: 0;
}

.leo-user-menu-header strong {
    color: #111827;
    font-size: 0.9rem;
    line-height: 1.25;
}

.leo-user-menu-header small {
    color: var(--leo-muted);
    font-size: 0.75rem;
    line-height: 1.35;
    margin-top: 0.125rem;
}

/* Cartes: surfaces calmes, compatibles avec des usages repetes. */
.card {
    background: var(--leo-panel);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    box-shadow: var(--leo-shadow-sm);
}

.card-body {
    padding: 1rem;
}

.card-header,
.card-footer {
    background: var(--leo-panel-tint);
    border-color: var(--leo-border);
    padding: 0.75rem 1rem;
}

.card-header:first-child {
    border-radius: var(--leo-radius) var(--leo-radius) 0 0;
}

.card-title {
    align-items: center;
    color: var(--leo-text);
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    gap: 0.5rem;
    letter-spacing: 0;
}

.row-cards {
    row-gap: 1rem;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

/* Boutons: commandes nettes sans effets decoratifs. */
.btn {
    align-items: center;
    background: #ffffff;
    border-color: var(--leo-border);
    border-radius: var(--leo-radius-sm);
    box-shadow: none;
    color: var(--leo-text);
    display: inline-flex;
    gap: 0.5rem;
    font-weight: 600;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.5rem 1rem;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
    background: #f8fafc;
    border-color: #aebacc;
    color: var(--leo-text);
}

.btn:focus-visible {
    box-shadow: var(--leo-ring);
    outline: 0;
}

.btn:disabled,
.btn.disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.btn-primary {
    background: var(--leo-primary);
    border-color: var(--leo-primary);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--leo-primary-hover);
    border-color: var(--leo-primary-hover);
    color: #ffffff;
}

.btn-success {
    background: var(--leo-success);
    border-color: var(--leo-success);
    color: #ffffff;
}

.btn-outline-danger {
    background: #ffffff;
    border-color: #fecdca;
    color: var(--leo-danger);
}

.btn-outline-danger:hover {
    background: #fff5f5;
    border-color: #fda29b;
    color: #991b1b;
}

.btn-sm {
    min-height: 2rem;
    padding: 0.375rem 0.875rem;
}

.btn-list {
    gap: 0.5rem;
}

/* Champs: bordures slate-200 et focus ring bleu doux. */
.form-label {
    color: var(--leo-text);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select,
.input-group-text {
    background-color: #ffffff;
    border-color: var(--leo-border);
    border-radius: var(--leo-radius-sm);
    color: var(--leo-text);
    min-height: 2.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--leo-primary);
    box-shadow: var(--leo-ring);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:disabled,
.form-select:disabled {
    background: #f1f5f9;
    color: #7a93a8;
}

.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--leo-danger);
}

.invalid-feedback {
    color: var(--leo-danger);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

.input-group .form-control,
.input-group .form-select {
    border-radius: var(--leo-radius-sm) 0 0 var(--leo-radius-sm);
}

.input-group .btn {
    border-radius: 0 var(--leo-radius-sm) var(--leo-radius-sm) 0;
}

/* Badges/tags: pills lisibles, proches des classes Tailwind px-3 py-1 text-xs. */
.badge {
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
}

.bg-blue-lt {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.bg-green-lt {
    background: #dcfae6 !important;
    color: #067647 !important;
}

.bg-red-lt {
    background: #fee4e2 !important;
    color: #b42318 !important;
}

.bg-yellow-lt {
    background: #fef0c7 !important;
    color: #b54708 !important;
}

.bg-orange-lt {
    background: #ffead5 !important;
    color: #b93815 !important;
}

.bg-cyan-lt {
    background: #cff9fe !important;
    color: #0e7090 !important;
}

.bg-purple-lt {
    background: #ebe9fe !important;
    color: #5925dc !important;
}

.bg-secondary-lt {
    background: #f2f4f7 !important;
    color: #475467 !important;
}

/* Tables: densite enterprise, lecture stable sur de gros volumes. */
.table-responsive {
    border-radius: var(--leo-radius);
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    color: var(--leo-text);
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--leo-border);
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0.6rem 0.75rem;
    text-transform: uppercase;
}

.table tbody td,
.table tfoot th {
    border-color: var(--leo-border);
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tfoot th {
    background: #f8fafc;
    color: var(--leo-text);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    min-height: 2.25rem;
}

.dataTables_wrapper .row {
    align-items: center;
    row-gap: 0.5rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.625rem !important;
}

.leo-filter-card .card-body {
    padding: 0.875rem;
}

.leo-compact-table {
    min-width: 760px;
}

.leo-compact-table th,
.leo-compact-table td {
    white-space: normal;
}

.leo-compact-table td {
    max-width: 260px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-item.active .page-link,
.page-item.active .page-link {
    background: var(--leo-primary);
    border-color: var(--leo-primary);
}

.page-link {
    border-color: var(--leo-border);
    color: var(--leo-primary);
}

.page-link:hover {
    background: #f1f5f9;
    border-color: #aebacc;
    color: var(--leo-primary-hover);
}

/* Alerts transformees en toasts: bas droite, slide-in, sans encombrer le contenu. */
.leo-toast-stack {
    bottom: 1.5rem;
    display: grid;
    gap: 0.75rem;
    max-width: min(26rem, calc(100vw - 2rem));
    position: fixed;
    right: 1.5rem;
    z-index: 1080;
}

.alert {
    align-items: flex-start;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    display: flex;
    gap: 0.75rem;
    box-shadow: var(--leo-shadow-sm);
    line-height: 1.5;
    margin: 0;
    padding: 1rem 1.25rem;
}

.leo-toast-stack .alert {
    animation: leo-slide-in 0.24s ease-out;
}

.alert-success {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #065f46;
}

.alert-danger {
    background: #fef3f2;
    border-color: #fecdca;
    color: #991b1b;
}

@keyframes leo-slide-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton loader pour les chargements AJAX. */
.leo-skeleton {
    background: linear-gradient(90deg, #e4e7ec 25%, #f8fafc 37%, #e4e7ec 63%);
    background-size: 400% 100%;
    border-radius: var(--leo-radius-sm);
    min-height: 1rem;
    animation: leo-pulse 1.4s ease infinite;
}

.leo-skeleton-row {
    display: grid;
    gap: 0.75rem;
}

.leo-skeleton-row .leo-skeleton:nth-child(1) {
    width: 72%;
}

.leo-skeleton-row .leo-skeleton:nth-child(2) {
    width: 100%;
}

.leo-skeleton-row .leo-skeleton:nth-child(3) {
    width: 56%;
}

@keyframes leo-pulse {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* Dashboard: cockpit finance dense et actionnable. */
.leo-command-bar {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(16rem, 0.75fr) minmax(34rem, 1.25fr);
    padding: 0.875rem 1rem;
}

.leo-command-title {
    min-width: 0;
}

.leo-command-title h2 {
    color: #111827;
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-command-meta {
    color: var(--leo-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    gap: 0.375rem 0.75rem;
    margin-top: 0.375rem;
}

.leo-command-meta span {
    align-items: center;
    display: inline-flex;
    min-width: 0;
}

.leo-command-meta span:not(:last-child)::after {
    color: #cbd5e1;
    content: "/";
    margin-left: 0.75rem;
}

.leo-command-filter {
    min-width: 0;
}

.leo-filter-grid {
    align-items: end;
    display: grid;
    gap: 0.625rem;
    grid-template-columns: minmax(8.5rem, 0.9fr) minmax(8.5rem, 0.9fr) minmax(13rem, 1.35fr) minmax(8rem, 0.8fr) minmax(7rem, 0.65fr);
}

.leo-filter-grid .form-label {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.leo-section-kicker {
    color: var(--leo-primary);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.leo-section-heading h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
}

.leo-executive-strip {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.leo-risk-panel {
    align-items: center;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: var(--leo-radius);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    grid-column: span 3;
    justify-content: space-between;
    min-height: 7.5rem;
    padding: 1rem 1.125rem;
}

.leo-risk-panel .leo-section-kicker {
    color: #bfdbfe;
}

.leo-risk-panel h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
}

.leo-risk-panel p {
    color: #cbd5e1;
    font-size: 0.875rem;
    margin: 0.375rem 0 0;
}

.leo-risk-panel.is-success {
    background: #064e3b;
    border-color: #047857;
}

.leo-risk-panel.is-warning {
    background: #78350f;
    border-color: #b45309;
}

.leo-risk-panel.is-danger {
    background: #7f1d1d;
    border-color: #b42318;
}

.leo-risk-meter {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--leo-radius-sm);
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 5rem;
    min-width: 8rem;
    padding: 0.75rem;
    text-align: center;
}

.leo-risk-meter strong {
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.leo-risk-meter span {
    color: #dbeafe;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.375rem;
}

.leo-executive-facts {
    display: contents;
}

.leo-fact {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: var(--leo-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 7.5rem;
    padding: 0.95rem 1rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.leo-fact:hover {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    transform: translateY(-1px);
}

.leo-fact.is-success {
    border-color: #bbf7d0;
}

.leo-fact.is-warning {
    background: #fffbeb;
    border-color: #fed7aa;
}

.leo-fact.is-danger {
    background: #fef3f2;
    border-color: #fecaca;
}

.leo-fact span {
    color: var(--leo-muted);
    font-size: 0.8125rem;
    font-weight: 700;
}

.leo-fact strong {
    color: #111827;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 0.5rem;
}

.leo-dashboard-kpis {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Compact executive overview */
.leo-executive-overview {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.leo-executive-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 46px;
    padding: 9px 14px;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

.leo-executive-status,
.leo-executive-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.leo-executive-status {
    color: #475569;
    font-size: .78rem;
}

.leo-executive-status strong {
    color: #1e293b;
    font-size: .82rem;
    white-space: nowrap;
}

.leo-executive-status > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leo-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.leo-executive-status.is-warning .leo-status-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .14);
}

.leo-executive-status.is-danger .leo-status-dot {
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.leo-executive-actions {
    flex: 0 0 auto;
    color: #64748b;
    font-size: .72rem;
    white-space: nowrap;
}

.leo-executive-actions .btn {
    padding: .25rem .55rem;
    border-color: #dbe3ed;
    border-radius: 7px;
    background: #fff;
    color: #475569;
    font-size: .72rem;
    font-weight: 600;
}

.leo-executive-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leo-executive-metric {
    display: flex;
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 12px 15px;
    border: 0;
    border-right: 1px solid #eef2f7;
    background: #fff;
    color: inherit;
    text-align: left;
}

.leo-executive-metric:last-child {
    border-right: 0;
}

button.leo-executive-metric {
    cursor: pointer;
}

button.leo-executive-metric:hover,
button.leo-executive-metric:focus-visible {
    background: #f8fafc;
    outline: 2px solid rgba(37, 99, 235, .16);
    outline-offset: -2px;
}

.leo-executive-metric-label {
    overflow: hidden;
    color: #64748b;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leo-executive-metric-value {
    color: #172033;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.leo-executive-metric-trend {
    color: #64748b;
    font-size: .67rem;
    line-height: 1.2;
}

.leo-executive-metric-trend.is-up {
    color: #15803d;
}

.leo-executive-metric-trend.is-down,
.leo-executive-metric.is-danger .leo-executive-metric-value {
    color: #b91c1c;
}

.leo-executive-metric.is-warning .leo-executive-metric-value {
    color: #a16207;
}

@media (max-width: 1199.98px) {
    .leo-executive-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-executive-metric:nth-child(3) {
        border-right: 0;
    }

    .leo-executive-metric:nth-child(n + 4) {
        border-top: 1px solid #eef2f7;
    }
}

@media (max-width: 767.98px) {
    .leo-executive-overview-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .leo-executive-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .leo-executive-actions > span:last-child {
        margin-left: auto;
    }

    .leo-executive-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-executive-metric,
    .leo-executive-metric:nth-child(3) {
        border-right: 1px solid #eef2f7;
    }

    .leo-executive-metric:nth-child(even) {
        border-right: 0;
    }

    .leo-executive-metric:nth-child(n + 3) {
        border-top: 1px solid #eef2f7;
    }
}

@media (max-width: 479.98px) {
    .leo-executive-status {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .leo-executive-status > span:last-child {
        width: 100%;
        padding-left: 16px;
        white-space: normal;
    }

    .leo-executive-metrics {
        grid-template-columns: 1fr;
    }

    .leo-executive-metric,
    .leo-executive-metric:nth-child(even),
    .leo-executive-metric:nth-child(3) {
        min-height: 68px;
        border-top: 1px solid #eef2f7;
        border-right: 0;
    }

    .leo-executive-metric:first-child {
        border-top: 0;
    }
}

.dashboard-detail-card {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: var(--leo-text);
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-detail-card:hover {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    transform: translateY(-1px);
}

.leo-kpi-card {
    display: grid;
    gap: 0.4rem;
    min-height: 7.75rem;
    padding: 0.875rem 0.95rem;
}

.leo-kpi-icon {
    align-items: center;
    background: var(--leo-primary-soft);
    border-radius: var(--leo-radius-sm);
    color: var(--leo-primary);
    display: inline-flex;
    height: 1.85rem;
    justify-content: center;
    width: 1.85rem;
}

.leo-kpi-icon .leo-icon {
    height: 1rem;
    width: 1rem;
}

.leo-kpi-label {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 0;
}

.leo-kpi-card strong {
    color: #111827;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.leo-kpi-foot {
    align-items: center;
    color: var(--leo-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.75rem;
    gap: 0.3rem 0.55rem;
}

.leo-trend {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 800;
    gap: 0.25rem;
    padding: 0.125rem 0.45rem;
}

.leo-trend .leo-icon {
    height: 0.75rem;
    width: 0.75rem;
}

.leo-trend.is-up {
    background: #ecfdf3;
    color: var(--leo-success);
}

.leo-trend.is-down {
    background: #fef3f2;
    color: var(--leo-danger);
}

.leo-trend.is-neutral {
    background: #f2f4f7;
    color: var(--leo-muted);
}

.leo-dashboard-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
}

.leo-dashboard-main {
    min-width: 0;
}

.leo-section-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.leo-section-heading h2 {
    color: #111827;
}

.leo-dashboard-chart-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.leo-chart-card-primary {
    grid-column: span 7;
}

.leo-chart-card-secondary {
    grid-column: span 5;
}

.leo-chart-card-half {
    grid-column: span 6;
}

.leo-chart-card .card-header {
    background: #ffffff;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
}

.leo-chart-card .card-title {
    font-size: 0.875rem;
}

.leo-chart-card .card-body {
    min-height: 8.75rem;
    padding: 0.75rem 0.875rem 0.875rem;
}

.leo-chart-card-primary .card-body,
.leo-chart-card-secondary .card-body {
    min-height: 9rem;
}

.leo-chart-card-half .card-body {
    min-height: 9.75rem;
}

.leo-chart-card canvas {
    max-height: 10rem;
}

.leo-pnl-card {
    grid-column: 1 / -1;
    overflow: hidden;
}

.leo-pnl-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
}

.leo-pnl-header .card-title { font-size: 1rem; margin: 0.12rem 0 0.18rem; }
.leo-pnl-header small { color: #667085; font-size: 0.72rem; }

.leo-pnl-currency-form { align-items: center; display: flex; flex: 0 0 auto; gap: 0.5rem; }
.leo-pnl-currency-form label { color: #667085; font-size: 0.68rem; font-weight: 700; white-space: nowrap; }
.leo-pnl-currency-form .form-select { min-width: 5.5rem; }

.leo-pnl-summary {
    background: #f8fafc;
    border-bottom: 1px solid var(--leo-border);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-pnl-summary div { border-right: 1px solid var(--leo-border); display: grid; gap: 0.15rem; padding: 0.72rem 1rem; }
.leo-pnl-summary div:last-child { border-right: 0; }
.leo-pnl-summary span { color: #667085; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.leo-pnl-summary strong { color: #101828; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.leo-pnl-summary .is-revenue strong { color: var(--leo-primary); }
.leo-pnl-summary .is-expense strong,
.leo-pnl-summary .is-loss strong { color: var(--leo-danger); }
.leo-pnl-summary .is-profit strong { color: var(--leo-success); }

.leo-pnl-visual-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(21rem, .75fr); }
.leo-pnl-visual { min-width: 0; padding: 0.9rem 1rem 0.4rem; }
.leo-pnl-visual + .leo-pnl-visual { border-left: 1px solid var(--leo-border); }
.leo-pnl-visual-heading { display: grid; gap: 0.1rem; }
.leo-pnl-visual-heading strong { color: #101828; font-size: 0.78rem; }
.leo-pnl-visual-heading span { color: #667085; font-size: 0.66rem; }
.leo-pnl-chart-body { min-height: 14rem; padding: 0.75rem 0 0.35rem; }
.leo-pnl-chart-body canvas { max-height: 13rem; }
.leo-pnl-breakdown { display: flex; flex-wrap: wrap; gap: 0.45rem 1.25rem; padding: 0 1rem 0.45rem; }
.leo-pnl-breakdown span { color: #667085; font-size: 0.68rem; }
.leo-pnl-breakdown strong { color: #344054; font-variant-numeric: tabular-nums; margin-left: 0.25rem; }
.leo-pnl-footnote { color: #667085; font-size: 0.68rem; padding: 0 1rem 0.85rem; }
.leo-pnl-detail-summary { background: #f8fafc; border-bottom: 1px solid var(--leo-border); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.leo-pnl-detail-summary div { border-right: 1px solid var(--leo-border); display: grid; gap: .12rem; padding: .75rem 1rem; }
.leo-pnl-detail-summary div:last-child { border-right: 0; }
.leo-pnl-detail-summary span { color: #667085; font-size: .66rem; font-weight: 700; text-transform: uppercase; }
.leo-pnl-detail-summary strong { color: #101828; font-size: .9rem; font-variant-numeric: tabular-nums; }
.leo-pnl-detail-summary .is-profit strong { color: var(--leo-success); }
.leo-pnl-detail-summary .is-loss strong { color: var(--leo-danger); }
.leo-pnl-detail-intro { align-items: stretch; background: #fff; border-bottom: 1px solid var(--leo-border); display: grid; grid-template-columns: minmax(12rem, .32fr) minmax(0, .68fr); }
.leo-pnl-detail-focus { border-left: 4px solid var(--leo-primary); display: grid; gap: .15rem; padding: 1rem 1.25rem; }
.leo-pnl-detail-focus.is-expense,.leo-pnl-detail-focus.is-loss { border-left-color: var(--leo-danger); }
.leo-pnl-detail-focus.is-profit { border-left-color: var(--leo-success); }
.leo-pnl-detail-focus > span { color: #667085; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.leo-pnl-detail-focus > strong { color: #101828; font-size: 1.45rem; font-variant-numeric: tabular-nums; line-height: 1.25; }
.leo-pnl-detail-focus.is-revenue > strong { color: var(--leo-primary); }
.leo-pnl-detail-focus.is-expense > strong,.leo-pnl-detail-focus.is-loss > strong { color: var(--leo-danger); }
.leo-pnl-detail-focus.is-profit > strong { color: var(--leo-success); }
.leo-pnl-detail-focus small { color: #667085; font-size: .7rem; }
.leo-pnl-detail-explanation { border-left: 1px solid var(--leo-border); padding: 1rem 1.25rem; }
.leo-pnl-detail-explanation > strong { color: #101828; display: block; font-size: .85rem; margin-bottom: .2rem; }
.leo-pnl-detail-explanation p { color: #667085; font-size: .74rem; margin: 0 0 .5rem; }
.leo-pnl-detail-explanation > span { align-items: center; color: #475467; display: flex; font-size: .68rem; gap: .25rem; }
.leo-pnl-detail-explanation .leo-icon { color: var(--leo-primary); height: .8rem; width: .8rem; }
.leo-pnl-equation { align-items: center; background: #f8fafc; border-bottom: 1px solid var(--leo-border); display: flex; flex-wrap: wrap; gap: .45rem .7rem; padding: .55rem 1.25rem; }
.leo-pnl-equation span { color: #667085; font-size: .67rem; }
.leo-pnl-equation span strong { color: #344054; font-variant-numeric: tabular-nums; margin-left: .18rem; }
.leo-pnl-equation b { color: #98a2b3; font-size: .8rem; }
.leo-pnl-equation .leo-pnl-equation-margin { background: #eaf2ff; border-radius: 999px; color: var(--leo-primary); font-weight: 700; margin-left: auto; padding: .18rem .5rem; }
.leo-pnl-detail-breakdown { background: #fff; border-bottom: 1px solid var(--leo-border); display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 1rem; }
.leo-pnl-detail-breakdown button { align-items: center; background: #fff; border: 1px solid var(--leo-border); border-radius: .5rem; color: #475467; display: inline-flex; flex: 0 0 auto; gap: .45rem; min-height: 2.25rem; padding: .4rem .65rem; }
.leo-pnl-detail-breakdown button:hover { background: #f8fafc; border-color: #b8c6dc; }
.leo-pnl-detail-breakdown button.is-active { background: #eff6ff; border-color: #93b4f7; color: var(--leo-primary); box-shadow: 0 0 0 2px rgba(29,78,216,.07); }
.leo-pnl-detail-breakdown button span { font-size: .7rem; font-weight: 700; }
.leo-pnl-detail-breakdown button strong { background: rgba(102,112,133,.09); border-radius: 999px; font-size: .67rem; font-variant-numeric: tabular-nums; padding: .12rem .38rem; }
.leo-dashboard-detail-table td.is-money { font-weight: 700; }
.leo-ledger-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.leo-ledger-amount.is-negative { color: var(--leo-danger); }
.leo-pnl-empty { align-items: center; display: flex; gap: 1rem; min-height: 12rem; padding: 2rem; }
.leo-pnl-empty-icon { align-items: center; background: #eff6ff; border-radius: 50%; color: var(--leo-primary); display: flex; height: 3rem; justify-content: center; min-width: 3rem; }
.leo-pnl-empty strong { color: #101828; display: block; margin-bottom: 0.25rem; }
.leo-pnl-empty p { color: #667085; font-size: 0.78rem; margin: 0; max-width: 40rem; }

@media (max-width: 767.98px) {
    .leo-pnl-header { gap: 0.75rem; }
    .leo-pnl-currency-form label { display: none; }
    .leo-pnl-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leo-pnl-summary div:nth-child(2) { border-right: 0; }
    .leo-pnl-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--leo-border); }
    .leo-pnl-empty { align-items: flex-start; padding: 1.25rem; }
    .leo-pnl-detail-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .leo-pnl-detail-intro { grid-template-columns: 1fr; }
    .leo-pnl-detail-explanation { border-left: 0; border-top: 1px solid var(--leo-border); }
    .leo-pnl-equation .leo-pnl-equation-margin { margin-left: 0; }
}

@media (max-width: 1199.98px) {
    .leo-pnl-visual-grid { grid-template-columns: 1fr; }
    .leo-pnl-visual + .leo-pnl-visual { border-left: 0; border-top: 1px solid var(--leo-border); }
}

.leo-dashboard-detail-table {
    min-width: 720px;
    table-layout: fixed;
    width: 100% !important;
}

.leo-dashboard-detail-table .is-money {
    min-width: 9rem;
    white-space: nowrap;
}

.leo-dashboard-detail-table td.is-money {
    font-variant-numeric: tabular-nums;
}

.leo-dashboard-detail-table thead th {
    background: #f8fafc;
    color: #475467;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding-bottom: 0.7rem;
    padding-top: 0.7rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.leo-dashboard-detail-table tbody tr {
    border-left: 3px solid transparent;
    transition: background-color 0.12s ease;
}

.leo-dashboard-detail-table tbody tr:hover { background: #f8fbff; }
.leo-dashboard-detail-table tbody tr.is-success-row { border-left-color: rgba(2, 122, 72, 0.55); }
.leo-dashboard-detail-table tbody tr.is-warning-row { border-left-color: rgba(181, 71, 8, 0.55); }
.leo-dashboard-detail-table tbody tr.is-danger-row { border-left-color: rgba(180, 35, 24, 0.55); }

.leo-dashboard-detail-table > tbody > tr > td {
    font-size: 0.78rem;
    padding-bottom: 0.55rem;
    padding-top: 0.55rem;
    vertical-align: middle;
}

.leo-dashboard-detail-table .leo-col-expand {
    text-align: center;
    width: 3.25rem;
}

.leo-dashboard-detail-table .leo-col-expand .btn {
    border: 0;
    box-shadow: none;
    color: var(--leo-primary);
}

.leo-dashboard-detail-table tbody tr.is-details-open { background: #f8fbff; }

.leo-dashboard-detail-row > td {
    background: #f8fafc !important;
    padding: 0 !important;
}

.leo-dashboard-detail-panel { padding: 0.85rem 1rem 0.9rem 3.25rem; }

.leo-dashboard-detail-grid {
    display: grid;
    gap: 0.65rem 1.25rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-dashboard-detail-grid div { display: grid; gap: 0.12rem; min-width: 0; }
.leo-dashboard-detail-grid span {
    color: #667085;
    font-size: 0.68rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}
.leo-dashboard-detail-grid strong {
    color: #101828;
    font-size: 0.78rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.leo-ledger-reference {
    color: #101828;
    display: block;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.leo-ledger-secondary-reference {
    color: #667085;
    display: block;
    font-size: 0.72rem;
    line-height: 1.3;
    max-width: 13rem;
    overflow-wrap: anywhere;
}

.leo-dashboard-detail-table td.is-positive {
    color: var(--leo-success);
    font-weight: 700;
}

.leo-dashboard-detail-responsive .dataTables_wrapper { padding: 0.875rem 1rem 1rem; }
.leo-dashboard-detail-modal-body > .leo-skeleton-row,
.leo-dashboard-detail-modal-body > .alert { margin: 1rem; }
.leo-dashboard-detail-responsive .dataTables_wrapper .row:first-child,
.leo-dashboard-detail-responsive .dataTables_wrapper .row:last-child { align-items: center; row-gap: 0.625rem; }
.leo-dashboard-detail-responsive .dataTables_filter input,
.leo-dashboard-detail-responsive .dataTables_length select {
    border-color: var(--leo-border);
    border-radius: var(--leo-radius-sm);
}
.leo-dashboard-detail-responsive .dataTables_filter input:focus,
.leo-dashboard-detail-responsive .dataTables_length select:focus {
    border-color: var(--leo-primary);
    box-shadow: var(--leo-ring);
}

@media (max-width: 575.98px) {
    .leo-dashboard-detail-responsive .dataTables_wrapper { padding: 0.75rem; }
    .leo-dashboard-detail-responsive .dataTables_wrapper .row:first-child > div,
    .leo-dashboard-detail-responsive .dataTables_wrapper .row:last-child > div { width: 100%; }
    .leo-dashboard-detail-responsive .dataTables_filter label,
    .leo-dashboard-detail-responsive .dataTables_length label { display: block; width: 100%; }
    .leo-dashboard-detail-responsive .dataTables_filter input { margin-left: 0; width: 100%; }
    .leo-dashboard-detail-panel { padding-left: 1rem; }
    .leo-dashboard-detail-grid { grid-template-columns: 1fr; }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .leo-dashboard-detail-panel { padding-left: 1rem; }
    .leo-dashboard-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.leo-workqueue-card .card-header {
    align-items: center;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.875rem;
}

.leo-workqueue-card .card-title {
    font-size: 0.95rem;
}

.modal-full-width {
    margin-left: auto;
    margin-right: auto;
    max-width: min(1320px, calc(100vw - 2rem));
}

.modal-full-width .leo-workqueue-card .card-header {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.leo-workqueue-header-actions {
    align-items: center;
    color: var(--leo-muted);
    display: flex;
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 700;
    gap: 0.625rem;
}

.leo-workqueue-table {
    table-layout: fixed;
    margin: 0;
    min-width: 1040px;
}

.leo-workqueue-col-priority {
    width: 8.5rem;
}

.leo-workqueue-col-select {
    width: 3rem;
}

.leo-workqueue-col-invoice {
    width: 10rem;
}

.leo-workqueue-col-business-ref {
    width: 11rem;
}

.leo-workqueue-col-client {
    width: 13rem;
}

.leo-workqueue-col-due {
    width: 8.5rem;
}

.leo-workqueue-col-deposit {
    width: 8.25rem;
}

.leo-workqueue-col-balance {
    width: 9.5rem;
}

.leo-workqueue-col-action {
    width: 9rem;
}

.leo-workqueue-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--leo-border);
    color: #475467;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0;
    padding: 0.625rem 0.75rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.leo-workqueue-table td {
    border-top: 1px solid #eef2f6;
    color: var(--leo-text);
    padding: 0.7rem 0.75rem;
    vertical-align: middle;
}

.leo-workqueue-row {
    position: relative;
}

.leo-workqueue-row > td:first-child {
    padding-left: 1rem;
    position: relative;
}

.leo-workqueue-row > td:first-child::before {
    bottom: 0.65rem;
    content: "";
    left: 0;
    position: absolute;
    top: 0.65rem;
    width: 3px;
}

.leo-workqueue-row.is-danger > td:first-child::before {
    background: var(--leo-danger);
}

.leo-workqueue-row.is-warning > td:first-child::before {
    background: var(--leo-warning);
}

.leo-workqueue-row.is-neutral > td:first-child::before {
    background: var(--leo-primary);
}

.leo-workqueue-ref,
.leo-workqueue-client,
.leo-workqueue-business-ref {
    color: #111827;
    display: block;
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leo-workqueue-ref,
.leo-workqueue-client {
    max-width: 18rem;
}

.leo-workqueue-sub {
    color: var(--leo-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.125rem;
    white-space: nowrap;
}

.leo-workqueue-amount {
    color: #111827;
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    line-height: 1.25;
    white-space: nowrap;
}

.leo-priority {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    gap: 0.3rem;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
}

.leo-priority .leo-icon {
    height: 0.75rem;
    width: 0.75rem;
}

.leo-priority.is-danger {
    background: #fef3f2;
    color: var(--leo-danger);
}

.leo-priority.is-warning {
    background: #fffaeb;
    color: var(--leo-warning);
}

.leo-priority.is-neutral {
    background: #eff6ff;
    color: var(--leo-primary);
}

.leo-deposit-state {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
}

.leo-deposit-state.is-done {
    background: #ecfdf3;
    color: var(--leo-success);
}

.leo-deposit-state.is-pending {
    background: #fffaeb;
    color: var(--leo-warning);
}

.leo-row-action {
    align-items: center;
    border-color: #b2c4df;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-width: 4.75rem;
    white-space: nowrap;
}

.leo-row-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.leo-row-actions .leo-row-action {
    min-width: 4.5rem;
}

.leo-billing-source-notice {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.leo-billing-source-notice > div {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.leo-billing-source-notice strong {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.25;
}

.leo-billing-source-notice span:not(.leo-priority) {
    color: var(--leo-muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
}

.leo-notification-table .leo-notification-title {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.25;
    margin-bottom: 0.2rem;
}

.leo-notification-table .leo-notification-message {
    color: var(--leo-muted);
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.35;
    margin: 0;
    max-width: 54rem;
}

.leo-notification-table tr.is-unread td {
    background: #f8fbff;
}

.leo-invoice-command {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.25rem;
    padding: 1rem 1.125rem;
}

.leo-invoice-command-copy .leo-section-kicker {
    color: #bfdbfe;
}

.leo-invoice-command h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-invoice-command p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-invoice-command-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-invoice-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.leo-invoice-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: var(--leo-text);
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    min-height: 9.5rem;
    padding: 0.875rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.leo-invoice-kpi:hover,
.leo-invoice-kpi:focus {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    outline: 0;
    transform: translateY(-1px);
}

.leo-invoice-kpi-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: var(--leo-radius-sm);
    color: var(--leo-primary);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.leo-invoice-kpi.is-success .leo-invoice-kpi-icon {
    background: #ecfdf3;
    color: var(--leo-success);
}

.leo-invoice-kpi.is-warning .leo-invoice-kpi-icon {
    background: #fffaeb;
    color: var(--leo-warning);
}

.leo-invoice-kpi.is-danger .leo-invoice-kpi-icon {
    background: #fef3f2;
    color: var(--leo-danger);
}

.leo-invoice-kpi.is-neutral .leo-invoice-kpi-icon,
.leo-invoice-kpi.is-muted .leo-invoice-kpi-icon {
    background: #f2f4f7;
    color: #475467;
}

.leo-invoice-kpi-label {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-invoice-kpi strong {
    color: #111827;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.leo-invoice-kpi small {
    color: var(--leo-muted);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.35;
}

.leo-invoice-ops {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.22fr);
}

.leo-invoice-filter {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.625rem;
    grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.15fr) minmax(9rem, 0.85fr) minmax(8rem, 0.75fr) minmax(8rem, 0.75fr) auto;
    padding: 0.875rem;
}

.leo-invoice-filter .form-label {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-invoice-filter-actions {
    display: flex;
    gap: 0.4rem;
}

.leo-invoice-health {
    background: #ffffff;
    border: 1px solid #b7cff7;
    border-radius: var(--leo-radius);
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6.25rem;
    padding: 0.875rem;
}

.leo-invoice-health span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-invoice-health strong {
    color: #111827;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.leo-invoice-health small {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 650;
    margin-top: 0.25rem;
}

.leo-invoice-list-card .card-header {
    background: #ffffff;
}

.leo-historical-hero {
    background: linear-gradient(135deg, #102a43 0%, #1f4f46 58%, #71512a 100%);
}

.leo-historical-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(18rem, 1.4fr);
    gap: 1rem;
}

.leo-historical-summary-item,
.leo-historical-summary-note {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 1rem;
}

.leo-historical-summary-item span,
.leo-historical-summary-note strong {
    color: #64748b;
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.leo-historical-summary-item strong {
    color: #0f172a;
    display: block;
    font-size: 1.45rem;
    line-height: 1.2;
    margin-top: .25rem;
}

.leo-historical-summary-item small,
.leo-historical-summary-note span {
    color: #64748b;
}

.leo-historical-summary-item.is-primary {
    background: #f2fbf7;
    border-color: rgba(31, 79, 70, 0.24);
}

.leo-historical-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.leo-historical-card .card-header,
.leo-historical-card .card-footer {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.08);
}

.leo-historical-table {
    min-width: 1050px;
}

.leo-historical-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.leo-historical-table td {
    vertical-align: top;
}

.leo-historical-table .form-control,
.leo-historical-table .form-select {
    min-height: 2.55rem;
}

.leo-historical-balance {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    color: #0f172a;
    font-weight: 800;
    min-height: 2.55rem;
    padding: .65rem .75rem;
    text-align: right;
    white-space: nowrap;
}

.leo-historical-footer {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.leo-cost-command {
    align-items: center;
    background: #0f172a;
    border: 1px solid #243044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.5rem;
    padding: 1rem 1.125rem;
}

.leo-cost-command .leo-section-kicker {
    color: #a7f3d0;
}

.leo-cost-command h2 {
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.leo-cost-command p {
    color: #d1d5db;
    font-size: 0.88rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
    max-width: 58rem;
}

.leo-cost-command-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-cost-command-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
}

.leo-cost-executive {
    align-items: stretch;
    display: grid;
    gap: 0.875rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.leo-cost-executive-main,
.leo-cost-risk-board {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
}

.leo-cost-executive-main {
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    text-align: left;
    width: 100%;
}

.leo-cost-executive-main strong {
    color: var(--leo-text);
    font-size: 1.7rem;
    font-weight: 850;
    line-height: 1.15;
}

.leo-cost-executive-main small {
    color: var(--leo-muted);
    font-weight: 650;
}

.leo-cost-executive-bar,
.leo-cost-consumption-bar {
    background: #eef2f7;
    border-radius: 999px;
    height: 0.55rem;
    overflow: hidden;
}

.leo-cost-executive-bar span,
.leo-cost-consumption-bar span {
    background: #2563eb;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.leo-cost-risk-board {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
}

.leo-cost-risk {
    appearance: none;
    border-right: 1px solid var(--leo-border);
    border-bottom: 0;
    border-left: 0;
    border-top: 0;
    cursor: pointer;
    display: grid;
    gap: 0.25rem;
    min-height: 5.75rem;
    padding: 0.9rem;
    text-align: left;
}

.leo-cost-risk:last-child {
    border-right: 0;
}

.leo-cost-risk span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leo-cost-risk strong {
    color: var(--leo-text);
    font-size: 1.45rem;
    font-weight: 850;
}

.leo-cost-risk.is-danger {
    background: #fff1f0;
}

.leo-cost-risk.is-warning {
    background: #fffaeb;
}

.leo-cost-risk.is-success {
    background: #ecfdf3;
}

.leo-cost-risk.is-muted {
    background: #f8fafc;
}

.leo-cost-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leo-cost-kpi {
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    min-height: 8.25rem;
    padding: 0.875rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    width: 100%;
}

.leo-cost-executive-main:hover,
.leo-cost-executive-main:focus,
.leo-cost-risk:hover,
.leo-cost-risk:focus,
.leo-cost-kpi:hover,
.leo-cost-kpi:focus {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    outline: 0;
    transform: translateY(-1px);
}

.leo-cost-kpi-icon {
    align-items: center;
    background: #f2f4f7;
    border-radius: var(--leo-radius-sm);
    color: #475467;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.leo-cost-kpi-icon.is-success {
    background: #ecfdf3;
    color: var(--leo-success);
}

.leo-cost-kpi-icon.is-warning {
    background: #fffaeb;
    color: var(--leo-warning);
}

.leo-cost-kpi-icon.is-danger {
    background: #fef3f2;
    color: var(--leo-danger);
}

.leo-cost-kpi-icon.is-neutral {
    background: #eff6ff;
    color: var(--leo-primary);
}

.leo-cost-kpi-label {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leo-cost-kpi strong {
    color: var(--leo-text);
    font-size: 1.08rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.leo-cost-kpi small {
    color: var(--leo-muted);
    font-size: 0.74rem;
    font-weight: 650;
}

.leo-cost-panel {
    border-color: var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
}

.leo-cost-panel .card-header {
    background: #ffffff;
}

.leo-cost-filter-body {
    background: #f8fafc;
}

.leo-cost-filter {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.75fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) auto;
}

.leo-cost-table {
    min-width: 1120px;
}

.leo-cost-table thead th {
    background: #f8fafc;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.leo-cost-row-over td {
    background: #fff7f6;
}

.leo-cost-consumption {
    display: grid;
    gap: 0.35rem;
    min-width: 9.5rem;
}

.leo-cost-consumption-head {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.leo-cost-consumption-head strong {
    color: var(--leo-text);
    font-size: 0.82rem;
}

.leo-cost-consumption-head span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.leo-cost-consumption-bar {
    height: 0.45rem;
}

.leo-cost-consumption-bar span.is-success {
    background: var(--leo-success);
}

.leo-cost-consumption-bar span.is-warning {
    background: var(--leo-warning);
}

.leo-cost-consumption-bar span.is-danger {
    background: var(--leo-danger);
}

.leo-cost-consumption-bar span.is-muted {
    background: #98a2b3;
}

.leo-cost-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 850;
    justify-content: center;
    min-width: 6.6rem;
    padding: 0.3rem 0.55rem;
}

.leo-cost-status.is-success {
    background: #ecfdf3;
    color: #027a48;
}

.leo-cost-status.is-warning {
    background: #fffaeb;
    color: #b54708;
}

.leo-cost-status.is-danger {
    background: #fef3f2;
    color: #b42318;
}

.leo-cost-status.is-muted {
    background: #f2f4f7;
    color: #475467;
}

.leo-cost-modal .modal-header {
    background: #f8fafc;
    border-bottom-color: var(--leo-border);
}

.leo-cost-modal-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0.875rem;
}

.leo-cost-modal-summary div {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    padding: 0.8rem;
}

.leo-cost-modal-summary span,
.leo-cost-modal-meta span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leo-cost-modal-summary strong {
    color: var(--leo-text);
    display: block;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.25;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.leo-cost-modal-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.leo-cost-modal-meta span {
    background: #f2f4f7;
    border-radius: 999px;
    color: #475467;
    padding: 0.35rem 0.6rem;
}

.leo-cost-detail-table {
    min-width: 980px;
}

.leo-invoice-create {
    display: block;
}

.leo-invoice-form-hero {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.5rem;
    padding: 1rem 1.125rem;
}

.leo-invoice-form-hero .leo-section-kicker {
    color: #bfdbfe;
}

.leo-invoice-form-hero h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-invoice-form-hero p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-invoice-form-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-invoice-form-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.34fr);
}

.leo-invoice-form-main {
    display: grid;
    gap: 1rem;
}

.leo-invoice-form-card .card-header,
.leo-invoice-lines-card .card-header,
.leo-invoice-summary-panel .card-header {
    background: #ffffff;
}

.leo-invoice-form-card .card-title,
.leo-invoice-lines-card .card-title {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
}

.leo-step-dot {
    align-items: center;
    background: var(--leo-primary);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 850;
    height: 1.45rem;
    justify-content: center;
    width: 1.45rem;
}

.leo-invoice-number {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: var(--leo-radius-sm);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem 0.875rem;
}

.leo-invoice-number span {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leo-invoice-number strong {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 850;
}

.leo-invoice-linking-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leo-invoice-field {
    min-width: 0;
}

.leo-invoice-field.is-wide {
    grid-column: 1 / -1;
}

.leo-invoice-field.is-primary .form-select {
    border-color: #b9c7da;
}

.leo-invoice-attachment-area {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: var(--leo-radius-sm);
    margin-top: 1rem;
    padding: 1rem;
}

.leo-invoice-attachment-head {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.leo-invoice-attachment-head span {
    color: #111827;
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
}

.leo-invoice-attachment-head small {
    color: var(--leo-muted);
    font-size: 0.78rem;
    font-weight: 750;
    text-align: right;
}

.leo-invoice-attachment-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.leo-invoice-relation-column {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.leo-relation-preview {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: var(--leo-radius-sm);
    display: grid;
    gap: 0.75rem;
    min-height: 10.75rem;
    padding: 0.875rem;
}

.leo-relation-preview.is-empty {
    align-items: center;
    border-style: dashed;
    color: var(--leo-muted);
}

.leo-relation-preview-empty {
    color: var(--leo-muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
}

.leo-relation-preview-head {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.leo-relation-preview-head div {
    min-width: 0;
}

.leo-relation-preview-head span:not(.badge) {
    color: var(--leo-muted);
    display: block;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-relation-preview-head strong {
    color: #111827;
    display: block;
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1.25;
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
}

.leo-relation-preview-subtitle,
.leo-relation-preview-description {
    color: #475467;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
}

.leo-relation-preview-description {
    border-top: 1px solid #eef2f6;
    padding-top: 0.65rem;
}

.leo-relation-preview-facts {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.leo-relation-preview-facts div {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 0.45rem;
    min-width: 0;
    padding: 0.55rem 0.65rem;
}

.leo-relation-preview-facts span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.66rem;
    font-weight: 850;
    text-transform: uppercase;
}

.leo-relation-preview-facts strong {
    color: #111827;
    display: block;
    font-size: 0.8rem;
    font-weight: 850;
    line-height: 1.25;
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
}

.leo-invoice-editor-table {
    table-layout: fixed;
    min-width: 1120px;
}

.leo-invoice-editor-table th:first-child,
.leo-invoice-editor-table td:first-child {
    width: 18rem;
}

.leo-invoice-editor-table th:nth-child(2),
.leo-invoice-editor-table td:nth-child(2) {
    width: 32rem;
}

.leo-invoice-editor-table th:nth-child(3),
.leo-invoice-editor-table td:nth-child(3) {
    width: 7rem;
}

.leo-invoice-editor-table th:nth-child(4),
.leo-invoice-editor-table td:nth-child(4) {
    width: 8.5rem;
}

.leo-invoice-editor-table th:nth-child(5),
.leo-invoice-editor-table td:nth-child(5) {
    width: 5.5rem;
}

.leo-invoice-editor-table th:nth-child(6),
.leo-invoice-editor-table td:nth-child(6),
.leo-invoice-editor-table th:nth-child(7),
.leo-invoice-editor-table td:nth-child(7) {
    width: 7.5rem;
}

.leo-invoice-editor-table th:nth-child(8),
.leo-invoice-editor-table td:nth-child(8) {
    width: 7rem;
}

.leo-invoice-editor-table .form-control {
    background: #ffffff;
    min-height: 2.3rem;
}

.leo-invoice-description-field {
    line-height: 1.4;
    min-height: 4.5rem;
    resize: vertical;
}

.leo-invoice-editor-table tbody td {
    padding-bottom: 0.625rem;
    padding-top: 0.625rem;
    vertical-align: top;
}

.leo-invoice-editor-table tfoot th {
    background: #f8fafc;
    border-top: 1px solid #d9e2ec;
    color: #111827;
    font-size: 0.85rem;
    font-weight: 850;
}

.leo-line-tax-switch {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: center;
    margin: 0;
    min-width: 4.25rem;
    white-space: nowrap;
}

.leo-line-tax-switch .form-check-input {
    margin: 0;
}

.leo-line-tax-switch .form-check-label {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
}

.leo-invoice-summary-panel {
    position: sticky;
    top: 5rem;
}

.leo-invoice-summary-total {
    background: #0f172a;
    border: 1px solid #263244;
    border-radius: var(--leo-radius-sm);
    color: #ffffff;
    padding: 0.95rem;
}

.leo-invoice-summary-total span {
    color: #bfdbfe;
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-invoice-summary-total strong {
    color: #ffffff;
    display: block;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}

.leo-invoice-summary-total strong span {
    color: inherit;
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 0;
    text-transform: none;
}

.leo-invoice-summary-list {
    display: grid;
    gap: 0;
    margin: 0.75rem 0 0;
}

.leo-invoice-summary-list div {
    align-items: center;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
}

.leo-invoice-summary-list dt {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leo-invoice-summary-list dd {
    color: #111827;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    font-weight: 850;
    margin: 0;
    text-align: right;
}

.leo-invoice-submit-stack {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.leo-invoice-form-card input[type="file"] {
    min-height: 2.75rem;
    padding-bottom: 0.55rem;
    padding-top: 0.55rem;
}

.leo-invoice-confirm-modal .modal-header,
.leo-invoice-confirm-modal .modal-footer {
    background: #ffffff;
}

.leo-invoice-confirm-modal .modal-body {
    background: #fbfcfe;
}

.leo-invoice-confirm-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leo-invoice-confirm-grid div,
.leo-invoice-confirm-totals div {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: var(--leo-radius-sm);
    min-height: 4.5rem;
    padding: 0.75rem;
}

.leo-invoice-confirm-grid span,
.leo-invoice-confirm-totals span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-invoice-confirm-grid strong,
.leo-invoice-confirm-totals strong {
    color: #111827;
    display: block;
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.25;
    margin-top: 0.4rem;
    overflow-wrap: anywhere;
}

.leo-invoice-confirm-totals {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leo-invoice-confirm-totals .is-primary {
    background: #0f172a;
    border-color: #263244;
}

.leo-invoice-confirm-totals .is-primary span {
    color: #bfdbfe;
}

.leo-invoice-confirm-totals .is-primary strong {
    color: #ffffff;
    font-size: 1.1rem;
}

.leo-invoice-confirm-table {
    min-width: 760px;
}

.leo-crm-command {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.25rem;
    padding: 1rem 1.125rem;
}

.leo-crm-command .leo-section-kicker {
    color: #bfdbfe;
}

.leo-crm-command h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-crm-command p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-crm-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-crm-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leo-crm-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: var(--leo-text);
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    min-height: 9.25rem;
    padding: 0.875rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.leo-crm-kpi:hover,
.leo-crm-kpi:focus {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    outline: 0;
    transform: translateY(-1px);
}

.leo-crm-kpi-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: var(--leo-radius-sm);
    color: var(--leo-primary);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.leo-crm-kpi.is-success .leo-crm-kpi-icon {
    background: #ecfdf3;
    color: var(--leo-success);
}

.leo-crm-kpi.is-warning .leo-crm-kpi-icon {
    background: #fffaeb;
    color: var(--leo-warning);
}

.leo-crm-kpi.is-danger .leo-crm-kpi-icon {
    background: #fef3f2;
    color: var(--leo-danger);
}

.leo-crm-kpi.is-neutral .leo-crm-kpi-icon {
    background: #f2f4f7;
    color: #475467;
}

.leo-crm-kpi-label {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-crm-kpi strong {
    color: #111827;
    font-size: 1.12rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.leo-crm-kpi small {
    color: var(--leo-muted);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.35;
}

.leo-crm-ops {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.22fr);
}

.leo-crm-filter {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.625rem;
    grid-template-columns: minmax(12rem, 1.1fr) minmax(12rem, 1.1fr) minmax(8rem, 0.75fr) minmax(8rem, 0.75fr) auto;
    padding: 0.875rem;
}

.leo-crm-filter .form-label {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-crm-filter-actions {
    display: flex;
    gap: 0.4rem;
}

.leo-crm-health {
    background: #ffffff;
    border: 1px solid #b7cff7;
    border-radius: var(--leo-radius);
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6.25rem;
    padding: 0.875rem;
}

.leo-crm-health span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-crm-health strong {
    color: #111827;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.leo-crm-health small {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 650;
    margin-top: 0.25rem;
}

.leo-crm-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.34fr);
}

.leo-crm-chart-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.leo-crm-chart-card {
    grid-column: span 6;
}

.leo-crm-chart-card.is-wide {
    grid-column: span 7;
}

.leo-crm-chart-card.is-small {
    grid-column: span 3;
}

.leo-crm-chart-card .card-header,
.leo-crm-followups .card-header,
.leo-crm-shortcuts .card-header {
    background: #ffffff;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
}

.leo-crm-chart-card .card-title {
    font-size: 0.875rem;
}

.leo-crm-chart-card .card-body {
    min-height: 9rem;
    padding: 0.75rem 0.875rem 0.875rem;
}

.leo-crm-chart-card canvas {
    max-height: 10rem;
}

.leo-crm-followups {
    position: sticky;
    top: 5rem;
}

.leo-crm-followup-row {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    text-align: left;
}

.leo-crm-followup-row strong {
    color: #111827;
    display: block;
    font-size: 0.875rem;
    line-height: 1.25;
}

.leo-crm-followup-row span:not(.badge) {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    margin-top: 0.15rem;
}

.leo-crm-shortcuts .btn-list {
    align-items: stretch;
    display: grid;
}

.leo-crm-shortcuts .btn {
    justify-content: flex-start;
}

#crmDetailModal .modal-header,
#crmDetailModal .modal-footer {
    background: #ffffff;
}

#crmDetailModal .modal-body {
    background: #fbfcfe;
    padding: 0.875rem;
}

.leo-crm-create-modal .modal-header,
.leo-crm-create-modal .modal-footer {
    background: #ffffff;
}

.leo-crm-create-modal .modal-body {
    background: #fbfcfe;
    padding: 1rem;
}

.leo-crm-modal-section {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    box-shadow: var(--leo-shadow-sm);
    padding: 0.875rem;
}

.leo-crm-modal-section + .leo-crm-modal-section {
    margin-top: 0.875rem;
}

.leo-crm-modal-section-title {
    align-items: baseline;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
}

.leo-crm-modal-section-title span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-crm-modal-section-title strong {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 850;
}

.leo-crm-create-modal .form-label {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
}

.leo-leads-command {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.25rem;
    padding: 1rem 1.125rem;
}

.leo-leads-command .leo-section-kicker {
    color: #bfdbfe;
}

.leo-leads-command h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-leads-command p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-leads-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-leads-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-leads-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: var(--leo-text);
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    min-height: 9.25rem;
    padding: 0.875rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.leo-leads-kpi:hover,
.leo-leads-kpi:focus {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    outline: 0;
    transform: translateY(-1px);
}

.leo-leads-kpi-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: var(--leo-radius-sm);
    color: var(--leo-primary);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.leo-leads-kpi.is-success .leo-leads-kpi-icon {
    background: #ecfdf3;
    color: var(--leo-success);
}

.leo-leads-kpi.is-warning .leo-leads-kpi-icon {
    background: #fffaeb;
    color: var(--leo-warning);
}

.leo-leads-kpi.is-danger .leo-leads-kpi-icon {
    background: #fef3f2;
    color: var(--leo-danger);
}

.leo-leads-kpi.is-neutral .leo-leads-kpi-icon {
    background: #f2f4f7;
    color: #475467;
}

.leo-leads-kpi-label {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-leads-kpi strong {
    color: #111827;
    font-size: 1.12rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.leo-leads-kpi small {
    color: var(--leo-muted);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.35;
}

.leo-leads-ops {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.22fr);
}

.leo-leads-filter {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.625rem;
    grid-template-columns: minmax(11rem, 1fr) minmax(11rem, 1fr) minmax(9rem, 0.8fr) minmax(8rem, 0.7fr) minmax(8rem, 0.7fr) auto;
    padding: 0.875rem;
}

.leo-leads-filter .form-label {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-leads-filter-actions {
    display: flex;
    gap: 0.4rem;
}

.leo-leads-health {
    background: #ffffff;
    border: 1px solid #b7cff7;
    border-radius: var(--leo-radius);
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6.25rem;
    padding: 0.875rem;
}

.leo-leads-health span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-leads-health strong {
    color: #111827;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.leo-leads-health small {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 650;
    margin-top: 0.25rem;
}

.leo-leads-list-card .card-header {
    background: #ffffff;
}

.leo-leads-table {
    min-width: 940px;
}

.leo-pipeline-command {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.25rem;
    padding: 1rem 1.125rem;
}

.leo-pipeline-command .leo-section-kicker {
    color: #bfdbfe;
}

.leo-pipeline-command h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-pipeline-command p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-pipeline-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-pipeline-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leo-pipeline-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: var(--leo-text);
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    min-height: 9.25rem;
    padding: 0.875rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.leo-pipeline-kpi:hover,
.leo-pipeline-kpi:focus {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    outline: 0;
    transform: translateY(-1px);
}

.leo-pipeline-kpi-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: var(--leo-radius-sm);
    color: var(--leo-primary);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.leo-pipeline-kpi.is-success .leo-pipeline-kpi-icon {
    background: #ecfdf3;
    color: var(--leo-success);
}

.leo-pipeline-kpi.is-warning .leo-pipeline-kpi-icon {
    background: #fffaeb;
    color: var(--leo-warning);
}

.leo-pipeline-kpi.is-danger .leo-pipeline-kpi-icon {
    background: #fef3f2;
    color: var(--leo-danger);
}

.leo-pipeline-kpi-label {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-pipeline-kpi strong {
    color: #111827;
    font-size: 1.08rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.leo-pipeline-kpi small {
    color: var(--leo-muted);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.35;
}

.leo-pipeline-ops {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.22fr);
}

.leo-pipeline-filter {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.625rem;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) minmax(8rem, 0.7fr) minmax(8rem, 0.7fr) auto;
    padding: 0.875rem;
}

.leo-pipeline-filter .form-label {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-pipeline-filter-actions {
    display: flex;
    gap: 0.4rem;
}

.leo-pipeline-health {
    background: #ffffff;
    border: 1px solid #b7cff7;
    border-radius: var(--leo-radius);
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6.25rem;
    padding: 0.875rem;
}

.leo-pipeline-health span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-pipeline-health strong {
    color: #111827;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.leo-pipeline-health small {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 650;
    margin-top: 0.25rem;
}

.leo-pipeline-board {
    gap: 1rem;
}

.leo-pipeline-column {
    background: #ffffff;
    border-color: #d6deea;
    box-shadow: var(--leo-shadow-sm);
    min-height: 31rem;
}

.leo-pipeline-column:nth-child(2n),
.leo-pipeline-column:nth-child(3n) {
    background: #ffffff;
}

.leo-pipeline-column-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--leo-border);
    padding: 0.875rem;
}

.leo-pipeline-column-header h2 {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 850;
}

.leo-pipeline-column-header .badge {
    border: 0;
    cursor: pointer;
    font-weight: 850;
}

.leo-pipeline-card {
    background: #ffffff;
    border-color: #d9e2ef;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.leo-pipeline-card-head {
    align-items: flex-start;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.leo-pipeline-card-head strong {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.25;
}

.leo-pipeline-card-client {
    color: var(--leo-muted);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.25rem;
}

.leo-pipeline-card-foot {
    color: var(--leo-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.74rem;
    font-weight: 650;
    gap: 0.35rem 0.65rem;
}

.leo-opportunity-hero {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.25rem;
    padding: 1rem 1.125rem;
}

.leo-opportunity-hero .leo-section-kicker {
    color: #bfdbfe;
}

.leo-opportunity-hero h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-opportunity-hero p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-opportunity-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-opportunity-kpis {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-opportunity-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    min-height: 7.25rem;
    padding: 0.9rem;
}

.leo-opportunity-kpi.is-primary {
    border-color: #b7cff7;
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
}

.leo-opportunity-kpi span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-opportunity-kpi strong {
    color: #111827;
    display: block;
    font-size: 1.13rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}

.leo-opportunity-kpi small {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.35rem;
}

.leo-opportunity-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.38fr);
}

.leo-opportunity-form .card-header,
.leo-opportunity-activity-card .card-header,
.leo-opportunity-history-card .card-header {
    background: #ffffff;
}

.leo-opportunity-section {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    box-shadow: var(--leo-shadow-sm);
    padding: 0.875rem;
}

.leo-opportunity-section + .leo-opportunity-section {
    margin-top: 0.875rem;
}

.leo-opportunity-section-title {
    align-items: baseline;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
}

.leo-opportunity-section-title span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-opportunity-section-title strong {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 850;
}

.leo-opportunity-side {
    min-width: 0;
}

.leo-opportunity-timeline {
    background: #ffffff;
    display: grid;
    gap: 0;
    padding: 0.5rem 0;
}

.leo-opportunity-timeline-item {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1rem minmax(0, 1fr);
    padding: 0.85rem 1rem;
    position: relative;
}

.leo-opportunity-timeline-item:not(:last-child)::before {
    background: #d9e2ef;
    bottom: -0.25rem;
    content: "";
    left: 1.45rem;
    position: absolute;
    top: 1.45rem;
    width: 1px;
}

.leo-opportunity-timeline-mark {
    background: var(--leo-primary);
    border: 3px solid #eff6ff;
    border-radius: 999px;
    height: 0.85rem;
    margin-top: 0.2rem;
    width: 0.85rem;
    z-index: 1;
}

.leo-opportunity-timeline-head {
    align-items: flex-start;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
}

.leo-opportunity-timeline-head strong {
    color: #111827;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.25;
}

.leo-opportunity-timeline-head span,
.leo-opportunity-timeline-meta {
    color: var(--leo-muted);
    font-size: 0.74rem;
    font-weight: 650;
}

.leo-opportunity-timeline-item p {
    font-size: 0.82rem;
    margin: 0.35rem 0 0;
}

.leo-opportunity-empty {
    color: var(--leo-muted);
    font-size: 0.875rem;
    font-weight: 650;
    padding: 1rem;
}

.leo-clients-command {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 7.25rem;
    padding: 1rem 1.125rem;
}

.leo-clients-command .leo-section-kicker {
    color: #bfdbfe;
}

.leo-clients-command h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-clients-command p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-clients-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-clients-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-clients-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    min-height: 7.25rem;
    padding: 0.9rem;
}

.leo-clients-kpi.is-primary {
    border-color: #b7cff7;
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
}

.leo-clients-kpi span,
.leo-clients-health span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-clients-kpi strong,
.leo-clients-health strong {
    color: #111827;
    display: block;
    font-size: 1.25rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}

.leo-clients-kpi small,
.leo-clients-health small {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.35rem;
}

.leo-clients-ops {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.22fr);
}

.leo-clients-filter {
    align-items: end;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.625rem;
    grid-template-columns: minmax(14rem, 1fr) auto;
    padding: 0.875rem;
}

.leo-clients-filter .form-label {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-clients-filter-actions {
    display: flex;
    gap: 0.4rem;
}

.leo-clients-health {
    background: #ffffff;
    border: 1px solid #b7cff7;
    border-radius: var(--leo-radius);
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 6.25rem;
    padding: 0.875rem;
}

.leo-clients-list-card .card-header,
.leo-client-modal-form .modal-header,
.leo-client-modal-form .modal-footer {
    background: #ffffff;
}

.leo-clients-table {
    min-width: 920px;
}

.leo-client-modal-form .modal-body {
    background: #fbfcfe;
    padding: 1rem;
}

.leo-client-modal-section {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    box-shadow: var(--leo-shadow-sm);
    padding: 0.875rem;
}

.leo-client-modal-section + .leo-client-modal-section {
    margin-top: 0.875rem;
}

.leo-client-modal-section-title {
    align-items: baseline;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
}

.leo-client-modal-section-title span {
    color: var(--leo-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-client-modal-section-title strong {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 850;
}

.leo-client-modal-form .form-label {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
}

.leo-client-profile-hero {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 8rem;
    padding: 1rem 1.125rem;
}

.leo-client-profile-identity {
    align-items: center;
    display: flex;
    gap: 1rem;
    min-width: 0;
}

.leo-client-avatar {
    align-items: center;
    background: var(--leo-primary);
    border-radius: var(--leo-radius);
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.25rem;
    font-weight: 900;
    height: 3.5rem;
    justify-content: center;
    width: 3.5rem;
}

.leo-client-profile-hero .leo-section-kicker {
    color: #bfdbfe;
}

.leo-client-profile-hero h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-client-profile-hero p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-client-profile-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-client-profile-kpis {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-client-profile-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    min-height: 7.25rem;
    padding: 0.9rem;
}

.leo-client-profile-kpi.is-primary {
    border-color: #b7cff7;
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
}

.leo-client-profile-kpi span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-client-profile-kpi strong {
    color: #111827;
    display: block;
    font-size: 1.18rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}

.leo-client-profile-kpi small {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.35rem;
}

.leo-client-profile-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(18rem, 0.65fr);
}

.leo-client-profile-card .card-header,
.leo-client-profile-side .card-header {
    background: #ffffff;
}

.leo-client-profile-side {
    align-self: start;
}

.leo-invoice-table,
.leo-invoice-detail-table,
.leo-crm-detail-table {
    min-width: 900px;
}

.leo-invoice-table td:nth-child(6),
.leo-invoice-table td:nth-child(7),
.leo-invoice-table td:nth-child(8),
.leo-invoice-detail-table td:nth-child(5),
.leo-invoice-detail-table td:nth-child(6),
.leo-invoice-detail-table td:nth-child(7) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#invoiceDetailModal .modal-header,
#invoiceDetailModal .modal-footer {
    background: #ffffff;
}

#invoiceDetailModal .modal-body {
    background: #fbfcfe;
    padding: 0.875rem;
}

.leo-payment-modal-form .modal-header,
.leo-payment-modal-form .modal-footer {
    background: #ffffff;
}

.leo-payment-modal-form .modal-body {
    background: #fbfcfe;
    padding: 1rem;
}

.leo-payment-summary-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leo-payment-summary-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-width: 0;
    padding: 0.75rem;
}

.leo-payment-summary-item span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leo-payment-summary-item strong {
    color: #0f172a;
    display: block;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leo-payment-summary-item.is-balance {
    background: #0f172a;
    border-color: #0f172a;
}

.leo-payment-summary-item.is-balance span,
.leo-payment-summary-item.is-balance strong {
    color: #ffffff;
}

.leo-payment-modal-form .leo-modal-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.leo-payment-modal-form .leo-modal-section + .leo-modal-section {
    margin-top: 0.875rem;
}

.leo-payment-modal-form .leo-modal-section-title {
    align-items: center;
    display: flex;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}

.leo-payment-modal-form .leo-modal-section-title span {
    align-items: center;
    background: #eef2ff;
    border-radius: 999px;
    color: #3730a3;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    height: 1.625rem;
    justify-content: center;
    width: 1.625rem;
}

.leo-payment-modal-form .leo-modal-section-title strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.leo-payment-modal-form .form-label {
    color: #334155;
    font-weight: 700;
}

.leo-invoice-show-hero {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 8.5rem;
    padding: 1rem 1.125rem;
}

.leo-invoice-show-copy {
    min-width: 0;
}

.leo-invoice-show-copy .leo-section-kicker {
    color: #93c5fd;
}

.leo-invoice-show-copy h2 {
    color: #ffffff;
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: 0;
    margin: 0.125rem 0;
}

.leo-invoice-show-copy p {
    color: #cbd5e1;
    margin: 0;
}

.leo-invoice-show-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-invoice-show-kpis {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-invoice-show-kpi {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: var(--leo-shadow-sm);
    min-width: 0;
    padding: 0.95rem;
}

.leo-invoice-show-kpi span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leo-invoice-show-kpi strong {
    color: #0f172a;
    display: block;
    font-size: 1.2rem;
    line-height: 1.25;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.leo-invoice-show-kpi small {
    color: #64748b;
    display: block;
    margin-top: 0.25rem;
}

.leo-invoice-show-kpi.is-balance {
    border-color: #fed7aa;
}

.leo-invoice-show-kpi.is-paid {
    border-color: #bbf7d0;
}

.leo-invoice-show-kpi.is-total {
    border-color: #bfdbfe;
}

.leo-invoice-show-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.34fr);
}

.leo-invoice-show-main,
.leo-invoice-show-side {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.leo-invoice-show-side {
    position: sticky;
    top: 1rem;
}

.leo-invoice-show-card {
    border-color: #e5e7eb;
    border-radius: 8px;
    box-shadow: var(--leo-shadow-sm);
    overflow: hidden;
}

.leo-invoice-show-card .card-header {
    align-items: center;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
}

.leo-invoice-progress-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.leo-invoice-progress-head span {
    color: #64748b;
    font-weight: 700;
}

.leo-invoice-progress-head strong {
    color: #0f172a;
    font-size: 1.05rem;
}

.leo-invoice-progress {
    background: #e5e7eb;
    height: 0.55rem;
}

.leo-invoice-progress .progress-bar {
    background: #027a48;
}

.leo-invoice-show-facts {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1rem;
}

.leo-invoice-show-facts div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
}

.leo-invoice-show-facts span,
.leo-invoice-show-list dt {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leo-invoice-show-facts strong,
.leo-invoice-show-list dd {
    color: #0f172a;
    display: block;
    font-weight: 800;
    margin-top: 0.25rem;
}

.leo-invoice-show-table,
.leo-payment-history-table {
    min-width: 760px;
}

.leo-invoice-show-table td:nth-child(2),
.leo-invoice-show-table td:nth-child(3),
.leo-invoice-show-table td:nth-child(5),
.leo-payment-history-table td:last-child {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.leo-invoice-show-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.leo-invoice-show-list div {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 0.75rem;
}

.leo-invoice-show-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.leo-invoice-show-list dd {
    margin-bottom: 0;
}

.leo-invoice-note {
    color: #334155;
    line-height: 1.55;
}

.leo-treasury-command {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 8.5rem;
    padding: 1rem 1.125rem;
}

.leo-treasury-command-copy {
    min-width: 0;
}

.leo-treasury-command-copy .leo-section-kicker {
    color: #93c5fd;
}

.leo-treasury-command-copy h2 {
    color: #ffffff;
    font-size: clamp(1.5rem, 2.5vw, 2.15rem);
    font-weight: 850;
    letter-spacing: 0;
    margin: 0.125rem 0;
}

.leo-treasury-command-copy p {
    color: #cbd5e1;
    margin: 0;
}

.leo-treasury-command-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-treasury-ops {
    align-items: stretch;
    display: grid;
    gap: 0.875rem;
    grid-template-columns: minmax(0, 1fr) 13rem;
}

.leo-treasury-filter {
    align-items: end;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    padding: 0.875rem;
}

.leo-treasury-filter .form-label {
    color: #334155;
    font-weight: 700;
}

.leo-treasury-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.leo-treasury-health {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.875rem;
}

.leo-treasury-health span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leo-treasury-health strong {
    color: #0f172a;
    font-size: 1.75rem;
    line-height: 1.05;
}

.leo-treasury-health small {
    color: #64748b;
}

.leo-treasury-health.is-warning {
    border-color: #fed7aa;
}

.leo-treasury-health.is-ok {
    border-color: #bbf7d0;
}

.leo-treasury-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-treasury-kpi {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: var(--leo-shadow-sm);
    min-width: 0;
    padding: 0.9rem;
}

.leo-treasury-kpi.is-total {
    background: #0f172a;
    border-color: #0f172a;
}

.leo-treasury-kpi.is-entry {
    border-color: #bbf7d0;
}

.leo-treasury-kpi.is-exit,
.leo-treasury-kpi.is-negative {
    border-color: #fecaca;
}

.leo-treasury-kpi.is-positive {
    border-color: #bbf7d0;
}

.leo-treasury-kpi span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leo-treasury-kpi strong {
    color: #0f172a;
    display: block;
    font-size: 1.15rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.leo-treasury-kpi small {
    color: #64748b;
    display: block;
    margin-top: 0.25rem;
}

.leo-treasury-kpi.is-total span,
.leo-treasury-kpi.is-total strong,
.leo-treasury-kpi.is-total small {
    color: #ffffff;
}

.leo-treasury-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
}

.leo-treasury-main {
    min-width: 0;
}

.leo-treasury-side {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 5rem;
}

.leo-treasury-chart-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.leo-treasury-chart-card {
    border-color: #e5e7eb;
    border-radius: 8px;
    box-shadow: var(--leo-shadow-sm);
    grid-column: span 6;
    overflow: hidden;
}

.leo-treasury-chart-card.is-wide {
    grid-column: span 7;
}

.leo-treasury-chart-card.is-wide + .leo-treasury-chart-card {
    grid-column: span 5;
}

.leo-treasury-chart-card .card-header,
.leo-treasury-table-card .card-header,
.leo-treasury-watch-card .card-header,
.leo-treasury-actions-card .card-header {
    align-items: center;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
}

.leo-treasury-chart-card .card-title,
.leo-treasury-table-card .card-title,
.leo-treasury-watch-card .card-title,
.leo-treasury-actions-card .card-title {
    font-size: 0.95rem;
}

.leo-treasury-chart-card .card-body {
    min-height: 9.5rem;
    padding: 0.75rem 0.875rem 0.875rem;
}

.leo-treasury-chart-card canvas {
    max-height: 10.5rem;
}

.leo-chart-empty-body {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 9.5rem;
}

.leo-chart-empty-body canvas {
    display: none;
}

.leo-chart-empty {
    color: #64748b;
    max-width: 18rem;
    text-align: center;
}

.leo-chart-empty strong {
    color: #0f172a;
    display: block;
    font-weight: 850;
}

.leo-chart-empty span {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 0.25rem;
}

.leo-treasury-table-card,
.leo-treasury-watch-card,
.leo-treasury-actions-card {
    border-color: #e5e7eb;
    border-radius: 8px;
    box-shadow: var(--leo-shadow-sm);
    overflow: hidden;
}

.leo-treasury-recent-table {
    min-width: 760px;
}

.leo-treasury-recent-table td:last-child {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.leo-treasury-watch-list {
    display: grid;
}

.leo-treasury-watch-item {
    align-items: center;
    border-top: 1px solid #eef2f7;
    color: #0f172a;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.875rem;
    text-decoration: none;
}

.leo-treasury-watch-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

.leo-treasury-watch-icon {
    align-items: center;
    background: #fff7ed;
    border-radius: 999px;
    color: #b54708;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 850;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.leo-treasury-watch-item strong,
.leo-treasury-watch-item small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leo-treasury-watch-item small {
    color: #64748b;
}

.leo-treasury-watch-item em {
    color: #b54708;
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}

.leo-treasury-quick-actions {
    display: grid;
    gap: 0.5rem;
}

.leo-catalog-command {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.125rem;
}

.leo-catalog-command h2 {
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    font-weight: 800;
    letter-spacing: 0;
    margin: 0.125rem 0;
}

.leo-catalog-command p {
    color: #64748b;
    margin: 0;
}

.leo-catalog-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-catalog-kpi-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-catalog-kpi {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: var(--leo-shadow-sm);
    padding: 0.95rem;
}

.leo-catalog-kpi.is-primary {
    border-color: #bfdbfe;
}

.leo-catalog-kpi span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leo-catalog-kpi strong {
    color: #0f172a;
    display: block;
    font-size: 1.35rem;
    margin-top: 0.25rem;
}

.leo-catalog-kpi small {
    color: #64748b;
}

.leo-catalog-ops {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    padding: 0.875rem;
}

.leo-catalog-filter {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
}

.leo-catalog-filter .form-label,
.leo-catalog-modal-form .form-label {
    color: #334155;
    font-weight: 700;
}

.leo-catalog-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.leo-catalog-list-card .card-header,
.leo-catalog-modal-form .modal-header,
.leo-catalog-modal-form .modal-footer,
#catalogProfitabilityModal .modal-header,
#catalogProfitabilityModal .modal-footer {
    background: #ffffff;
}

.leo-catalog-modal-form .modal-body,
#catalogProfitabilityModal .modal-body {
    background: #fbfcfe;
    padding: 1rem;
}

.leo-catalog-modal-form .leo-modal-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.leo-catalog-modal-form .leo-modal-section + .leo-modal-section {
    margin-top: 0.875rem;
}

.leo-catalog-modal-form .leo-modal-section-title {
    align-items: center;
    display: flex;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}

.leo-catalog-modal-form .leo-modal-section-title span {
    align-items: center;
    background: #eef2ff;
    border-radius: 999px;
    color: #3730a3;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    height: 1.625rem;
    justify-content: center;
    width: 1.625rem;
}

.leo-catalog-table,
.leo-catalog-profit-table {
    min-width: 880px;
}

.leo-catalog-table td:nth-child(4),
.leo-catalog-table td:nth-child(5),
.leo-catalog-table td:nth-child(6),
.leo-catalog-profit-table td:nth-child(3),
.leo-catalog-profit-table td:nth-child(4),
.leo-catalog-profit-table td:nth-child(5),
.leo-catalog-profit-table td:nth-child(6),
.leo-catalog-profit-table td:nth-child(7) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.leo-treasury-account-hero {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 8rem;
    padding: 1rem 1.125rem;
}

.leo-account-identity {
    align-items: center;
    display: flex;
    gap: 1rem;
    min-width: 0;
}

.leo-account-mark {
    align-items: center;
    background: #2563eb;
    border-radius: var(--leo-radius);
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 3.25rem;
    justify-content: center;
    width: 3.25rem;
}

.leo-account-mark .leo-icon {
    height: 1.45rem;
    width: 1.45rem;
}

.leo-account-identity .leo-section-kicker {
    color: #bfdbfe;
}

.leo-account-identity h2 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-account-identity p {
    color: #cbd5e1;
    font-size: 0.875rem;
    margin: 0.35rem 0 0;
}

.leo-account-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-account-kpis {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-account-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    min-height: 7.25rem;
    padding: 0.9rem;
}

.leo-account-kpi.is-primary {
    border-color: #b7cff7;
    box-shadow: inset 0 3px 0 var(--leo-primary), var(--leo-shadow-sm);
}

.leo-account-kpi span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-account-kpi strong {
    color: #111827;
    display: block;
    font-size: 1.25rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}

.leo-account-kpi small {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.35rem;
}

.leo-movement-quick-card .card-header,
.leo-movement-history-card .card-header {
    background: #ffffff;
}

.leo-cashbox-detail-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.7fr) minmax(20rem, 0.85fr);
    grid-template-areas:
        "history info"
        "history users";
}

.leo-movement-quick-card {
    border-color: #b7cff7;
    grid-area: quick;
}

.leo-movement-quick-card .card-body {
    padding: 0.875rem 1rem;
}

.leo-movement-launch {
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--leo-radius-sm);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 4.25rem;
    padding: 0.8rem 0.9rem;
}

.leo-movement-launch strong,
#cashBoxMovementModal .modal-title,
#bankAccountMovementModal .modal-title {
    color: #0f172a;
    font-weight: 850;
}

.leo-movement-launch span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.15rem;
}

#cashBoxMovementModal .modal-header,
#cashBoxMovementModal .modal-footer,
#bankAccountMovementModal .modal-header,
#bankAccountMovementModal .modal-footer {
    background: #ffffff;
}

#cashBoxMovementModal .modal-body,
#bankAccountMovementModal .modal-body {
    background: #fbfcfe;
}

#cashBoxMovementModal .form-label,
#bankAccountMovementModal .form-label {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
}

.leo-movement-quick-grid {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(11rem, 1fr) minmax(8rem, 0.75fr) minmax(8rem, 0.7fr) minmax(9rem, 0.8fr) minmax(14rem, 1.4fr) minmax(14rem, 1.2fr);
}

.leo-movement-description textarea {
    min-height: 2.45rem;
    resize: vertical;
}

.leo-movement-actions {
    align-items: end;
    display: grid;
    gap: 0.45rem;
}

.leo-movement-actions .form-check {
    margin: 0;
}

.leo-movement-actions .btn-list {
    justify-content: flex-end;
}

.leo-movement-history-card {
    grid-area: history;
    min-height: 25rem;
}

.leo-movement-history-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-movement-history-actions .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    margin: 0 !important;
    min-height: 2rem;
    white-space: nowrap;
}

.leo-movement-history-card > .card-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.leo-cashbox-info-card {
    grid-area: info;
}

.leo-cashbox-users-card {
    grid-area: users;
}

.leo-cashbox-info-card,
.leo-cashbox-users-card {
    align-self: start;
}

.leo-assigned-users .list-group-item {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.leo-assigned-rights {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.leo-account-movement-table {
    table-layout: fixed;
    width: 100% !important;
}

.leo-account-movement-table thead th {
    background: #f8fafc;
    color: #475467;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.leo-account-movement-table th,
.leo-account-movement-table td {
    min-width: 0;
    overflow-wrap: normal;
    white-space: normal;
    word-break: normal;
}

.leo-account-movement-table > tbody > tr > td {
    padding-bottom: 0.48rem;
    padding-top: 0.48rem;
}

.leo-movement-filters {
    align-items: end;
    background: #f8fafc;
    border-bottom: 1px solid var(--leo-border);
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(9rem, 1fr)) auto;
    padding: 0.75rem 1rem;
}

.leo-movement-filters .form-label {
    font-size: 0.72rem;
    margin-bottom: 0.25rem;
}

.leo-account-movement-table .leo-col-expand {
    text-align: center;
    width: 5%;
}

.leo-account-movement-table .leo-col-balance {
    font-variant-numeric: tabular-nums;
    width: 17%;
    white-space: nowrap;
}

.leo-account-movement-table .leo-col-expand .btn {
    border: 0;
    box-shadow: none;
    color: var(--leo-primary);
}

.leo-movement-detail-row > td {
    background: #f8fafc !important;
    padding: 0 !important;
}

.leo-movement-detail-panel {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.9rem 3.2rem;
}

.leo-movement-detail-grid {
    display: grid;
    flex: 1 1 auto;
    gap: 0.6rem 1.25rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-movement-detail-grid div {
    display: grid;
    gap: 0.1rem;
}

.leo-movement-detail-grid span {
    color: #667085;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.leo-movement-detail-grid strong {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .leo-movement-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-movement-filters .btn {
        grid-column: 1 / -1;
    }

    .leo-movement-detail-panel {
        align-items: stretch;
        flex-direction: column;
        padding-left: 1rem;
    }

    .leo-movement-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .leo-movement-filters,
    .leo-movement-detail-grid {
        grid-template-columns: 1fr;
    }

    .leo-account-movement-table .leo-col-type,
    .leo-account-movement-table .leo-col-status {
        display: none;
    }
}

.leo-account-movement-table tbody tr {
    border-left: 3px solid transparent;
}

.leo-account-movement-table tbody tr.is-credit-row {
    border-left-color: rgba(2, 122, 72, 0.55);
}

.leo-account-movement-table tbody tr.is-debit-row {
    border-left-color: rgba(180, 35, 24, 0.55);
}

.leo-account-movement-table .leo-col-date {
    width: 10%;
}

.leo-account-movement-table .leo-col-reference {
    width: 25%;
}

.leo-account-movement-table .leo-col-type {
    line-height: 1.25;
    overflow-wrap: normal;
    width: 14%;
}

.leo-account-movement-table .leo-col-impact {
    width: 14%;
}

.leo-account-movement-table .leo-col-status {
    width: 10%;
}

.leo-account-movement-table .leo-col-action {
    text-align: right;
    width: 14%;
    white-space: nowrap;
}

.leo-account-movement-table .leo-col-action .btn {
    display: inline-flex;
    justify-content: center;
    min-width: 6.25rem;
    white-space: nowrap;
}

.leo-account-movement-table .leo-workqueue-ref {
    display: block;
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.leo-account-movement-table .leo-movement-label {
    display: block;
    line-height: 1.35;
    margin-top: 0.25rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.leo-account-impact {
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    white-space: nowrap;
}

.leo-account-impact.is-credit {
    color: var(--leo-success);
}

.leo-account-impact.is-debit {
    color: var(--leo-danger);
}

.leo-account-movement-responsive .dataTables_wrapper {
    padding: 0.875rem 1rem 1rem;
}

.leo-account-movement-responsive .dataTables_wrapper .row:first-child,
.leo-account-movement-responsive .dataTables_wrapper .row:last-child {
    align-items: center;
    row-gap: 0.625rem;
}

.leo-account-movement-responsive .dataTables_filter input,
.leo-account-movement-responsive .dataTables_length select {
    border-color: var(--leo-border);
    border-radius: var(--leo-radius-sm);
}

.leo-account-movement-responsive .dataTables_filter input:focus,
.leo-account-movement-responsive .dataTables_length select:focus {
    border-color: var(--leo-primary);
    box-shadow: var(--leo-ring);
}

.leo-cashbox-command {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(18rem, 1fr) minmax(34rem, 1.25fr);
    padding: 1rem;
}

.leo-cashbox-command h2 {
    color: #111827;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.leo-cashbox-command p {
    color: var(--leo-muted);
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.4rem 0 0;
}

.leo-cashbox-filter {
    align-items: end;
    display: grid;
    gap: 0.625rem;
    grid-template-columns: minmax(10rem, 1fr) minmax(9rem, 0.75fr) auto auto;
}

.leo-cashbox-summary {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-cashbox-summary-item {
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    color: #ffffff;
    min-height: 6.75rem;
    padding: 0.9rem 1rem;
}

.leo-cashbox-summary-item span {
    color: #bfdbfe;
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-cashbox-summary-item strong {
    color: #ffffff;
    display: block;
    font-size: 1.25rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}

.leo-cashbox-summary-item small {
    color: #cbd5e1;
    display: block;
    font-size: 0.75rem;
    font-weight: 650;
    margin-top: 0.35rem;
}

.leo-cashbox-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leo-cashbox-card {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    gap: 0.875rem;
    min-height: 19rem;
    padding: 1rem;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.leo-cashbox-card::before {
    background: var(--leo-primary);
    border-radius: 999px;
    content: "";
    left: 0;
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    width: 3px;
}

.leo-cashbox-card.is-inactive::before {
    background: var(--leo-danger);
}

.leo-cashbox-card.is-closed::before {
    background: #98a2b3;
}

.leo-cashbox-card:hover {
    border-color: #9db2ce;
    box-shadow: var(--leo-shadow-md);
    transform: translateY(-1px);
}

.leo-cashbox-card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.leo-cashbox-icon {
    align-items: center;
    background: var(--leo-primary-soft);
    border-radius: var(--leo-radius-sm);
    color: var(--leo-primary);
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.leo-cashbox-card-main h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
}

.leo-cashbox-card-main p {
    color: var(--leo-muted);
    font-size: 0.8125rem;
    font-weight: 650;
    margin: 0.3rem 0 0;
}

.leo-cashbox-balance {
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: var(--leo-radius-sm);
    padding: 0.875rem;
}

.leo-cashbox-balance span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-cashbox-balance strong {
    color: #111827;
    display: block;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.45rem;
    overflow-wrap: anywhere;
}

.leo-cashbox-balance small {
    display: block;
    font-size: 0.75rem;
    font-weight: 750;
    margin-top: 0.35rem;
}

.leo-cashbox-balance small.is-credit {
    color: var(--leo-success);
}

.leo-cashbox-balance small.is-debit {
    color: var(--leo-danger);
}

.leo-cashbox-meta {
    display: grid;
    gap: 0.5rem;
    margin: 0;
}

.leo-cashbox-meta div {
    align-items: center;
    border-top: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.5rem;
}

.leo-cashbox-meta dt {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.leo-cashbox-meta dd {
    color: #111827;
    font-size: 0.8125rem;
    font-weight: 750;
    margin: 0;
    min-width: 0;
    text-align: right;
}

.leo-cashbox-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.leo-bank-command {
    border-color: #cbd5e1;
}

.leo-bank-summary-item {
    background: #0f172a;
    border-color: #263244;
}

.leo-bank-card::before {
    background: #0f766e;
}

.leo-bank-card.is-inactive::before {
    background: var(--leo-danger);
}

.leo-bank-card.is-closed::before {
    background: #98a2b3;
}

.leo-bank-icon {
    background: #ccfbf1;
    color: #0f766e;
}

.leo-bank-form-card .card-body {
    padding: 0;
}

.leo-form-section {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(13rem, 0.42fr) minmax(0, 1fr);
    padding: 1.1rem;
}

.leo-form-section + .leo-form-section {
    border-top: 1px solid #eef2f6;
}

.leo-form-section h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0.2rem 0 0;
}

.leo-form-section p {
    color: var(--leo-muted);
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.45;
    margin: 0.45rem 0 0;
}

.leo-dashboard-side {
    position: sticky;
    top: 5rem;
}

.leo-alert-card .card-header {
    background: #ffffff;
}

.leo-attention-list .list-group-item {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.95rem 1rem;
}

.leo-attention-list .list-group-item span {
    color: var(--leo-text);
    display: grid;
    gap: 0.125rem;
    min-width: 0;
}

.leo-attention-list .list-group-item span strong {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 800;
}

.leo-attention-list .list-group-item span small {
    color: var(--leo-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.leo-attention-list .badge {
    flex: 0 0 auto;
}

.list-group-item {
    background: transparent;
    align-items: center;
    border-color: var(--leo-border);
    color: var(--leo-text);
    padding: 1rem 1.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.list-group-item > span:first-child {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
}

.leo-notification-list .list-group-item {
    align-items: stretch;
}

.leo-notification-item {
    display: flex;
    gap: 1rem;
}

.leo-notification-item.is-unread {
    background: #eff6ff;
}

.leo-notification-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: 9999px;
    color: var(--leo-primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.leo-notification-content {
    flex: 1 1 auto;
    min-width: 0;
}

.leo-notification-title {
    color: var(--leo-text);
    font-size: 0.975rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.leo-notification-message {
    color: var(--leo-muted);
    line-height: 1.6;
    margin: 0.375rem 0 0.25rem;
}

.leo-notification-action {
    flex: 0 0 auto;
}

.leo-empty-state {
    align-items: center;
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
}

.leo-empty-icon {
    background: #f2f4f7;
    border-radius: 9999px;
    color: var(--leo-muted);
    height: 3rem;
    padding: 0.75rem;
    width: 3rem;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background: #f8fafc;
    color: var(--leo-primary);
}

.modal-content {
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-md);
}

.modal-header,
.modal-footer {
    border-color: var(--leo-border);
}

.text-muted {
    color: var(--leo-muted) !important;
}

.audit-json {
    max-height: 180px;
    max-width: 360px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.75rem;
}

.leo-audit-table { table-layout: fixed; width: 100% !important; }
.leo-audit-table thead th { background: #f8fafc; color: #475467; font-size: .68rem; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.leo-audit-table > tbody > tr > td { font-size: .76rem; padding-bottom: .5rem; padding-top: .5rem; vertical-align: middle; }
.leo-audit-table tbody tr { border-left: 3px solid transparent; transition: background-color .12s ease; }
.leo-audit-table tbody tr:hover,.leo-audit-table tbody tr.is-details-open { background: #f8fbff; }
.leo-audit-table .leo-col-expand { text-align: center; width: 5%; }
.leo-audit-table .leo-col-expand .btn { border: 0; box-shadow: none; color: var(--leo-primary); }
.leo-audit-table th:nth-child(2),.leo-audit-table td:nth-child(2) { width: 15%; }
.leo-audit-table th:nth-child(3),.leo-audit-table td:nth-child(3) { width: 27%; }
.leo-audit-table th:nth-child(4),.leo-audit-table td:nth-child(4) { width: 18%; }
.leo-audit-table th:nth-child(5),.leo-audit-table td:nth-child(5) { width: 23%; }
.leo-audit-table th:nth-child(6),.leo-audit-table td:nth-child(6) { text-align: center; width: 12%; }
.leo-audit-table td:nth-child(2) strong,.leo-audit-table td:nth-child(2) small { display: block; }
.leo-audit-table td:nth-child(2) small,.leo-audit-user small { color: #667085; font-size: .67rem; margin-top: .08rem; }
.leo-audit-user { display: grid; gap: .08rem; min-width: 0; }
.leo-audit-user strong,.leo-audit-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leo-audit-record { color: #475467; font-variant-numeric: tabular-nums; font-weight: 700; }
.leo-audit-detail-row > td { background: #f8fafc !important; padding: 0 !important; }
.leo-audit-detail-panel { padding: .9rem 1rem .95rem 3.25rem; }
.leo-audit-detail-meta { display: grid; gap: .65rem 1.25rem; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: .75rem; }
.leo-audit-detail-meta div { display: grid; gap: .12rem; min-width: 0; }
.leo-audit-detail-meta span,.leo-audit-json-block > span { color: #667085; font-size: .66rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.leo-audit-detail-meta strong { color: #344054; font-size: .74rem; overflow-wrap: anywhere; }
.leo-audit-change-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.leo-audit-json-block { min-width: 0; }
.leo-audit-json-block pre { background: #fff; border: 1px solid var(--leo-border); border-radius: .45rem; color: #344054; font-size: .7rem; line-height: 1.45; margin: .25rem 0 0; max-height: 13rem; overflow: auto; padding: .65rem .75rem; white-space: pre-wrap; word-break: break-word; }
.leo-audit-responsive .dataTables_wrapper { padding: .8rem 1rem 1rem; }

@media (max-width: 767.98px) {
    .leo-audit-table { min-width: 720px; }
    .leo-audit-detail-panel { padding-left: 1rem; }
    .leo-audit-detail-meta,.leo-audit-change-grid { grid-template-columns: 1fr; }
}

.crm-kanban {
    display: grid;
    gap: 0.875rem;
    grid-auto-columns: minmax(18rem, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 0.75rem;
}

.crm-kanban-column {
    background: #f8fafc;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 14rem);
    min-height: 28rem;
}

.crm-kanban-column:nth-child(2n) {
    background: #ffffff;
}

.crm-kanban-column:nth-child(3n) {
    background: #f8fafc;
}

.crm-kanban-header,
.crm-kanban-total {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
}

.crm-kanban-header h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
}

.crm-kanban-header span,
.crm-kanban-total {
    color: var(--leo-muted);
    font-size: 0.8125rem;
    font-weight: 700;
}

.crm-kanban-dropzone {
    display: grid;
    flex: 1 1 auto;
    gap: 0.75rem;
    overflow-y: auto;
    padding: 0 0.75rem 0.75rem;
}

.crm-kanban-column.is-drag-over {
    border-color: var(--leo-primary);
    box-shadow: var(--leo-ring);
}

.crm-opportunity-card {
    background: #fbfdff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    box-shadow: none;
    cursor: grab;
    padding: 0.875rem;
}

.crm-opportunity-card:active {
    cursor: grabbing;
}

.crm-opportunity-card:hover {
    border-color: #aebacc;
    box-shadow: var(--leo-shadow-sm);
}

.crm-card-meta {
    align-items: center;
    display: flex;
    font-weight: 800;
    justify-content: space-between;
    margin: 0.625rem 0 0.25rem;
}

.crm-convert-form {
    border-top: 1px solid var(--leo-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.625rem;
}

/* Pages metier: polish transversal hors dashboard/login. */
.page-body main > .row.align-items-end.mb-3,
.page-body main > .row.g-2.align-items-end.mb-3,
.page-body main > form.card.mb-3:not(.leo-dashboard-filter) {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    margin-left: 0;
    margin-right: 0;
    padding: 1rem;
}

.page-body main > .row.align-items-end.mb-3 > [class*="col-"],
.page-body main > .row.g-2.align-items-end.mb-3 > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.page-body main > .d-flex.justify-content-end.mb-3,
.page-body main > .d-flex.justify-content-between.mb-3 {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    gap: 0.5rem;
    padding: 0.75rem;
}

.js-ajax-form.card,
form.card:not(.leo-login-card):not(.leo-dashboard-filter) {
    overflow: hidden;
}

.js-ajax-form.card > .card-body,
form.card:not(.leo-login-card):not(.leo-dashboard-filter) > .card-body {
    padding: 1.25rem;
}

.card > .card-body > .row.g-3:first-child,
.card > .card-body > .row.row-cards:first-child {
    align-items: start;
}

.card .card-footer.d-flex {
    align-items: center;
    gap: 0.75rem;
}

.card dl.row {
    margin-bottom: 0;
    row-gap: 0.625rem;
}

.card dl.row dt {
    color: var(--leo-muted);
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.card dl.row dd {
    color: var(--leo-text);
    margin-bottom: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.table-responsive {
    background: #ffffff;
}

.card > .table-responsive:first-child {
    border-radius: var(--leo-radius);
}

.datatable {
    width: 100% !important;
}

.dataTables_wrapper {
    padding: 0.875rem;
}

.dataTables_wrapper .table {
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    overflow: hidden;
}

.dataTables_wrapper .row:first-child {
    margin-bottom: 0.75rem;
}

.dataTables_wrapper label {
    color: var(--leo-muted);
    font-size: 0.8125rem;
    font-weight: 700;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    min-width: min(18rem, 60vw);
}

.dataTables_wrapper .dataTables_info {
    color: var(--leo-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

.btn-list.flex-nowrap {
    align-items: center;
}

.btn-list.flex-nowrap .btn-sm {
    white-space: nowrap;
}

.report-print-area .card-header {
    background: #ffffff;
}

.report-print-area .table-responsive {
    padding: 0.875rem;
}

.leo-notification-list {
    background: #ffffff;
}

.leo-notification-list .list-group-item {
    border-left: 0;
    border-right: 0;
    padding: 1rem 1.25rem;
}

.leo-notification-item.is-unread {
    box-shadow: inset 3px 0 0 var(--leo-primary);
}

.empty {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    margin: 1rem auto;
    max-width: 42rem;
    padding: 2rem;
}

.empty-header {
    color: var(--leo-primary);
    font-weight: 800;
}

.empty-title {
    color: #111827;
    font-weight: 800;
}

.audit-json {
    background: #f8fafc;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    padding: 0.5rem;
}

/* Enterprise uplift transversal: listes, formulaires, fiches et controles. */
.page-wrapper {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0, rgba(244, 246, 248, 0) 15rem),
        var(--leo-bg);
}

.page-header .container-xl {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.leo-page-heading {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    min-height: 4.5rem;
    padding: 0.875rem 1rem;
}

.leo-page-heading .page-title {
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.25;
}

.leo-page-subtitle {
    color: var(--leo-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.75rem;
    font-weight: 700;
    gap: 0.35rem 0.625rem;
    margin-top: 0.25rem;
    text-transform: uppercase;
}

.leo-page-subtitle span:not(:last-child)::after {
    color: #cbd5e1;
    content: "/";
    margin-left: 0.625rem;
}

.page-body main > .row.align-items-end.mb-3,
.page-body main > .row.g-2.align-items-end.mb-3,
.page-body main > .d-flex.justify-content-end.mb-3,
.page-body main > .d-flex.justify-content-between.mb-3 {
    position: relative;
}

.page-body main > .row.align-items-end.mb-3::before,
.page-body main > .row.g-2.align-items-end.mb-3::before,
.page-body main > .d-flex.justify-content-end.mb-3::before,
.page-body main > .d-flex.justify-content-between.mb-3::before {
    background: var(--leo-primary);
    border-radius: 999px;
    bottom: 0.75rem;
    content: "";
    left: 0.75rem;
    position: absolute;
    top: 0.75rem;
    width: 3px;
}

.page-body main > .row.align-items-end.mb-3,
.page-body main > .row.g-2.align-items-end.mb-3 {
    align-items: end !important;
}

.page-body main > .row.align-items-end.mb-3 form,
.page-body main > .row.g-2.align-items-end.mb-3 form {
    width: 100%;
}

.page-body main > .row.align-items-end.mb-3 .form-label,
.page-body main > .row.g-2.align-items-end.mb-3 .form-label {
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.card {
    overflow: hidden;
}

.card-header {
    align-items: center;
    min-height: 3.125rem;
}

.card-header .text-muted,
.card-header .small {
    color: var(--leo-muted) !important;
    font-size: 0.75rem;
    font-weight: 650;
}

.form-label {
    color: #344054;
    font-size: 0.8125rem;
    font-weight: 750;
}

.leo-required-mark {
    color: var(--leo-danger);
    font-size: 0.95em;
    font-weight: 900;
    line-height: 1;
}

.leo-required-soft {
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 999px;
    color: var(--leo-danger);
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    margin-left: 0.35rem;
    padding: 0.18rem 0.4rem;
    vertical-align: middle;
    white-space: nowrap;
}

.form-control,
.form-select {
    border-color: #cfd8e3;
    border-radius: var(--leo-radius-sm);
    color: #111827;
    font-size: 0.875rem;
    min-height: 2.45rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #8fb1e8;
    box-shadow: var(--leo-ring);
}

.form-hint,
.invalid-feedback,
.js-form-alert {
    font-size: 0.8125rem;
}

.table {
    color: var(--leo-text);
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--leo-border);
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding-bottom: 0.7rem;
    padding-top: 0.7rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    border-color: #eef2f6;
    font-size: 0.875rem;
    padding-bottom: 0.7rem;
    padding-top: 0.7rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #fbfdff;
}

.table .badge {
    font-weight: 800;
}

.dataTables_wrapper .row:first-child {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    margin: 0 0 0.75rem;
    padding: 0.625rem;
}

.dataTables_wrapper .row:first-child > [class*="col-"] {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-color: #cfd8e3;
    border-radius: var(--leo-radius-sm);
    min-height: 2.25rem;
}

.dataTables_wrapper .row:last-child {
    align-items: center;
    margin-top: 0.75rem;
}

.pagination .page-link {
    border-color: var(--leo-border);
    color: var(--leo-text);
    font-size: 0.8125rem;
    font-weight: 700;
    min-height: 2.125rem;
    min-width: 2.125rem;
}

.pagination .page-item.active .page-link {
    background: var(--leo-primary);
    border-color: var(--leo-primary);
}

.btn-list {
    gap: 0.375rem;
}

.btn-sm {
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
}

.badge {
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
}

dl.row dt,
dl.row dd {
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 0.625rem;
    padding-top: 0.625rem;
}

dl.row dt:nth-last-child(2),
dl.row dd:last-child {
    border-bottom: 0;
}

.row.g-3 > [class*="col-"] > .card,
.row.row-cards > [class*="col-"] > .card {
    height: 100%;
}

.modal-header {
    background: #f8fafc;
}

.modal-title {
    color: #111827;
    font-weight: 800;
}

.leo-toast-stack .alert {
    border: 1px solid var(--leo-border);
    box-shadow: var(--leo-shadow-md);
}

/* Auth: experience de connexion premium, sobre et rassurante. */
.leo-auth {
    background: #f4f6f8;
    min-height: 100vh;
}

.leo-auth-shell {
    display: grid;
    grid-template-columns: minmax(22rem, 0.95fr) minmax(24rem, 1.05fr);
    min-height: 100vh;
}

.leo-auth-panel {
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        #111827;
    background-size: 32px 32px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 4rem);
    position: relative;
}

.leo-auth-panel::after {
    background: rgba(37, 99, 235, 0.14);
    content: "";
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    width: 1px;
}

.leo-auth-brand {
    align-items: center;
    color: #ffffff;
    display: inline-flex;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    position: relative;
    text-decoration: none;
    width: fit-content;
    z-index: 1;
}

.leo-auth-brand:hover {
    color: #ffffff;
}

.leo-auth-copy {
    max-width: 34rem;
    position: relative;
    z-index: 1;
}

.leo-auth-kicker {
    color: #93c5fd;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    text-transform: uppercase;
}

.leo-auth-copy h1 {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.7rem);
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
    max-width: 12ch;
}

.leo-auth-copy p:last-child {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.75;
    margin: 1.25rem 0 0;
    max-width: 34rem;
}

.leo-auth-insights {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 34rem;
    position: relative;
    z-index: 1;
}

.leo-auth-insights div {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--leo-radius);
    padding: 1rem;
}

.leo-auth-insights span {
    color: #cbd5e1;
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.leo-auth-insights strong {
    color: #ffffff;
    font-size: 0.9375rem;
}

.leo-auth-main {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: clamp(1.25rem, 5vw, 4rem);
}

.leo-auth-card-wrap {
    max-width: 28rem;
    width: 100%;
}

.leo-login-card {
    border: 1px solid #d0d7e2;
    border-radius: 0.875rem;
    box-shadow: 0 20px 45px rgba(16, 24, 40, 0.12);
    overflow: hidden;
}

.leo-login-card .card-body {
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.leo-login-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.leo-login-mark {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    color: var(--leo-primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.leo-login-mark svg {
    height: 1.35rem;
    width: 1.35rem;
}

.leo-login-header p {
    color: var(--leo-muted);
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.125rem;
    text-transform: uppercase;
}

.leo-login-header h1 {
    color: #111827;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.leo-input-shell {
    position: relative;
}

.leo-input-shell .leo-icon {
    color: #98a2b3;
    left: 0.875rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.leo-input-shell .form-control {
    padding-left: 2.625rem;
}

.leo-login-card .form-control {
    min-height: 2.75rem;
}

.leo-login-card .btn-primary {
    min-height: 2.75rem;
}

.leo-login-footnote {
    align-items: flex-start;
    color: var(--leo-muted);
    display: flex;
    font-size: 0.8125rem;
    gap: 0.5rem;
    line-height: 1.5;
    margin-top: 1.25rem;
}

@media (max-width: 767.98px) {
    .page-header {
        padding: 0.875rem 0 0.5rem;
    }

    .page-body {
        padding: 0.625rem 0 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header,
    .card-footer {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .container-xl {
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }

    .btn {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .navbar .container-xl {
        min-height: 3.75rem;
    }

    .navbar-collapse {
        border-top: 1px solid rgba(255, 255, 255, 0.10);
        margin-top: 0.5rem;
        padding: 0.75rem 0 1rem;
    }

    .leo-shell-nav {
        align-items: stretch;
        gap: 0.375rem;
    }

    .leo-shell-nav .nav-link {
        justify-content: space-between;
        width: 100%;
    }

    .navbar .dropdown-menu {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.10);
        box-shadow: none;
        margin: 0.375rem 0 0.5rem;
        min-width: 0;
        width: 100%;
    }

    .navbar .dropdown-menu::before {
        display: none;
    }

    .leo-shell-menu-heading span,
    .leo-shell-menu-text strong {
        color: #ffffff;
    }

    .leo-shell-menu-heading small,
    .leo-shell-menu-text small {
        color: #cbd5e1;
    }

    .leo-shell-actions {
        border-top: 1px solid rgba(255, 255, 255, 0.10);
        justify-content: space-between;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        width: 100%;
    }

    .leo-user-trigger {
        flex: 1 1 auto;
        justify-content: flex-start;
    }

    .leo-toast-stack {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }

    .leo-notification-menu {
        min-width: min(22rem, calc(100vw - 2rem));
    }

    .leo-notification-item {
        flex-direction: column;
    }

    .leo-notification-action,
    .leo-notification-action .btn {
        width: 100%;
    }

    .crm-kanban {
        grid-auto-columns: minmax(16rem, 86vw);
    }

    .leo-compact-table {
        min-width: 620px;
    }

    .modal-full-width {
        max-width: calc(100vw - 1rem);
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: left !important;
    }

    .leo-dashboard-kpis,
    .leo-executive-facts,
    .leo-account-kpis,
    .leo-cashbox-summary,
    .leo-cashbox-grid,
    .leo-treasury-kpi-grid {
        grid-template-columns: 1fr;
    }

    .leo-dashboard-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-payment-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-chart-card-primary,
    .leo-chart-card-secondary,
    .leo-chart-card-half {
        grid-column: span 1;
    }

    .leo-chart-card .card-body {
        min-height: 8.5rem;
        padding: 0.875rem;
    }
}

@media (max-width: 991.98px) {
    .leo-command-bar,
    .leo-executive-strip,
    .leo-cashbox-command,
    .leo-invoice-ops,
    .leo-crm-ops,
    .leo-leads-ops,
    .leo-pipeline-ops,
    .leo-opportunity-layout,
    .leo-clients-ops,
    .leo-client-profile-layout,
    .leo-invoice-form-layout,
    .leo-contract-form-layout,
    .leo-contract-detail-layout,
    .leo-crm-layout,
    .leo-treasury-account-hero,
    .leo-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .leo-invoice-command,
    .leo-invoice-form-hero,
    .leo-invoice-show-hero,
    .leo-contract-command,
    .leo-contract-form-hero,
    .leo-contract-detail-hero,
    .leo-catalog-command,
    .leo-treasury-command,
    .leo-crm-command,
    .leo-leads-command,
    .leo-pipeline-command,
    .leo-opportunity-hero,
    .leo-clients-command,
    .leo-client-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .leo-invoice-command-actions,
    .leo-invoice-form-actions,
    .leo-invoice-show-actions,
    .leo-contract-actions,
    .leo-contract-form-actions,
    .leo-contract-detail-actions,
    .leo-catalog-actions,
    .leo-treasury-command-actions,
    .leo-crm-actions,
    .leo-leads-actions,
    .leo-pipeline-actions,
    .leo-opportunity-actions,
    .leo-clients-actions,
    .leo-client-profile-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .leo-opportunity-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-clients-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-client-profile-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-invoice-kpi-grid,
    .leo-contract-kpis,
    .leo-contract-detail-kpis,
    .leo-crm-kpi-grid,
    .leo-leads-kpi-grid,
    .leo-pipeline-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-contract-finance-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-invoice-filter,
    .leo-contract-filter,
    .leo-crm-filter,
    .leo-leads-filter,
    .leo-pipeline-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-invoice-filter-actions,
    .leo-contract-filter-actions,
    .leo-crm-filter-actions,
    .leo-leads-filter-actions,
    .leo-pipeline-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .leo-crm-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-crm-chart-card,
    .leo-crm-chart-card.is-wide,
    .leo-crm-chart-card.is-small {
        grid-column: span 1;
    }

    .leo-crm-followups {
        position: static;
    }

    .leo-invoice-summary-panel {
        position: static;
    }

    .leo-invoice-show-layout {
        grid-template-columns: 1fr;
    }

    .leo-invoice-show-side {
        position: static;
    }

    .leo-contract-form-side,
    .leo-contract-detail-side {
        position: static;
    }

    .leo-invoice-show-kpis,
    .leo-invoice-show-facts,
    .leo-catalog-kpi-grid,
    .leo-treasury-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-catalog-filter,
    .leo-treasury-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-catalog-filter-actions,
    .leo-treasury-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .leo-treasury-layout,
    .leo-treasury-ops {
        grid-template-columns: 1fr;
    }

    .leo-invoice-linking-grid,
    .leo-invoice-attachment-grid {
        grid-template-columns: 1fr;
    }

    .leo-invoice-attachment-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .leo-invoice-attachment-head small {
        text-align: left;
    }

    .leo-treasury-side {
        position: static;
    }

    .leo-cashbox-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-cashbox-filter .btn {
        width: 100%;
    }

    .leo-cashbox-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-cashbox-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-cashbox-detail-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "history"
            "info"
            "users";
    }

    .leo-movement-history-card > .card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-movement-history-actions {
        justify-content: flex-start;
    }

    .leo-movement-quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-movement-description,
    .leo-movement-actions {
        grid-column: span 3;
    }

    .leo-treasury-account-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .leo-account-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .leo-form-section {
        grid-template-columns: 1fr;
    }

    .leo-account-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-account-movement-table .leo-col-type {
        display: none;
    }

    .leo-account-movement-table .leo-col-date {
        width: 12%;
    }

    .leo-account-movement-table .leo-col-reference {
        width: 43%;
    }

    .leo-account-movement-table .leo-col-impact {
        width: 20%;
    }

    .leo-account-movement-table .leo-col-status {
        width: 12%;
    }

    .leo-account-movement-table .leo-col-action {
        width: 13%;
    }

    .leo-account-movement-responsive .dataTables_filter input {
        min-width: min(16rem, 48vw);
    }

    .leo-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-filter-grid > div:last-child {
        grid-column: 1 / -1;
    }

    .leo-risk-panel,
    .leo-executive-facts {
        grid-column: 1 / -1;
    }

    .leo-executive-facts {
        display: grid;
        gap: 0.875rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-dashboard-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-treasury-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-treasury-chart-card,
    .leo-treasury-chart-card.is-wide,
    .leo-treasury-chart-card.is-wide + .leo-treasury-chart-card {
        grid-column: span 1;
    }

    .leo-chart-card-primary,
    .leo-chart-card-secondary,
    .leo-chart-card-half {
        grid-column: span 1;
    }

    .leo-dashboard-side {
        position: static;
    }

    .leo-auth-shell {
        grid-template-columns: 1fr;
    }

    .leo-auth-panel {
        min-height: 20rem;
        padding: 1.5rem;
    }

    .leo-auth-copy {
        margin-top: 2.75rem;
    }

    .leo-auth-copy h1 {
        max-width: 18ch;
    }

    .leo-auth-insights {
        margin-top: 2rem;
    }

    .leo-auth-main {
        align-items: flex-start;
        padding: 1.25rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .leo-executive-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .leo-dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .leo-contract-kpis,
    .leo-contract-detail-kpis,
    .leo-contract-filter {
        grid-template-columns: 1fr;
    }

    .leo-contract-ops-strip {
        grid-template-columns: 1fr;
    }

    .leo-contract-ops-strip > div {
        border-bottom: 1px solid #334155;
        border-right: 0;
    }

    .leo-contract-ops-strip > div:last-child { border-bottom: 0; }

    .leo-contract-filter-actions {
        flex-direction: column;
    }

    .leo-filter-grid {
        grid-template-columns: 1fr;
    }

    .leo-filter-grid > div:last-child {
        grid-column: auto;
    }

    .leo-executive-facts {
        grid-template-columns: 1fr;
    }

    .leo-risk-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-risk-meter {
        align-items: flex-start;
        min-height: auto;
        width: 100%;
    }

    .leo-dashboard-chart-grid {
        grid-template-columns: 1fr;
    }

    .leo-payment-summary-grid {
        grid-template-columns: 1fr;
    }

    .leo-account-kpis {
        grid-template-columns: 1fr;
    }

    .leo-invoice-kpi-grid,
    .leo-invoice-filter,
    .leo-invoice-show-kpis,
    .leo-invoice-show-facts,
    .leo-catalog-kpi-grid,
    .leo-catalog-filter,
    .leo-treasury-kpi-grid,
    .leo-treasury-filter,
    .leo-treasury-chart-grid,
    .leo-crm-kpi-grid,
    .leo-crm-filter,
    .leo-leads-kpi-grid,
    .leo-leads-filter,
    .leo-pipeline-kpi-grid,
    .leo-pipeline-filter,
    .leo-opportunity-kpis,
    .leo-clients-kpi-grid,
    .leo-client-profile-kpis,
    .leo-clients-filter,
    .leo-crm-chart-grid {
        grid-template-columns: 1fr;
    }

    .leo-invoice-filter-actions,
    .leo-catalog-filter-actions,
    .leo-treasury-filter-actions,
    .leo-crm-filter-actions,
    .leo-leads-filter-actions,
    .leo-pipeline-filter-actions {
        justify-content: stretch;
    }

    .leo-invoice-filter-actions .btn,
    .leo-invoice-command-actions .btn,
    .leo-invoice-form-actions .btn,
    .leo-invoice-show-actions .btn,
    .leo-invoice-show-actions form,
    .leo-catalog-actions .btn,
    .leo-catalog-filter-actions .btn,
    .leo-treasury-command-actions .btn,
    .leo-treasury-filter-actions .btn,
    .leo-crm-filter-actions .btn,
    .leo-crm-actions .btn,
    .leo-leads-filter-actions .btn,
    .leo-leads-actions .btn,
    .leo-pipeline-filter-actions .btn,
    .leo-pipeline-actions .btn,
    .leo-opportunity-actions .btn,
    .leo-clients-filter-actions .btn,
    .leo-clients-actions .btn,
    .leo-client-profile-actions .btn {
        flex: 1 1 auto;
    }

    .leo-invoice-show-actions form .btn {
        width: 100%;
    }

    .leo-cashbox-filter,
    .leo-cashbox-summary,
    .leo-cashbox-grid {
        grid-template-columns: 1fr;
    }

    .leo-movement-quick-grid {
        grid-template-columns: 1fr;
    }

    .leo-movement-description,
    .leo-movement-actions {
        grid-column: auto;
    }

    .leo-movement-actions .btn-list {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .leo-movement-actions .btn {
        flex: 1 1 auto;
    }

    .leo-movement-launch {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-movement-launch .btn {
        width: 100%;
    }

    .leo-account-movement-responsive .dataTables_wrapper {
        padding: 0.75rem;
    }

    .leo-account-movement-responsive .dataTables_wrapper .row:first-child > div,
    .leo-account-movement-responsive .dataTables_wrapper .row:last-child > div {
        text-align: left !important;
    }

    .leo-account-movement-responsive .dataTables_filter label,
    .leo-account-movement-responsive .dataTables_length label {
        display: grid;
        gap: 0.375rem;
        width: 100%;
    }

    .leo-account-movement-responsive .dataTables_filter input {
        margin-left: 0;
        min-width: 0;
        width: 100%;
    }

    .leo-account-movement-responsive .dataTables_length select {
        width: 100%;
    }

    .leo-account-movement-table .leo-col-status {
        display: none;
    }

    .leo-account-movement-table .leo-col-date {
        width: 16%;
    }

    .leo-account-movement-table .leo-col-reference {
        width: 47%;
    }

    .leo-account-movement-table .leo-col-impact {
        width: 20%;
    }

    .leo-account-movement-table .leo-col-action {
        width: 17%;
    }

    .leo-account-movement-table .leo-col-action .btn {
        min-width: 5.4rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .leo-account-impact {
        white-space: normal;
    }

    .leo-chart-card-primary,
    .leo-chart-card-secondary,
    .leo-chart-card-half {
        grid-column: 1 / -1;
    }

    .leo-auth-panel {
        min-height: auto;
    }

    .leo-auth-copy h1 {
        font-size: 1.75rem;
    }

    .leo-auth-copy p:last-child {
        font-size: 0.9375rem;
    }

    .leo-auth-insights {
        grid-template-columns: 1fr;
    }

    .leo-login-card {
        border-radius: var(--leo-radius);
    }

    .leo-statement-toolbar,
    .leo-statement-head {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-statement-filter {
        grid-template-columns: 1fr;
    }

    .leo-statement-actions {
        flex-wrap: wrap;
    }

    .leo-statement-actions .btn {
        flex: 1 1 auto;
    }

    .leo-statement-document {
        padding: 1rem;
    }

    .leo-statement-company img {
        max-width: 300px;
    }

    .leo-statement-meta {
        min-width: 0;
        text-align: left;
    }

    .leo-statement-summary {
        justify-content: stretch;
    }

    .leo-statement-summary table {
        min-width: 0;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .report-print-area,
    .report-print-area * {
        visibility: visible;
    }

    .report-print-area {
        inset: 0;
        position: absolute;
    }

    .leo-statement-toolbar {
        display: none;
    }

    .leo-statement-document {
        border: 0;
        box-shadow: none;
        max-width: none;
        padding: 0.25in;
    }
}
/* Client statement */
.leo-statement-toolbar {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.leo-statement-filter {
    align-items: end;
    background: var(--leo-panel);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    display: grid;
    flex: 1 1 auto;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
    padding: 1rem;
}

.leo-statement-filter .is-wide {
    min-width: 220px;
}

.leo-statement-actions {
    align-items: center;
    align-self: stretch;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-statement-document {
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
    color: #111827;
    margin: 0 auto;
    max-width: 1120px;
    padding: 1.75rem;
}

.leo-statement-head {
    align-items: flex-start;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
}

.leo-statement-company {
    max-width: 560px;
}

.leo-statement-company img {
    display: block;
    height: auto;
    margin-bottom: 0.75rem;
    max-width: 360px;
    width: 100%;
}

.leo-statement-company-copy {
    color: #111827;
    display: grid;
    font-size: 0.78rem;
    gap: 0.12rem;
    line-height: 1.35;
}

.leo-statement-company-copy strong {
    font-size: 0.95rem;
}

.leo-statement-meta {
    min-width: 300px;
    text-align: right;
    width: min(100%, 380px);
}

.leo-statement-meta h2 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 0.45rem;
}

.leo-statement-meta table,
.leo-statement-summary table {
    border-collapse: collapse;
    margin-left: auto;
    width: 100%;
}

.leo-statement-meta th,
.leo-statement-meta td,
.leo-statement-summary th,
.leo-statement-summary td {
    border: 1px solid #c9c9c9;
    padding: 0.45rem 0.65rem;
}

.leo-statement-meta th,
.leo-statement-summary th {
    background: #dedede;
    font-weight: 800;
    text-align: right;
}

.leo-statement-meta td,
.leo-statement-summary td {
    background: #f8f8f8;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: normal;
}

.leo-statement-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 1.75rem 0 0.55rem;
}

.leo-statement-table {
    border-collapse: collapse;
    font-size: 0.82rem;
    table-layout: fixed;
    width: 100%;
}

.leo-statement-table col.is-date {
    width: 9%;
}

.leo-statement-table col.is-type {
    width: 9%;
}

.leo-statement-table col.is-document {
    width: 18%;
}

.leo-statement-table col.is-reference {
    width: 22%;
}

.leo-statement-table col.is-money {
    width: 14%;
}

.leo-statement-table th,
.leo-statement-table td {
    border: 1px solid #c9c9c9;
    padding: 0.42rem 0.55rem;
    overflow-wrap: anywhere;
    vertical-align: top;
    white-space: normal;
    word-break: normal;
}

.leo-statement-table th {
    background: #dedede;
    font-weight: 800;
}

.leo-statement-table tbody tr:nth-child(even) td {
    background: #f5f5f5;
}

.leo-statement-table .is-nowrap,
.leo-statement-table .is-money {
    overflow-wrap: normal;
    white-space: nowrap;
}

.leo-statement-summary {
    display: grid;
    gap: 0.85rem;
    justify-content: end;
    margin-top: 1.45rem;
}

.leo-statement-summary table {
    min-width: 420px;
}

.leo-statement-summary .is-total th,
.leo-statement-summary .is-total td {
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .leo-statement-toolbar,
    .leo-statement-head {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-statement-filter {
        grid-template-columns: 1fr;
    }

    .leo-statement-actions {
        flex-wrap: wrap;
    }

    .leo-statement-actions .btn {
        flex: 1 1 auto;
    }

    .leo-statement-document {
        padding: 1rem;
    }

    .leo-statement-company img {
        max-width: 300px;
    }

    .leo-statement-meta {
        min-width: 0;
        text-align: left;
    }

    .leo-statement-summary {
        justify-content: stretch;
    }

    .leo-statement-summary table {
        min-width: 0;
    }
}

@media print {
    .leo-statement-toolbar {
        display: none;
    }

    .leo-statement-document {
        border: 0;
        box-shadow: none;
        max-width: none;
        padding: 0.25in;
    }
}

/* Treasury movement detail */
.leo-treasury-movement-hero {
    align-items: center;
    background: linear-gradient(135deg, #111827 0%, #25324a 100%);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-md);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    min-height: 150px;
    overflow: hidden;
    padding: 1.35rem;
}

.leo-treasury-movement-hero.is-entry {
    background: linear-gradient(135deg, #064e3b 0%, #0f766e 100%);
}

.leo-treasury-movement-hero.is-exit {
    background: linear-gradient(135deg, #7f1d1d 0%, #b45309 100%);
}

.leo-treasury-movement-hero h2 {
    color: #ffffff;
    font-size: 1.8rem;
    letter-spacing: 0;
    margin: 0.15rem 0;
}

.leo-treasury-movement-hero p {
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

.leo-treasury-movement-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-treasury-movement-actions form {
    margin: 0;
}

.leo-treasury-movement-kpis {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-treasury-movement-kpi {
    background: var(--leo-panel);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    padding: 1rem;
}

.leo-treasury-movement-kpi span,
.leo-treasury-movement-kpi small,
.leo-treasury-flow-node span,
.leo-treasury-flow-node small,
.leo-treasury-movement-note span,
.leo-detail-grid span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.78rem;
}

.leo-treasury-movement-kpi strong {
    color: var(--leo-text);
    display: block;
    font-size: 1.15rem;
    line-height: 1.25;
    margin: 0.2rem 0;
}

.leo-treasury-movement-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 330px;
}

.leo-treasury-movement-main,
.leo-treasury-movement-side {
    display: grid;
    gap: 1rem;
}

.leo-treasury-movement-card {
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
}

.leo-treasury-flow {
    align-items: stretch;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr);
}

.leo-treasury-flow-node {
    background: var(--leo-panel-tint);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    padding: 1rem;
}

.leo-treasury-flow-node strong {
    display: block;
    font-size: 1rem;
    margin: 0.2rem 0;
}

.leo-treasury-flow-arrow {
    align-items: center;
    color: var(--leo-primary);
    display: flex;
    font-weight: 800;
    justify-content: center;
    position: relative;
    text-align: center;
}

.leo-treasury-flow-arrow::before {
    background: var(--leo-primary);
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    right: 0;
    top: 50%;
}

.leo-treasury-flow-arrow span {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    position: relative;
}

.leo-treasury-movement-note {
    border-top: 1px solid var(--leo-border);
    margin-top: 1rem;
    padding-top: 1rem;
}

.leo-treasury-movement-note p {
    margin: 0.2rem 0 0;
}

.leo-detail-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.leo-detail-grid div {
    background: var(--leo-panel-tint);
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    padding: 0.85rem;
}

.leo-detail-grid strong {
    display: block;
    margin-top: 0.2rem;
}

.leo-audit-list {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 1fr;
    margin: 0;
}

.leo-audit-list dt {
    color: var(--leo-muted);
    font-size: 0.78rem;
}

.leo-audit-list dd {
    border-bottom: 1px solid var(--leo-border);
    margin: -0.45rem 0 0;
    padding-bottom: 0.65rem;
}

.leo-contract-command,
.leo-contract-form-hero,
.leo-contract-detail-hero {
    align-items: center;
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.125rem;
}

.leo-contract-command h2,
.leo-contract-form-hero h2,
.leo-contract-detail-hero h2 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
}

.leo-contract-command p,
.leo-contract-form-hero p,
.leo-contract-detail-hero p {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
    margin: 0.35rem 0 0;
}

.leo-contract-actions,
.leo-contract-form-actions,
.leo-contract-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-contract-kpis,
.leo-contract-detail-kpis {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-contract-finance-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leo-contract-kpi,
.leo-contract-detail-kpi {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
    min-height: 7.25rem;
    padding: 0.95rem;
}

button.leo-contract-kpi {
    appearance: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    width: 100%;
}

button.leo-contract-kpi:hover,
button.leo-contract-kpi:focus-visible {
    border-color: #93b4f7;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
    outline: none;
    transform: translateY(-1px);
}

.leo-contract-kpi.is-primary,
.leo-contract-detail-kpi.is-status {
    border-color: #bfdbfe;
}

.leo-contract-kpi.is-warning,
.leo-contract-detail-kpi.is-warning {
    background: #fffbeb;
    border-color: #fed7aa;
}

.leo-contract-kpi.is-danger {
    background: #fff7f6;
    border-color: #fecdca;
}

.leo-contract-kpi.is-danger strong {
    color: var(--leo-danger);
}

.leo-contract-kpi.is-ok {
    border-color: #bbf7d0;
}

.leo-contract-kpi span,
.leo-contract-detail-kpi span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.leo-contract-kpi strong,
.leo-contract-detail-kpi strong {
    color: #111827;
    display: block;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.leo-contract-kpi small,
.leo-contract-detail-kpi small {
    color: var(--leo-muted);
    display: block;
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.leo-contract-kpi > strong + strong {
    border-top: 1px solid var(--leo-border);
    margin-top: 0.35rem;
    padding-top: 0.35rem;
}

.leo-contract-ops-strip {
    background: #111827;
    border: 1px solid #253044;
    border-radius: var(--leo-radius);
    color: #fff;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
}

.leo-contract-ops-strip > div {
    border-right: 1px solid #334155;
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 1rem;
}

.leo-contract-ops-strip > div:last-child { border-right: 0; }
.leo-contract-ops-strip span { color: #94a3b8; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.leo-contract-ops-strip strong { color: #fff; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.leo-contract-ops-strip small { color: #cbd5e1; font-size: 0.7rem; }
.leo-contract-ops-strip .is-warning strong { color: #fdba74; }
.leo-contract-ops-strip .is-ok strong { color: #86efac; }
.leo-contract-coverage strong small { color: #94a3b8; display: inline; font-size: 0.62rem; margin-left: 0.15rem; }

.leo-contract-panel,
.leo-contract-section,
.leo-contract-side-card,
.leo-contract-info-panel {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    box-shadow: var(--leo-shadow-sm);
}

.leo-contract-filter {
    align-items: end;
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    padding: 1rem;
}

.leo-contract-filter-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.leo-contract-list-card .card-header {
    background: #ffffff;
}

.leo-contract-table {
    min-width: 1480px;
}

.leo-contract-table th {
    color: var(--leo-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.leo-contract-progress {
    align-items: center;
    display: grid;
    gap: 0.4rem;
    grid-template-columns: minmax(4.5rem, 1fr) auto;
    min-width: 8rem;
}

.leo-contract-progress > div {
    background: #e5e7eb;
    border-radius: 999px;
    height: 0.4rem;
    overflow: hidden;
}

.leo-contract-progress > div > span {
    background: linear-gradient(90deg, #2563eb, #16a34a);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.leo-contract-progress.is-over > div > span { background: var(--leo-danger); }
.leo-contract-progress.is-over strong { color: var(--leo-danger); }

.leo-contract-progress strong {
    color: #334155;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.leo-contract-modal-summary {
    background: #f8fafc;
    border-bottom: 1px solid var(--leo-border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.leo-contract-modal-summary > div {
    border-right: 1px solid var(--leo-border);
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem 1rem;
}

.leo-contract-modal-summary span { color: #667085; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; }
.leo-contract-modal-summary strong { color: #101828; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.leo-contract-modal-summary small { color: #667085; font-size: 0.7rem; }
.leo-contract-modal-summary .is-ok { border-top: 3px solid #22c55e; }
.leo-contract-modal-summary .is-warning { border-top: 3px solid #f59e0b; }

.leo-reminder-decision {
    display: grid;
    gap: 0.55rem;
}

.leo-reminder-decision-option {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--leo-border);
    border-radius: 0.65rem;
    cursor: pointer;
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem;
}

.leo-reminder-decision-option.is-active {
    background: #eff6ff;
    border-color: #93b4f7;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.07);
}

.leo-reminder-decision-option input { margin-top: 0.2rem; }
.leo-reminder-decision-option span { display: grid; gap: 0.12rem; }
.leo-reminder-decision-option strong { color: #101828; font-size: 0.82rem; }
.leo-reminder-decision-option small { color: #667085; font-size: 0.72rem; }
.leo-reminder-decision-option:has(input:disabled) { cursor: not-allowed; opacity: 0.55; }

.leo-external-invoice-fields {
    background: #f8fafc;
    border: 1px solid var(--leo-border);
    border-radius: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
}

.leo-contract-form-layout,
.leo-contract-detail-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 20rem;
}

.leo-contract-form-main,
.leo-contract-detail-main {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.leo-contract-form-side,
.leo-contract-detail-side {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 5rem;
}

.leo-contract-section {
    padding: 1rem;
}

.leo-contract-section-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--leo-border);
    display: flex;
    gap: 0.75rem;
    margin: -0.15rem 0 1rem;
    padding-bottom: 0.85rem;
}

.leo-contract-section-head > span {
    align-items: center;
    background: var(--leo-primary-soft);
    border-radius: var(--leo-radius-sm);
    color: var(--leo-primary);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 850;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.leo-contract-section-head h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
}

.leo-contract-section-head p {
    color: var(--leo-muted);
    font-size: 0.825rem;
    margin: 0.2rem 0 0;
}

.leo-contract-side-card {
    padding: 1rem;
}

.leo-contract-side-card strong {
    color: #111827;
    display: block;
    font-size: 1.35rem;
    font-weight: 850;
    line-height: 1.2;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.leo-contract-side-card small,
.leo-contract-side-card p {
    color: var(--leo-muted);
    display: block;
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

.leo-contract-side-card.is-actions {
    display: grid;
    gap: 0.5rem;
}

.leo-contract-reference {
    background: #f8fafc;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    color: #111827;
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 0.85rem;
    overflow-wrap: anywhere;
    padding: 0.65rem 0.75rem;
}

.leo-contract-info-panel {
    padding: 1rem;
}

.leo-contract-info-head {
    align-items: center;
    border-bottom: 1px solid var(--leo-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
}

.leo-contract-info-head h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
}

.leo-contract-info-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.leo-contract-info-list dt {
    color: var(--leo-muted);
    font-size: 0.75rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.leo-contract-info-list dd {
    border-bottom: 1px solid #eef2f7;
    color: #111827;
    font-weight: 650;
    margin: -0.45rem 0 0;
    padding-bottom: 0.6rem;
}

.leo-billing-planner {
    background: #f8fafc;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius);
    padding: 1rem;
}

.leo-billing-planner-head {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.leo-billing-planner-head h3 {
    font-size: 1rem;
    margin: 0;
}

.leo-section-kicker {
    color: var(--leo-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leo-billing-total {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    min-width: 13rem;
    padding: 0.7rem 0.85rem;
    text-align: right;
}

.leo-billing-total span {
    color: var(--leo-muted);
    display: block;
    font-size: 0.75rem;
}

.leo-billing-total strong {
    color: #0f172a;
    display: block;
    font-size: 1.05rem;
}

.leo-billing-installments {
    background: #ffffff;
    border: 1px solid var(--leo-border);
    border-radius: var(--leo-radius-sm);
    margin-bottom: 0;
    overflow: hidden;
}

.leo-billing-installments th {
    color: var(--leo-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.leo-billing-mode-summary {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: var(--leo-radius-sm);
    color: #1e3a8a;
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
}

.leo-billing-mode-summary strong {
    color: #0f172a;
}

.leo-billing-mode-summary span {
    color: #475569;
    font-size: 0.85rem;
}

.leo-billing-mode-panel {
    animation: leoBillingPanelIn 0.18s ease-out;
}

.leo-billing-mode-panel.is-active .leo-billing-installments,
.leo-billing-mode-panel.is-active .leo-billing-preview {
    box-shadow: var(--leo-shadow-sm);
}

.leo-billing-preview {
    align-items: center;
    background: #ffffff;
    border: 1px dashed var(--leo-border);
    border-radius: var(--leo-radius-sm);
    color: var(--leo-muted);
    display: flex;
    min-height: 2.75rem;
    padding: 0 0.85rem;
}

@keyframes leoBillingPanelIn {
    from {
        opacity: 0;
        transform: translateY(-0.25rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leo-swal-confirm {
    border-radius: 0.65rem;
}

.leo-swal-summary {
    display: grid;
    gap: 0;
    margin: 1rem 0 0;
    text-align: left;
}

.leo-swal-summary div {
    display: grid;
    grid-template-columns: minmax(7rem, 34%) minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.62rem 0;
    border-bottom: 1px solid #eef2f7;
}

.leo-swal-summary div:first-child {
    border-top: 1px solid #eef2f7;
}

.leo-swal-summary dt {
    margin: 0;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.leo-swal-summary dd {
    margin: 0;
    color: #111827;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.leo-swal-summary-note {
    margin: 0.9rem 0 0;
    padding: 0.72rem 0.85rem;
    border: 1px solid #dbeafe;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.88rem;
    text-align: left;
}

.leo-supplier-historical-payment {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: var(--leo-radius-sm);
    display: flex;
    gap: 0.65rem;
    margin: 0;
    padding: 0.75rem 0.85rem;
}

.leo-supplier-historical-payment .form-check-input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.leo-supplier-historical-payment .form-check-label {
    color: #111827;
    font-weight: 800;
}

.leo-supplier-historical-payment small {
    color: #667085;
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.18rem;
}

.leo-payment-error {
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 9px;
    color: #7f1d1d;
    margin-bottom: 1rem;
    overflow: hidden;
}
.leo-payment-error-head { display: flex; gap: .7rem; padding: .8rem .85rem; }
.leo-payment-error-head > span {
    align-items: center;
    background: #fee2e2;
    border-radius: 8px;
    color: #dc2626;
    display: flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
}
.leo-payment-error-head svg { height: 19px; width: 19px; }
.leo-payment-error-head > div { min-width: 0; }
.leo-payment-error-head strong { display: block; font-size: .86rem; }
.leo-payment-error-head p { color: #991b1b; font-size: .76rem; margin: .18rem 0 0; }
.leo-payment-error-context {
    border-top: 1px solid #fecaca;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.leo-payment-error-context > div { display: flex; flex-direction: column; padding: .55rem .75rem; }
.leo-payment-error-context > div + div { border-left: 1px solid #fecaca; }
.leo-payment-error-context span { color: #b45353; font-size: .64rem; font-weight: 700; text-transform: uppercase; }
.leo-payment-error-context strong { color: #7f1d1d; font-size: .75rem; margin-top: .12rem; }
.leo-payment-error-help {
    align-items: flex-start;
    background: #fffbeb;
    border-top: 1px solid #fde68a;
    color: #854d0e;
    display: flex;
    font-size: .72rem;
    gap: .5rem;
    padding: .6rem .75rem;
}
.leo-payment-error-help svg { flex: 0 0 auto; height: 16px; width: 16px; }
.leo-payment-error-help span { display: flex; flex-direction: column; }
.leo-payment-error-help strong { font-size: .68rem; margin-bottom: .1rem; }

@media (max-width: 575.98px) {
    .leo-payment-error-context { grid-template-columns: 1fr; }
    .leo-payment-error-context > div + div { border-left: 0; border-top: 1px solid #fecaca; }
}

@media (max-width: 992px) {
    .leo-cost-command {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-cost-command-actions {
        justify-content: flex-start;
    }

    .leo-cost-executive,
    .leo-cost-kpi-grid,
    .leo-cost-filter,
    .leo-cost-modal-summary {
        grid-template-columns: 1fr;
    }

    .leo-cost-risk-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-cost-risk:nth-child(2) {
        border-right: 0;
    }

    .leo-treasury-movement-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-treasury-movement-actions {
        justify-content: flex-start;
    }

    .leo-treasury-movement-kpis,
    .leo-treasury-movement-layout,
    .leo-treasury-flow,
    .leo-detail-grid {
        grid-template-columns: 1fr;
    }

    .leo-billing-planner-head {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-billing-total {
        min-width: 0;
        text-align: left;
    }

    .leo-historical-summary {
        grid-template-columns: 1fr;
    }

    .leo-historical-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .leo-historical-footer .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .leo-swal-summary div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

.leo-collection-workspace {
    margin-top: -0.25rem;
}

.leo-collection-kpi-strip {
    align-items: stretch;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(106px, 0.55fr)) auto;
}

.leo-collection-kpi {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    min-height: 4.25rem;
    padding: 0.72rem 0.85rem;
}

.leo-collection-kpi span {
    color: #667085;
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.leo-collection-kpi strong {
    color: #111827;
    display: block;
    font-size: 1.25rem;
    line-height: 1.1;
    margin-top: 0.3rem;
    white-space: nowrap;
}

.leo-collection-kpi-main {
    background: #111827;
    border-color: #111827;
}

.leo-collection-kpi-main span {
    color: rgba(255, 255, 255, 0.7);
}

.leo-collection-kpi-main strong {
    color: #ffffff;
    font-size: 1.35rem;
}

.leo-collection-kpi-main small {
    color: rgba(255, 255, 255, 0.72);
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 0.18rem;
}

.leo-collection-kpi-danger {
    border-bottom: 3px solid #dc2626;
}

.leo-collection-kpi-warning {
    border-bottom: 3px solid #d97706;
}

.leo-collection-actions {
    align-items: center;
    align-self: stretch;
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    min-height: 4.25rem;
}

.leo-collection-actions .btn {
    font-weight: 800;
    height: 100%;
    min-height: 2.6rem;
    white-space: nowrap;
}

.leo-collection-filter {
    align-items: end;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(6, minmax(135px, 1fr)) auto;
    padding: 0.78rem;
}

.leo-collection-filter .form-label {
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.leo-collection-filter .form-select,
.leo-collection-filter .btn {
    min-height: 2.45rem;
}

.leo-collection-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.leo-collection-card {
    border-color: #dbe3ef;
    border-radius: 8px;
    overflow: hidden;
}

.leo-collection-table {
    min-width: 1460px;
}

.leo-collection-table th {
    background: #f8fafc;
    color: #475467;
    font-size: 0.76rem;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.leo-collection-table td {
    vertical-align: top;
}

.leo-collection-invoice-cell {
    max-width: 210px;
}

.leo-collection-invoice-cell a,
.leo-collection-invoice-cell span,
.leo-collection-invoice-cell small,
.leo-collection-feedback span,
.leo-collection-feedback small {
    overflow-wrap: anywhere;
    word-break: normal;
}

.leo-collection-invoice-cell a {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
}

.leo-collection-invoice-cell span,
.leo-collection-invoice-cell small {
    color: #667085;
    display: block;
    font-weight: 600;
    margin-top: 0.18rem;
}

.leo-collection-balance {
    color: #b42318;
    font-weight: 800;
    white-space: nowrap;
}

.leo-collection-control-cell {
    min-width: 145px;
}

.leo-collection-control-cell small {
    color: #667085;
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0.18rem;
}

.leo-collection-control {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.42rem 0.55rem;
    white-space: nowrap;
}

.leo-collection-control-danger {
    background: #fee2e2;
    color: #991b1b;
}

.leo-collection-control-warning {
    background: #fef3c7;
    color: #92400e;
}

.leo-collection-control-success {
    background: #dcfce7;
    color: #166534;
}

.leo-collection-control-neutral {
    background: #e0f2fe;
    color: #075985;
}

.leo-collection-feedback {
    max-width: 320px;
    min-width: 260px;
}

.leo-collection-feedback strong,
.leo-collection-feedback span,
.leo-collection-feedback small {
    display: block;
}

.leo-collection-feedback strong {
    color: #111827;
    font-size: 0.82rem;
}

.leo-collection-feedback span {
    color: #344054;
    font-weight: 600;
    line-height: 1.32;
    margin-top: 0.15rem;
}

.leo-collection-feedback small {
    color: #667085;
    margin-top: 0.2rem;
}

.leo-collection-history {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.45rem;
    padding-top: 0.35rem;
}

.leo-collection-history summary {
    color: #2563eb;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
    list-style-position: inside;
}

.leo-collection-history article {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 0.4rem;
    padding: 0.45rem 0.55rem;
}

.leo-collection-history article strong,
.leo-collection-history article span,
.leo-collection-history article small {
    display: block;
}

.leo-collection-history article strong {
    color: #111827;
    font-size: 0.78rem;
}

.leo-collection-history article span {
    color: #344054;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
}

.leo-collection-history article small {
    color: #667085;
    font-size: 0.74rem;
    margin-top: 0.15rem;
}

.leo-collection-modal-summary {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0.95rem;
}

.leo-collection-modal-summary span {
    color: #667085;
    font-weight: 700;
}

.leo-collection-modal-summary strong {
    color: #b42318;
    font-size: 1.08rem;
}

@media (max-width: 1200px) {
    .leo-collection-kpi-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leo-collection-actions {
        align-items: stretch;
        justify-content: flex-start;
        min-height: 3.5rem;
    }

    .leo-collection-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .leo-collection-kpi-strip,
    .leo-collection-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .leo-collection-kpi-strip,
    .leo-collection-filter {
        grid-template-columns: 1fr;
    }

    .leo-collection-filter-actions {
        flex-direction: column;
    }
}

.leo-vat-workspace {
    margin-top: -0.25rem;
}

.leo-vat-hero {
    align-items: center;
    background: linear-gradient(135deg, #102f59 0%, #174d8f 62%, #2563a9 100%);
    border-radius: 12px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    padding: 1.25rem 1.4rem;
    position: relative;
}
.leo-vat-hero::after {
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
    content: "";
    height: 14rem;
    position: absolute;
    right: 14%;
    top: -9rem;
    width: 14rem;
}
.leo-vat-hero .leo-section-kicker,
.leo-vat-hero p { color: rgba(255,255,255,.76); }
.leo-vat-hero h2 { font-size: 1.55rem; margin: .15rem 0 .25rem; }
.leo-vat-hero p { margin: 0; }
.leo-vat-hero-meta {
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-width: 150px;
    padding: .7rem .9rem;
    position: relative;
    z-index: 1;
}
.leo-vat-hero-meta span,
.leo-vat-hero-meta small { color: rgba(255,255,255,.72); font-size: .7rem; }
.leo-vat-hero-meta span { font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.leo-vat-hero-meta strong { font-size: 1.35rem; }

.leo-vat-toolbar,
.leo-vat-filter,
.leo-vat-generate {
    align-items: end;
    display: flex;
    gap: 0.65rem;
}

.leo-vat-toolbar {
    justify-content: space-between;
}

.leo-vat-filter {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
    padding: 0.75rem;
}

.leo-vat-filter .form-label {
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.leo-vat-period-strip {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(300px, 1.5fr) minmax(210px, .75fr) minmax(200px, .7fr);
}

.leo-vat-period-main,
.leo-vat-pill,
.leo-vat-status {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 0.85rem 0.95rem;
}

.leo-vat-period-main {
    background: #102f59;
    border-color: #102f59;
    color: #ffffff;
}

.leo-vat-period-main span,
.leo-vat-pill span,
.leo-vat-status span,
.leo-vat-kpi span {
    color: #667085;
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.leo-vat-period-main span,
.leo-vat-period-main small {
    color: rgba(255, 255, 255, 0.72);
}

.leo-vat-period-main strong,
.leo-vat-pill strong,
.leo-vat-kpi strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.1;
    margin-top: 0.28rem;
}

.leo-vat-period-main small,
.leo-vat-pill small {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.22rem;
}

.leo-vat-pill-success {
    border-bottom: 3px solid #16a34a;
}

.leo-vat-pill-warning {
    border-bottom: 3px solid #d97706;
}

.leo-vat-pill-danger {
    border-bottom: 3px solid #dc2626;
}

.leo-vat-pill-neutral {
    border-bottom: 3px solid #64748b;
}

.leo-vat-actions {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
    display: grid;
    gap: .65rem;
    grid-column: 1 / -1;
    grid-template-columns: minmax(180px, 1fr) 230px 230px;
    padding: .65rem;
}

.leo-vat-export-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 0 .5rem;
}
.leo-vat-export-label span {
    color: #334155;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.leo-vat-export-label small { color: #64748b; font-size: .72rem; margin-top: .15rem; }
.leo-vat-export-option {
    align-items: center;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    color: #0f172a;
    display: inline-flex;
    flex: 1;
    gap: .5rem;
    min-height: 54px;
    min-width: 0;
    padding: .6rem .7rem;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.leo-vat-export-option:hover {
    color: #0f172a;
    transform: translateY(-1px);
}
.leo-vat-export-option.is-pdf { background: #fff7f7; border-color: #fecaca; }
.leo-vat-export-option.is-pdf:hover { border-color: #ef4444; box-shadow: 0 5px 14px rgba(220, 38, 38, .1); }
.leo-vat-export-option.is-excel { background: #f1fcf5; border-color: #bbf7d0; }
.leo-vat-export-option.is-excel:hover { border-color: #22c55e; box-shadow: 0 5px 14px rgba(22, 163, 74, .1); }
.leo-vat-export-icon {
    align-items: center;
    border-radius: 7px;
    display: flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
}
.leo-vat-export-option.is-pdf .leo-vat-export-icon { background: #fee2e2; color: #dc2626; }
.leo-vat-export-option.is-excel .leo-vat-export-icon { background: #dcfce7; color: #15803d; }
.leo-vat-export-icon .leo-icon { height: 19px; width: 19px; }
.leo-vat-export-copy { display: flex; flex: 1; flex-direction: column; line-height: 1.15; }
.leo-vat-export-copy strong { font-size: .8rem; }
.leo-vat-export-copy small { color: #64748b; font-size: .68rem; margin-top: .18rem; white-space: nowrap; }
.leo-vat-export-arrow { color: #94a3b8; flex: 0 0 auto; height: 14px; width: 14px; }
.leo-vat-export-option:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.leo-vat-kpis {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-vat-kpi {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-left: 4px solid #94a3b8;
    border-radius: 9px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .045);
    padding: 0.9rem 1rem;
}
.leo-vat-kpi.is-collected { border-left-color: #2563eb; }
.leo-vat-kpi.is-deductible { border-left-color: #16a34a; }
.leo-vat-kpi.is-clean { border-left-color: #16a34a; }
.leo-vat-kpi.is-anomaly { background: #fff7ed; border-left-color: #ea580c; }

.leo-vat-kpi small {
    color: #667085;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.leo-vat-kpi-net {
    background: #eff6ff;
    border-left-color: #1d4ed8;
}
.leo-vat-kpi-net.is-credit { background: #ecfdf5; border-left-color: #059669; }

.leo-vat-workflow {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
    padding: .85rem 1rem 1rem;
}
.leo-vat-workflow-head { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: .8rem; }
.leo-vat-workflow-head > div { display: flex; flex-direction: column; }
.leo-vat-workflow-head strong { color: #0f172a; font-size: .9rem; }
.leo-vat-workflow-head > small { color: #64748b; }
.leo-vat-workflow-track { display: grid; grid-template-columns: repeat(6, 1fr); }
.leo-vat-workflow-track > div { align-items: center; display: flex; flex-direction: column; gap: .35rem; position: relative; }
.leo-vat-workflow-track > div::before {
    background: #dce4ef;
    content: "";
    height: 2px;
    left: -50%;
    position: absolute;
    right: 50%;
    top: 15px;
}
.leo-vat-workflow-track > div:first-child::before { display: none; }
.leo-vat-workflow-track > div.is-complete::before,
.leo-vat-workflow-track > div.is-current::before { background: #2563eb; }
.leo-vat-workflow-track > div > span {
    align-items: center;
    background: #eef2f7;
    border: 2px solid #dce4ef;
    border-radius: 50%;
    color: #64748b;
    display: flex;
    font-size: .7rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    position: relative;
    width: 30px;
    z-index: 1;
}
.leo-vat-workflow-track > div.is-complete > span { background: #2563eb; border-color: #2563eb; color: #fff; }
.leo-vat-workflow-track > div.is-current > span { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; box-shadow: 0 0 0 4px #dbeafe; }
.leo-vat-workflow-track .leo-icon { height: 14px; width: 14px; }
.leo-vat-workflow-track small { color: #64748b; font-size: .68rem; font-weight: 700; text-align: center; }
.leo-vat-workflow-track .is-current small { color: #1d4ed8; }

.leo-vat-card {
    border-color: #dbe3ef;
    border-radius: 10px;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .045);
    overflow: hidden;
}

.leo-vat-card .card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.leo-vat-anomalies {
    display: grid;
    gap: 0.55rem;
}

.leo-vat-anomalies div {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #9a3412;
    display: flex;
    font-weight: 700;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
}

.leo-vat-control-success {
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 9px;
    display: flex;
    gap: .75rem;
    padding: .8rem;
}
.leo-vat-control-success > span { align-items: center; background: #16a34a; border-radius: 9px; color: #fff; display: flex; height: 38px; justify-content: center; width: 38px; }
.leo-vat-control-success .leo-icon { height: 20px; width: 20px; }
.leo-vat-control-success > div { display: flex; flex-direction: column; }
.leo-vat-control-success strong { color: #166534; }
.leo-vat-control-success small { color: #4b7b5a; }

.leo-vat-table {
    margin-bottom: 0;
    min-width: 960px;
}

.leo-vat-table th {
    background: #f8fafc;
    color: #475467;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.leo-vat-tax {
    color: #0f766e;
    font-weight: 800;
}
.leo-vat-reference strong { color: #174d8f; }
.leo-vat-table tbody tr { transition: background-color .15s ease; }
.leo-vat-table tbody tr:hover td { background: #f8fbff; }

@media (max-width: 1200px) {
    .leo-vat-period-strip,
    .leo-vat-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leo-vat-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .leo-vat-actions { grid-column: 1 / -1; grid-template-columns: 1fr 210px 210px; }
}

@media (max-width: 768px) {
    .leo-vat-hero { align-items: stretch; flex-direction: column; gap: 1rem; }
    .leo-vat-filter,
    .leo-vat-generate {
        align-items: stretch;
        flex-direction: column;
    }
    .leo-vat-actions { align-items: stretch; display: grid; grid-template-columns: 1fr; }
    .leo-vat-export-label { padding: .25rem; }
    .leo-vat-export-option { width: 100%; }

    .leo-vat-period-strip,
    .leo-vat-kpis {
        grid-template-columns: 1fr;
    }
    .leo-vat-workflow { overflow-x: auto; }
    .leo-vat-workflow-track { min-width: 620px; }
}

/* Balance agee */
.leo-aged-hero {
    align-items: center;
    background: linear-gradient(135deg, #0f2f66 0%, #1d4ed8 62%, #2563eb 100%);
    border-radius: 12px;
    color: #fff;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    overflow: hidden;
    padding: 1.25rem 1.4rem;
    position: relative;
}

.leo-aged-hero::after {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    content: "";
    height: 13rem;
    position: absolute;
    right: 12%;
    top: -8rem;
    width: 13rem;
}

.leo-aged-hero .leo-section-kicker,
.leo-aged-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.leo-aged-hero h2 {
    font-size: 1.5rem;
    margin: 0.2rem 0;
}

.leo-aged-hero p {
    margin: 0;
}

.leo-aged-switch {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9px;
    display: flex;
    gap: 0.35rem;
    padding: 0.3rem;
    position: relative;
    z-index: 1;
}

.leo-aged-switch .btn:not(.btn-primary) {
    border-color: transparent;
    color: #fff;
}

.leo-aged-filters {
    border-color: #d7e0ed;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.leo-aged-filter-header {
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
}

.leo-aged-filter-actions {
    align-items: center;
    border-top: 1px solid #edf1f7;
    display: flex;
    justify-content: space-between;
    margin-top: .25rem;
    padding-top: 1rem;
}

.leo-aged-filter-actions > .small {
    align-items: center;
    display: inline-flex;
    gap: .4rem;
}

.leo-aged-filter-actions .leo-icon,
.leo-aged-table-card .card-header .leo-icon {
    height: 16px;
    width: 16px;
}

.leo-aged-kpis {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leo-aged-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
    padding: 0.9rem 1rem;
}

.leo-aged-kpi.is-total { background: #eff6ff; border-left-color: #1d4ed8; }
.leo-aged-kpi.is-warning { background: #fffbeb; border-left-color: #f59e0b; }
.leo-aged-kpi.is-danger { background: #fff1f2; border-left-color: #e11d48; }
.leo-aged-kpi span, .leo-aged-kpi small { color: #64748b; display: block; }
.leo-aged-kpi span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.leo-aged-kpi strong { color: #0f172a; display: block; font-size: 1.12rem; margin: 0.35rem 0 0.2rem; }
.leo-aged-kpi small { font-size: 0.73rem; }

.leo-aged-dashboard {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.7fr);
}

.leo-aged-chart {
    height: 18rem;
}

.leo-aged-legend {
    display: grid;
    gap: 0.65rem;
}

.leo-aged-legend > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 0.55rem 1fr;
    padding: 0.65rem 0.7rem;
}

.leo-aged-legend > div > span { border-radius: 999px; grid-row: 1 / 3; }
.leo-aged-legend .is-current { background: #16a34a; }
.leo-aged-legend .is-watch { background: #2563eb; }
.leo-aged-legend .is-risk { background: #f59e0b; }
.leo-aged-legend .is-critical { background: #e11d48; }
.leo-aged-legend strong, .leo-aged-legend small { margin-left: 0.6rem; }
.leo-aged-legend small { color: #64748b; }

.leo-aged-table-card {
    border-color: #dce4ef;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.leo-aged-table-card > .card-header {
    align-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, .055), rgba(255, 255, 255, 0));
    justify-content: space-between;
    min-height: 5rem;
}

.leo-aged-table-card .leo-section-kicker {
    font-size: .65rem;
}

.leo-aged-table-guide {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #e5eaf1;
    border-top: 1px solid #edf1f7;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: .55rem 1rem;
}

.leo-aged-table-guide span {
    align-items: center;
    color: #475569;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 600;
    gap: .35rem;
}

.leo-aged-table-guide i {
    border-radius: 999px;
    display: inline-block;
    height: .45rem;
    width: .45rem;
}

.leo-aged-table-guide .is-current { background: #16a34a; }
.leo-aged-table-guide .is-watch { background: #3b82f6; }
.leo-aged-table-guide .is-risk { background: #f59e0b; }
.leo-aged-table-guide .is-critical { background: #e11d48; }
.leo-aged-table-guide small { color: #64748b; margin-left: auto; }

.leo-aged-table { min-width: 980px; margin-bottom: 0; }
.leo-aged-table > thead th {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding-bottom: .8rem;
    padding-top: .8rem;
    white-space: nowrap;
}

.leo-aged-group-row {
    border-left: 3px solid #2563eb;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.leo-aged-group-row.is-current { border-left-color: #16a34a; }
.leo-aged-group-row.is-watch { border-left-color: #3b82f6; }
.leo-aged-group-row.is-risk { border-left-color: #f59e0b; }
.leo-aged-group-row.is-critical { border-left-color: #e11d48; }
.leo-aged-group-row:hover td { background: #f8fafc; }
.leo-aged-group-row.is-open td { background: #eff6ff; }
.leo-aged-group-row:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.leo-aged-group-row small { color: #64748b; display: block; font-size: 0.72rem; margin-top: 0.15rem; }
.leo-aged-group-row > td { padding-bottom: 1rem; padding-top: 1rem; }

.leo-aged-party > strong { color: #0f172a; font-size: .88rem; }
.leo-aged-party > span {
    color: #2563eb;
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    margin-top: .3rem;
}

.leo-aged-distribution-cell { min-width: 210px; width: 25%; }
.leo-aged-distribution {
    background: #e8edf4;
    border-radius: 999px;
    display: flex;
    height: .55rem;
    overflow: hidden;
    width: 100%;
}
.leo-aged-distribution i { display: block; min-width: 2px; }
.leo-aged-distribution .is-current { background: #16a34a; }
.leo-aged-distribution .is-days_1_30,
.leo-aged-distribution .is-days_31_60 { background: #3b82f6; }
.leo-aged-distribution .is-days_61_90 { background: #f59e0b; }
.leo-aged-distribution .is-days_90_plus { background: #e11d48; }
.leo-aged-distribution-cell small { margin-top: .4rem; }

.leo-aged-total strong { color: #0f172a; display: block; font-size: .9rem; white-space: nowrap; }
.leo-aged-total span { color: #64748b; font-size: .68rem; font-weight: 700; }

.leo-aged-detail-row > td { background: #f1f5f9; padding: 0.85rem 1rem 1.1rem; }
.leo-aged-detail-row table { background: #fff; border: 1px solid #dce4ef; border-radius: 8px; }
.leo-aged-detail-row th { color: #64748b; font-size: 0.68rem; text-transform: uppercase; white-space: nowrap; }
.leo-aged-detail-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: .65rem;
}
.leo-aged-detail-heading > div { display: flex; flex-direction: column; }
.leo-aged-detail-heading strong { color: #0f172a; font-size: .82rem; }
.leo-aged-detail-heading small { color: #64748b; font-size: .7rem; }
.leo-aged-documents-table td { padding-bottom: .65rem; padding-top: .65rem; }
.leo-aged-statement-dialog { max-width: min(1380px, calc(100vw - 2rem)); }
.leo-aged-statement-modal-body { background: #f3f6fa; padding: 1rem; }
.leo-aged-statement-loading {
    align-items: center;
    color: #64748b;
    display: flex;
    gap: .65rem;
    justify-content: center;
    min-height: 18rem;
}
.leo-statement-preview-summary {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1.5fr 1fr .65fr;
    margin-bottom: .85rem;
}
.leo-statement-preview-summary > div {
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    padding: .75rem .9rem;
}
.leo-statement-preview-summary span,
.leo-statement-preview-summary small { color: #64748b; font-size: .7rem; }
.leo-statement-preview-summary span { font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.leo-statement-preview-summary strong { color: #0f172a; font-size: .95rem; margin: .2rem 0; }
.leo-statement-preview-actions {
    align-items: center;
    background: #fff;
    border: 1px solid #dce4ef;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    display: flex;
    justify-content: space-between;
    padding: .65rem .8rem;
}
.leo-statement-preview-actions .leo-icon { height: 15px; width: 15px; }
.leo-statement-preview-table {
    background: #fff;
    border: 1px solid #dce4ef;
    margin-bottom: 0;
    min-width: 880px;
}
.leo-statement-preview-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .68rem;
    letter-spacing: .035em;
    padding-bottom: .75rem;
    padding-top: .75rem;
    text-transform: uppercase;
    white-space: nowrap;
}
.leo-statement-preview-table td { font-size: .78rem; padding-bottom: .65rem; padding-top: .65rem; }
.leo-statement-preview-totals {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: flex-end;
    margin-top: .85rem;
}
.leo-statement-preview-totals > div {
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    padding: .65rem .8rem;
}
.leo-statement-preview-totals span { color: #64748b; font-size: .7rem; }
.leo-statement-preview-totals b { color: #0f172a; margin-top: .15rem; }
.leo-statement-preview-totals .is-total { background: #eff6ff; border-color: #bfdbfe; }
.leo-statement-preview-totals .is-total b { color: #1d4ed8; }
.leo-aged-bucket.is-current { background: #dcfce7; color: #166534; }
.leo-aged-bucket.is-days_1_30, .leo-aged-bucket.is-days_31_60 { background: #dbeafe; color: #1e40af; }
.leo-aged-bucket.is-days_61_90 { background: #fef3c7; color: #92400e; }
.leo-aged-bucket.is-days_90_plus { background: #ffe4e6; color: #9f1239; }

@media (max-width: 991.98px) {
    .leo-aged-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leo-aged-dashboard { grid-template-columns: 1fr; }
    .leo-aged-filter-actions { align-items: flex-end; flex-direction: column; }
}

@media (max-width: 575.98px) {
    .leo-aged-hero { align-items: stretch; flex-direction: column; }
    .leo-aged-switch .btn { flex: 1; }
    .leo-aged-kpis { grid-template-columns: 1fr; }
    .leo-aged-filter-header, .leo-aged-table-card > .card-header { align-items: flex-start; flex-direction: column; }
    .leo-aged-filter-actions .btn-list, .leo-aged-filter-actions .btn { width: 100%; }
    .leo-aged-table-guide small { margin-left: 0; width: 100%; }
    .leo-statement-preview-summary { grid-template-columns: 1fr; }
    .leo-statement-preview-actions { align-items: flex-start; flex-direction: column; gap: .65rem; }
    .leo-statement-preview-totals > div { width: 100%; }
}
