/* Presentation only: existing controls, IDs and business data are preserved. */
.v5{--bg:#F4F7FB;--line:#D9E2EC;--accent:#1E5DB8;--gold:#D4A93A;background:#F4F7FB;color:#1F2937;font-family:Inter,"Segoe UI",-apple-system,BlinkMacSystemFont,sans-serif}
.v5 #workspace>header{background:#0B2E59;color:white}
.v5 #workspace.admin-layout>header{min-height:124px;padding:15px 24px;display:flex;flex-wrap:nowrap;justify-content:space-between;gap:24px;border-bottom:3px solid #E0B84E;box-shadow:0 3px 14px #0b2e5926;background-image:linear-gradient(90deg,#082747f5 0%,#082747ed 29%,#08274780 57%,#08274738 72%,#082747df 100%),url('./header-premium.png');background-size:cover;background-position:center 48%}
.v5 .admin-layout>header .brand{display:grid;grid-template-columns:246px minmax(0,1fr);gap:5px 26px;align-items:center;flex:1;min-width:0}
.premium-logo{grid-column:1;grid-row:1/4;display:flex;align-items:center;gap:7px;padding:10px 11px;background:linear-gradient(135deg,#fff,#f4f8fd);border:1px solid #d6e1ed;border-radius:10px;box-shadow:0 4px 16px #03162c33;color:#0B2E59;min-width:0}
.premium-logo svg{width:53px;height:67px;flex-shrink:0}.premium-logo strong{font:small-caps 18px/1.05 Georgia,"Times New Roman",serif;letter-spacing:-.5px;display:block}.premium-logo span{display:block;font-size:6.8px;letter-spacing:-.05px;font-weight:750;margin-top:7px;white-space:nowrap;color:#182b40}
.v5 .admin-layout>header .brand h1{font-size:clamp(20px,1.7vw,29px);font-weight:650;letter-spacing:-.035em;margin:0;color:white;line-height:1.2;text-shadow:0 2px 6px #041527b3}
.v5 .admin-layout>header .brand>small{font-size:13px;line-height:1.5;color:#f0f5fc;opacity:1}.v5 .admin-layout>header .account-bar{font-size:13px;color:#fff;margin:0}.v5 .admin-layout>header .toolbar{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;max-width:340px;flex-shrink:0}.premium-motto{width:100%;text-align:right;font-size:13px;line-height:1.4;letter-spacing:.03em;color:#fff;text-shadow:0 2px 5px #0009}
.v5 .v5-header-date{font-size:12px;margin:0;color:white;padding:8px 10px;background:#0b2e59b3;border-radius:7px;display:inline-flex}.v5 .admin-layout>header #signout{background:#0b2e59c9;border:1px solid #D4A93A;border-radius:7px;min-height:38px;padding:8px 12px;color:white;font-weight:500}.v5 .admin-layout>header #signout:hover{background:#1c4d7f}
.v5 .admin-layout .workspace-layout{grid-template-columns:246px minmax(0,1fr)}.v5 .admin-layout .workspace-layout.menu-collapsed{grid-template-columns:minmax(0,1fr)}
.v5 .admin-layout .workspace-layout>.tabs{background:linear-gradient(160deg,#0B2E59,#08243f 85%);padding:16px 13px 76px;gap:5px;height:calc(100vh - 124px);min-height:0;max-height:100vh;overflow:auto;border-right:1px solid #173f6b}
.v5 .admin-layout .tabs .tab{font-size:14px;line-height:1.4;color:#edf4fc;font-weight:500;padding:12px 13px;gap:13px;border:1px solid transparent;border-radius:8px;min-height:45px}.v5 .tabs .v5-icon{width:22px;height:22px;flex-basis:22px;stroke-width:1.5}.v5 .admin-layout .tabs .tab.active,.v5 .admin-layout .tabs .tab[aria-pressed=true]{background:linear-gradient(110deg,#ffe28a,#E0B84E 50%,#D4A93A);border:1px solid #efca65;box-shadow:0 3px 9px #0003,inset 0 1px #fff7cd;color:#142737;font-weight:750}.v5 .admin-layout .tabs .tab:not(.active):hover{background:#ffffff12;border-color:#ffffff25}.v5 .admin-layout .tab[data-tab=billing],.v5 .admin-layout .tab[data-tab=settings]{border-top:1px solid #7298bb66;margin-top:9px;padding-top:16px;border-radius:0 0 8px 8px}
.v5 .admin-layout .workspace-layout>.container{background:radial-gradient(ellipse at top right,#fff 0%,#F4F7FB 65%);padding:22px 25px 85px;min-height:calc(100vh - 124px)}.v5 .statusline{padding:0 0 13px;margin:0 0 16px;color:#526580;border-bottom:1px solid #D9E2EC;font-size:12px}.v5 .statusline #refresh{background:#eef5ff;border:1px solid #cbdcf4;color:#1E5DB8;padding:9px 16px;font-size:13px}.v5 .v5-section-heading{border:0;padding:0;margin:0 0 20px}.v5 #v5-section-title{font-size:28px;font-weight:750;letter-spacing:-.03em;color:#0B2E59}
.v5 #workspace .card,.v5 #workspace .stat{background:#fff;border:1px solid #D9E2EC;border-radius:11px;box-shadow:0 5px 18px #16487808}.v5 .card{padding:20px;margin-bottom:18px}.v5 .card h3{font-size:16px;line-height:1.35;color:#164d96;font-weight:700;margin:0 0 15px}.v5 .card h2{color:#0B2E59}.v5 input,.v5 select,.v5 textarea{border:1px solid #c3d4e7;border-radius:7px;background:#fff;color:#1F2937;min-height:42px}.v5 input::placeholder,.v5 textarea::placeholder{color:#687e99;opacity:1}.v5 .field label,.v5 label,.v5 .workforce-fields label{color:#304b6e;font-weight:600}.v5 button.ghost{background:#f0f6fe;color:#1E5DB8;border-color:#d4e2f3}.v5 button.primary{background:linear-gradient(110deg,#EAC965,#D4A93A);color:#172b42;border:1px solid #c69d30;box-shadow:0 2px 5px #ac821820}.v5 button:hover:not(:disabled){filter:brightness(.98)}.v5 :focus-visible{outline:3px solid #2563EB;outline-offset:3px}
.v5 #dashboardFilters{padding:18px 20px;margin-bottom:20px;gap:20px}.v5 #dashScope{color:#526b8a;font-size:12px;margin:0}.v5-quick-actions{gap:10px;margin:0 0 20px}.v5-quick-actions>span{color:#164d96;font-size:14px}.v5-quick-actions button{min-height:43px;padding:10px 14px;border:1px solid #d7e4f5;color:#1E5DB8;box-shadow:0 3px 10px #15477e05}
.v5 .admin-layout #dashboard .stats{gap:12px}.v5 #dashboard .stat{min-height:140px;padding:18px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.v5 #dashboard .stat>b{font-size:clamp(23px,1.8vw,30px);color:#0B2E59;letter-spacing:-.035em;font-weight:750}.v5 #dashboard .stat>span{font-size:12px;line-height:1.5;color:#51698b}.v5-metric-icon{width:36px;height:36px;border-radius:10px;background:#eaf2ff;color:#2563EB}.v5-metric-icon .v5-icon{width:23px;height:23px}.v5 .v5-metric-3 .v5-metric-icon{background:#e1f9ea;color:#13944e}
.v5 #accountingDash{padding:20px}.v5 #accountingDash>.debt-totals{gap:12px}.v5 #accountingDash .debt-totals>div{border:0;border-radius:9px;background:linear-gradient(110deg,#eef5ff,#f8fbff);padding:14px 16px;color:#304b6e}.v5 #accountingDash .debt-totals b{font-size:24px;color:#144d99;margin-top:7px}.v5 #accountingDash>p{color:#526b8a;font-size:12px;line-height:1.5}
.v5 .dashboard-charts{gap:15px}.v5 .dashboard-chart{padding:18px;border-top:1px solid #D9E2EC}.v5 .dashboard-chart h3{color:#144d99;font-size:16px}.v5 .dashboard-chart>p{color:#526b8a;font-size:12px;line-height:1.5}.v5 .dashboard-chart .plot-wrap>svg{height:145px;width:100%;overflow:visible}.v5 .chart-color-0{fill:#2563EB;background:#2563EB}.v5 .chart-color-1{fill:#24a59a;background:#24a59a}.v5 .chart-color-2{fill:#885bc2;background:#885bc2}.v5 .chart-color-3{fill:#D4A93A;background:#D4A93A}.v5 .chart-legend{max-height:150px}.v5 .chart-legend li{padding:6px 0;color:#345077;font-size:12px}.v5 .chart-total{padding:13px;background:#f1f6fe;border:0;border-radius:8px;color:#144d99!important;font-size:15px!important;font-weight:700}.v5-dashboard-grid{gap:16px}.v5-dashboard-grid>.card{padding:20px}.v5-dashboard-grid p{font-size:13px;color:#304967;line-height:1.5;padding:10px 0}
.v5 th{background:#edf3fb;color:#24466f;border-bottom:1px solid #c8d8ea;font-size:13px;padding:13px 12px}.v5 td{color:#263b53;padding:12px;font-size:14px}.v5 tbody tr:nth-child(even){background:#fafcff}.v5 tbody tr:hover{background:#edf5ff}.v5 .menu-toggle{background:#0f355f;border-color:#577fa8;box-shadow:0 3px 8px #04182b33;padding:11px 15px}.v5 .followup-button{background:#0f355f;border-color:#577fa8}.v5 .amount-negative,.v5 .negative-amount{color:#b21e32!important}.v5 .amount-favorable{color:#137347!important}
@media(min-width:1500px){.v5 .admin-layout #dashboard .stats{grid-template-columns:repeat(6,minmax(0,1fr))}.v5 .dashboard-charts{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1250px){.v5 #workspace.admin-layout>header{gap:16px;padding:15px 18px}.v5 .admin-layout>header .brand{grid-template-columns:205px minmax(0,1fr);gap:5px 18px}.premium-logo{padding:8px}.premium-logo svg{width:43px}.premium-logo strong{font-size:16px}.premium-logo span{font-size:5.7px}.v5 .admin-layout>header .toolbar{max-width:215px}.v5 .admin-layout .workspace-layout{grid-template-columns:216px minmax(0,1fr)}.v5 .admin-layout .workspace-layout.menu-collapsed{grid-template-columns:minmax(0,1fr)}.v5 .admin-layout .tabs .tab{padding:11px 8px;font-size:13px}.v5 #accountingDash .debt-totals b{font-size:21px}}
@media(max-width:950px){.v5 #workspace.admin-layout>header{flex-wrap:wrap;background-position:65% 45%}.v5 .admin-layout>header .brand{grid-template-columns:205px minmax(0,1fr);flex-basis:100%}.v5 .admin-layout>header .toolbar{max-width:none;width:100%;justify-content:flex-end}.premium-motto{width:auto;margin-right:auto;text-align:left;font-size:11px}.v5 .admin-layout .workspace-layout>.container{padding:18px 16px 80px}.v5 #dashboard .stat{min-height:130px;padding:15px}.v5 #v5-section-title{font-size:25px}.v5 .v5-header-date{display:inline-flex}}
@media(max-width:700px){.v5 .admin-layout .workspace-layout{display:block}.v5 .admin-layout .workspace-layout>.tabs{height:auto;max-height:250px;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}.v5 .admin-layout .tab[data-tab=billing],.v5 .admin-layout .tab[data-tab=settings]{margin:0;border-top-color:transparent;padding-top:11px}.v5 .admin-layout>header .brand{grid-template-columns:1fr;gap:9px}.premium-logo{grid-column:1;grid-row:auto;width:222px;box-sizing:border-box}.v5 .admin-layout>header .brand h1,.v5 .admin-layout>header .brand>small,.v5 .admin-layout>header .account-bar{grid-column:1}.v5 .admin-layout>header .brand h1{font-size:22px}.v5 .admin-layout>header .brand>small{font-size:11px}.v5 .admin-layout>header .toolbar{gap:8px}.premium-motto{font-size:10px}.v5 .v5-header-date{font-size:10px;padding:6px}.v5 #workspace.admin-layout>header{padding:16px}.v5 #dashboard .stat>b{font-size:23px}.v5 #dashboardFilters{gap:12px}.v5 #accountingDash .debt-totals b{font-size:19px}.v5 .card{padding:16px}}

.v5 .premium-motto{order:-1}

/* Facturación avanzada: opciones compactas dentro de los editores existentes. */
.invoice-advanced > label,.invoice-advanced [data-iv-confirm] label,.invoice-party-editor fieldset label{display:flex;align-items:center;gap:.6rem;padding:.4rem 0;}
.invoice-advanced input[type=checkbox],.invoice-party-editor input[type=checkbox]{width:auto;min-width:1rem;margin:0;flex:0 0 auto;}
.invoice-party-editor fieldset{border:1px solid #d5deed;border-radius:10px;padding:12px;}
