/* DespachoCloud Control · v0.1.0
   Diseño derivado conceptualmente del portal clientes v0.4.
   Paleta independiente: berenjena/cobre, no azul comercial. */
:root{--ink:#332d3c;--ink2:#4b3b55;--muted:#786f7e;--purple:#67446e;--purple-dark:#3c2b49;--plum:#4c305d;--copper:#c68a55;--copper-light:#f7eddf;--bg:#f5f3f6;--card:#fff;--line:#e8e3eb;--green:#25785b;--red:#a6404a;--blue:#516c96;--sh:0 5px 24px rgba(44,33,53,.045)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.45}a{text-decoration:none;color:inherit}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #be986b;outline-offset:2px}.container{max-width:1400px;padding:0 26px;margin:0 auto}.topline{background:var(--purple-dark);color:#ece3ee}.topline-inner{min-height:34px;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:12px}.topline-sep{color:#cc9c6a;margin:0 9px}.toplinks{display:flex;gap:23px}.toplinks a:hover{text-decoration:underline}.mainhead{background:#fff;box-shadow:0 1px 0 #e5dfe8}.brandline{height:91px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:13px;min-width:240px}.brand-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:12px;color:#fff;background:linear-gradient(145deg,#73517e,#3e2b4b);font-weight:800;font-size:17px;letter-spacing:1px}.brand strong{display:block;font-size:25px;letter-spacing:-.65px;color:#42314e}.brand small{display:block;color:#9a849a;font-size:12px;font-weight:500}.headmeta{display:flex;gap:12px;align-items:center}.demo-chip,.admin-chip{font-size:11px;border-radius:22px;padding:8px 11px;letter-spacing:.4px}.demo-chip{color:#865325;background:#fdf3e4;border:1px solid #e9d5bd;font-weight:700}.admin-chip{color:#6b5372;background:#f4eff6;border:1px solid #e9dfea}.menubar{background:#65436c}.menulinks{display:flex;min-height:48px;align-items:stretch;gap:0;overflow-x:auto;scrollbar-width:thin}.menulinks a{display:flex;align-items:center;color:#f8f3f8;padding:0 20px;font-weight:700;font-size:12px;white-space:nowrap;transition:background .18s}.menulinks a:hover{background:#7b5882}.menulinks a.active{background:#3d2d4a;border-bottom:3px solid #d8a36f}.page-layout{display:grid;grid-template-columns:235px minmax(0,1fr);gap:28px;padding-top:29px;padding-bottom:58px}.sidebar{min-width:0}.sidebar-card{background:#fff;border:1px solid var(--line);box-shadow:var(--sh);margin-bottom:17px;padding:18px 16px}.sidebar-card h4{margin:-18px -16px 13px;padding:12px 15px;border-bottom:1px solid var(--line);font-size:12px;color:#6d596f;background:#faf9fa}.sidebar-intro{background:#46334f;color:white;border:0;padding:22px 19px}.sidebar-kicker{color:#e3bb90;font-size:10px;letter-spacing:1.6px;font-weight:800}.sidebar-intro h3{font-size:18px;margin:8px 0}.sidebar-intro p{font-size:12px;line-height:1.65;color:#e7dce7;margin:0}.side-row{display:flex;justify-content:space-between;gap:6px;border-bottom:1px solid #f0edf0;padding:11px 1px;color:#7b7180;font-size:12px}.side-row strong{color:#402c4c;font-size:16px}.side-action{display:block;margin-top:17px;text-align:center;background:#efdcc7;color:#654126;font-size:11px;font-weight:bold;padding:11px 7px}.side-link{display:block;color:#5b4666;font-size:12px;line-height:1.55;padding:11px 0;border-bottom:1px solid #f0edf0}.side-link:hover{color:#a16b3d}.sidebar-note{border-left:3px solid #c28d5c;background:#fffaf2}.sidebar-note b{font-size:13px}.sidebar-note p{font-size:12px;color:#776d6e;margin:8px 0 0;line-height:1.6}.content{min-width:0}.page-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 0 20px}.eyebrow{color:#b17642;font-size:10px;letter-spacing:1.35px;font-weight:800}.page-title h1{font-size:32px;letter-spacing:-1px;line-height:1.2;color:#372b43;margin:5px 0 5px}.page-title p{color:#827786;margin:0;font-size:13px}.date-indicator{border:1px solid #e5dae7;border-radius:20px;background:#fff;white-space:nowrap;padding:8px 13px;color:#745f7c;font-size:11px}.demo-notice{border:1px solid #e6d1b9;background:#fff8ee;color:#745635;padding:11px 15px;font-size:12px;margin-bottom:22px}.demo-notice span{font-size:16px;color:#ac763f;margin-right:6px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:21px}.kpi{position:relative;overflow:hidden;background:white;border:1px solid var(--line);padding:18px 17px 16px;min-height:138px;box-shadow:var(--sh);transition:transform .15s,border-color .15s}.kpi:hover{transform:translateY(-2px);border-color:#c5b3ca}.kpi:before{content:'';height:3px;background:#aa8caf;position:absolute;inset:0 0 auto}.kpi.accent:before{background:var(--copper)}.kpi-label{display:block;font-size:10px;line-height:1.35;letter-spacing:.6px;font-weight:800;color:#807487;min-height:27px;max-width:90%}.kpi strong{display:block;color:#4c315b;font-size:34px;letter-spacing:-1px;font-weight:800;line-height:1.2;margin:7px 0 6px}.kpi strong.amount{font-size:25px;margin-top:12px;white-space:nowrap}.kpi small{color:#8e8292;font-size:11px}.kpi-icon{position:absolute;right:14px;bottom:13px;color:#e3d7e6;font-size:26px;font-weight:800}.dashboard-split{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.85fr);gap:19px;margin-bottom:20px}.card{background:white;border:1px solid var(--line);box-shadow:var(--sh);min-width:0;margin-bottom:0}.card-head{display:flex;align-items:center;justify-content:space-between;gap:13px;padding:20px 21px 17px;border-bottom:1px solid var(--line)}.card-head h2,.card.pad h2{margin:5px 0 0;color:#382b44;font-size:19px;letter-spacing:-.3px}.card-head .eyebrow{color:#b78755}.textlink{font-size:12px;color:#795080;font-weight:700;white-space:nowrap}.textlink:hover{text-decoration:underline}.card-footnote{padding:11px 20px 15px;font-size:11px;color:#918594;line-height:1.55}.chart-wrap{padding:23px 24px 10px}.bar-chart{height:210px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:13px;align-items:end}.bar-chart.large{grid-template-columns:repeat(8,minmax(0,1fr));height:285px}.bar-column{height:100%;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px}.bar-column>strong{font-size:10px;color:#5b4d62;white-space:nowrap}.bar-column>span{font-size:11px;color:#8d818f}.bar-track{height:calc(100% - 40px);width:100%;max-width:52px;background:#f6f2f7;display:flex;flex-direction:column;justify-content:flex-end;border-radius:5px 5px 0 0;overflow:hidden}.bar-fill{background:linear-gradient(0deg,#694977,#b38eb8);min-height:2%;border-radius:5px 5px 0 0;transition:height .3s ease}.attention-list a{display:flex;align-items:center;gap:13px;padding:16px 20px;border-bottom:1px solid #f1edf1}.attention-list a:hover{background:#faf8fb}.attention-list a:last-child{border:0}.attention-list a>span:nth-child(2){flex:1;min-width:0}.attention-list b{font-size:13px;color:#45374b}.attention-list small{display:block;color:#9b909e;font-size:11px;margin-top:4px}.attention-list a>span:last-child{color:#ad9aaf}.attention-bullet{flex:0 0 32px;height:32px;display:grid;place-items:center;font-weight:bold;border-radius:9px}.attention-bullet.error{background:#fdecee;color:#a54d59}.attention-bullet.amber{background:#fff1df;color:#bd7a38}.attention-bullet.purple{background:#f0e9f4;color:#775283}.attention-bullet.green{background:#eaf8ef;color:#3f8662}.compact-table,.data-table,.invoice-lines{width:100%;border-collapse:collapse;text-align:left}.compact-table th,.data-table th,.invoice-lines th{background:#f7f5f8;font-size:10px;color:#6e5e76;letter-spacing:.45px;text-transform:uppercase;padding:13px 14px;border-bottom:1px solid #e7e0e9;white-space:nowrap}.compact-table td,.data-table td,.invoice-lines td{border-bottom:1px solid #eee9f0;padding:14px;font-size:12px;vertical-align:middle}.compact-table tbody tr:last-child td,.data-table tbody tr:last-child td,.invoice-lines tbody tr:last-child td{border-bottom:0}.compact-table tbody tr:hover,.data-table tbody tr:hover{background:#fcf9fd}.table-scroll{width:100%;overflow:auto}.table-scroll .data-table{min-width:850px}.table-link{color:#674270;font-weight:800;text-decoration:underline;text-decoration-color:#c6a4ca;text-underline-offset:3px;white-space:nowrap}.table-link:hover{color:#a67343}.data-table td small{display:block;color:#988c9c;font-size:10px;margin-top:3px}.data-table td strong{color:#44364d}.sort-trigger{padding:0;background:none;border:0;font-size:inherit;font-weight:800;color:inherit;text-transform:inherit;letter-spacing:inherit;white-space:nowrap}.sort-trigger:hover{color:#b27444}.sort-icon{color:#b18bba;font-weight:800;margin-left:5px;font-size:14px}.data-table thead th:has([aria-sort]){background:#f7f5f8}.pill{display:inline-flex;align-items:center;padding:6px 9px;border-radius:6px;font-size:10px;font-weight:800;white-space:nowrap;background:#f0edf1;color:#675c6b}.pill-activo,.pill-pagada,.pill-cerrado{background:#e9f6ed;color:#267450}.pill-demo{background:#f9f0e1;color:#97612c}.pill-suspendido,.pill-pendiente,.pill-abierto,.pill-media{background:#fff3df;color:#986625}.pill-vencida,.pill-alta,.pill-baja{background:#fcebed;color:#a94d57}.pill-borrador{background:#f2f0f5;color:#71677a}.btn-secondary,.btn-primary,.btn-mini{display:inline-flex;justify-content:center;align-items:center;gap:6px;border-radius:6px;border:1px solid #c4b1c7;padding:10px 14px;background:#fff;color:#5a4162;font-weight:800;font-size:12px;white-space:nowrap}.btn-primary{background:#67466f;color:#fff;border-color:#67466f}.btn-primary:hover{background:#4c3154}.btn-secondary:hover,.btn-mini:hover{background:#f8f1f9}.btn-mini{font-size:10px;padding:7px 9px}.table-toolbar{display:flex;justify-content:flex-end;gap:10px;padding:15px 21px}.table-toolbar input,.table-toolbar select,.page-actions select{border:1px solid #ddd3e1;border-radius:6px;background:#fff;color:#4c4251;padding:10px 12px;max-width:100%}.table-toolbar input{width:310px}.table-toolbar select{min-width:170px}.table-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 21px;border-top:1px solid #ece6ef;color:#897c8c;font-size:12px}.page-actions{display:flex;align-items:center;gap:8px}.page-actions label{display:flex;align-items:center;gap:6px}.page-actions select{padding:7px}.page-actions button{background:white;border:1px solid #e3d8e6;border-radius:7px;color:#624968;padding:8px 10px;font-size:11px;font-weight:700}.page-actions button:hover:not(:disabled){background:#f9f3fa}.table-empty{color:#856d8b;text-align:center;padding:15px;font-size:12px}.table-empty[hidden],.data-table tr[hidden]{display:none!important}.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.inline-note{display:flex;gap:9px;align-items:flex-start;background:#fff9ef;border-left:3px solid #c79059;color:#7c6c5f;padding:15px;margin:18px 0;font-size:12px;line-height:1.65}.info-grid .inline-note{margin:0}.inline-note strong{flex:0 0 auto;color:#5c4558}.inline-note span{flex:1}.stat-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#fff;border:1px solid var(--line);margin-bottom:19px}.stat-strip:has(>div:nth-child(3):last-child){grid-template-columns:repeat(3,1fr)}.stat-strip>div{padding:19px 21px;border-right:1px solid var(--line)}.stat-strip>div:last-child{border-right:0}.stat-strip span{color:#7f7482;display:block;font-size:11px}.stat-strip strong{font-size:23px;color:#533b5d;margin-top:6px;display:block}.recurring{padding:26px 24px 20px}.recurring strong{display:block;color:#55345e;font-size:39px;letter-spacing:-1px}.recurring>span{font-size:11px;color:#ae7d51;font-weight:800}.recurring p{font-size:12px;color:#867b8a;line-height:1.7}.shortcuts{display:flex;gap:15px;padding:0 24px 22px}.shortcuts a{font-size:11px;color:#6d4775;font-weight:bold;text-decoration:underline}.breadcrumb{font-size:12px;color:#8e8191;margin:-8px 0 17px}.breadcrumb a{text-decoration:underline}.client-banner{background:linear-gradient(120deg,#3b2c47,#6b4b75);padding:22px 25px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:19px;border-radius:8px}.client-banner h2{font-size:23px;margin:7px 0}.client-banner p{margin:0;color:#e5dce7}.three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:19px}.pad{padding:22px}.pad h3{margin:8px 0;color:#533c5b}.pad p{margin:9px 0;color:#716777;font-size:12px;overflow-wrap:anywhere}.client-banner .pill{font-size:12px}.three-col+.card{margin-bottom:19px}.access-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:19px}.access-box{background:#fbf9fc;border:1px solid #eee5ef;padding:20px}.access-box b{color:#49384f;font-size:15px}.access-box p{color:#867a88;font-size:12px;min-height:40px}.invoice-sheet{background:#fff;border:1px solid var(--line);padding:26px 30px 32px;box-shadow:var(--sh)}.invoice-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:20px;border-bottom:1px solid var(--line)}.invoice-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:25px 0}.invoice-head h2{font-size:28px;color:#4b3556;margin:6px 0}.invoice-head p{margin:0;color:#9a8c9d}.invoice-status{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:8px}.invoice-status small{color:#7e7380}.invoice-parties{display:grid;grid-template-columns:1fr 1fr;gap:25px;padding:18px 0 25px}.invoice-parties h3{margin:8px 0;font-size:17px}.invoice-parties p{font-size:12px;line-height:1.65;color:#796e7e;overflow-wrap:anywhere}.invoice-lines{min-width:590px}.invoice-lines th,.invoice-lines td{text-align:right}.invoice-lines th:first-child,.invoice-lines td:first-child{text-align:left}.invoice-totals{width:min(100%,360px);margin:22px 0 25px auto}.invoice-totals>div{display:flex;align-items:center;justify-content:space-between;padding:11px 12px;border-bottom:1px solid var(--line);font-size:13px}.invoice-totals .invoice-grand{background:#f5f0f6;border:0;color:#4d3457;font-weight:800;font-size:17px}.invoice-bottom{background:#fff8ee;color:#776556;padding:18px 20px;font-size:12px}.invoice-bottom p{margin:5px 0;line-height:1.6}.explanation{font-size:12px;color:#877c8b;margin:15px 2px}.report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:23px}.report-card{position:relative;padding:24px;min-height:240px;display:flex;align-items:flex-start;flex-direction:column}.report-card h2{font-size:18px;margin:9px 0}.report-card p{font-size:12px;color:#8a7e8e;line-height:1.6;flex:1;margin-bottom:20px}.report-icon{font-size:34px;color:#7b5984;display:block;margin-bottom:12px}.report-card.planned{background:#fcfafc}.soon{background:#faf0e4;padding:10px 12px;font-size:11px;color:#946532}.suggestions{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;margin-top:18px}.suggestions>div{border-top:1px solid #eee8ef;padding:15px 3px}.suggestions b{font-size:13px;color:#593e62}.suggestions p{font-size:12px;color:#837687;margin-bottom:0}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}footer{background:#302738;color:#f5edf5;font-size:11px}.footer-grid{display:flex;justify-content:space-between;gap:15px;align-items:center;min-height:70px}.footer-grid small{opacity:.7;margin-left:8px}
@media(max-width:1250px){.container{padding:0 20px}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.page-layout{grid-template-columns:210px minmax(0,1fr);gap:20px}.dashboard-split{grid-template-columns:1fr}}
@media(max-width:850px){.page-layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:1fr 1fr;gap:10px;order:2}.sidebar-card{margin:0}.content{order:1}.headmeta .admin-chip{display:none}.menulinks a{padding:0 14px}.page-title{align-items:flex-start;flex-direction:column}.date-indicator{align-self:flex-start}.three-col{grid-template-columns:1fr 1fr}.stat-strip{grid-template-columns:repeat(2,1fr)}.stat-strip:has(>div:nth-child(3):last-child){grid-template-columns:repeat(2,1fr)}.stat-strip>div{border-bottom:1px solid var(--line)}.invoice-parties{grid-template-columns:1fr}}
@media(max-width:600px){.container{padding:0 14px}.topline-inner{flex-direction:column;justify-content:center;padding-top:8px;padding-bottom:8px;gap:4px}.toplinks{gap:14px}.brandline{height:auto;padding-top:17px;padding-bottom:17px;align-items:flex-start;flex-direction:column}.brand strong{font-size:22px}.headmeta{gap:6px}.page-layout{padding-top:23px}.page-title h1{font-size:27px}.kpi-grid{gap:10px}.kpi{min-height:130px;padding:15px 13px}.kpi strong{font-size:30px}.kpi strong.amount{font-size:20px}.kpi-icon{font-size:20px}.dashboard-split,.info-grid,.three-col,.report-grid,.suggestions,.access-grid{grid-template-columns:1fr}.sidebar{grid-template-columns:1fr}.table-toolbar{flex-direction:column}.table-toolbar input,.table-toolbar select{width:100%;min-width:0}.table-pager{align-items:flex-start;flex-direction:column}.page-actions{flex-wrap:wrap}.card-head{align-items:flex-start;flex-direction:column}.bar-chart{gap:4px}.bar-column>strong{font-size:8px}.invoice-sheet{padding:17px}.invoice-head{flex-direction:column}.invoice-status{align-items:flex-start;text-align:left}.stat-strip{grid-template-columns:1fr 1fr!important}.stat-strip strong{font-size:19px}.inline-note{display:block}.inline-note span{display:block}.footer-grid{flex-direction:column;align-items:flex-start;padding-top:16px;padding-bottom:16px}}
@media print{.topline,.mainhead,.sidebar,.demo-notice,.page-title,.invoice-actions,footer,.breadcrumb{display:none!important}body{background:#fff}.page-layout{display:block;padding:0}.invoice-sheet{border:0;box-shadow:none;padding:0}.invoice-bottom{border:1px solid #ddd;background:#fff}.container{max-width:none;margin:0;padding:0}.content{width:100%}}


/* v0.1.1 · Mejora de contraste, estados y planes */
:root{--muted-strong:#64596b;--warn:#b97719;--warn-bg:#fff3db;--ok:#1f7a52;--ok-bg:#e8f7ef;--bad:#b13f4a;--bad-bg:#fdecee;--info:#365f98;--info-bg:#e9f1fe}
body{color:#2f2835}
.page-title p,.explanation,.card-footnote,.sidebar-note p,.inline-note,.table-pager,.page-summary,.data-table td small,.brand small{color:var(--muted-strong)}
.data-table thead th,.compact-table thead th,.invoice-lines thead th{background:#f4f0f6;color:#4e3d58;border-bottom:1px solid #d8cbdf}
.sort-trigger{display:inline-flex;align-items:center;gap:6px;color:#4e3d58;font-weight:800}
.sort-trigger:hover{color:#8b5627}
.sort-icon{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:999px;background:#efe8f4;color:#6a4c7d;border:1px solid #dacbe4;font-size:12px;margin-left:0}
.pill{gap:7px;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800}
.pill-dot{width:9px;height:9px;border-radius:50%;display:inline-block;flex:0 0 9px}
.pill-ok{background:var(--ok-bg);color:var(--ok)}
.pill-ok .pill-dot{background:var(--ok)}
.pill-warn{background:var(--warn-bg);color:var(--warn)}
.pill-warn .pill-dot{background:var(--warn)}
.pill-bad{background:var(--bad-bg);color:var(--bad)}
.pill-bad .pill-dot{background:var(--bad)}
.pill-info{background:var(--info-bg);color:var(--info)}
.pill-info .pill-dot{background:var(--info)}
.pill-neutral{background:#f2f0f5;color:#5e5465}
.pill-neutral .pill-dot{background:#807687}
.plan-badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:7px 11px;font-weight:800;font-size:11px;border:1px solid #dbcde4;background:#f8f5fa;color:#473650;white-space:nowrap}
.plan-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#ede4f4;color:#5d4372;font-size:11px}
.plan-basico{background:#eef5ff;color:#2f568f;border-color:#cddcf2}.plan-basico .plan-icon{background:#dbe9ff;color:#2f568f}
.plan-profesional{background:#efe8ff;color:#60368d;border-color:#dacbf4}.plan-profesional .plan-icon{background:#dfd0fb;color:#60368d}
.plan-premium{background:#fff2df;color:#8f5c13;border-color:#efd3a7}.plan-premium .plan-icon{background:#ffe2b8;color:#8f5c13}
.plan-demo{background:#f0f6f8;color:#365d69;border-color:#cfe0e7}.plan-demo .plan-icon{background:#dcecef;color:#365d69}
.side-link,.toplinks a,.textlink,.shortcuts a,.breadcrumb,.breadcrumb a{color:#513c5f}
.side-link:hover,.textlink:hover,.shortcuts a:hover,.breadcrumb a:hover{color:#9b632f}
.footer-grid{color:#f7f3f8}
footer{background:#2d2335}
.card,.sidebar-card,.kpi,.invoice-sheet{border-color:#e0d6e6}
