.loan-page { --loan-violet: #6d28d9; --loan-dark: #3b0764; --loan-soft: #f5f3ff; }
.loan-page .dashboard-shell { display: block !important; }
.loan-main { width: 100%; max-width: 1740px; margin: 0 auto; }
.loan-topbar { border-color: #c4b5fd !important; background: linear-gradient(135deg,#faf5ff,#ede9fe) !important; }
.loan-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.loan-kpis article { min-height: 102px; padding: 18px; border: 1px solid #ddd6fe; border-radius: 18px; background: #fff; box-shadow: 0 10px 24px rgba(76,29,149,.07); }
.loan-kpis span,.loan-kpis strong { display: block; }
.loan-kpis span { color: #64748b; font-size: 13px; font-weight: 850; }
.loan-kpis strong { margin-top: 8px; color: var(--loan-dark); font-size: 36px; }
.loan-kpis article[data-tone="late"] strong { color: #b91c1c; }
.loan-stock-panel,.loan-followup-panel { overflow: hidden; margin-bottom: 18px; padding: 0 !important; border-color: #ddd6fe !important; }
.loan-section-heading,.loan-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 20px 24px; }
.loan-section-heading { color: #fff; background: linear-gradient(135deg,#7c3aed,#5b21b6); }
.loan-section-heading h2,.loan-table-heading h2 { margin: 3px 0 0; font-size: 26px; }
.loan-section-heading h2 { color: #fff !important; }
.loan-section-heading .panel-overline { color: #ddd6fe !important; }
.loan-primary-button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; color: #fff; background: #6d28d9; font: inherit; font-weight: 900; cursor: pointer; }
.loan-section-heading .loan-primary-button { color: #4c1d95; background: #fff; }
.loan-primary-button:disabled { opacity: .55; cursor: wait; }
.loan-unit-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 24px 22px; }
.loan-unit { display: grid; min-width: 190px; gap: 3px; padding: 12px 14px; border: 1px solid #ddd6fe; border-radius: 12px; background: #fafafa; }
.loan-unit strong { color: #3b0764; }
.loan-unit small { color: #64748b; }
.loan-unit-status { justify-self: start; margin-top: 5px; padding: 3px 8px; border-radius: 999px; color: #166534; background: #dcfce7; font-size: 11px; font-weight: 900; }
.loan-unit-status[data-status="reserved"],.loan-unit-status[data-status="with_client"] { color: #1e40af; background: #dbeafe; }
.loan-unit-status[data-status="maintenance"] { color: #9a3412; background: #ffedd5; }
.loan-unit-action { margin-top:7px;padding:6px 9px;border:1px solid #c4b5fd;border-radius:8px;color:#4c1d95;background:#fff;font:inherit;font-size:11px;font-weight:900;cursor:pointer; }
.loan-filters { display: flex; gap: 12px; }
.loan-filters label { display: grid; gap: 5px; color: #64748b; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.loan-filters input,.loan-filters select { min-height: 40px; min-width: 220px; padding: 0 11px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; font: inherit; text-transform: none; }
.loan-table td { vertical-align: top; }
.loan-table td strong,.loan-table td small { display: block; }
.loan-table td small { margin-top: 3px; color: #64748b; }
.loan-state { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 950; white-space: nowrap; }
.loan-state[data-status="to_validate"] { color:#166534;background:#dcfce7; }
.loan-state[data-status="to_order"],.loan-state[data-status="ordered"] { color:#9a3412;background:#ffedd5; }
.loan-state[data-status="reserved"] { color:#1e40af;background:#dbeafe; }
.loan-state[data-status="with_client"] { color:#5b21b6;background:#ede9fe; }
.loan-state[data-overdue="true"] { color:#991b1b;background:#fee2e2; }
.loan-state[data-status="returned"],.loan-state[data-status="cancelled"] { color:#475569;background:#e2e8f0; }
.loan-missing { color: #b91c1c !important; font-weight: 900; }
.loan-actions { display: flex; flex-wrap: wrap; gap: 7px; min-width: 210px; }
.loan-actions button { min-height: 34px; padding: 0 10px; border: 1px solid #c4b5fd; border-radius: 8px; color:#4c1d95;background:#fff;font:inherit;font-size:12px;font-weight:900;cursor:pointer; }
.loan-actions button[data-primary="true"] { border-color:#6d28d9;color:#fff;background:#6d28d9; }
.loan-results { margin: 0; padding: 12px 24px 18px; color:#64748b;font-size:13px;font-weight:800; }
.loan-empty { padding: 48px 20px !important; text-align:center !important;color:#64748b !important; }
.loan-dialog { width: min(720px,calc(100vw - 30px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 28px 80px rgba(15,23,42,.3); }
.loan-dialog::backdrop { background: rgba(15,23,42,.58); }
.loan-dialog-card { display:grid;gap:18px;padding:24px; }
.loan-dialog-card h2 { margin: 2px 0 0; }
.loan-dialog-card p { color:#64748b; }
.loan-dialog-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.loan-dialog-grid label { display:grid;gap:6px;color:#334155;font-size:13px;font-weight:850; }
.loan-dialog-grid .is-wide { grid-column:1/-1; }
.loan-dialog-grid input,.loan-dialog-grid select,.loan-dialog-grid textarea { width:100%;padding:10px 12px;border:1px solid #cbd5e1;border-radius:9px;font:inherit;box-sizing:border-box; }
.loan-dialog-actions { display:flex;justify-content:flex-end;gap:10px; }
@media (max-width:1000px){.loan-kpis{grid-template-columns:repeat(2,1fr)}.loan-table-heading{align-items:stretch;flex-direction:column}.loan-filters{flex-wrap:wrap}}
@media (max-width:640px){.loan-kpis{grid-template-columns:1fr}.loan-filters,.loan-filters label{width:100%}.loan-filters input,.loan-filters select{min-width:0;width:100%}.loan-dialog-grid{grid-template-columns:1fr}.loan-dialog-grid .is-wide{grid-column:auto}}
