/* Structure and spacing adapted from the final local Panel_ODonnell. */
:root{font-family:Arial,Helvetica,sans-serif;font-size:14px;--ink:#202729;--muted:#66716f;--bg:#f3f4f1;--line:#dce0dc;--accent:#ac873f}
header{width:235px}.brand{padding:28px 22px}.brand>strong{display:block;font-size:21px;letter-spacing:0;white-space:nowrap}.brand small{font-size:12px;line-height:1.5;margin-top:5px}
main{max-width:none;padding:30px;width:calc(100% - 235px)}#workspace{max-width:1390px;margin:auto}#identity{font-size:12px;text-align:right;margin:12px 0;color:var(--muted)}
#menu{top:116px;left:14px;width:207px}#menu button{display:flex;align-items:center;gap:12px;padding:12px 15px;font-size:13px;line-height:1.35}#menu button svg{width:20px;height:20px;flex-shrink:0}#menu button span{min-width:0}#menu button[aria-current=page]{background:#292b23;color:#e4c486;box-shadow:inset 3px 0 #c9a45b}
.panel-top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;background:white;border:1px solid var(--line);border-top:3px solid #bd974d;border-radius:12px;padding:22px;margin-bottom:24px;box-shadow:0 2px 8px #18241d05}.panel-top h1{margin:0;font-size:25px;letter-spacing:-.03em}.panel-top p{margin:5px 0 0;color:var(--muted);font-size:14px}
#content{background:transparent;border:0;border-radius:0;padding:0;box-shadow:none}#content>h2:first-child{display:none}#content>h3{font-size:16px;margin:21px 0 11px}#content>.scroll{margin:12px 0 18px;background:white;border:1px solid var(--line);border-radius:12px}#content>.scroll table{border:0}th,td{padding:10px;vertical-align:middle}th{font-size:11px;letter-spacing:.04em}td{font-size:13px}td button{padding:8px 12px;font-size:12px}button{padding:9px 13px;font-size:13px;border-radius:9px}button.secondary{background:#fff;color:#293233;border:1px solid var(--line)}
#content>form,#orderForm,#content>details{background:white;border:1px solid var(--line);border-radius:12px;padding:18px;margin:16px 0}.form-grid{gap:12px}label{font-size:12px;font-weight:650;gap:5px}input,select,textarea{padding:9px;font-size:14px;color:var(--ink)}.order-line{padding:14px 0;gap:14px;border-top:1px solid var(--line)}.order-line label{font-size:13px}.order-line input[type=number]{font-size:18px;font-weight:600}.order-line input,.order-line select{min-height:46px}.stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.stat-card{padding:17px}.stat-card span{font-size:12px}.stat-card strong{font-size:24px;margin-top:7px}.dashboard-chart{background:white;padding:17px}.pilot{font-size:11px;padding:9px 13px;line-height:1.5}.hint{line-height:1.6}
.panel-status{display:inline-block;border-radius:99px;padding:4px 8px;font-size:11px;font-weight:700;background:#e7efec;color:#345259;white-space:nowrap}.panel-status.good{background:#ddf3d1;color:#39672b}.panel-status.pending{background:#fff1d2;color:#8a5b08}.panel-status.cancelled{background:#fbe1df;color:#a23e35}
#panelAdministration{border-top:1px solid #313735;margin-top:18px;padding-top:12px}#panelAdministration summary{cursor:pointer;color:#c5ccca;font-size:13px;font-weight:600;padding:12px 15px;border-radius:8px}#panelAdministration summary:hover{background:#202728;color:white}#panelAdministration button{font-size:12px;padding-left:22px}#panelAdministration:has(button[aria-current=page])>summary{color:#e4c486}
.panel-top{flex-direction:column}.company-scope{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:9px}.company-scope[hidden]{display:none}.company-scope>span{font-size:12px;font-weight:bold;color:var(--muted)}.company-scope button{font-size:11px;padding:6px 9px;background:#fff;color:var(--ink);border:1px solid var(--line)}.company-scope button.on{background:#ac873f;color:white}.company-scope small{flex-basis:100%;font-size:11px;color:var(--muted);margin-top:3px}.dashboard-four{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:22px 0}.dashboard-four .dashboard-chart{margin:0;min-width:0}.dashboard-four h3{font-size:16px;margin:0 0 12px}.dashboard-four svg{max-height:230px}.dashboard-four .dashboard-donut{height:190px}.panel-kicker{color:#a78036;font-size:10px;letter-spacing:1.5px;font-weight:bold;margin-bottom:6px}.dashboard-legend{display:flex;gap:15px;font-size:11px}.dashboard-amount{display:flex;justify-content:space-between;gap:12px;font-size:12px;margin:12px 0}@media(max-width:1000px){.dashboard-four{grid-template-columns:1fr}}
.dashboard-four .dashboard-chart{padding:18px;min-height:320px}.dashboard-four .dashboard-chart>svg{width:100%;height:230px;margin-top:16px}.dashboard-four .chart-value{font-size:11px}.dashboard-four .chart-label{font-size:10px}.dashboard-four .hint{font-size:11px}.dashboard-four .dashboard-donut{height:190px;max-width:280px;margin:18px auto}.dashboard-legend span{font-size:11px}.company-scope small{max-width:760px}.brand{padding:28px 22px!important}.dashboard-four .dashboard-chart>h3{margin-bottom:10px}
.dashboard-legend span::before{content:'';display:inline-block;width:10px;height:10px;margin-right:6px;background:#bd974d}.dashboard-legend .agent-gp::before{background:#373f40}.dashboard-legend .agent-azt::before{background:#a5aeaa}
.dashboard-alert{display:grid;grid-template-columns:1fr auto;gap:4px 18px;background:#fff;border:1px solid var(--line);border-top:3px solid #bd974d;border-radius:12px;padding:14px 18px;margin:18px 0;cursor:pointer}.dashboard-alert span{font-weight:700}.dashboard-alert strong{grid-row:1/3;grid-column:2;font-size:30px}.dashboard-alert small{color:var(--muted)}.agent-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.agent-cards button{display:flex;flex-direction:column;align-items:flex-start;gap:5px;background:#fff;color:var(--ink);border:1px solid var(--line);border-top:2px solid #bd974d}.agent-cards button>span{font-weight:700}.agent-cards button>strong{font-size:18px}.agent-cards button>b{font-size:12px;color:#947231}.dashboard-bottom{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin:22px 0}.dashboard-bottom>section{background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px}.dashboard-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dashboard-operations p{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:10px 0}.dashboard-operations strong{font-size:18px}.panel-top>#dashboardNewOrder{position:absolute;right:22px;top:22px}.panel-top{position:relative}@media(max-width:800px){.dashboard-bottom{grid-template-columns:1fr}.agent-cards{grid-template-columns:1fr}.panel-top>#dashboardNewOrder{position:static}}
.dashboard-rankings{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:22px 0}.dashboard-rankings>section{min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px}.dashboard-rankings h3{margin:0 0 12px;font-size:16px}.dashboard-rankings .scroll{margin:0}@media(max-width:900px){.dashboard-rankings{grid-template-columns:1fr}}
@media(max-width:1100px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){header{width:100%;padding:14px 18px}.brand{padding:0}main{width:100%;margin:0;padding:18px}#menu{position:static;width:100%;display:flex;flex-wrap:wrap;gap:5px;padding:9px;margin:16px 0}#menu button{width:auto;padding:10px 12px;flex:1 1 auto}#menu button svg{width:18px;height:18px}.panel-top{padding:18px;margin-bottom:18px}#identity{text-align:left}.order-line{grid-template-columns:1fr 1fr}.order-line label:first-child{grid-column:1/-1}}
@media(max-width:560px){main{padding:12px}.stat-grid,.form-grid{grid-template-columns:1fr}.panel-top{padding:16px}.panel-top h1{font-size:23px}th,td{padding:7px}#menu button{font-size:12px}}
@media print{#panelHeading{display:none!important}#content>h2:first-child{display:block}main{width:100%;margin:0;padding:0}#content{padding:0;background:white}#content>form,#orderForm,#content>details,#content>.scroll{border:0;box-shadow:none;padding:0;margin:0}.panel-status{padding:0;background:transparent;color:inherit}}

/* Dashboard final: mismas proporciones y jerarquía visual que el panel local. */
main{background:linear-gradient(180deg,#eef2ef 0,#f3f4f1 210px)}
#workspace{max-width:1420px}
.panel-top{background:rgba(255,255,255,.96);border-radius:14px;box-shadow:0 8px 24px rgba(24,36,29,.055)}
.panel-top h1{font-size:27px}.panel-top p{font-size:14px}
.dashboard-alert{border-radius:14px;padding:16px 20px;box-shadow:0 5px 16px rgba(24,36,29,.045);transition:transform .15s ease,box-shadow .15s ease}.dashboard-alert:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(24,36,29,.075)}.dashboard-alert span{font-size:15px}.dashboard-alert strong{font-size:32px;color:#171e20}.dashboard-alert small{font-size:12px}
.dashboard-four{gap:18px;margin:20px 0 24px}.dashboard-four .dashboard-chart{min-height:340px;padding:20px 21px;border:1px solid #d7ddd8;border-radius:14px;box-shadow:0 6px 18px rgba(24,36,29,.045)}.dashboard-four .dashboard-chart:nth-child(n+5){min-height:270px}.dashboard-four .dashboard-chart>h3{font-size:18px;line-height:1.2;margin:0 0 8px}.dashboard-four .dashboard-chart>.hint{margin:0;color:#61706c}.panel-kicker{font-size:10px;letter-spacing:1.8px;margin-bottom:7px}.dashboard-four .dashboard-chart>svg{height:235px;margin-top:12px;overflow:visible}.dashboard-four svg rect{rx:4}.dashboard-four .chart-value{font-weight:700;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}.dashboard-four .chart-label{fill:#596562}.dashboard-four .axis{stroke:#d5dad6}.dashboard-four .dashboard-donut{height:200px;margin:8px auto 2px}.dashboard-legend{margin:8px 0 0}.dashboard-amount{padding:7px 0;margin:0;border-bottom:1px solid #edf0ed}.dashboard-amount:last-child{border-bottom:0}.dashboard-amount strong{font-variant-numeric:tabular-nums}.agent-cards{gap:12px;margin-top:18px}.agent-cards button{min-height:132px;padding:15px;border-radius:11px;box-shadow:none}.agent-cards button>span{font-size:14px}.agent-cards button>strong{font-size:21px}
.stat-grid{gap:16px;margin:24px 0}.stat-card{min-height:96px;padding:17px 18px;background:#fff;border:1px solid #d7ddd8;border-top:3px solid #bd974d;border-radius:13px;box-shadow:0 5px 15px rgba(24,36,29,.035)}.stat-card span{color:#596562}.stat-card strong{font-size:25px;line-height:1.1;font-variant-numeric:tabular-nums}
.dashboard-bottom{gap:18px;margin:24px 0}.dashboard-bottom>section,.dashboard-rankings>section{border-color:#d7ddd8;border-radius:14px;padding:20px;box-shadow:0 6px 18px rgba(24,36,29,.04)}.dashboard-section-head h3,.dashboard-bottom>section>h3,.dashboard-rankings h3{font-size:17px;color:#171e20}.dashboard-bottom .scroll,.dashboard-rankings .scroll{border:0;border-radius:0}.dashboard-bottom table,.dashboard-rankings table{border:0}.dashboard-bottom tbody tr:hover,.dashboard-rankings tbody tr:hover{background:#f7f8f5}.dashboard-operations p{margin:0;padding:14px 0}.dashboard-rankings{gap:18px;margin:24px 0}.dashboard-rankings th{background:#edf0eb}.dashboard-rankings td:last-child{font-weight:700;font-variant-numeric:tabular-nums}
@media(max-width:1000px){.dashboard-four .dashboard-chart{min-height:320px}}
@media(max-width:560px){.panel-top h1{font-size:24px}.dashboard-four .dashboard-chart{padding:16px;min-height:300px}.dashboard-four .dashboard-chart>svg{height:205px}.stat-card{min-height:86px}.dashboard-bottom>section,.dashboard-rankings>section{padding:15px}}

/* Equivalencia visual y operativa con las vistas del panel local. */
.view-actions{display:flex;gap:9px;align-items:center;margin:0 0 18px}.filter-panel,.operations-panel,.commercial-section,.report-section,.intermediary-overview{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin:18px 0;box-shadow:0 5px 16px rgba(24,36,29,.035)}.filter-panel .form-grid{margin:0}.filter-panel .actions{margin-top:13px}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:22px 0 10px}.section-heading h3{margin:2px 0 0;font-size:18px}.section-heading>strong{font-size:25px;color:#171e20}.operations-panel .section-heading{margin-top:0}.operations-panel>.scroll{margin-bottom:0}.empty-state{background:#fff;border:1px dashed #cfd5d0;border-radius:12px;padding:22px;color:var(--muted);text-align:center}.row-actions{white-space:nowrap}.row-actions button{margin:2px}.row-actions .secondary{color:#8f372f;border-color:#e2c3bf}.editor-top:empty{display:none}.editor-top:not(:empty){background:#fff;border:1px solid var(--line);border-top:3px solid #bd974d;border-radius:14px;padding:18px 20px;margin:18px 0;box-shadow:0 8px 22px rgba(24,36,29,.06)}.editor-top form{margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}.editor-top h3{margin-top:0}
.invoice-totals{margin:18px 0 24px}.invoice-month{margin:18px 0 28px}.invoice-month>.section-heading{margin-bottom:8px;text-transform:capitalize}.invoice-month>.scroll{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:0 4px 14px rgba(24,36,29,.03)}.invoice-month td:last-child{min-width:128px}.invoice-month td:last-child button{width:100%;margin-top:5px}.invoice-month th:nth-child(n+5),.invoice-month td:nth-child(n+5){text-align:right}.invoice-month th:last-child,.invoice-month td:last-child{text-align:left}
.sales-overview{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,1fr);gap:18px;margin:22px 0}.sales-overview>.dashboard-chart{margin:0;min-height:360px;padding:20px;border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 18px rgba(24,36,29,.04)}.sales-overview svg{width:100%;height:260px}.collection-card .dashboard-donut{display:block;max-width:260px;height:205px;margin:0 auto}.collection-card p{display:flex;justify-content:space-between;gap:12px;padding:10px 0;margin:0;border-bottom:1px solid #edf0ed}.commercial-section>.scroll,.report-section>.scroll{margin-bottom:0;border:0}.commercial-section h3,.report-section h3{font-size:17px;margin-top:0}
.ranking-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.ranking-podium article{display:flex;gap:14px;align-items:center;background:#fff;border:1px solid var(--line);border-top:3px solid #bd974d;border-radius:13px;padding:17px;min-height:112px;box-shadow:0 5px 16px rgba(24,36,29,.035)}.ranking-podium article>span{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#efe7d5;color:#896a2e;font-size:19px;font-weight:800;flex:0 0 auto}.ranking-podium article div{display:flex;flex-direction:column;gap:5px;min-width:0}.ranking-podium small{color:var(--muted)}.ranking-podium strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ranking-podium b{font-size:18px}.ranking-chart{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;margin:18px 0}.ranking-chart h3{margin-top:0}.ranking-bar{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,2fr) 100px;gap:14px;align-items:center;margin:14px 0}.ranking-bar>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ranking-bar>i{display:block;height:11px;border-radius:7px;background:#eeeee8;overflow:hidden}.ranking-bar>i>b{display:block;height:100%;border-radius:7px;background:linear-gradient(90deg,#dfc48b,#ac873f)}.ranking-bar>strong{text-align:right;font-variant-numeric:tabular-nums}
.intermediary-overview{padding-top:16px}.intermediary-overview>.section-heading{margin-top:0}.intermediary-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}.intermediary-cards article{display:flex;flex-direction:column;gap:6px;padding:16px;background:#fafaf8;border:1px solid var(--line);border-top:2px solid #bd974d;border-radius:11px}.intermediary-cards article>span{font-weight:800}.intermediary-cards article>strong{font-size:20px}.intermediary-cards article>small{color:var(--muted)}.intermediary-cards article>b{color:#8f6e31}.report-output>.section-heading{margin-top:22px}.report-detail{background:#fff;border:1px solid var(--line);border-radius:10px;margin:9px 0;padding:12px}.report-detail summary{font-weight:700;cursor:pointer}.report-detail>.scroll{margin-top:12px}
@media(max-width:1000px){.sales-overview{grid-template-columns:1fr}.ranking-podium{grid-template-columns:1fr}.intermediary-cards{grid-template-columns:1fr}.ranking-bar{grid-template-columns:minmax(130px,1fr) minmax(120px,2fr) 90px}}
@media(max-width:650px){.section-heading{align-items:flex-start}.ranking-bar{grid-template-columns:1fr 70px}.ranking-bar>i{grid-row:2;grid-column:1/-1}.invoice-month>.scroll,.commercial-section>.scroll,.report-section>.scroll{overflow-x:auto}}

/* Ajuste de fidelidad final respecto al panel local. */
.dashboard-four .dashboard-chart{min-height:335px;padding:17px;border-radius:12px;box-shadow:0 2px 8px rgba(24,36,29,.025)}.dashboard-four .dashboard-chart>svg{height:255px;margin-top:5px}.dashboard-four .chart-value{font-size:10px;font-weight:700;fill:#171e20}.dashboard-four .chart-label{font-size:10px;fill:#596163}.dashboard-four .axis{stroke:#d9ddda;stroke-width:1}.dashboard-four .local-bar-chart{overflow:visible}.dashboard-four .dashboard-donut{height:190px}.dashboard-four .dashboard-chart:nth-child(n+5){min-height:245px}.dashboard-four .dashboard-chart:nth-child(n+5)>svg{height:190px}
.invoice-month{display:block;background:#fff;border:1px solid var(--line);border-radius:13px;margin:14px 0;box-shadow:0 4px 14px rgba(24,36,29,.03);overflow:hidden}.invoice-month>summary,.sales-month>summary{display:flex;justify-content:space-between;align-items:center;gap:18px;cursor:pointer;list-style:none;padding:16px 18px;background:#f8f8f5}.invoice-month>summary::-webkit-details-marker,.sales-month>summary::-webkit-details-marker{display:none}.invoice-month>summary span,.sales-month>summary span{font-size:17px;font-weight:800;text-transform:capitalize}.invoice-month>summary strong,.sales-month>summary strong{font-size:13px;color:#596562}.invoice-month[open]>summary,.sales-month[open]>summary{border-bottom:1px solid var(--line);background:#f2f3ef}.invoice-month>.scroll{margin:0;border:0;border-radius:0;box-shadow:none}.invoice-state{display:block;font-weight:700;margin-bottom:3px}.invoice-month td:last-child{min-width:235px}.invoice-month td:last-child br{display:none}.invoice-month td:last-child button,.invoice-action{display:inline-block!important;width:auto!important;min-width:0!important;margin:4px 4px 0 0!important;padding:6px 8px!important;border-radius:7px!important;font-size:11px!important;line-height:1.2!important}.invoice-month td:last-child small{display:block;margin-top:5px;line-height:1.4}
.sales-month{display:block;border:1px solid var(--line);border-radius:11px;margin:10px 0;overflow:hidden}.sales-month>.scroll{margin:0;border:0;border-radius:0}.sales-month td:nth-child(n+5){text-align:right}.sales-month th:nth-child(n+5){text-align:right}
.intermediary-cards button{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:16px;background:#fafaf8;color:var(--ink);border:1px solid var(--line);border-top:2px solid #bd974d;border-radius:11px;text-align:left}.intermediary-cards button:hover{background:#f1eee5;border-color:#bd974d}.intermediary-cards button>span{font-weight:800}.intermediary-cards button>strong{font-size:20px}.intermediary-cards button>small{color:var(--muted)}.intermediary-cards button>b{color:#8f6e31}.intermediary-cards button>em{font-size:11px;font-style:normal;color:#7e622d;margin-top:4px}.commission-check{width:21px;height:21px;accent-color:#ac873f;cursor:pointer}.commission-check:disabled{cursor:not-allowed;opacity:.35}.selectable-operation{background:#fffdf8}.selectable-operation:hover{background:#f6f0e2}.locked-operation{color:#777f7d;background:#fafafa}
#clientsTable>.scroll{border:1px solid var(--line);border-radius:14px;box-shadow:0 5px 16px rgba(24,36,29,.035);overflow:hidden}#clientsTable table{border:0}#clientsTable tbody tr:nth-child(even){background:#fafaf8}#clientsTable tbody tr:hover{background:#f3efe5}#clientsTable td:first-child strong{font-size:14px;color:#171e20}#clientsTable td:nth-last-child(2){font-weight:800;color:#785d29;font-variant-numeric:tabular-nums}#clientsTable td:last-child button{min-width:68px}
.clickable-report{cursor:pointer}.clickable-report:hover,.clickable-report:focus{background:#f2ecdf;outline:none}.report-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.report-client-document{border-top:3px solid #bd974d}.report-client-document>.scroll{border:0;margin-bottom:0}
@media print{body.printing-report-client header,body.printing-report-client #panelHeading,body.printing-report-client #message,body.printing-report-client #reportForm,body.printing-report-client .report-output>*:not(#reportClientDetail){display:none!important}body.printing-report-client #reportClientDetail{display:block!important}body.printing-report-client #reportClientDetail .report-client-document{border:0;box-shadow:none;margin:0;padding:0}}
@media(max-width:850px){.invoice-month>summary,.sales-month>summary{align-items:flex-start;flex-direction:column}.invoice-month td:last-child{min-width:180px}.report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.table-sort{background:none!important;border:0!important;color:inherit!important;padding:0!important;font:inherit!important;font-weight:700!important;box-shadow:none!important;text-align:left!important}.debt-button{min-width:96px}.client-debt-document{background:#fff;border:1px solid var(--line,#d7d9d7);border-top:2px solid var(--gold,#b59345);border-radius:12px;padding:18px;margin-bottom:18px}
@media print{body.printing-client-debt *{visibility:hidden!important}body.printing-client-debt .client-debt-document,body.printing-client-debt .client-debt-document *{visibility:visible!important}body.printing-client-debt .client-debt-document{position:absolute;left:0;top:0;width:100%;border:0}body.printing-client-debt .no-print{display:none!important}}
.settlement-operations-document{background:#fff;border-radius:12px}
@media print{body.printing-settlement-operations *{visibility:hidden!important}body.printing-settlement-operations .settlement-operations-document,body.printing-settlement-operations .settlement-operations-document *{visibility:visible!important}body.printing-settlement-operations .settlement-operations-document{position:absolute;left:0;top:0;width:100%}body.printing-settlement-operations .no-print{display:none!important}}
.catalog-templates{background:#fff;border:1px solid var(--line);border-top:2px solid #bd974d;border-radius:12px;padding:18px;margin:16px 0}.tariff-template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tariff-template-grid article{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fafaf8}.button-link{display:inline-block;padding:8px 12px;border-radius:8px;background:#ad8a42;color:#fff!important;text-decoration:none;font-weight:700}
@media(max-width:900px){.tariff-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.tariff-template-grid{grid-template-columns:1fr}}
.dashboard-ranking-panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:19px;box-shadow:0 5px 18px rgba(24,36,29,.035)}.dashboard-ranking-clients{margin-top:18px}.dashboard-ranking-title{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-bottom:13px}.dashboard-ranking-title h3{margin:3px 0 0}.dashboard-ranking-title>small{color:var(--muted);text-align:right}.dashboard-ranking-list{display:grid;gap:7px}.dashboard-ranking-row{display:grid;grid-template-columns:34px minmax(0,1fr);gap:11px;align-items:center;padding:9px 10px;border:1px solid #e5e6e2;border-radius:10px;background:linear-gradient(90deg,#fffdf8,#fff)}.dashboard-ranking-row:first-child{border-color:#d3b56d;background:linear-gradient(90deg,#f8f1df,#fff)}.dashboard-rank-position{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#e9e7df;color:#4f5553;font-weight:800}.dashboard-ranking-row:first-child .dashboard-rank-position{background:#b49349;color:#fff}.dashboard-rank-heading{display:flex;justify-content:space-between;align-items:center;gap:14px}.dashboard-rank-heading>div{display:flex;min-width:0;flex-direction:column}.dashboard-rank-heading strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-rank-heading small{color:var(--muted);margin-top:2px}.dashboard-rank-heading>b{white-space:nowrap;color:#765b27;font-size:14px;font-variant-numeric:tabular-nums}.dashboard-rank-track{height:5px;margin-top:7px;background:#ecece8;border-radius:999px;overflow:hidden}.dashboard-rank-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#a9853c,#c7a85e)}.dashboard-coverage{margin:10px 2px 18px}.dashboard-rankings{align-items:start}
@media(max-width:700px){.dashboard-ranking-title{align-items:flex-start;flex-direction:column}.dashboard-ranking-title>small{text-align:left}.dashboard-rank-heading{align-items:flex-start;flex-direction:column;gap:4px}.dashboard-rank-heading>b{font-size:13px}}

/* Filtros compactos, resúmenes mensuales y reposiciones con el flujo del panel. */
.compact-filters{padding:12px 14px!important;margin:12px 0 16px!important}.compact-filter-main,.compact-filter-more{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:9px;align-items:end}.compact-filter-main .filter-search{grid-column:span 2}.compact-filters label{gap:3px}.compact-filters input,.compact-filters select{min-height:36px;padding:7px 8px;font-size:12px}.filter-actions{display:flex;gap:7px;justify-content:flex-end;margin-top:10px}.filter-actions button{padding:7px 12px}.advanced-filters{margin-top:9px;border-top:1px solid #eceeea;padding-top:8px}.advanced-filters>summary{cursor:pointer;color:#75612f;font-size:12px;font-weight:700;list-style:none}.advanced-filters>summary::before{content:'+ ';font-weight:900}.advanced-filters[open]>summary::before{content:'− '}.compact-filter-more{grid-template-columns:repeat(5,minmax(130px,1fr));margin-top:9px}.commercial-filter-bar .compact-filter-main{grid-template-columns:110px 150px 170px minmax(170px,1fr) minmax(220px,1.4fr)}.commercial-filter-bar .filter-search{grid-column:auto}
.monthly-ledger{background:#fff;border:1px solid var(--line);border-radius:13px;margin:18px 0;overflow:hidden}.commercial-section.monthly-ledger{padding:0}.commercial-section.monthly-ledger>.section-heading{padding:17px 19px 8px;margin:0}.invoice-month-labels,.sales-month-labels{display:grid;gap:10px;align-items:center;padding:10px 12px;background:#edf0eb;color:#26302f;font-size:10px;font-weight:800;letter-spacing:.045em;text-transform:uppercase}.invoice-month-labels,.invoice-month-summary{grid-template-columns:minmax(140px,1.25fr) minmax(68px,.65fr) repeat(6,minmax(92px,1fr)) 78px}.sales-month-labels,.sales-month-summary{grid-template-columns:minmax(150px,1.25fr) minmax(78px,.65fr) repeat(5,minmax(110px,1fr)) 78px}.monthly-ledger .invoice-month,.monthly-ledger .sales-month{margin:0;border:0;border-top:1px solid #dfe3df;border-radius:0;box-shadow:none}.monthly-ledger .invoice-month:first-child,.monthly-ledger .sales-month:first-of-type{border-top:0}.invoice-month>summary.invoice-month-summary,.sales-month>summary.sales-month-summary{display:grid;gap:10px;padding:11px 12px;background:#fff}.invoice-month-summary>*:not(:first-child),.sales-month-summary>*:not(:first-child){text-align:right}.invoice-month-summary strong,.sales-month-summary strong{font-size:12px!important;color:#151b1c!important;text-transform:capitalize}.invoice-month-summary span,.sales-month-summary span,.invoice-month-summary b,.sales-month-summary b{font-size:12px!important;font-weight:500!important;text-transform:none!important;font-variant-numeric:tabular-nums}.invoice-month-summary b,.sales-month-summary b{font-weight:800!important}.invoice-month-summary .pending-value{color:#8a4c2c}.invoice-month-summary i,.sales-month-summary i{justify-self:end;background:#ac873f;color:#fff;border-radius:8px;padding:8px 12px;font-size:12px;font-style:normal;font-weight:800}.invoice-month[open]>.invoice-month-summary,.sales-month[open]>.sales-month-summary{background:#eef7fa;border-bottom:1px solid #cddfe5}.monthly-ledger .scroll{margin:0;border:0;border-radius:0}.monthly-ledger tbody tr:hover{background:#faf6ed}
.replenishment-panel{margin-top:24px}.replenishment-panel td:nth-last-child(2){font-weight:800;font-variant-numeric:tabular-nums}.modal-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(18,28,29,.48);backdrop-filter:blur(2px)}.replenishment-modal{width:min(900px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:16px;padding:20px;box-shadow:0 24px 70px rgba(0,0,0,.26)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.modal-head h2{margin:2px 0 0}.replenishment-meta{display:flex;gap:18px;flex-wrap:wrap;padding:12px 0;margin:4px 0 8px;border-bottom:1px solid var(--line)}.replenishment-meta p{margin:0}.replenishment-modal .scroll{margin:0;border:1px solid var(--line);border-radius:11px}.replenishment-modal input[type=number]{width:100px;min-height:34px;padding:5px 8px}.replenishment-total{display:flex;justify-content:flex-end;gap:12px;align-items:center;margin-top:10px}.replenishment-total strong{font-size:16px;color:#765b27}.replenishment-modal .actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px}
@media(max-width:1150px){.compact-filter-main{grid-template-columns:repeat(3,minmax(140px,1fr))}.compact-filter-main .filter-search{grid-column:auto}.compact-filter-more{grid-template-columns:repeat(3,minmax(140px,1fr))}.commercial-filter-bar .compact-filter-main{grid-template-columns:repeat(3,minmax(150px,1fr))}.monthly-ledger{overflow-x:auto}.invoice-month-labels,.invoice-month-summary{min-width:1050px}.sales-month-labels,.sales-month-summary{min-width:1000px}}
@media(max-width:650px){.compact-filter-main,.compact-filter-more,.commercial-filter-bar .compact-filter-main{grid-template-columns:1fr}.filter-actions{justify-content:stretch}.filter-actions button{flex:1}.modal-backdrop{padding:8px}.replenishment-modal{padding:15px;max-height:calc(100vh - 16px)}.modal-head{align-items:center}.replenishment-meta{display:grid;gap:5px}.replenishment-modal .actions{display:grid}.replenishment-modal .actions button{width:100%}}

/* Remate de alineación y legibilidad solicitado tras la revisión visual. */
.invoice-month-labels>*:not(:first-child),.sales-month-labels>*:not(:first-child),.invoice-month-summary>*:not(:first-child),.sales-month-summary>*:not(:first-child){text-align:center!important}.invoice-month-summary i,.sales-month-summary i{justify-self:center}.dashboard-four .dashboard-chart:first-child .chart-value{font-size:14px!important;font-weight:800;stroke-width:4px}.dashboard-four .dashboard-chart:first-child .chart-label{font-size:11px!important}
.report-client-modal{width:min(1040px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:16px;padding:20px;box-shadow:0 24px 70px rgba(0,0,0,.26)}.report-client-modal .modal-head p{margin:6px 0 0;color:var(--muted)}.report-client-metrics{grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0}.report-client-modal>.section-heading{margin:18px 0 8px}.report-client-modal>.scroll{margin:0;border:1px solid var(--line);border-radius:12px}.report-client-modal th:nth-child(n+3):nth-child(-n+6),.report-client-modal td:nth-child(n+3):nth-child(-n+6){text-align:right;font-variant-numeric:tabular-nums}.report-client-modal .actions{display:flex;gap:8px;margin-top:16px}.report-client-modal .hint{margin-bottom:0}
@media(max-width:760px){.report-client-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.report-client-modal{padding:15px;max-height:calc(100vh - 16px)}.report-client-modal .modal-head{align-items:flex-start}.report-client-modal .actions{display:grid}.report-client-modal .actions button{width:100%}}
@media print{body.printing-report-client *{visibility:hidden!important}body.printing-report-client #reportClientModal,body.printing-report-client #reportClientModal *{visibility:visible!important}body.printing-report-client #reportClientModal{position:absolute;inset:0;display:block;padding:0;background:#fff}body.printing-report-client .report-client-modal{width:100%;max-height:none;overflow:visible;border:0;border-radius:0;padding:0;box-shadow:none}body.printing-report-client .report-client-modal .no-print{display:none!important}body.printing-report-client .report-client-modal .stat-card{break-inside:avoid}}
#managedClientForm .form-grid{grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:6px 12px;align-items:end}#managedClientForm label{gap:3px;margin:3px 0;font-size:11px}#managedClientForm input,#managedClientForm select{min-height:35px;padding:6px 8px;font-size:12px}#managedClientForm .client-field-addressLine,#managedClientForm .client-field-email{grid-column:span 2}#managedClientForm .client-field-addressNumber,#managedClientForm .client-field-postalCode{max-width:180px}#managedClientForm>.hint{margin:9px 0 5px}#managedClientForm>.actions{margin:8px 0 0}.account-address-grid .client-field-addressLine{grid-column:span 2}.account-address-grid .client-field-addressNumber,.account-address-grid .client-field-postalCode{max-width:190px}
@media(max-width:650px){#managedClientForm .form-grid{grid-template-columns:1fr}#managedClientForm .client-field-addressLine,#managedClientForm .client-field-email,.account-address-grid .client-field-addressLine{grid-column:auto}#managedClientForm .client-field-addressNumber,#managedClientForm .client-field-postalCode,.account-address-grid .client-field-addressNumber,.account-address-grid .client-field-postalCode{max-width:none}}
