:root{--navy:#12396c;--blue:#2f6fed;--teal:#20b7bd;--green:#2fb46e;--orange:#f4a514;--purple:#8657eb;--bg:#f4f7fb;--text:#10213b;--muted:#6f7f95;--line:#dfe6ef;--sidebar:286px}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Comic Neue",cursive;color:var(--text);background:var(--bg);overflow-x:hidden}a{text-decoration:none;color:inherit}button,input{font:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:var(--sidebar);background:#fff;border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;z-index:30;display:flex;flex-direction:column;transition:width .28s ease;overflow:hidden}.brand-row{height:100px;display:flex;align-items:center;gap:13px;padding:18px 18px}.brand-logo{width:48px;height:48px;border-radius:14px;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:22px;flex:0 0 auto}.brand-copy{min-width:0;display:flex;flex-direction:column}.brand-copy strong{font-size:21px}.brand-copy span{font-size:13px;color:var(--muted);line-height:1.25}.icon-button{border:0;background:transparent;cursor:pointer}.sidebar-toggle{margin-left:auto;font-size:20px;color:var(--navy)}.sidebar-nav{padding:0 14px 20px;overflow:auto}.nav-link{width:100%;min-height:48px;display:flex;align-items:center;gap:14px;padding:0 14px;border:0;background:transparent;border-left:3px solid transparent;color:#30445f;font-weight:600;font-size:15px;cursor:pointer;text-align:left;transition:.2s}.nav-link>i:first-child{width:22px;text-align:center;font-size:17px}.nav-link.active,.nav-link:hover{background:#eef4ff;color:var(--navy);border-left-color:var(--navy)}.nav-group-toggle .chevron{margin-left:auto;font-size:12px;transition:transform .25s}.nav-group.open .chevron{transform:rotate(180deg)}.submenu{max-height:0;overflow:hidden;transition:max-height .32s ease}.nav-group.open .submenu{max-height:520px}.submenu a{display:block;padding:11px 16px 11px 53px;color:#5b6d84;font-size:14px;border-left:3px solid transparent}.submenu a:hover{color:var(--navy);background:#f6f9fd;border-left-color:#9cb6db}.support-box{margin:auto 18px 18px;border:1px solid var(--line);border-radius:14px;padding:14px;display:flex;align-items:center;gap:12px}.support-box>i{color:var(--teal)}.support-box div{display:flex;flex-direction:column}.support-box span{font-size:13px;color:var(--teal)}.main-shell{width:calc(100% - var(--sidebar));margin-left:var(--sidebar);transition:.28s ease}.topbar{height:104px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:20}.topbar h1{margin:0;font-size:31px}.topbar p{margin:5px 0 0;color:var(--muted)}.topbar-actions{display:flex;align-items:center;gap:16px}.search-box{height:52px;width:min(435px,32vw);border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;gap:12px;padding:0 15px;background:#fff}.search-box input{border:0;outline:0;width:100%;font-size:16px}.notification{position:relative;font-size:20px}.notification span{position:absolute;right:-9px;top:-11px;background:#ef4444;color:#fff;border-radius:50%;font-size:11px;min-width:19px;height:19px;display:grid;place-items:center}.profile{display:flex;align-items:center;gap:10px}.profile>div:nth-child(2){display:flex;flex-direction:column}.profile span{font-size:13px;color:var(--muted)}.avatar{width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,var(--navy),var(--teal));color:#fff;display:grid;place-items:center;font-weight:800}.page-content{padding:28px 32px 40px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.kpi-card{min-height:165px;border:1px solid var(--line);border-radius:18px;padding:24px;display:flex;align-items:center;gap:16px;box-shadow:0 10px 25px rgba(24,55,91,.05);position:relative;background:#fff}.kpi-card.blue{background:#f5f8ff}.kpi-card.orange{background:#fffaf0}.kpi-card.green{background:#f3fcf7}.kpi-card.teal{background:#f1fbfc}.kpi-icon{width:54px;height:54px;border-radius:15px;display:grid;place-items:center;font-size:20px;background:#e5edff;color:var(--blue)}.orange .kpi-icon{background:#fff0ca;color:var(--orange)}.green .kpi-icon{background:#dff7e8;color:var(--green)}.teal .kpi-icon{background:#dff7f8;color:var(--teal)}.kpi-card>div:nth-child(2){display:flex;flex-direction:column}.kpi-card strong{font-size:32px;line-height:1.1;margin:5px 0}.kpi-card small{color:#009b5b;font-weight:700}.kpi-chart{margin-left:auto;font-size:31px;color:currentColor}.blue .kpi-chart{color:var(--blue)}.orange .kpi-chart{color:var(--orange)}.green .kpi-chart{color:var(--green)}.teal .kpi-chart{color:var(--teal)}.dashboard-grid{display:grid;grid-template-columns:1.6fr .95fr 1fr;gap:20px;margin-top:20px}.panel{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 25px rgba(24,55,91,.05);padding:22px;min-width:0}.panel h2{margin:0;font-size:20px}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.panel-head>div{display:flex;flex-direction:column;text-align:right}.panel-head strong{font-size:20px}.panel-head strong span{color:var(--green)}.panel-head small{color:var(--muted);margin-top:6px}.fake-chart{height:310px;position:relative;padding:28px 0 32px 64px}.fake-chart svg{width:100%;height:100%;border-bottom:1px solid #e9eef5;background:repeating-linear-gradient(to bottom,transparent 0,transparent 66px,#e9eef5 67px)}.ylabels{position:absolute;left:0;top:32px;bottom:30px;display:flex;flex-direction:column;justify-content:space-between;color:var(--muted);font-size:13px}.xlabels{position:absolute;left:70px;right:0;bottom:0;display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.status-panel,.production-panel{display:flex;flex-direction:column}.donut-wrap{display:flex;align-items:center;gap:18px;margin:26px 0}.donut{width:170px;aspect-ratio:1;border-radius:50%;background:conic-gradient(var(--orange) 0 16%,var(--blue) 16% 63%,var(--green) 63% 75%,var(--teal) 75%);display:grid;place-items:center;position:relative}.donut:after{content:"";width:92px;aspect-ratio:1;background:#fff;border-radius:50%;position:absolute}.donut span{position:relative;z-index:2;color:var(--muted);display:flex;flex-direction:column;align-items:center}.donut strong{font-size:28px;color:var(--text)}.donut-wrap ul{padding:0;margin:0;list-style:none;flex:1}.donut-wrap li{display:flex;gap:7px;align-items:center;font-size:13px;margin:12px 0}.donut-wrap li b{margin-left:auto}.dot{width:9px;height:9px;border-radius:50%}.orange-dot{background:var(--orange)}.blue-dot{background:var(--blue)}.green-dot{background:var(--green)}.teal-dot{background:var(--teal)}.outline-button,.primary-button{min-height:50px;border-radius:13px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:700;cursor:pointer}.outline-button{border:1px solid var(--line);background:#fff;color:var(--navy);margin-top:auto}.primary-button{background:var(--navy);color:#fff;border:0}.production-row{display:grid;grid-template-columns:44px 1fr 36px 90px 45px;align-items:center;gap:10px;padding:14px 0;border-bottom:1px solid #edf1f5}.stage-icon{width:40px;height:40px;border-radius:11px;color:#fff;display:grid;place-items:center}.stage-icon.blue{background:var(--blue)}.stage-icon.teal{background:var(--teal)}.stage-icon.purple{background:var(--purple)}.stage-icon.green{background:var(--green)}.progress{height:8px;background:#e9edf3;border-radius:20px;overflow:hidden}.progress i{height:100%;display:block;background:var(--blue);border-radius:20px}.production-row small{color:var(--muted)}.lower-grid{display:grid;grid-template-columns:1.7fr .75fr .85fr;gap:20px;margin-top:20px}.table-scroll{overflow:auto}.table-panel table{width:100%;border-collapse:collapse;min-width:720px}.table-panel th,.table-panel td{text-align:left;padding:15px 12px;border-bottom:1px solid #edf1f5;font-size:14px}.table-panel th{color:var(--muted)}.status-badge{background:#e7efff;color:var(--blue);padding:7px 10px;border-radius:8px;font-weight:700;font-size:12px}.metric-line{display:flex;gap:14px;padding:20px 0;border-bottom:1px solid #edf1f5}.metric-line>i{width:50px;height:50px;border-radius:12px;background:var(--blue);color:#fff;display:grid;place-items:center;font-size:21px}.metric-line.green>i{background:var(--green)}.metric-line span{flex:1;color:var(--muted);display:grid;grid-template-columns:1fr auto;gap:5px}.metric-line strong{font-size:24px;color:var(--text)}.metric-line small{color:var(--blue)}.stock-alert{display:grid;grid-template-columns:42px 1fr 25px;gap:10px;align-items:center;background:#fff7f7;border:1px solid #ffdada;padding:13px;margin-top:12px;border-radius:13px}.stock-alert>i{width:40px;height:40px;border-radius:10px;background:#e8f0ff;color:var(--blue);display:grid;place-items:center}.stock-alert span{display:flex;flex-direction:column;font-size:13px;font-weight:700}.stock-alert small{color:#ef4444;font-weight:600}.stock-alert strong{color:#ef4444;font-size:20px}.placeholder-panel{min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.placeholder-icon{width:80px;height:80px;border-radius:22px;background:#e9f0ff;color:var(--blue);font-size:31px;display:grid;place-items:center}.placeholder-panel p{max-width:600px;color:var(--muted);line-height:1.6}.sidebar.collapsed{width:82px}.sidebar.collapsed .brand-copy,.sidebar.collapsed .nav-link span,.sidebar.collapsed .nav-link .chevron,.sidebar.collapsed .submenu,.sidebar.collapsed .support-box div{display:none}.sidebar.collapsed .brand-row{padding:16px 12px;gap:6px;flex-direction:column;height:115px}.sidebar.collapsed .sidebar-toggle{margin:0}.sidebar.collapsed .nav-link{justify-content:center;padding:0}.sidebar.collapsed .support-box{justify-content:center}.sidebar.collapsed~.main-shell{margin-left:82px;width:calc(100% - 82px)}@media(max-width:1200px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1.5fr 1fr}.production-panel{grid-column:1/-1}.lower-grid{grid-template-columns:1fr 1fr}.table-panel{grid-column:1/-1}}@media(max-width:850px){.sidebar{transform:translateX(-100%)}.sidebar.mobile-open{transform:translateX(0)}.main-shell,.sidebar.collapsed~.main-shell{width:100%;margin-left:0}.topbar{padding:0 18px;height:auto;min-height:90px}.topbar-actions{display:none}.page-content{padding:20px 15px}.kpi-grid,.dashboard-grid,.lower-grid{grid-template-columns:1fr}.production-panel{grid-column:auto}.topbar h1{font-size:25px}}@media(max-width:520px){.kpi-grid{grid-template-columns:1fr}.kpi-card{min-height:130px}.fake-chart{height:250px;padding-left:48px}.donut-wrap{flex-direction:column}.production-row{grid-template-columns:42px 1fr 30px 70px}.production-row small{display:none}}
/* Ajuste general de tipografía: aproximadamente 2% menor */
html{font-size:98%}.topbar h1{font-size:30px}.brand-copy strong{font-size:20px}.nav-link{font-size:14.7px}.submenu a{font-size:13.7px}.kpi-card strong{font-size:31px}.panel h2{font-size:19.6px}
/* Animación precisa del acordeón */
.nav-group{border-radius:10px}.nav-group-toggle{position:relative}.submenu{display:grid;grid-template-rows:0fr;max-height:none;opacity:.25;transition:grid-template-rows .34s cubic-bezier(.4,0,.2,1),opacity .25s ease}.submenu>*{overflow:hidden}.nav-group.open .submenu{grid-template-rows:1fr;opacity:1}.submenu a.active{color:var(--navy);font-weight:700;background:#f2f7fc;border-left-color:var(--navy)}
/* Módulo Operaciones */
.alert{display:flex;align-items:center;gap:10px;padding:14px 16px;border-radius:12px;margin-bottom:16px;font-weight:650}.alert.success{background:#ecfdf3;color:#087a48;border:1px solid #bcebd2}.alert.error{background:#fff1f1;color:#b42318;border:1px solid #fecaca}.operation-form{display:grid;gap:18px}.form-section{padding:24px}.section-title{display:flex;align-items:center;gap:13px;margin-bottom:22px}.section-title>span{width:43px;height:43px;border-radius:12px;display:grid;place-items:center;background:#eaf1ff;color:var(--blue)}.section-title h2{margin:0}.section-title p{margin:3px 0 0;color:var(--muted);font-size:13px}.form-grid{display:grid;gap:16px}.form-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.span-2{grid-column:span 2}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field>span{font-size:13px;font-weight:700;color:#41536b}.field input,.field select,.field textarea{width:100%;border:1px solid #d9e2ed;border-radius:10px;background:#fff;color:var(--text);padding:11px 12px;outline:none;transition:border .2s,box-shadow .2s}.field input,.field select{height:44px}.field input:focus,.field select:focus,.field textarea:focus{border-color:#7ca7eb;box-shadow:0 0 0 3px rgba(47,111,237,.1)}.money-input{display:flex;border:1px solid #d9e2ed;border-radius:10px;overflow:hidden;background:#fff}.money-input b{display:grid;place-items:center;padding:0 11px;background:#f4f7fb;color:var(--muted)}.money-input input{border:0;border-radius:0}.money-input.compact{width:155px}.order-summary{display:flex;align-items:center;justify-content:flex-end;gap:28px}.order-summary>div{display:flex;flex-direction:column;gap:5px}.order-summary>div>span{font-size:12px;color:var(--muted)}.order-summary strong{font-size:23px}.quick-customer{padding:0;overflow:hidden}.quick-customer summary{list-style:none;padding:16px 20px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-weight:750}.quick-customer summary::-webkit-details-marker{display:none}.quick-customer summary>span{display:flex;gap:10px;align-items:center}.quick-customer summary>i{transition:transform .25s}.quick-customer[open] summary>i{transform:rotate(180deg)}.quick-customer form{border-top:1px solid var(--line);padding:18px 20px}.action-field{justify-content:flex-end}.secondary-button{min-height:44px;border:1px solid #ccd8e7;background:#fff;color:var(--navy);border-radius:10px;padding:0 16px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}.secondary-button.danger{color:#c52a2a;border-color:#f2bcbc}.module-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.filter-form{display:flex;gap:10px;flex:1}.search-field{max-width:560px;flex:1;border:1px solid #d9e2ed;border-radius:10px;height:44px;display:flex;align-items:center;gap:10px;padding:0 13px}.search-field input{width:100%;border:0;outline:0}.data-panel{padding:0;overflow:hidden}.table-responsive{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:1050px}.data-table th,.data-table td{padding:14px 15px;border-bottom:1px solid #edf1f5;text-align:left;vertical-align:middle;font-size:13px}.data-table th{background:#f8fafc;color:#607089;font-size:12px;text-transform:uppercase;letter-spacing:.02em}.data-table td>small,.data-table td>span:not(.state-pill){display:block;margin-top:4px;color:var(--muted)}.order-code{color:var(--navy)}.state-pill{display:inline-flex;padding:6px 9px;border-radius:999px;background:color-mix(in srgb,var(--state,#64748B) 12%,white);color:var(--state,#64748B);font-size:11px;font-weight:800}.row-actions{display:flex;gap:7px}.row-actions form{margin:0}.action-button{width:34px;height:34px;border:1px solid #dce4ee;background:#fff;border-radius:9px;display:grid;place-items:center;color:var(--navy);cursor:pointer}.action-button.danger{color:#dc2626}.empty-state{text-align:center!important;padding:55px 20px!important;color:var(--muted)}.empty-state>i{font-size:34px;display:block;margin-bottom:12px}.empty-state strong,.empty-state span{display:block;margin-top:5px}.production-board,.quality-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.production-card,.quality-card{display:flex;flex-direction:column;gap:18px}.production-card-head,.quality-head{display:flex;justify-content:space-between;gap:14px}.production-card h2,.quality-card h2{margin:8px 0 3px;font-size:19px}.production-card p,.quality-card p{margin:0;color:var(--muted)}.item-count{height:36px;padding:0 11px;border-radius:9px;background:#f0f5ff;color:var(--blue);display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700}.production-meta{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px}.production-meta span{display:flex;align-items:center;gap:6px}.full{width:100%}.quality-head>div>span{font-size:10px;font-weight:850;color:var(--blue);letter-spacing:.08em}.quality-head>strong{font-size:27px;text-align:center}.quality-head>strong small{display:block;font-size:10px;color:var(--muted)}.check-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:11px;font-size:12px;color:#53657d}.check-list li{display:flex;align-items:center;gap:7px}.quality-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:auto}.quality-actions form{margin:0}
@media(max-width:1100px){.form-grid.cols-4{grid-template-columns:repeat(2,1fr)}.production-board,.quality-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.form-grid.cols-3,.form-grid.cols-4{grid-template-columns:1fr}.span-2{grid-column:auto}.module-toolbar,.filter-form,.order-summary{align-items:stretch;flex-direction:column}.production-board,.quality-grid{grid-template-columns:1fr}.money-input.compact{width:100%}}
/* Corrección final del desplegable: altura animada y contenido completo */
.submenu{display:block;max-height:0;overflow:hidden;opacity:.25;transition:max-height .36s cubic-bezier(.4,0,.2,1),opacity .25s ease}.nav-group.open .submenu{max-height:620px;opacity:1}


/* NUEVA ORDEN PROFESIONAL */
.order-workspace{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:20px;align-items:start}
.wizard-card,.live-order-summary{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 24px rgba(15,35,65,.045)}
.wizard-card{overflow:hidden;min-width:0}
.order-steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:0 14px;background:#fbfcfe;border-bottom:1px solid var(--line)}
.order-step{position:relative;min-height:82px;border:0;background:transparent;color:#718096;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 6px;cursor:pointer;text-align:left}
.order-step:after{content:"";position:absolute;left:56%;right:-44%;top:30px;height:2px;background:#e3e9f0}.order-step:last-child:after{display:none}
.step-icon{width:36px;height:36px;border-radius:11px;background:#edf1f6;color:#8b99aa;display:grid;place-items:center;z-index:1;transition:.25s}
.order-step b,.order-step small{display:block}.order-step b{font-size:12px;color:#45566d}.order-step small{font-size:10px;margin-top:2px}
.order-step.active .step-icon{background:var(--navy);color:#fff;box-shadow:0 6px 14px rgba(18,57,108,.18)}.order-step.active b{color:var(--navy)}
.order-step.active:before{content:"";position:absolute;left:18%;right:18%;bottom:-1px;height:3px;background:var(--navy);border-radius:4px 4px 0 0}
.order-step.complete .step-icon{background:#e8f8ef;color:var(--green)}.order-step.complete .step-icon i:before{content:"\f00c"}.order-step.complete:after{background:#bfe8d1}
.wizard-body{min-height:520px}.wizard-pane{display:none;padding:28px;animation:wizardFade .28s ease}.wizard-pane.active{display:block}
@keyframes wizardFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.pane-heading{display:flex;align-items:center;gap:13px;margin-bottom:25px;padding-bottom:18px;border-bottom:1px solid #edf1f5}.pane-heading-icon{width:46px;height:46px;border-radius:13px;background:#eaf1ff;color:var(--blue);display:grid;place-items:center;font-size:18px}.pane-heading-icon.success{background:#e9f9f0;color:var(--green)}
.pane-heading>div:nth-child(2){min-width:0}.pane-heading span{font-size:9px;font-weight:850;letter-spacing:.1em;color:var(--blue)}.pane-heading h2{font-size:20px;margin:3px 0}.pane-heading p{margin:0;color:var(--muted);font-size:12px}.pane-action{margin-left:auto;white-space:nowrap}
.modern-grid{gap:17px}.input-shell{position:relative;display:flex;align-items:center;border:1px solid #d9e2ed;border-radius:11px;background:#fff;overflow:hidden;transition:.2s}.input-shell:focus-within{border-color:#7ca7eb;box-shadow:0 0 0 3px rgba(47,111,237,.1)}
.input-shell>i{width:42px;text-align:center;color:#8493a8;flex:0 0 auto}.input-shell input,.input-shell select,.input-shell textarea{border:0!important;box-shadow:none!important;border-radius:0!important;padding-left:0!important;background:transparent!important}.money-shell>b{width:42px;height:42px;display:grid;place-items:center;background:#f5f7fa;color:#64748b}.textarea-shell{align-items:flex-start}.textarea-shell>i{padding-top:13px}
.selection-preview{margin-top:20px;border:1px solid #dbe5f1;border-radius:14px;background:#f8fbff;display:flex;align-items:center;gap:12px;padding:15px}.selection-preview.empty{background:#fafbfc}.preview-avatar{width:40px;height:40px;border-radius:11px;background:var(--navy);color:#fff;display:grid;place-items:center}.selection-preview.empty .preview-avatar{background:#e9edf3;color:#8593a5}.selection-preview strong,.selection-preview span{display:block}.selection-preview span{color:var(--muted);font-size:11px;margin-top:3px}
.choice-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;margin-bottom:23px}.choice-card{position:relative;border:1px solid #dfe6ef;border-radius:14px;padding:15px;cursor:pointer;background:#fff;transition:.2s}.choice-card input{position:absolute;opacity:0}.choice-card i{width:37px;height:37px;border-radius:10px;background:#f0f4f9;color:#607089;display:grid;place-items:center;margin-bottom:10px}.choice-card b,.choice-card small{display:block}.choice-card b{font-size:12.5px}.choice-card small{font-size:10px;color:var(--muted);margin-top:4px;line-height:1.35}.choice-card.active{border-color:#7da7e7;background:#f5f9ff;box-shadow:0 0 0 2px rgba(47,111,237,.07)}.choice-card.active i{background:var(--navy);color:#fff}
.items-table-wrap{border:1px solid #e1e7ef;border-radius:14px;overflow:hidden}.items-table{width:100%;border-collapse:collapse}.items-table th{background:#f8fafc;color:#68788d;text-transform:uppercase;letter-spacing:.035em;font-size:9.5px;padding:11px;text-align:left}.items-table td{padding:13px 11px;border-top:1px solid #edf1f5;font-size:11.5px}.items-table td:first-child{display:flex;align-items:center;gap:10px}.items-table td small{display:block;color:var(--muted);margin-top:3px}.item-cell-icon{width:36px;height:36px;border-radius:10px;background:#eaf1ff;color:var(--blue);display:grid;place-items:center}.remove-item{width:31px;height:31px;border:1px solid #f0caca;background:#fff6f6;color:#dc2626;border-radius:9px;cursor:pointer}
.empty-items{text-align:center;padding:42px 20px;background:#fcfdff}.empty-items>span{width:52px;height:52px;border-radius:15px;background:#eaf1ff;color:var(--blue);display:grid;place-items:center;margin:0 auto 12px;font-size:20px}.empty-items strong{display:block}.empty-items p{color:var(--muted);font-size:11px;margin:6px 0 15px}
.information-banner{margin-top:17px;border-radius:12px;background:#f0f7ff;color:#365b8b;padding:12px 14px;display:flex;gap:9px;font-size:11px;line-height:1.45}
.payment-layout{display:grid;grid-template-columns:1fr 300px;gap:24px}.payment-summary{background:#f7f9fc;border:1px solid #e2e8f0;border-radius:15px;padding:18px}.payment-summary>div{display:flex;justify-content:space-between;padding:8px 0;font-size:11px;color:#68788d}.payment-summary .total{border-top:1px solid #dce4ee;border-bottom:1px solid #dce4ee;margin:6px 0;padding:14px 0;color:var(--text)}.payment-summary .total strong{font-size:20px;color:var(--navy)}
.review-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.review-card{border:1px solid #dfe6ef;border-radius:14px;padding:16px;background:#fbfcfe}.review-card>span{display:block;color:#728197;font-size:10.5px}.review-card>span i{margin-right:6px;color:var(--blue)}.review-card strong{display:block;font-size:15px;margin:9px 0 4px}.review-card small{color:var(--muted)}.final-confirmation{display:flex;align-items:center;gap:13px;margin-top:18px;background:#eef9f3;border:1px solid #cbead8;padding:16px;border-radius:14px;color:#206c47}.final-confirmation>i{font-size:23px}.final-confirmation p{margin:4px 0 0;font-size:10.5px}
.wizard-footer{min-height:76px;border-top:1px solid var(--line);background:#fbfcfe;padding:14px 23px;display:flex;align-items:center;gap:13px}.wizard-progress{margin:auto;min-width:200px;text-align:center}.wizard-progress>span{font-size:9.5px;color:var(--muted)}.wizard-progress>div{height:5px;background:#e4eaf1;border-radius:99px;margin-top:6px;overflow:hidden}.wizard-progress i{height:100%;display:block;background:linear-gradient(90deg,var(--blue),var(--teal));transition:width .3s}
.hidden{display:none!important}.live-order-summary{position:sticky;top:123px;padding:18px}.summary-title{display:flex;align-items:center;gap:10px;margin-bottom:17px}.summary-title>span{width:38px;height:38px;border-radius:11px;background:var(--navy);color:#fff;display:grid;place-items:center}.summary-title strong,.summary-title small{display:block}.summary-title small{font-size:9.5px;color:var(--muted);margin-top:2px}.summary-row{display:flex;justify-content:space-between;gap:11px;padding:8px 0;font-size:11px}.summary-row span{color:var(--muted)}.summary-row b{text-align:right}.summary-divider{height:1px;background:#e5eaf0;margin:7px 0}.summary-total{padding:11px 0}.summary-total span{display:block;font-size:9.5px;color:var(--muted)}.summary-total strong{display:block;font-size:24px;color:var(--navy);margin-top:3px}.summary-row.balance b{color:var(--green)}.summary-help{display:flex;gap:8px;background:#f4f8fd;border-radius:11px;padding:10px;margin-top:12px;color:#54708f}.summary-help p{margin:0;font-size:10px;line-height:1.4}
.app-modal{position:fixed;inset:0;z-index:200;display:none;align-items:center;justify-content:center;padding:20px}.app-modal.open{display:flex}.modal-backdrop{position:absolute;inset:0;background:rgba(9,23,43,.55);backdrop-filter:blur(3px)}.modal-window{position:relative;width:min(700px,100%);max-height:90vh;background:#fff;border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.2);overflow:auto;animation:modalIn .24s ease}.modal-large{width:min(880px,100%)}@keyframes modalIn{from{opacity:0;transform:translateY(12px) scale(.985)}}.modal-window>header{display:flex;align-items:center;justify-content:space-between;padding:19px 22px;border-bottom:1px solid #e7ecf2;position:sticky;top:0;background:#fff;z-index:2}.modal-window>header>div{display:flex;gap:11px;align-items:center}.modal-icon{width:41px;height:41px;border-radius:12px;background:#eaf1ff;color:var(--blue);display:grid;place-items:center}.modal-window h2{font-size:17px;margin:0}.modal-window header p{font-size:10.5px;color:var(--muted);margin:4px 0 0}.modal-close{width:35px;height:35px;border:0;border-radius:10px;background:#f3f5f8;color:#64748b;cursor:pointer}.modal-content{padding:21px}.modal-window>form>footer,.modal-window>footer{display:flex;justify-content:flex-end;gap:9px;padding:14px 21px;border-top:1px solid #e7ecf2;background:#fbfcfe;position:sticky;bottom:0}.modal-open{overflow:hidden}
@media(max-width:1250px){.order-workspace{grid-template-columns:1fr}.live-order-summary{position:static;display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.summary-title,.summary-total,.summary-help{grid-column:1/-1}}
@media(max-width:950px){.order-steps{grid-template-columns:repeat(3,1fr)}.order-step:after{display:none}.choice-cards{grid-template-columns:repeat(2,1fr)}.payment-layout{grid-template-columns:1fr}}
@media(max-width:650px){.wizard-pane{padding:19px 15px}.order-steps{grid-template-columns:repeat(2,1fr);padding:0}.order-step{min-height:65px}.order-step small{display:none}.pane-heading{align-items:flex-start;flex-wrap:wrap}.pane-action{margin-left:0;width:100%}.choice-cards,.review-grid{grid-template-columns:1fr}.wizard-footer{flex-wrap:wrap}.wizard-progress{order:-1;width:100%}.items-table{min-width:680px}.items-table-wrap{overflow:auto}.live-order-summary{grid-template-columns:1fr 1fr}.modal-content{padding:16px}}


/* =========================================================
   AJUSTE GENERAL PARA VISUALIZACIÓN NATIVA AL 100%
   Equivale aproximadamente a la distribución anterior al 90%
   ========================================================= */
:root{
  --sidebar:258px;
  --scroll-track:#edf2f7;
  --scroll-thumb:#a9b7c8;
  --scroll-thumb-hover:#8294aa;
}
html{font-size:90%;scrollbar-color:var(--scroll-thumb) var(--scroll-track);scrollbar-width:thin}
body{font-size:1rem}

/* Scrollbar general coherente con el sistema */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:var(--scroll-track);border-radius:999px}
::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border:2px solid var(--scroll-track);border-radius:999px}
::-webkit-scrollbar-thumb:hover{background:var(--scroll-thumb-hover)}
::-webkit-scrollbar-corner{background:var(--scroll-track)}

/* Sidebar compacto y con desplazamiento propio */
.sidebar{width:var(--sidebar)}
.brand-row{height:90px;padding:15px 16px;gap:11px}
.brand-logo{width:43px;height:43px;border-radius:13px;font-size:19px}
.brand-copy strong{font-size:18px;line-height:1.12}
.brand-copy span{font-size:11.5px}
.sidebar-toggle{font-size:18px}
.sidebar-nav{flex:1;min-height:0;padding:0 12px 18px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#9cadc1 transparent}
.sidebar-nav::-webkit-scrollbar{width:7px}
.sidebar-nav::-webkit-scrollbar-track{background:transparent}
.sidebar-nav::-webkit-scrollbar-thumb{background:#a9b8c9;border:1px solid #fff;border-radius:999px}
.sidebar-nav::-webkit-scrollbar-thumb:hover{background:#8496ab}
.nav-link{min-height:43px;gap:12px;padding:0 12px;font-size:13.5px}
.nav-link>i:first-child{width:20px;font-size:15.5px}
.submenu a{padding:9px 13px 9px 47px;font-size:12.6px}
.support-box{display:none!important}

/* Encabezado y contenido principal */
.main-shell{width:calc(100% - var(--sidebar));margin-left:var(--sidebar)}
.topbar{height:94px;padding:0 30px}
.topbar h1{font-size:28px}
.topbar p{margin-top:4px;font-size:13px}
.topbar-actions{gap:14px}
.search-box{height:47px;width:min(410px,32vw);border-radius:13px;padding:0 14px}
.search-box input{font-size:14.5px}
.notification{font-size:18px}
.avatar{width:42px;height:42px}
.profile{gap:9px}.profile span{font-size:11.5px}
.page-content{padding:25px 29px 36px}

/* Dashboard más compacto, sin perder jerarquía */
.kpi-grid{gap:18px}
.kpi-card{min-height:148px;border-radius:16px;padding:21px;gap:14px}
.kpi-icon{width:49px;height:49px;border-radius:14px;font-size:18px}
.kpi-card strong{font-size:29px;margin:4px 0}
.kpi-card small{font-size:11.5px}
.kpi-chart{font-size:28px}
.dashboard-grid,.lower-grid{gap:18px;margin-top:18px}
.panel{border-radius:16px;padding:20px}
.panel h2{font-size:18px}
.panel-head strong{font-size:18px}.panel-head small{margin-top:5px;font-size:11.5px}
.fake-chart{height:279px;padding:25px 0 29px 58px}
.ylabels{top:29px;bottom:27px;font-size:11.5px}
.xlabels{left:63px;font-size:10.8px}
.donut-wrap{gap:16px;margin:23px 0}
.donut{width:153px}.donut:after{width:83px}.donut strong{font-size:25px}
.donut-wrap li{font-size:11.5px;margin:10px 0}
.outline-button,.primary-button{min-height:45px;border-radius:12px;padding:0 16px}
.production-row{grid-template-columns:40px 1fr 33px 81px 41px;gap:9px;padding:12px 0}
.stage-icon{width:36px;height:36px;border-radius:10px}
.progress{height:7px}
.table-panel table{min-width:648px}
.table-panel th,.table-panel td{padding:13px 11px;font-size:12.5px}
.status-badge{padding:6px 9px;font-size:10.8px}
.metric-line{gap:12px;padding:18px 0}.metric-line>i{width:45px;height:45px;font-size:19px}.metric-line strong{font-size:22px}
.stock-alert{grid-template-columns:38px 1fr 23px;gap:9px;padding:12px}.stock-alert>i{width:36px;height:36px}.stock-alert span{font-size:11.5px}.stock-alert strong{font-size:18px}

/* Estado colapsado proporcional */
.sidebar.collapsed{width:74px}
.sidebar.collapsed .brand-row{height:104px;padding:14px 10px}
.sidebar.collapsed~.main-shell{margin-left:74px;width:calc(100% - 74px)}

/* Scroll interno para tablas y modales */
.table-scroll,.items-table-wrap,.modal-window{scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) var(--scroll-track)}
.table-scroll::-webkit-scrollbar,.items-table-wrap::-webkit-scrollbar,.modal-window::-webkit-scrollbar{width:8px;height:8px}

/* Mantener la escala del asistente de órdenes consistente */
.order-workspace{gap:18px;grid-template-columns:minmax(0,1fr) 270px}
.live-order-summary{top:110px}

@media(max-width:1200px){
  :root{--sidebar:244px}
  .page-content{padding:23px 25px 34px}
}
@media(max-width:760px){
  html{font-size:100%}
  .topbar{height:auto;min-height:78px;padding:14px 18px}
  .page-content{padding:18px 15px 28px}
}

/* AVANCE 078: Perfil, Cuenta y Soporte adaptados correctamente a móvil */
@media(max-width:760px){
 #userProfileModal.app-modal.open,
 #accountSettingsModal.app-modal.open,
 #supportModal.app-modal.open{
  inset:78px 0 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
  overscroll-behavior:contain!important;
 }
 #userProfileModal>.modal-backdrop,
 #accountSettingsModal>.modal-backdrop,
 #supportModal>.modal-backdrop{
  position:absolute!important;
  inset:0!important;
 }
 #userProfileModal .user-modal-window,
 #accountSettingsModal .user-modal-window,
 #supportModal .user-modal-window{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  max-width:100%!important;
  height:calc(100dvh - 94px)!important;
  min-height:0!important;
  max-height:calc(100dvh - 94px)!important;
  margin:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
  box-sizing:border-box!important;
 }
 #userProfileModal .user-modal-window>form,
 #accountSettingsModal .user-modal-window>form,
 #supportModal .user-modal-window>form{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  width:100%!important;
  min-height:0!important;
  max-height:none!important;
  overflow:hidden!important;
 }
 #userProfileModal .user-modal-header,
 #accountSettingsModal .user-modal-header,
 #supportModal .user-modal-header{
  position:relative!important;
  inset:auto!important;
  z-index:4!important;
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  width:100%!important;
  min-height:76px!important;
  padding:14px 16px!important;
  border-radius:18px 18px 0 0!important;
  box-sizing:border-box!important;
 }
 #userProfileModal .user-modal-header>div,
 #accountSettingsModal .user-modal-header>div,
 #supportModal .user-modal-header>div{
  min-width:0!important;
  align-items:center!important;
 }
 #userProfileModal .user-modal-header .modal-icon,
 #accountSettingsModal .user-modal-header .modal-icon,
 #supportModal .user-modal-header .modal-icon{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
 }
 #userProfileModal .user-modal-header h2,
 #accountSettingsModal .user-modal-header h2,
 #supportModal .user-modal-header h2{
  font-size:1.08rem!important;
  line-height:1.2!important;
 }
 #userProfileModal .user-modal-header p,
 #accountSettingsModal .user-modal-header p,
 #supportModal .user-modal-header p{
  display:block!important;
  max-width:100%!important;
  font-size:.72rem!important;
  line-height:1.3!important;
  overflow-wrap:anywhere!important;
 }
 #userProfileModal .user-modal-header .modal-close,
 #accountSettingsModal .user-modal-header .modal-close,
 #supportModal .user-modal-header .modal-close{
  display:grid!important;
  place-items:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  margin-left:8px!important;
 }
 #userProfileModal .user-modal-window .modal-content,
 #accountSettingsModal .user-modal-window .modal-content,
 #supportModal .user-modal-window .modal-content{
  display:block!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-height:0!important;
  max-height:none!important;
  padding:16px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:auto!important;
  box-sizing:border-box!important;
 }
 #userProfileModal .user-profile-summary,
 #accountSettingsModal .account-modal-layout,
 #supportModal .support-action-grid,
 #supportModal .support-modal-grid,
 #userProfileModal .user-modal-grid.cols-2{
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
  min-width:0!important;
 }
 #userProfileModal .user-profile-summary{
  gap:14px!important;
  align-items:start!important;
 }
 #userProfileModal .user-profile-avatar{
  width:92px!important;
  height:92px!important;
  font-size:2rem!important;
 }
 #userProfileModal .user-photo-card,
 #accountSettingsModal .user-modal-card,
 #supportModal .user-modal-card,
 #supportModal .support-action,
 #supportModal .support-side,
 #supportModal .support-request-form{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
 }
 #accountSettingsModal .account-modal-layout aside{
  grid-column:auto!important;
  grid-row:auto!important;
 }
 #supportModal .support-request-grid{
  grid-template-columns:minmax(0,1fr)!important;
 }
 #userProfileModal .field,
 #accountSettingsModal .field,
 #supportModal .field,
 #userProfileModal .input-shell,
 #accountSettingsModal .input-shell,
 #supportModal .input-shell,
 #userProfileModal input,
 #accountSettingsModal input,
 #supportModal input,
 #userProfileModal select,
 #accountSettingsModal select,
 #supportModal select,
 #userProfileModal textarea,
 #accountSettingsModal textarea,
 #supportModal textarea{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
 }
 #userProfileModal .user-modal-window>form>footer,
 #accountSettingsModal .user-modal-window>form>footer,
 #supportModal .user-modal-window>form>footer{
  position:relative!important;
  inset:auto!important;
  z-index:4!important;
  display:grid!important;
  flex:0 0 auto!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-height:74px!important;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom))!important;
  border-radius:0 0 18px 18px!important;
  box-sizing:border-box!important;
 }
 #userProfileModal .user-modal-window>form>footer .primary-button,
 #userProfileModal .user-modal-window>form>footer .secondary-button,
 #accountSettingsModal .user-modal-window>form>footer .primary-button,
 #accountSettingsModal .user-modal-window>form>footer .secondary-button,
 #supportModal .user-modal-window>form>footer .primary-button,
 #supportModal .user-modal-window>form>footer .secondary-button{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  height:46px!important;
  margin:0!important;
  padding:0 10px!important;
  justify-content:center!important;
  white-space:nowrap!important;
 }
}
@media(max-width:340px){
 #userProfileModal .user-modal-header,
 #accountSettingsModal .user-modal-header,
 #supportModal .user-modal-header,
 #userProfileModal .user-modal-window .modal-content,
 #accountSettingsModal .user-modal-window .modal-content,
 #supportModal .user-modal-window .modal-content,
 #userProfileModal .user-modal-window>form>footer,
 #accountSettingsModal .user-modal-window>form>footer,
 #supportModal .user-modal-window>form>footer{
  padding-left:12px!important;
  padding-right:12px!important;
 }
 #userProfileModal .user-modal-window>form>footer,
 #accountSettingsModal .user-modal-window>form>footer,
 #supportModal .user-modal-window>form>footer{gap:7px!important}
 #userProfileModal .user-modal-window>form>footer button,
 #accountSettingsModal .user-modal-window>form>footer button,
 #supportModal .user-modal-window>form>footer button{
  font-size:.78rem!important;
  padding-inline:6px!important;
 }
}

/* Sucursales: acción secundaria claramente contenida en el pie del formulario */
.branch-form-modal form>footer .branch-cancel-button{
  min-height:48px!important;
  padding:0 20px!important;
  border:1px solid #b9c9dd!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--navy)!important;
  box-shadow:0 2px 5px rgba(18,57,108,.05)!important;
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.branch-form-modal form>footer .branch-cancel-button:hover{
  border-color:#6f91bc!important;
  background:#f3f7fd!important;
  box-shadow:0 4px 10px rgba(18,57,108,.1)!important;
  transform:translateY(-1px);
}
.branch-form-modal form>footer .branch-cancel-button:focus-visible{
  outline:3px solid rgba(47,111,237,.2)!important;
  outline-offset:2px;
}
html[data-theme="dark"] .branch-form-modal form>footer .branch-cancel-button{
  background:var(--surface,#172033)!important;
  border-color:#50627b!important;
  color:#dbeafe!important;
}
html[data-theme="dark"] .branch-form-modal form>footer .branch-cancel-button:hover{
  background:var(--surface-raised,#1e293b)!important;
  border-color:#7691b5!important;
}

/* Roles y permisos: buscador completo y acción Cancelar contenida */
.roles-module .roles-search{
  width:min(650px,100%)!important;
  max-width:650px!important;
  min-height:54px!important;
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr)!important;
  align-items:stretch!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #cbd8e8!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 2px 6px rgba(18,57,108,.045)!important;
  transition:border-color .18s ease,box-shadow .18s ease!important;
}
.roles-module .roles-search:focus-within{
  border-color:#6f9ff0!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.12)!important;
}
.roles-module .roles-search>i{
  width:54px!important;
  min-width:54px!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  border-right:1px solid #d8e3f0!important;
  background:#eef4ff!important;
  color:#2f6fed!important;
  font-size:17px!important;
}
.roles-module .roles-search>input{
  width:100%!important;
  min-width:0!important;
  min-height:52px!important;
  padding:0 16px!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:var(--text)!important;
  box-shadow:none!important;
}
#managementModal:has(input[name="entity"][value="role"]) footer .user-cancel-button{
  min-height:48px!important;
  padding:0 22px!important;
  border:1px solid #b9c9dd!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--navy)!important;
  box-shadow:0 2px 5px rgba(18,57,108,.05)!important;
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
#managementModal:has(input[name="entity"][value="role"]) footer .user-cancel-button:hover{
  border-color:#6f91bc!important;
  background:#f3f7fd!important;
  box-shadow:0 4px 10px rgba(18,57,108,.1)!important;
  transform:translateY(-1px);
}
#managementModal:has(input[name="entity"][value="role"]) footer .user-cancel-button:focus-visible{
  outline:3px solid rgba(47,111,237,.2)!important;
  outline-offset:2px;
}
html[data-theme="dark"] .roles-module .roles-search{
  background:var(--surface,#172033)!important;
  border-color:#40516b!important;
}
html[data-theme="dark"] .roles-module .roles-search>i{
  background:#1d3554!important;
  border-color:#40516b!important;
  color:#7cb6ff!important;
}
html[data-theme="dark"] #managementModal:has(input[name="entity"][value="role"]) footer .user-cancel-button{
  background:var(--surface,#172033)!important;
  border-color:#50627b!important;
  color:#dbeafe!important;
}
@media(max-width:900px){
  .roles-module .roles-search{max-width:none!important}
}

/* Usuarios: confirmación compacta y acción Cancelar claramente contenida */
#userConfirmModal .user-confirm-modal{
  width:min(440px,calc(100vw - 24px))!important;
  max-width:440px!important;
  border-radius:20px!important;
  overflow:hidden!important;
}
#userConfirmModal .user-confirm-modal>header{
  padding:20px 22px!important;
}
#userConfirmModal .user-confirm-modal .modal-content{
  padding:24px 26px!important;
}
#userConfirmModal .user-confirm-modal>footer{
  padding:16px 22px!important;
  gap:12px!important;
  display:grid!important;
  grid-template-columns:1fr 1.25fr!important;
  align-items:center!important;
}
#userConfirmModal .user-confirm-modal>footer .primary-button,
#userConfirmModal .user-confirm-modal>footer .user-confirm-cancel{
  width:100%!important;
  min-width:0!important;
  min-height:48px!important;
  justify-content:center!important;
}
#userConfirmModal .user-confirm-modal>footer .user-confirm-cancel{
  padding:0 18px!important;
  border:1px solid #b9c9dd!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--navy)!important;
  box-shadow:0 2px 5px rgba(18,57,108,.05)!important;
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
#userConfirmModal .user-confirm-modal>footer .user-confirm-cancel:hover{
  border-color:#6f91bc!important;
  background:#f3f7fd!important;
  box-shadow:0 4px 10px rgba(18,57,108,.1)!important;
  transform:translateY(-1px);
}
#userConfirmModal .user-confirm-modal>footer .user-confirm-cancel:focus-visible{
  outline:3px solid rgba(47,111,237,.2)!important;
  outline-offset:2px;
}
html[data-theme="dark"] #userConfirmModal .user-confirm-modal>footer .user-confirm-cancel{
  background:var(--surface,#172033)!important;
  border-color:#50627b!important;
  color:#dbeafe!important;
}
@media(max-width:460px){
  #userConfirmModal .user-confirm-modal>footer{
    grid-template-columns:1fr!important;
  }
}


/* AJUSTE SOLICITADO: BARRA DE PASOS EN UNA SOLA LÍNEA SIN SUBTÍTULOS */
.order-steps{display:grid !important;grid-template-columns:repeat(6,minmax(0,1fr)) !important;padding:0 14px !important;background:#fbfcfe !important;border-bottom:1px solid var(--line) !important;}
.order-step{position:relative !important;min-height:76px !important;border:0 !important;background:transparent !important;color:#718096 !important;display:flex !important;align-items:center !important;justify-content:center !important;gap:8px !important;padding:10px 6px !important;cursor:pointer !important;text-align:left !important;overflow:visible !important;}
.order-step:after{content:"" !important;position:absolute !important;left:56% !important;right:-44% !important;top:50% !important;transform:translateY(-50%) !important;height:2px !important;background:#e3e9f0 !important;border-radius:999px !important;}
.order-step:last-child:after{display:none !important;}
.order-step b,.order-step small{display:block !important;}
.order-step b{font-size:12px !important;color:#45566d !important;line-height:1.15 !important;}
.order-step small{display:none !important;}
.order-step.active .step-icon{background:var(--navy) !important;color:#fff !important;box-shadow:0 6px 14px rgba(18,57,108,.18) !important;}
.order-step.active b{color:var(--navy) !important;}
.order-step.active:before{content:"" !important;position:absolute !important;left:18% !important;right:18% !important;bottom:-1px !important;height:3px !important;background:var(--navy) !important;border-radius:4px 4px 0 0 !important;}
.order-step.complete .step-icon{background:#e8f8ef !important;color:var(--green) !important;}
.order-step.complete .step-icon i:before{content:"\f00c" !important;}
.order-step.complete:after{background:#bfe8d1 !important;}
@media(max-width:950px){.order-steps{grid-template-columns:repeat(3,1fr) !important;}.order-step:after{display:none !important;}}
@media(max-width:650px){.order-steps{grid-template-columns:repeat(2,1fr) !important;padding:0 !important;}.order-step{min-height:65px !important;}.order-step small{display:none !important;}}


/* AJUSTE FINAL: líneas de conexión más pequeñas */
.order-step:after{left:60% !important; right:-30% !important;}
@media(max-width:1200px){.order-step:after{left:61% !important; right:-26% !important;}}


/* AJUSTE EXTRA: líneas aún más pequeñas */
.order-step:after{left:63% !important; right:-22% !important; height:2px !important;}
@media(max-width:1200px){.order-step:after{left:64% !important; right:-19% !important;}}


/* AJUSTE REAL: líneas más cortas y visibles */
.order-step:after{left:auto !important; right:-10px !important; width:30px !important; height:2px !important;}
@media(max-width:1200px){.order-step:after{right:-8px !important; width:24px !important;}}


/* SELECTOR PROFESIONAL DE CLIENTES */
.customer-field{position:relative}.customer-combobox{position:relative}.customer-search-shell{height:48px;display:grid;grid-template-columns:50px minmax(0,1fr) 44px;align-items:center;border:1px solid #cfd9e6;border-radius:12px;background:#fff;overflow:hidden;transition:border-color .2s,box-shadow .2s}.customer-search-shell:focus-within{border-color:#6f9ff0;box-shadow:0 0 0 3px rgba(47,111,237,.12)}
.customer-search-icon{height:100%;display:grid;place-items:center;background:#edf4ff;color:var(--navy);border-right:1px solid #dce6f2;font-size:15px}.customer-search-shell input{width:100%;height:100%;border:0!important;outline:0!important;padding:0 14px!important;background:transparent!important;font-size:12px;color:var(--text);box-shadow:none!important}.customer-search-shell input::placeholder{color:#6f7f92}.customer-toggle{height:100%;border:0;background:transparent;color:#65758a;cursor:pointer;transition:.2s}.customer-toggle i{transition:transform .2s}.customer-toggle.open i{transform:rotate(180deg)}
.customer-results{position:absolute;top:calc(100% + 7px);left:0;right:0;z-index:80;max-height:320px;overflow:auto;background:#fff;border:1px solid #d9e2ec;border-radius:13px;box-shadow:0 18px 45px rgba(15,35,65,.16);padding:6px}.customer-result{width:100%;display:grid;grid-template-columns:39px minmax(0,1fr) auto;align-items:center;gap:10px;border:0;background:#fff;border-radius:9px;padding:9px 10px;text-align:left;cursor:pointer;color:var(--text)}.customer-result:hover,.customer-result:focus{background:#f1f6fd;outline:0}.customer-result-avatar{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#eaf2ff;color:var(--navy)}.customer-result-data{min-width:0}.customer-result-data strong,.customer-result-data small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-result-data strong{font-size:11.5px}.customer-result-data small{font-size:9.8px;color:var(--muted);margin-top:3px}.customer-balance{font-size:9.5px;font-weight:800;color:#b45309;background:#fff7ed;border:1px solid #fed7aa;border-radius:999px;padding:4px 7px;white-space:nowrap}.customer-empty,.customer-loading{min-height:72px;display:flex;align-items:center;justify-content:center;gap:9px;color:var(--muted);font-size:11px}.customer-results{scrollbar-width:thin;scrollbar-color:#bcc9d8 #f2f5f8}.customer-results::-webkit-scrollbar{width:7px}.customer-results::-webkit-scrollbar-thumb{background:#bcc9d8;border-radius:99px}.customer-results::-webkit-scrollbar-track{background:#f2f5f8}
@media(max-width:650px){.customer-search-shell{grid-template-columns:44px minmax(0,1fr) 40px}.customer-balance{display:none}.customer-result{grid-template-columns:36px minmax(0,1fr)}}


/* AJUSTE MODAL: iconos con fondo y scroll interno */
.modal-window{
  overflow:hidden !important;
  display:flex;
  flex-direction:column;
}
.modal-window form{
  display:flex;
  flex-direction:column;
  min-height:0;
  flex:1 1 auto;
  overflow:hidden;
}
.modal-window .modal-content{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:21px;
  scrollbar-width:thin;
  scrollbar-color:var(--scroll-thumb) var(--scroll-track);
  scrollbar-gutter:stable;
}
.modal-window .modal-content::-webkit-scrollbar{width:8px;height:8px}
.modal-window .modal-content::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-radius:999px}
.modal-window .modal-content::-webkit-scrollbar-track{background:var(--scroll-track)}
.modal-window>form>footer,
.modal-window>footer{
  position:relative;
  bottom:auto;
  flex:0 0 auto;
}
.modal-window .input-shell>i{
  width:44px;
  flex:0 0 44px;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eef4ff;
  border-right:1px solid #dce7f5;
  color:var(--blue);
}
.modal-window .textarea-shell>i{
  align-items:flex-start;
  padding-top:13px;
}
.modal-window .money-shell>b{
  width:44px;
  height:auto;
  min-height:44px;
  background:#eef4ff;
  border-right:1px solid #dce7f5;
  color:var(--blue);
}
.modal-window .input-shell{
  border-color:#d6e0ec;
}
.modal-window .input-shell:focus-within{
  border-color:#7ca7eb;
  box-shadow:0 0 0 3px rgba(47,111,237,.10);
}
@media(max-width:650px){
  .modal-window .modal-content{padding:16px;}
}


/* AJUSTE SOLICITADO: tarjetas de modalidad centradas con iconos de color */
.choice-cards{
  align-items:stretch;
}
.choice-card{
  min-height:140px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px 16px;
}
.choice-card i{
  width:44px;
  height:44px;
  border-radius:12px;
  margin:0 auto 12px;
}
.choice-card b{
  font-size:13px;
  text-align:center;
}
.choice-card small{
  font-size:10.5px;
  text-align:center;
  max-width:170px;
}
.choice-card:nth-child(1) i{background:#eaf1ff;color:#2f6fed;}
.choice-card:nth-child(2) i{background:#fff2df;color:#f59e0b;}
.choice-card:nth-child(3) i{background:#e8fbf7;color:#14b8a6;}
.choice-card:nth-child(4) i{background:#eef4ff;color:#4f46e5;}
.choice-card.active:nth-child(1) i,
.choice-card.active:nth-child(2) i,
.choice-card.active:nth-child(3) i,
.choice-card.active:nth-child(4) i{background:var(--navy);color:#fff;}
@media(max-width:950px){
  .choice-card{min-height:126px;}
}
@media(max-width:650px){
  .choice-card{min-height:112px;padding:16px 14px;}
  .choice-card i{width:40px;height:40px;margin-bottom:10px;}
}


/* AJUSTE: fondo de color para iconos de Prioridad y Fecha prometida */
.wizard-pane[data-pane="1"] .input-shell > i{
  width:44px;
  flex:0 0 44px;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
  border-right:1px solid #dce7f5;
}
.wizard-pane[data-pane="1"] .field:first-child .input-shell > i{
  background:#fff2df;
  color:#f59e0b;
}
.wizard-pane[data-pane="1"] .field:nth-child(2) .input-shell > i{
  background:#eaf1ff;
  color:#2f6fed;
}


/* AJUSTE FINAL: más espacio entre icono y texto en formularios del modal */
.modal-window .input-shell input,
.modal-window .input-shell select,
.modal-window .input-shell textarea{
  padding-left:14px !important;
  padding-right:12px !important;
}
.modal-window .input-shell textarea{
  padding-top:12px !important;
}


/* AJUSTE FINAL: prioridad y fecha con mismo fondo y más espacio del texto */
.wizard-pane[data-pane="1"] .input-shell > i{
  width:44px !important;
  flex:0 0 44px !important;
  align-self:stretch !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:var(--blue) !important;
}
.wizard-pane[data-pane="1"] .input-shell input,
.wizard-pane[data-pane="1"] .input-shell select,
.wizard-pane[data-pane="1"] .input-shell textarea{
  padding-left:14px !important;
  padding-right:12px !important;
}


/* AJUSTE: fondo uniforme para iconos en Entrega y observaciones */
.wizard-pane[data-pane="3"] .input-shell > i,
.wizard-pane[data-pane="3"] .money-shell > b{
  width:44px !important;
  flex:0 0 44px !important;
  align-self:stretch !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:var(--blue) !important;
}
.wizard-pane[data-pane="3"] .input-shell input,
.wizard-pane[data-pane="3"] .input-shell select,
.wizard-pane[data-pane="3"] .input-shell textarea{
  padding-left:14px !important;
  padding-right:12px !important;
}
.wizard-pane[data-pane="3"] .input-shell textarea{
  padding-top:12px !important;
}
.wizard-pane[data-pane="3"] .textarea-shell > i{
  padding-top:13px !important;
}


/* AJUSTE: fondo uniforme e interacción en Pago inicial */
.wizard-pane[data-pane="4"] .input-shell > i,
.wizard-pane[data-pane="4"] .money-shell > b{
  width:44px !important;
  flex:0 0 44px !important;
  align-self:stretch !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:var(--blue) !important;
}
.wizard-pane[data-pane="4"] .input-shell input,
.wizard-pane[data-pane="4"] .input-shell select,
.wizard-pane[data-pane="4"] .input-shell textarea{
  padding-left:14px !important;
  padding-right:12px !important;
}
#paymentReferenceField.hidden{display:none !important;}


/* =========================================================
   MÓDULO CLIENTES
   ========================================================= */
.customer-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.customer-kpis article,.customer-profile-kpis article{background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px;display:flex;align-items:center;gap:13px;box-shadow:0 7px 20px rgba(15,35,65,.04)}.customer-kpis small,.customer-profile-kpis small{display:block;color:var(--muted);font-size:10px}.customer-kpis strong,.customer-profile-kpis strong{display:block;font-size:22px;margin-top:4px}.customer-kpi-icon{width:43px;height:43px;border-radius:12px;display:grid;place-items:center}.customer-kpi-icon.blue{background:#eaf1ff;color:var(--blue)}.customer-kpi-icon.teal{background:#e8fbf7;color:#14b8a6}.customer-kpi-icon.purple{background:#f1ebff;color:#7c3aed}.customer-kpi-icon.orange{background:#fff2df;color:#f59e0b}
.customer-panel,.customer-form-card,.customer-profile-head{background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:0 8px 24px rgba(15,35,65,.04);overflow:hidden}.customer-panel-head{display:flex;justify-content:space-between;align-items:center;padding:20px 22px;border-bottom:1px solid #edf1f5}.customer-panel-head h2{margin:0;font-size:18px}.customer-panel-head p{margin:4px 0 0;color:var(--muted);font-size:11px}.customer-toolbar{display:flex;gap:10px;padding:14px 22px;border-bottom:1px solid #edf1f5}.customer-search{height:42px;flex:1;border:1px solid #d9e2ed;border-radius:11px;display:flex;align-items:center;background:#fff;overflow:hidden}.customer-search i{width:43px;height:100%;display:grid;place-items:center;background:#eef4ff;color:var(--blue);border-right:1px solid #dce7f5}.customer-search input{border:0;outline:0;padding:0 13px;width:100%}.secondary-button{min-height:42px;border:1px solid #d5dfeb;background:#fff;color:var(--navy);border-radius:11px;padding:0 15px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700;cursor:pointer}.secondary-button.compact{min-height:34px;font-size:10px}.customer-table-wrap{overflow:auto}.customer-table{width:100%;border-collapse:collapse;min-width:900px}.customer-table th{font-size:9.5px;text-transform:uppercase;letter-spacing:.04em;color:#718096;background:#f8fafc;text-align:left;padding:12px 14px}.customer-table td{padding:13px 14px;border-top:1px solid #edf1f5;font-size:11px;vertical-align:middle}.customer-cell{display:flex;align-items:center;gap:10px}.customer-avatar{width:37px;height:37px;border-radius:11px;background:#eaf1ff;color:var(--blue);display:grid;place-items:center}.customer-avatar.company{background:#f1ebff;color:#7c3aed}.customer-cell strong,.table-subtext{display:block}.customer-cell small,.table-subtext{color:var(--muted);font-size:9.5px;margin-top:3px}.balance-pill{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:9.5px;font-weight:800}.balance-pill.pending{background:#fff2df;color:#d97706}.balance-pill.clear{background:#e9f9f0;color:#168557}.row-actions{display:flex;gap:6px}.row-actions a,.address-list form button{width:31px;height:31px;border:1px solid #dce4ee;background:#fff;border-radius:9px;display:grid;place-items:center;color:var(--navy);cursor:pointer}.empty-state{padding:38px;text-align:center;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:7px}.empty-state i{font-size:25px;color:#8fa2b8}.customer-link{font-weight:800;color:var(--navy)}.status-dot{display:inline-flex;align-items:center;gap:6px;font-weight:700}.status-dot:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--status)}
.customer-tabs,.profile-tabs{display:flex;gap:0;background:#fbfcfe;border-bottom:1px solid #e6ebf1}.customer-tabs button,.profile-tabs a{min-height:64px;padding:0 22px;border:0;background:transparent;color:#6b7b90;font-weight:750;display:flex;align-items:center;gap:8px;position:relative;cursor:pointer}.customer-tabs button.active,.profile-tabs a.active{color:var(--navy)}.customer-tabs button.active:after,.profile-tabs a.active:after{content:"";position:absolute;bottom:-1px;left:20px;right:20px;height:3px;background:var(--navy);border-radius:4px 4px 0 0}.customer-form-pane{display:none;padding:26px}.customer-form-pane.active{display:block;animation:wizardFade .25s}.form-section-title{display:flex;align-items:center;gap:13px;margin-bottom:23px;padding-bottom:17px;border-bottom:1px solid #edf1f5}.form-section-title>span{width:45px;height:45px;border-radius:13px;background:#eaf1ff;color:var(--blue);display:grid;place-items:center}.form-section-title h2{margin:0;font-size:18px}.form-section-title p{margin:4px 0 0;color:var(--muted);font-size:11px}.customer-type-cards{grid-template-columns:repeat(2,minmax(0,220px));justify-content:flex-start}.customer-form-pane .input-shell>i,.inline-form-card .input-shell>i{width:44px;flex:0 0 44px;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue)}.customer-form-pane .input-shell input,.customer-form-pane .input-shell select,.customer-form-pane .input-shell textarea,.inline-form-card .input-shell input,.inline-form-card .input-shell select,.inline-form-card .input-shell textarea{padding-left:14px!important;padding-right:12px!important}.customer-form-footer{padding:14px 22px;border-top:1px solid #e7ecf2;background:#fbfcfe;display:flex;justify-content:space-between;align-items:center}.customer-form-footer>div{display:flex;gap:9px}
.customer-profile-head{padding:20px 22px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.profile-main{display:flex;align-items:center;gap:14px}.profile-large-avatar{width:58px;height:58px;border-radius:16px;background:#eaf1ff;color:var(--blue);display:grid;place-items:center;font-size:21px}.profile-large-avatar.company{background:#f1ebff;color:#7c3aed}.profile-main small{font-size:9px;color:var(--blue);font-weight:850;letter-spacing:.08em}.profile-main h2{margin:4px 0;font-size:21px}.profile-main p{margin:0;color:var(--muted);font-size:11px}.profile-actions{display:flex;gap:9px}.customer-profile-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.customer-profile-kpis article>span{width:42px;height:42px;border-radius:12px;background:#eef4ff;color:var(--blue);display:grid;place-items:center}.profile-summary-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;padding:22px}.profile-summary-grid article,.inline-form-card{border:1px solid #e0e7ef;border-radius:14px;padding:18px;background:#fff}.profile-summary-grid article.span-2{grid-column:1/-1}.profile-summary-grid h3,.inline-form-card h3,.section-mini-head h3{margin:0 0 14px;font-size:14px}.detail-line{display:flex;align-items:center;gap:11px;padding:10px 0;border-bottom:1px solid #edf1f5}.detail-line:last-child{border-bottom:0}.detail-line>i{width:38px;height:38px;border-radius:10px;background:#eef4ff;color:var(--blue);display:grid;place-items:center}.detail-line span{display:flex;flex-direction:column}.detail-line small{color:var(--muted);font-size:9.5px}.detail-line b{font-size:11px;margin-top:3px}.customer-notes-box{margin:0;color:#56677e;line-height:1.6}.profile-two-columns{display:grid;grid-template-columns:1.5fr .8fr;gap:18px;padding:22px}.inline-form-card{display:flex;flex-direction:column;gap:13px;height:max-content}.check-line{display:flex;gap:8px;align-items:center;font-size:10.5px;color:#56677e}.address-list,.notes-list{display:flex;flex-direction:column;gap:10px}.address-list article,.notes-list article{border:1px solid #e0e7ef;border-radius:13px;padding:14px;display:flex;gap:12px;align-items:flex-start}.address-list article>span,.notes-list article>span{width:38px;height:38px;border-radius:10px;background:#eef4ff;color:var(--blue);display:grid;place-items:center;flex:0 0 auto}.address-list article>div{flex:1}.address-list strong{display:block}.address-list em{font-style:normal;background:#e9f9f0;color:#168557;padding:3px 6px;border-radius:999px;font-size:8px}.address-list p,.notes-list p{margin:5px 0;color:#43556d}.address-list small,.notes-list small{color:var(--muted)}.notes-list article.important{background:#fffaf0;border-color:#f7dca5}.notes-list article.important>span{background:#fff2df;color:#f59e0b}.balance-summary{background:linear-gradient(135deg,var(--navy),#1b578e);color:#fff;border-radius:17px;padding:20px 22px;margin-bottom:16px;display:flex;align-items:center;gap:18px}.balance-summary>span{width:48px;height:48px;border-radius:14px;background:rgba(255,255,255,.14);display:grid;place-items:center;font-size:20px}.balance-summary>div{min-width:170px}.balance-summary small{display:block;opacity:.75}.balance-summary strong{display:block;font-size:22px;margin-top:4px}
@media(max-width:1050px){.customer-kpis,.customer-profile-kpis{grid-template-columns:repeat(2,1fr)}.profile-two-columns{grid-template-columns:1fr}.customer-profile-head{align-items:flex-start;gap:15px}.profile-actions{flex-wrap:wrap}}@media(max-width:650px){.customer-kpis,.customer-profile-kpis,.profile-summary-grid{grid-template-columns:1fr}.customer-panel-head,.customer-profile-head,.customer-form-footer{flex-direction:column;align-items:stretch;gap:12px}.customer-toolbar{flex-wrap:wrap}.customer-search{flex-basis:100%}.customer-tabs,.profile-tabs{overflow:auto}.customer-tabs button,.profile-tabs a{min-width:max-content}.customer-form-pane{padding:18px 15px}.customer-type-cards{grid-template-columns:1fr}.profile-summary-grid article.span-2{grid-column:auto}.profile-main{align-items:flex-start}.balance-summary{flex-wrap:wrap}}


/* =========================================================
   MÓDULO RECOJOS Y ENTREGAS
   ========================================================= */
.delivery-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.delivery-kpis article{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;display:flex;align-items:center;gap:12px;box-shadow:0 7px 20px rgba(15,35,65,.04)}.delivery-kpis small,.delivery-kpis strong{display:block}.delivery-kpis small{color:var(--muted);font-size:10px}.delivery-kpis strong{font-size:24px;margin-top:3px}.delivery-kpi-icon,.delivery-card-icon{width:43px;height:43px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto}.delivery-kpi-icon.blue,.delivery-card-icon.blue{background:#eaf1ff;color:#2f6fed}.delivery-kpi-icon.orange,.delivery-card-icon.orange{background:#fff2df;color:#f59e0b}.delivery-kpi-icon.teal,.delivery-card-icon.teal{background:#e7faf7;color:#14b8a6}.delivery-kpi-icon.green,.delivery-card-icon.green{background:#e8f8ef;color:#2fb46e}.delivery-card-icon.purple{background:#f1ecff;color:#8657eb}
.module-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.module-search{min-width:420px;max-width:620px;display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.module-search>i{width:42px;text-align:center;color:var(--blue);background:#eef4ff;align-self:stretch;display:grid;place-items:center}.module-search input{flex:1;border:0;outline:0;padding:12px 13px}.module-search button{border:0;background:var(--navy);color:#fff;align-self:stretch;padding:0 18px}.section-intro strong,.section-intro span{display:block}.section-intro span{font-size:11px;color:var(--muted);margin-top:4px}.delivery-panel{padding:0;overflow:hidden}.delivery-panel .panel-head{padding:18px 20px;border-bottom:1px solid #edf1f5}.delivery-panel .panel-head small{display:block;color:var(--muted);margin-top:4px}.delivery-table{width:100%;border-collapse:collapse;min-width:880px}.delivery-table th,.delivery-table td{padding:13px 15px;border-bottom:1px solid #edf1f5;text-align:left;font-size:11px;vertical-align:middle}.delivery-table th{background:#f8fafc;color:#6c7d91;text-transform:uppercase;font-size:9px;letter-spacing:.05em}.delivery-table td strong,.delivery-table td small{display:block}.delivery-table td small{color:var(--muted);margin-top:3px}.empty-row{text-align:center!important;color:var(--muted);padding:38px!important}.delivery-status{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;font-size:9px;font-weight:800;text-transform:capitalize;background:#edf2f7;color:#607089;white-space:nowrap}.delivery-status.requested,.delivery-status.pending,.delivery-status.planned{background:#fff3df;color:#b66b00}.delivery-status.scheduled,.delivery-status.assigned,.delivery-status.accepted{background:#eaf1ff;color:#2f6fed}.delivery-status.on_route,.delivery-status.in_progress,.delivery-status.in_review{background:#e7faf7;color:#0f8e83}.delivery-status.picked_up,.delivery-status.delivered,.delivery-status.completed,.delivery-status.resolved,.delivery-status.closed{background:#e8f8ef;color:#218855}.delivery-status.failed,.delivery-status.cancelled{background:#fff0f0;color:#d63c3c}.inline-status{display:flex;gap:6px}.inline-status select{max-width:110px;border:1px solid var(--line);border-radius:8px;padding:7px;background:#fff;font-size:10px}.inline-status button{width:31px;border:0;border-radius:8px;background:var(--navy);color:#fff;cursor:pointer}
.delivery-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px}.delivery-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;box-shadow:0 7px 20px rgba(15,35,65,.035)}.delivery-card-top{display:flex;align-items:center;gap:11px}.delivery-card-top>div{min-width:0;flex:1}.delivery-card-top strong,.delivery-card-top small{display:block}.delivery-card-top small{color:var(--muted);font-size:10px;margin-top:3px}.delivery-card p{display:flex;gap:8px;align-items:flex-start;color:#55677e;font-size:11px;margin:15px 0}.delivery-card p i{color:var(--blue);margin-top:2px}.delivery-card-meta{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #edf1f5;padding-top:12px}.delivery-card-meta span{font-size:10px;color:var(--muted)}.delivery-card-meta i{margin-right:5px;color:var(--blue)}.routes-grid{grid-template-columns:repeat(3,minmax(0,1fr));padding:0}.route-progress{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.route-progress>div{background:#f7f9fc;border-radius:10px;padding:10px}.route-progress span,.route-progress strong{display:block}.route-progress span{font-size:9px;color:var(--muted)}.route-progress strong{font-size:18px;margin-top:3px}.route-actions{display:flex;gap:8px}.route-actions button{flex:1;border:1px solid var(--line);border-radius:9px;background:#fff;padding:9px;color:var(--navy);font-size:10px;cursor:pointer}.empty-module{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:220px;color:var(--muted);gap:10px}.empty-module i{font-size:32px;color:#9aa9bb}.check-card{display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;padding:12px;background:#f9fbfd}.check-card input{margin-right:10px}.check-card span{display:grid;grid-template-columns:32px 1fr;align-items:center}.check-card i{grid-row:1/3;width:32px;height:32px;border-radius:9px;background:#eef4ff;color:var(--blue);display:grid;place-items:center;margin-right:9px}.check-card b,.check-card small{display:block}.check-card small{color:var(--muted);font-size:9px;margin-top:2px}
.delivery-panel .input-shell>i,.delivery-panel .money-shell>b,.app-modal .input-shell>i,.app-modal .money-shell>b{background:#eef4ff!important;color:var(--blue)!important;border-right:1px solid #dce7f5!important}.delivery-panel .input-shell input,.delivery-panel .input-shell select,.delivery-panel .input-shell textarea,.app-modal .input-shell input,.app-modal .input-shell select,.app-modal .input-shell textarea{padding-left:14px!important;padding-right:12px!important}
@media(max-width:1100px){.delivery-kpis{grid-template-columns:repeat(2,1fr)}.routes-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.module-toolbar{align-items:stretch;flex-direction:column}.module-search{min-width:0;width:100%}.delivery-cards,.routes-grid{grid-template-columns:1fr}.delivery-kpis{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.delivery-kpis{grid-template-columns:1fr}.delivery-card-meta{flex-direction:column}}


/* MÓDULO CAJA Y VENTAS */
.cash-alert{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;margin-bottom:16px;font-size:12px}.cash-alert.success{background:#eaf8f0;color:#207548;border:1px solid #ccebd9}.cash-alert.error{background:#fff0f0;color:#b42318;border:1px solid #ffd6d6}.cash-alert.warning{background:#fff8e8;color:#8a5a00;border:1px solid #f5dfaa}.cash-alert a{margin-left:auto;font-weight:800}.cash-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:17px}.cash-kpis article{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;display:flex;align-items:center;gap:12px;box-shadow:0 8px 22px rgba(24,55,91,.04)}.cash-kpis small,.cash-kpis strong{display:block}.cash-kpis small{font-size:10px;color:var(--muted);margin-bottom:4px}.cash-kpis strong{font-size:16px}.cash-kpi-icon,.cash-title-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;flex:0 0 auto;background:#eaf1ff;color:var(--blue)}.cash-kpi-icon.green{background:#e7f8ef;color:#2aa566}.cash-kpi-icon.orange{background:#fff3df;color:#ec9713}.cash-kpi-icon.purple{background:#f1ebff;color:#8055dc}.cash-kpi-icon.red{background:#ffebeb;color:#dc3f3f}.cash-grid.two{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr);gap:17px}.cash-panel{background:#fff;border:1px solid var(--line);border-radius:17px;padding:20px;box-shadow:0 10px 25px rgba(24,55,91,.04);min-width:0}.cash-panel-head{display:flex;align-items:center;gap:12px;padding-bottom:16px;margin-bottom:17px;border-bottom:1px solid #edf1f5}.cash-panel-head.no-line{padding:0;margin:0;border:0}.cash-panel-head h2{margin:0;font-size:16px}.cash-panel-head p{margin:4px 0 0;color:var(--muted);font-size:10.5px}.cash-title-icon.soft{background:#eef8f8;color:var(--teal)}.cash-form{display:grid;gap:14px}.cash-form.grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}.cash-form label>span{display:block;font-size:11px;font-weight:700;margin-bottom:6px}.cash-input{display:flex;align-items:center;border:1px solid #d6e0ec;border-radius:11px;overflow:hidden;background:#fff;min-height:43px}.cash-input>i,.cash-input>b{width:44px;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue);flex:0 0 44px}.cash-input input,.cash-input select,.cash-input textarea{width:100%;border:0!important;outline:0!important;background:transparent!important;padding:11px 13px!important;font-size:12px}.cash-input.textarea{align-items:flex-start}.cash-input.textarea>i{padding-top:13px}.cash-input:focus-within{border-color:#7ca7eb;box-shadow:0 0 0 3px rgba(47,111,237,.1)}.span-two{grid-column:1/-1}.cash-state{display:flex;align-items:center;gap:12px;border-radius:13px;padding:15px;margin-bottom:17px}.cash-state.open{background:#ecf8f1;border:1px solid #ccebd9;color:#216d47}.cash-state>i{font-size:22px}.cash-state div{flex:1}.cash-state strong,.cash-state span{display:block}.cash-state span{font-size:10px;margin-top:3px}.cash-state b{font-size:18px}.cash-steps{list-style:none;padding:0;margin:0;display:grid;gap:13px}.cash-steps li{display:flex;gap:11px;align-items:center}.cash-steps li>b{width:32px;height:32px;border-radius:9px;background:#eef4ff;color:var(--blue);display:grid;place-items:center}.cash-steps strong,.cash-steps small{display:block}.cash-steps small{color:var(--muted);font-size:10px;margin-top:2px}.cash-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:17px}.cash-search{height:42px;border:1px solid #dbe3ec;border-radius:11px;display:flex;align-items:center;overflow:hidden;min-width:380px}.cash-search>i{padding-left:13px;color:#8190a4}.cash-search input{border:0;outline:0;padding:0 12px;flex:1}.cash-search button{align-self:stretch;border:0;background:var(--navy);color:#fff;padding:0 15px;font-weight:700}.cash-table-wrap{overflow:auto}.cash-table{width:100%;border-collapse:collapse;min-width:820px}.cash-table th,.cash-table td{text-align:left;padding:12px 10px;border-bottom:1px solid #edf1f5;font-size:11px}.cash-table th{font-size:9px;text-transform:uppercase;color:#78889c;letter-spacing:.04em;background:#fafbfd}.cash-table td strong,.cash-table td small{display:block}.cash-table td small{font-size:9.5px;color:var(--muted);margin-top:3px}.cash-balance{color:#d97706}.cash-badge{display:inline-flex;padding:6px 9px;border-radius:8px;font-size:9.5px;font-weight:800;background:#eaf1ff;color:var(--blue)}.cash-badge.orange{background:#fff2dd;color:#d98200}.cash-badge.green{background:#e8f8ef;color:#238a56}.cash-badge.red{background:#ffeded;color:#c93636}.cash-action{border:0;border-radius:9px;background:#eaf1ff;color:var(--blue);padding:8px 10px;font-weight:800;cursor:pointer}.cash-action:disabled{opacity:.45;cursor:not-allowed}.cash-empty{text-align:center!important;padding:35px!important;color:var(--muted)}.cash-empty>i,.cash-empty>strong,.cash-empty>span{display:block;margin:auto}.cash-empty>i{font-size:25px;color:var(--blue);margin-bottom:9px}.cash-empty>strong{color:var(--text);margin-bottom:5px}.cash-empty .primary-button{display:inline-flex;margin-top:14px}.cash-tabs{display:flex;gap:8px;margin-bottom:14px}.cash-tabs button{border:1px solid #dbe3ec;background:#fff;color:#607089;border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer}.cash-tabs button.active{background:var(--navy);color:#fff;border-color:var(--navy)}.cash-tab{display:none}.cash-tab.active{display:block}.cash-summary-list{display:grid;gap:8px}.cash-summary-list>div,.cash-methods>div{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #edf1f5;font-size:11px}.cash-summary-list .positive b{color:#268c59}.cash-summary-list .negative b{color:#cb3a3a}.cash-summary-list .total{border-top:1px solid #dce4ee;margin-top:5px;padding-top:15px}.cash-summary-list .total strong{font-size:21px;color:var(--navy)}.cash-methods{margin-top:15px}.cash-methods span small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.cash-difference{background:#f7f9fc;border:1px solid #e0e7ef;border-radius:12px;padding:14px}.cash-difference span,.cash-difference strong,.cash-difference small{display:block}.cash-difference strong{font-size:20px;margin:5px 0}.cash-difference small{color:var(--muted)}.cash-difference .surplus{color:#26915a}.cash-difference .shortage{color:#d03d3d}.cash-difference .balanced{color:var(--navy)}
@media(max-width:1100px){.cash-kpis{grid-template-columns:repeat(2,1fr)}.cash-grid.two{grid-template-columns:1fr}.cash-toolbar{align-items:stretch;flex-direction:column}.cash-search{min-width:0;width:100%}}@media(max-width:650px){.cash-kpis,.cash-form.grid-two{grid-template-columns:1fr}.cash-panel{padding:15px}.span-two{grid-column:auto}}


/* MÓDULOS RESTANTES: diseño profesional, compacto y uniforme */
.management-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.management-title{display:flex;align-items:center;gap:14px}.management-title>span{width:50px;height:50px;border-radius:14px;background:#eef4ff;color:var(--blue);display:grid;place-items:center;font-size:19px}.management-title small{color:var(--blue);font-weight:800;text-transform:uppercase;letter-spacing:.06em}.management-title h2{margin:3px 0;font-size:21px}.management-title p{margin:0;color:var(--muted)}.management-flash{padding:13px 16px;border-radius:12px;margin-bottom:15px;background:#eaf8f0;color:#23734d;border:1px solid #cfead9}.management-flash.error{background:#fff1f1;color:#b42323;border-color:#ffd1d1}.management-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.management-kpis article{display:flex;align-items:center;gap:13px}.management-kpis article>span{width:43px;height:43px;border-radius:12px;background:#eef4ff;color:var(--blue);display:grid;place-items:center}.management-kpis small,.management-kpis strong{display:block}.management-kpis strong{font-size:20px;margin-top:3px}.management-table-panel{padding:0;overflow:hidden}.table-toolbar{padding:15px 17px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.table-toolbar .input-shell{width:min(390px,65%)}.table-toolbar>span{color:var(--muted);font-size:12px}.management-table{width:100%;border-collapse:collapse;min-width:820px}.management-table th,.management-table td{padding:12px 13px;border-bottom:1px solid #edf1f5;text-align:left;font-size:11.5px;vertical-align:middle}.management-table th{background:#f8fafc;color:#68788d;text-transform:uppercase;font-size:9px;letter-spacing:.04em}.status-pill{padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800}.status-pill.active{background:#e8f8ef;color:#278354}.status-pill.inactive{background:#fff0f0;color:#c23f3f}.mini-action{width:32px;height:32px;border:1px solid #dbe4ef;border-radius:9px;background:#fff;color:var(--blue);cursor:pointer}.empty-management{text-align:center;padding:45px;display:flex;flex-direction:column;gap:7px;color:var(--muted)}.empty-management i{font-size:27px;color:#9aabc0}.report-filter{display:flex;align-items:end;gap:12px;margin-bottom:15px}.report-filter label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:11px}.report-filter input{height:40px;border:1px solid var(--line);border-radius:10px;padding:0 11px}.management-form footer{display:flex;justify-content:flex-end;margin-top:18px}.management-form .input-shell>i,.management-hero .input-shell>i,.management-table-panel .input-shell>i{width:44px;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue)}.management-form .input-shell input,.management-form .input-shell select,.management-form .input-shell textarea,.management-table-panel .input-shell input{padding-left:14px!important;padding-right:12px!important}.management-form textarea{min-height:95px}.check-line{display:flex;align-items:center;gap:8px;padding:12px;border:1px solid #dce5ef;border-radius:11px;background:#fbfcfe}.backup-card{text-align:center;max-width:760px;margin:auto;padding:42px}.backup-card>span{width:72px;height:72px;border-radius:20px;background:#eef4ff;color:var(--blue);display:grid;place-items:center;font-size:28px;margin:0 auto}.backup-card p{color:var(--muted);line-height:1.7}.modal-window .modal-content .input-shell>i,.modal-window .modal-content .money-shell>b{background:#eef4ff!important;color:var(--blue)!important;border-right:1px solid #dce7f5!important}.modal-window .modal-content input,.modal-window .modal-content select,.modal-window .modal-content textarea{padding-left:14px!important}.modal-window .modal-content textarea{min-height:85px}@media(max-width:900px){.management-kpis{grid-template-columns:1fr 1fr}.management-hero{align-items:flex-start;flex-direction:column}.report-filter{flex-wrap:wrap}}@media(max-width:560px){.management-kpis{grid-template-columns:1fr}.management-hero .primary-button{width:100%}}


/* TIPOGRAFÍA GLOBAL: Comic Neue */
html,body,button,input,select,textarea{
  font-family:"Comic Neue",cursive !important;
}
body{font-weight:400;}
h1,h2,h3,h4,h5,h6,.brand-copy strong,.kpi-card strong,.panel h2,.field>span,.nav-link,.submenu a,button,th{
  font-weight:700;
}
input,select,textarea,td,p,small,span{
  letter-spacing:.01em;
}

/* Registro único de clientes: modal rápido reutilizado en Operaciones y Clientes */
.customer-panel-head .primary-button{border:0;cursor:pointer}
#customerModal .modal-window{width:min(760px,100%)}
#customerModal .input-shell>i{width:44px;flex:0 0 44px;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue)}
#customerModal .input-shell input,#customerModal .input-shell select{padding-left:14px!important;padding-right:12px!important}
#customerModal .modal-content{row-gap:18px}
@media(max-width:650px){#customerModal .modal-content{grid-template-columns:1fr}#customerModal .field.span-2{grid-column:auto}}


/* Origen de solicitudes de recojo */
.pickup-origin{display:inline-flex;align-items:center;justify-content:center;min-width:78px;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:700;text-transform:none}
.pickup-origin.order{background:#eaf1ff;color:#2f6fed}
.pickup-origin.manual{background:#f1f5f9;color:#475569}
.pickup-origin.phone{background:#ecfdf3;color:#168454}
.pickup-origin.whatsapp{background:#e5fbf0;color:#159a5b}
.delivery-table td>small{display:block;margin-top:4px;color:var(--muted)}


/* Autenticación y menú de usuario */
.auth-body{min-height:100vh;background:#f3f7fc;font-family:"Comic Neue",cursive}.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(360px,46%) 1fr}.auth-brand-panel{background:linear-gradient(145deg,#0e3568,#154b86);color:#fff;padding:48px 7vw;display:flex;flex-direction:column;position:relative;overflow:hidden}.auth-brand-panel:after{content:"";position:absolute;width:420px;height:420px;border-radius:50%;background:rgba(255,255,255,.06);right:-170px;bottom:-170px}.auth-brand{display:flex;align-items:center;gap:14px;position:relative;z-index:1}.auth-brand>span{width:54px;height:54px;border-radius:16px;background:#fff;color:#15457d;display:grid;place-items:center;font-size:22px}.auth-brand div{display:flex;flex-direction:column}.auth-brand strong{font-size:23px}.auth-brand small{opacity:.76}.auth-copy{margin:auto 0;max-width:520px;position:relative;z-index:1}.auth-eyebrow{font-size:12px;letter-spacing:.16em;font-weight:700;color:#8fd7db}.auth-copy h1{font-size:48px;line-height:1.08;margin:18px 0}.auth-copy p{font-size:18px;line-height:1.65;opacity:.82}.auth-features{display:flex;gap:22px;position:relative;z-index:1}.auth-features div{display:flex;align-items:center;gap:9px;font-weight:700}.auth-form-panel{display:grid;place-items:center;padding:32px}.login-card{width:min(460px,100%);background:#fff;border:1px solid #dfe8f3;border-radius:24px;padding:38px;box-shadow:0 24px 60px rgba(28,63,105,.11);text-align:center}.login-icon{width:60px;height:60px;border-radius:17px;background:#eaf1ff;color:#2f6fed;display:grid;place-items:center;font-size:23px;margin:0 auto 16px}.login-card h2{font-size:29px;margin:0}.login-card>p{color:#718198;margin:8px 0 28px}.auth-alert{display:flex;align-items:center;gap:9px;text-align:left;background:#fff0f0;color:#c83c3c;border:1px solid #ffd0d0;padding:12px 14px;border-radius:12px;margin-bottom:16px}.auth-field{display:block;text-align:left;margin:15px 0}.auth-field>span{display:block;font-weight:700;margin-bottom:7px;color:#304760}.auth-field>div{height:54px;border:1px solid #d7e1ed;border-radius:13px;display:flex;align-items:center;overflow:hidden}.auth-field div>i{width:48px;color:#2f6fed}.auth-field input{flex:1;border:0;outline:0;height:100%;padding:0 12px 0 0;background:transparent}.auth-field button{width:46px;height:100%;border:0;background:transparent;color:#718198;cursor:pointer}.auth-submit{width:100%;height:54px;border:0;border-radius:13px;background:#123f78;color:#fff;font-weight:700;font-size:16px;cursor:pointer;margin-top:10px}.auth-help{display:block;color:#8190a4;margin-top:20px}.profile-menu{position:relative}.profile{border:0;background:transparent;cursor:pointer;text-align:left}.profile-dropdown{display:none;position:absolute;right:0;top:calc(100% + 12px);width:245px;background:#fff;border:1px solid #dfe6ef;border-radius:14px;box-shadow:0 18px 50px rgba(20,48,82,.17);padding:10px;z-index:80}.profile-dropdown.open{display:block}.profile-dropdown>div{padding:10px 11px;border-bottom:1px solid #edf1f5;display:flex;flex-direction:column}.profile-dropdown small{color:#718198;margin-top:3px;word-break:break-all}.profile-dropdown button{width:100%;border:0;background:#fff;color:#c03535;padding:12px;border-radius:10px;text-align:left;cursor:pointer;font-weight:700}.profile-dropdown button:hover{background:#fff1f1}@media(max-width:900px){.auth-shell{grid-template-columns:1fr}.auth-brand-panel{display:none}.auth-form-panel{padding:20px}.login-card{padding:28px}}


/* Notificaciones globales: cierre automático después de 3 segundos */
[data-auto-dismiss]{
  opacity:1;
  transform:translateY(0);
  max-height:180px;
  overflow:hidden;
  transition:opacity .3s ease,transform .3s ease,max-height .35s ease,margin .35s ease,padding .35s ease,border-width .35s ease;
}
[data-auto-dismiss].notification-hiding{
  opacity:0;
  transform:translateY(-8px);
  max-height:0;
  margin-top:0!important;
  margin-bottom:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  border-width:0!important;
  pointer-events:none;
}
@media (prefers-reduced-motion:reduce){
  [data-auto-dismiss]{transition:none}
}


/* BUSCADOR GLOBAL Y NOTIFICACIONES DEL TOPBAR */
.global-search-trigger{appearance:none;text-align:left;cursor:pointer;color:#607089;justify-content:flex-start}
.global-search-trigger span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.global-search-trigger kbd,.global-search-panel kbd{border:1px solid #d8e1ec;background:#f6f8fb;color:#718096;border-radius:7px;padding:3px 7px;font:700 11px "Comic Neue",cursive;box-shadow:0 1px 1px rgba(15,23,42,.04)}
.global-search-overlay{position:fixed;inset:0;z-index:500;display:none;align-items:flex-start;justify-content:center;padding:10vh 18px 18px}
.global-search-overlay.open{display:flex}
.global-search-backdrop{position:absolute;inset:0;background:rgba(12,27,49,.58);backdrop-filter:blur(4px)}
.global-search-panel{position:relative;width:min(680px,100%);max-height:74vh;background:#fff;border:1px solid #dfe6ef;border-radius:18px;box-shadow:0 28px 85px rgba(8,28,55,.28);overflow:hidden;animation:searchPanelIn .18s ease}
@keyframes searchPanelIn{from{opacity:0;transform:translateY(-10px) scale(.985)}}
.global-search-panel>header{height:66px;display:flex;align-items:center;gap:13px;padding:0 18px;border-bottom:1px solid #e6ebf1}
.global-search-panel>header>i{color:var(--blue);font-size:18px}
.global-search-panel>header input{flex:1;border:0;outline:0;font-size:17px;background:transparent;color:var(--text)}
.global-search-caption{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;background:#f8fafc;border-bottom:1px solid #edf1f5}
.global-search-caption strong{font-size:13px}.global-search-caption span{font-size:11px;color:var(--muted)}
.global-search-results{max-height:calc(74vh - 112px);overflow:auto;padding:9px}
.global-search-result{display:grid;grid-template-columns:42px 1fr 22px;gap:12px;align-items:center;padding:11px 12px;border-radius:12px;transition:.15s}
.global-search-result:hover,.global-search-result.active{background:#eef4ff}
.global-search-result-icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:#eaf1ff;color:var(--blue)}
.global-search-result strong,.global-search-result small{display:block}.global-search-result strong{font-size:14px}.global-search-result small{font-size:11px;color:var(--muted);margin-top:3px}.global-search-result>i{font-size:12px;color:#9aabc0}
.global-search-empty{padding:45px 20px;text-align:center;color:var(--muted)}
.global-search-empty i{font-size:28px}.global-search-empty strong,.global-search-empty small{display:block}.global-search-empty strong{margin-top:10px;color:var(--text)}
.global-search-open{overflow:hidden}
.notification-menu{position:relative}
.notification{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;transition:.18s}
.notification:hover,.notification[aria-expanded="true"]{background:#eef4ff;color:var(--navy)}
.notification-dropdown{position:absolute;right:-8px;top:52px;width:390px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #dfe6ef;border-radius:16px;box-shadow:0 20px 60px rgba(17,40,72,.18);display:none;overflow:hidden;z-index:250}
.notification-dropdown.open{display:block;animation:notificationIn .16s ease}
@keyframes notificationIn{from{opacity:0;transform:translateY(-7px)}}
.notification-dropdown-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 17px;border-bottom:1px solid #e8edf3}
.notification-dropdown-head strong,.notification-dropdown-head small{display:block}.notification-dropdown-head strong{font-size:15px}.notification-dropdown-head small{font-size:10.5px;color:var(--muted);margin-top:3px}.notification-dropdown-head button{border:0;background:transparent;color:var(--blue);font:700 11px "Comic Neue",cursive;cursor:pointer}
.notification-list{padding:8px;max-height:390px;overflow:auto}
.notification-item{display:grid;grid-template-columns:42px 1fr 14px;align-items:center;gap:11px;padding:11px;border-radius:12px;transition:.16s}
.notification-item:hover{background:#f5f8fc}.notification-item.viewed{opacity:.65}
.notification-item-icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center}.notification-item-icon.green{background:#e5f8ed;color:#1f9d5a}.notification-item-icon.orange{background:#fff2dc;color:#e79000}.notification-item-icon.red{background:#ffe8e8;color:#dc3f3f}
.notification-item strong,.notification-item small{display:block}.notification-item strong{font-size:12.5px}.notification-item small{font-size:10.5px;color:var(--muted);margin-top:3px;line-height:1.35}.notification-item>i{font-size:10px;color:#9bacc0}
.notification-empty{text-align:center;padding:34px 18px}.notification-empty span{width:48px;height:48px;border-radius:14px;background:#edf3fb;color:#6d819a;display:grid;place-items:center;margin:0 auto 10px;font-size:18px}.notification-empty strong,.notification-empty small{display:block}.notification-empty small{color:var(--muted);font-size:11px;margin-top:4px}
@media(max-width:850px){.global-search-trigger{width:42px;padding:0;justify-content:center}.global-search-trigger span,.global-search-trigger kbd{display:none}.notification-dropdown{right:-55px;width:340px}}


/* AJUSTE LOGIN: iconos alineados con fondo uniforme dentro de los campos */
.auth-field > div{
  position:relative;
  overflow:hidden !important;
  background:#fff;
}

.auth-field div > i{
  width:50px !important;
  min-width:50px !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:var(--blue,#2f6fed) !important;
  margin:0 !important;
  padding:0 !important;
  line-height:1 !important;
  flex:0 0 50px !important;
}

.auth-field input{
  padding:0 14px !important;
  min-width:0;
}

.auth-field button#togglePassword{
  width:50px !important;
  min-width:50px !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-left:1px solid transparent !important;
  color:#718198 !important;
  flex:0 0 50px !important;
}

.auth-field button#togglePassword i{
  margin:0 !important;
  line-height:1 !important;
}


/* AJUSTE LOGO DEL SISTEMA EN SIDEBAR Y LOGIN */
.brand-row{
  height:104px !important;
  padding:0 18px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  border-bottom:1px solid var(--line,#dfe6ef);
  background:#fff;
}

.brand-image-link{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  flex:1 1 auto;
}

.brand-system-logo{
  width:auto !important;
  height:78px !important;
  max-width:178px !important;
  object-fit:contain !important;
  display:block !important;
}

.brand-logo,
.brand-copy{
  display:none !important;
}

.sidebar-toggle{
  flex:0 0 auto !important;
  margin-left:8px !important;
}

.sidebar.collapsed .brand-row{
  padding:0 10px !important;
  justify-content:center !important;
}

.sidebar.collapsed .brand-image-link{
  justify-content:center;
  flex:0 0 auto;
}

.sidebar.collapsed .brand-system-logo{
  height:48px !important;
  max-width:54px !important;
}

.sidebar.collapsed .sidebar-toggle{
  display:none !important;
}

/* Login: usa el mismo logo real del sistema */
.auth-logo-mark{
  width:58px !important;
  height:58px !important;
  border-radius:16px !important;
  background:#fff !important;
  color:inherit !important;
  display:grid !important;
  place-items:center !important;
  padding:5px !important;
  overflow:hidden !important;
}

.auth-logo-mark img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  display:block !important;
}


/* AJUSTE FINAL: logo del sidebar centrado y sin línea inferior */
.brand-row{
  justify-content:center !important;
  border-bottom:0 !important;
}

.brand-image-link{
  justify-content:center !important;
  flex:1 1 auto !important;
}

.brand-system-logo{
  margin:0 auto !important;
}

.brand-row .sidebar-toggle{
  position:absolute !important;
  right:22px !important;
  margin-left:0 !important;
}

.sidebar.collapsed .brand-row .sidebar-toggle{
  display:none !important;
}


/* AJUSTE FINAL: hamburguesa visible debajo del logo al colapsar sidebar */
.sidebar.collapsed .brand-row{
  height:104px !important;
  padding:10px 0 8px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  border-bottom:0 !important;
  position:relative !important;
}

.sidebar.collapsed .brand-image-link{
  height:auto !important;
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.sidebar.collapsed .brand-system-logo{
  height:43px !important;
  max-width:50px !important;
  margin:0 auto !important;
  object-fit:contain !important;
}

.sidebar.collapsed .brand-row .sidebar-toggle{
  display:flex !important;
  position:static !important;
  width:34px !important;
  height:30px !important;
  margin:0 !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:9px !important;
  color:var(--navy,#12396c) !important;
  background:#eef4ff !important;
}

.sidebar.collapsed .brand-row .sidebar-toggle:hover{
  background:#e3ecff !important;
}


/* AJUSTE: tooltips de módulos cuando el sidebar está colapsado */
.sidebar.collapsed{
  overflow:visible !important;
}

.sidebar.collapsed .sidebar-nav{
  overflow:visible !important;
}

.sidebar.collapsed .nav-group,
.sidebar.collapsed .nav-link{
  position:relative !important;
}

.sidebar.collapsed .nav-link{
  justify-content:center !important;
}

.sidebar.collapsed .nav-link > span{
  display:block !important;
  position:absolute !important;
  left:calc(100% + 12px) !important;
  top:50% !important;
  transform:translateY(-50%) translateX(-6px) !important;
  min-width:max-content !important;
  max-width:260px !important;
  padding:8px 12px !important;
  border-radius:10px !important;
  background:var(--navy,#12396c) !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  box-shadow:0 12px 30px rgba(15,35,70,.22) !important;
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
  z-index:9999 !important;
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease !important;
}

.sidebar.collapsed .nav-link > span::before{
  content:"" !important;
  position:absolute !important;
  left:-5px !important;
  top:50% !important;
  transform:translateY(-50%) rotate(45deg) !important;
  width:10px !important;
  height:10px !important;
  background:var(--navy,#12396c) !important;
  border-radius:2px !important;
}

.sidebar.collapsed .nav-link:hover > span,
.sidebar.collapsed .nav-link:focus-visible > span{
  opacity:1 !important;
  visibility:visible !important;
  transform:translateY(-50%) translateX(0) !important;
}

/* Evita que el tooltip tape el ícono activo */
.sidebar.collapsed .nav-link.active > span{
  left:calc(100% + 14px) !important;
}


/* AJUSTE: submódulos flotantes al hacer clic cuando el sidebar está colapsado */
.sidebar.collapsed .nav-group{
  position:relative !important;
}

.sidebar.collapsed .nav-group.open .nav-group-toggle > span{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

.sidebar.collapsed .nav-group.open .submenu{
  display:block !important;
  position:absolute !important;
  left:calc(100% + 12px) !important;
  top:0 !important;
  width:245px !important;
  max-height:none !important;
  overflow:visible !important;
  padding:10px !important;
  border:1px solid #dfe8f3 !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 18px 45px rgba(15,35,70,.20) !important;
  z-index:9998 !important;
}

.sidebar.collapsed .nav-group.open .submenu::before{
  content:"" !important;
  position:absolute !important;
  left:-6px !important;
  top:18px !important;
  width:12px !important;
  height:12px !important;
  background:#fff !important;
  border-left:1px solid #dfe8f3 !important;
  border-bottom:1px solid #dfe8f3 !important;
  transform:rotate(45deg) !important;
}

.sidebar.collapsed .nav-group.open .submenu a{
  display:flex !important;
  align-items:center !important;
  min-height:38px !important;
  padding:9px 11px !important;
  margin:2px 0 !important;
  border-radius:10px !important;
  border-left:0 !important;
  color:#314760 !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.2 !important;
  white-space:normal !important;
}

.sidebar.collapsed .nav-group.open .submenu a:hover,
.sidebar.collapsed .nav-group.open .submenu a.active{
  background:#eef4ff !important;
  color:var(--navy,#12396c) !important;
}

.sidebar.collapsed .nav-group.open .submenu a span{
  display:block !important;
}

/* Mientras el panel de submódulos está abierto, evita que el tooltip se cruce */
.sidebar.collapsed .nav-group.open .nav-link:hover > span{
  opacity:0 !important;
  visibility:hidden !important;
}


/* AJUSTE: estado activo del módulo padre en sidebar colapsado */
.sidebar.collapsed .nav-group.open > .nav-link,
.sidebar.collapsed .nav-group:has(.submenu a.active) > .nav-link,
.sidebar.collapsed .nav-group.is-active-parent > .nav-link{
  background:#eef4ff !important;
  color:var(--navy,#12396c) !important;
  border-left-color:var(--navy,#12396c) !important;
}

.sidebar.collapsed .nav-group.open > .nav-link > i:first-child,
.sidebar.collapsed .nav-group:has(.submenu a.active) > .nav-link > i:first-child,
.sidebar.collapsed .nav-group.is-active-parent > .nav-link > i:first-child{
  color:var(--navy,#12396c) !important;
}

/* El panel flotante se cierra visualmente si el grupo no está abierto */
.sidebar.collapsed .nav-group:not(.open) .submenu{
  display:none !important;
}


/* CORRECCIÓN REAL: en sidebar colapsado el panel solo aparece cuando el usuario hace clic */
.sidebar.collapsed .nav-group.open:not(.flyout-open) .submenu,
.sidebar.collapsed .nav-group:not(.flyout-open) .submenu{
  display:none !important;
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu{
  display:block !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
}

.sidebar.collapsed .nav-group.flyout-open > .nav-link{
  background:#eef4ff !important;
  color:var(--navy,#12396c) !important;
  border-left-color:var(--navy,#12396c) !important;
}


/* FIX FINAL: panel de submódulos colapsado estable para todos los módulos */
.sidebar.collapsed .nav-group .submenu{
  display:none !important;
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu{
  display:block !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
}

.sidebar.collapsed .nav-group.flyout-open .nav-group-toggle > span{
  opacity:0 !important;
  visibility:hidden !important;
}


/* FIX DEFINITIVO: el panel flotante usa flyout-open, no open */
.sidebar.collapsed .nav-group.flyout-open .submenu{
  display:block !important;
  position:absolute !important;
  left:calc(100% + 12px) !important;
  top:0 !important;
  width:245px !important;
  max-height:none !important;
  min-height:auto !important;
  overflow:visible !important;
  padding:10px !important;
  border:1px solid #dfe8f3 !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 18px 45px rgba(15,35,70,.20) !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
  z-index:9999 !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::before{
  content:"" !important;
  position:absolute !important;
  left:-6px !important;
  top:18px !important;
  width:12px !important;
  height:12px !important;
  background:#fff !important;
  border-left:1px solid #dfe8f3 !important;
  border-bottom:1px solid #dfe8f3 !important;
  transform:rotate(45deg) !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu a{
  display:flex !important;
  align-items:center !important;
  min-height:38px !important;
  padding:9px 11px !important;
  margin:2px 0 !important;
  border-radius:10px !important;
  border-left:0 !important;
  color:#314760 !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.2 !important;
  white-space:normal !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu a span{
  display:block !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu a:hover,
.sidebar.collapsed .nav-group.flyout-open .submenu a.active{
  background:#eef4ff !important;
  color:var(--navy,#12396c) !important;
}


/* AJUSTE: submenús largos con scroll interno en sidebar colapsado */
.sidebar.collapsed .nav-group.flyout-open .submenu{
  max-height: min(420px, calc(100vh - 48px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin;
  scrollbar-color: #b8c9df #f5f8fc;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar{
  width: 8px;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar-track{
  background: #f5f8fc;
  border-radius: 999px;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar-thumb{
  background: #b8c9df;
  border-radius: 999px;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar-thumb:hover{
  background: #9fb5d2;
}


/* AJUSTE FINAL: en sidebar colapsado mostrar solo 5 submódulos y usar scroll */
.sidebar.collapsed .nav-group.flyout-open .submenu{
  max-height:292px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  scrollbar-width:thin !important;
  scrollbar-color:#b8c9df #f5f8fc !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar{
  width:8px !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar-track{
  background:#f5f8fc !important;
  border-radius:999px !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar-thumb{
  background:#b8c9df !important;
  border-radius:999px !important;
}

.sidebar.collapsed .nav-group.flyout-open .submenu::-webkit-scrollbar-thumb:hover{
  background:#9fb5d2 !important;
}


/* AJUSTE PRECISO: flyout visible solo hasta Notificaciones */
.sidebar.collapsed .nav-group.flyout-open .submenu{
  max-height:235px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  scrollbar-width:thin !important;
  scrollbar-color:#b8c9df #f5f8fc !important;
}


/* MÓDULO CONFIGURACIÓN: ESTADOS DE ÓRDENES */
.order-status-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:22px;align-items:start}
.order-status-main{padding:18px}
.status-toolbar{display:flex;align-items:center;gap:12px;margin:6px 0 18px}
.status-search{width:270px;max-width:100%}
.status-filter-group{display:flex;gap:10px;flex-wrap:wrap}
.status-filter{min-height:38px;border:1px solid #dfe8f3;border-radius:9px;background:#fff;color:#344966;font-weight:700;padding:0 14px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.status-filter.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.status-filter .fa-circle{font-size:9px;color:#38c172}.status-filter.active .fa-circle{color:#fff}
.order-status-table{width:100%;min-width:900px;border-collapse:separate;border-spacing:0;border:1px solid #e5edf6;border-radius:12px;overflow:hidden}
.order-status-table th{background:#f8fafc;color:#52657d;font-size:12px;text-align:left;padding:12px 13px;border-bottom:1px solid #e5edf6;text-transform:none}
.order-status-table td{padding:11px 13px;border-bottom:1px solid #edf2f7;font-size:13px;vertical-align:middle}
.order-status-table tbody tr:last-child td{border-bottom:0}
.drag-cell{color:#6b7d93;width:34px}.status-code{font-size:12px;letter-spacing:.02em;color:#273a55}
.state-chip{display:inline-flex;min-height:28px;align-items:center;border-radius:8px;padding:0 11px;background:var(--state-bg);color:var(--state-color);font-weight:800}
.color-dot{display:inline-block;width:18px;height:18px;border-radius:50%;box-shadow:0 0 0 4px rgba(47,111,237,.08)}
.type-pill,.visible-pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;border-radius:8px;padding:0 10px;font-weight:800;font-size:12px}
.type-pill.blue{background:#e8f0ff;color:#2f6fed}.type-pill.teal{background:#def8fb;color:#0891b2}.type-pill.orange{background:#fff1d6;color:#d97706}.type-pill.green{background:#e8f8ed;color:#16a34a}.visible-pill.yes{background:#dff8ee;color:#0f8b5f}.visible-pill.no{background:#ffecef;color:#e43f55}
.switch-button{width:48px;height:26px;border:0;border-radius:999px;background:#cbd5e1;display:inline-flex;align-items:center;padding:3px;cursor:pointer}
.switch-button span{width:20px;height:20px;background:#fff;border-radius:50%;display:block;box-shadow:0 3px 10px rgba(0,0,0,.16);transition:.2s}
.switch-button.on{background:#2f6fed}.switch-button.on span{transform:translateX(22px)}
.inline-toggle-form{margin:0}.status-actions{display:flex;align-items:center;gap:7px}.status-actions form{margin:0}
.status-actions .mini-action{width:34px;height:34px;border:1px solid #dce7f4;background:#fff;border-radius:8px;color:#244464;display:grid;place-items:center;cursor:pointer}
.status-actions .mini-action:hover{background:#f3f7fd}.status-actions .mini-action.danger{color:#ef4444;border-color:#ffd8d8}
.status-table-footer{display:flex;align-items:center;justify-content:space-between;color:#65758b;font-size:12px;margin-top:16px}.status-table-footer>div{display:flex;gap:7px}.pager-button{width:32px;height:32px;border:1px solid #dfe7f1;border-radius:8px;background:#fff;color:#64748b;font-weight:800}.pager-button.active{background:#2f6fed;border-color:#2f6fed;color:#fff}
.status-side{display:flex;flex-direction:column;gap:16px}.flow-panel{padding:18px}.side-title{display:flex;align-items:center;gap:11px;margin-bottom:14px}.side-title span,.recommendation-card>span,.status-summary-card article>span{width:40px;height:40px;border-radius:12px;background:#eaf1ff;color:#2f6fed;display:grid;place-items:center}.side-title strong{font-size:17px}
.flow-list{display:flex;flex-direction:column;gap:9px}.flow-item{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:9px}.flow-item span{width:25px;height:25px;border-radius:50%;color:#fff;font-size:12px;font-weight:800;display:grid;place-items:center}.flow-item p{margin:0;font-weight:700;color:#33465f}
.status-summary-card{display:grid;grid-template-columns:repeat(3,1fr);gap:0;padding:18px}.status-summary-card article{padding:0 12px;border-right:1px solid #e9eef5}.status-summary-card article:last-child{border-right:0}.status-summary-card article>span.green{background:#e8f8ed;color:#16a34a}.status-summary-card article>span.purple{background:#f0eaff;color:#8657eb}.status-summary-card strong{display:block;font-size:26px;margin:10px 0 3px}.status-summary-card small{color:#718198}
.recommendation-card{display:flex;align-items:flex-start;gap:14px;padding:18px}.recommendation-card>span{background:#fff2d8;color:#f59e0b}.recommendation-card strong{display:block;margin-bottom:6px}.recommendation-card p{margin:0;color:#63758c;line-height:1.45}
@media(max-width:1250px){.order-status-layout{grid-template-columns:1fr}.status-side{display:grid;grid-template-columns:1fr 1fr}.flow-panel{grid-row:span 2}}
@media(max-width:760px){.status-toolbar{align-items:stretch;flex-direction:column}.status-search{width:100%}.status-side{display:flex}.order-status-main{padding:14px}.status-summary-card{grid-template-columns:1fr}.status-summary-card article{border-right:0;border-bottom:1px solid #e9eef5;padding:12px 0}.status-summary-card article:last-child{border-bottom:0}}


/* MÓDULO CONFIGURACIÓN: ESTADOS DE ÓRDENES */
.order-status-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:22px;align-items:start}
.order-status-main{padding:18px}
.status-toolbar{display:flex;align-items:center;gap:12px;margin:6px 0 18px}
.status-search{width:270px;max-width:100%}
.status-filter-group{display:flex;gap:10px;flex-wrap:wrap}
.status-filter{min-height:38px;border:1px solid #dfe8f3;border-radius:9px;background:#fff;color:#344966;font-weight:700;padding:0 14px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.status-filter.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.status-filter .fa-circle{font-size:9px;color:#38c172}.status-filter.active .fa-circle{color:#fff}
.order-status-table{width:100%;min-width:900px;border-collapse:separate;border-spacing:0;border:1px solid #e5edf6;border-radius:12px;overflow:hidden}
.order-status-table th{background:#f8fafc;color:#52657d;font-size:12px;text-align:left;padding:12px 13px;border-bottom:1px solid #e5edf6;text-transform:none}
.order-status-table td{padding:11px 13px;border-bottom:1px solid #edf2f7;font-size:13px;vertical-align:middle}
.order-status-table tbody tr:last-child td{border-bottom:0}
.drag-cell{color:#6b7d93;width:34px}.status-code{font-size:12px;letter-spacing:.02em;color:#273a55}
.state-chip{display:inline-flex;min-height:28px;align-items:center;border-radius:8px;padding:0 11px;background:var(--state-bg);color:var(--state-color);font-weight:800}
.color-dot{display:inline-block;width:18px;height:18px;border-radius:50%;box-shadow:0 0 0 4px rgba(47,111,237,.08)}
.type-pill,.visible-pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;border-radius:8px;padding:0 10px;font-weight:800;font-size:12px}
.type-pill.blue{background:#e8f0ff;color:#2f6fed}.type-pill.teal{background:#def8fb;color:#0891b2}.type-pill.orange{background:#fff1d6;color:#d97706}.type-pill.green{background:#e8f8ed;color:#16a34a}.visible-pill.yes{background:#dff8ee;color:#0f8b5f}.visible-pill.no{background:#ffecef;color:#e43f55}
.switch-button{width:48px;height:26px;border:0;border-radius:999px;background:#cbd5e1;display:inline-flex;align-items:center;padding:3px;cursor:pointer}
.switch-button span{width:20px;height:20px;background:#fff;border-radius:50%;display:block;box-shadow:0 3px 10px rgba(0,0,0,.16);transition:.2s}
.switch-button.on{background:#2f6fed}.switch-button.on span{transform:translateX(22px)}
.inline-toggle-form{margin:0}.status-actions{display:flex;align-items:center;gap:7px}.status-actions form{margin:0}
.status-actions .mini-action{width:34px;height:34px;border:1px solid #dce7f4;background:#fff;border-radius:8px;color:#244464;display:grid;place-items:center;cursor:pointer}
.status-actions .mini-action:hover{background:#f3f7fd}.status-actions .mini-action.danger{color:#ef4444;border-color:#ffd8d8}
.status-table-footer{display:flex;align-items:center;justify-content:space-between;color:#65758b;font-size:12px;margin-top:16px}.status-table-footer>div{display:flex;gap:7px}.pager-button{width:32px;height:32px;border:1px solid #dfe7f1;border-radius:8px;background:#fff;color:#64748b;font-weight:800}.pager-button.active{background:#2f6fed;border-color:#2f6fed;color:#fff}
.status-side{display:flex;flex-direction:column;gap:16px}.flow-panel{padding:18px}.side-title{display:flex;align-items:center;gap:11px;margin-bottom:14px}.side-title span,.recommendation-card>span,.status-summary-card article>span{width:40px;height:40px;border-radius:12px;background:#eaf1ff;color:#2f6fed;display:grid;place-items:center}.side-title strong{font-size:17px}
.flow-list{display:flex;flex-direction:column;gap:9px}.flow-item{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:9px}.flow-item span{width:25px;height:25px;border-radius:50%;color:#fff;font-size:12px;font-weight:800;display:grid;place-items:center}.flow-item p{margin:0;font-weight:700;color:#33465f}
.status-summary-card{display:grid;grid-template-columns:repeat(3,1fr);gap:0;padding:18px}.status-summary-card article{padding:0 12px;border-right:1px solid #e9eef5}.status-summary-card article:last-child{border-right:0}.status-summary-card article>span.green{background:#e8f8ed;color:#16a34a}.status-summary-card article>span.purple{background:#f0eaff;color:#8657eb}.status-summary-card strong{display:block;font-size:26px;margin:10px 0 3px}.status-summary-card small{color:#718198}
.recommendation-card{display:flex;align-items:flex-start;gap:14px;padding:18px}.recommendation-card>span{background:#fff2d8;color:#f59e0b}.recommendation-card strong{display:block;margin-bottom:6px}.recommendation-card p{margin:0;color:#63758c;line-height:1.45}
@media(max-width:1250px){.order-status-layout{grid-template-columns:1fr}.status-side{display:grid;grid-template-columns:1fr 1fr}.flow-panel{grid-row:span 2}}
@media(max-width:760px){.status-toolbar{align-items:stretch;flex-direction:column}.status-search{width:100%}.status-side{display:flex}.order-status-main{padding:14px}.status-summary-card{grid-template-columns:1fr}.status-summary-card article{border-right:0;border-bottom:1px solid #e9eef5;padding:12px 0}.status-summary-card article:last-child{border-bottom:0}}


/* CORRECCIÓN ESTADOS DE ÓRDENES: buscador profesional y acciones funcionales */
.status-toolbar{
  gap:14px !important;
  align-items:center !important;
}

.status-search{
  width:min(390px,100%) !important;
  height:48px !important;
  border:1px solid #d7e2ef !important;
  border-radius:14px !important;
  background:#fff !important;
  overflow:hidden !important;
  padding:0 !important;
  display:flex !important;
  align-items:stretch !important;
}

.status-search > i{
  width:52px !important;
  min-width:52px !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:var(--blue,#2f6fed) !important;
  margin:0 !important;
  line-height:1 !important;
}

.status-search input{
  height:100% !important;
  flex:1 !important;
  border:0 !important;
  outline:0 !important;
  padding:0 14px !important;
  font-size:15px !important;
  color:#21344d !important;
  background:#fff !important;
}

.status-search:focus-within{
  border-color:#8ab4ff !important;
  box-shadow:0 0 0 4px rgba(47,111,237,.10) !important;
}

.status-actions .mini-action{
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.status-actions .mini-action:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,35,70,.10);
}

.status-actions .mini-action.danger:hover{
  background:#fff5f5 !important;
}


/* MÓDULO CONFIGURACIÓN: MÉTODOS DE PAGO */
.payment-hero{margin-bottom:22px}
.payment-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin:0 0 22px}
.payment-kpi{min-height:118px;padding:22px 24px;display:flex;align-items:center;gap:18px}
.payment-kpi>span{width:62px;height:62px;border-radius:18px;display:grid;place-items:center;font-size:25px}
.payment-kpi>span.blue{background:#eaf1ff;color:#2f6fed}.payment-kpi>span.green{background:#e8f8ed;color:#24a85a}.payment-kpi>span.purple{background:#f1eaff;color:#8657eb}.payment-kpi>span.orange{background:#fff0d8;color:#f59e0b}
.payment-kpi strong{display:block;font-size:30px;line-height:1;color:#0d2a52;margin-bottom:8px}.payment-kpi small{font-size:16px;color:#64748b;font-weight:700}
.payment-toolbar-panel{display:grid;grid-template-columns:minmax(260px,380px) 1fr auto;align-items:center;gap:18px;padding:22px 26px;margin-bottom:22px}
.payment-search{height:52px;border:1px solid #d7e2ef;border-radius:14px;background:#fff;overflow:hidden;padding:0;display:flex;align-items:stretch}
.payment-search>i{width:54px;min-width:54px;height:100%;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue,#2f6fed);margin:0;line-height:1}
.payment-search input{height:100%;flex:1;min-width:0;border:0;outline:0;padding:0 20px;font-size:15px;color:#21344d;background:#fff}.payment-search input::placeholder{color:#7c899b;opacity:1}.payment-search:focus-within{border-color:#8ab4ff;box-shadow:0 0 0 4px rgba(47,111,237,.10)}
.payment-filter-group{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}
.payment-filter{min-height:42px;border:1px solid #d7e2ef;border-radius:999px;background:#fff;color:#263b58;font-weight:800;padding:0 22px;cursor:pointer;box-shadow:0 4px 12px rgba(24,55,91,.05)}
.payment-filter.active{background:var(--navy);border-color:var(--navy);color:#fff;box-shadow:0 8px 18px rgba(18,57,108,.20)}
.payment-new-button{min-width:190px;height:52px;font-size:16px}
.payment-table-panel{padding:16px}.payment-method-table{width:100%;min-width:920px;border-collapse:separate;border-spacing:0;border:1px solid #e5edf6;border-radius:14px;overflow:hidden}
.payment-method-table th{background:#f8fafc;color:#52657d;font-size:13px;text-align:left;padding:15px 18px;border-bottom:1px solid #e5edf6}
.payment-method-table td{padding:14px 18px;border-bottom:1px solid #edf2f7;font-size:14px;vertical-align:middle}.payment-method-table tbody tr:last-child td{border-bottom:0}
.payment-method-name{display:flex;align-items:center;gap:14px}.payment-method-name strong{font-size:15px;color:#233852}
.method-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;font-size:18px}
.method-icon.cash{background:#dcfce7;color:#16a34a}.method-icon.digital{background:#f2e8ff;color:#7c3aed}.method-icon.pos{background:#e8f1ff;color:#2f6fed}.method-icon.bank{background:#fff0d8;color:#f97316}.method-icon.credit{background:#ffe4ec;color:#e43f69}.method-icon.other{background:#eef4ff;color:#2f6fed}
.payment-type-pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;border-radius:8px;padding:0 12px;font-weight:800;font-size:12px}
.payment-type-pill.cash{background:#dff8ee;color:#0f8b5f}.payment-type-pill.digital{background:#efe7ff;color:#7c3aed}.payment-type-pill.pos{background:#e8f1ff;color:#2f6fed}.payment-type-pill.bank{background:#fff1d6;color:#d97706}.payment-type-pill.credit{background:#ffecef;color:#ef4444}.payment-type-pill.other{background:#eef4ff;color:#2f6fed}
.payment-actions{display:flex;align-items:center;gap:10px}.payment-actions form{margin:0}.payment-actions .mini-action{width:38px;height:38px;border:1px solid #dce7f4;background:#fff;border-radius:9px;color:#244464;display:grid;place-items:center;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.payment-actions .mini-action:hover{background:#f3f7fd;transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,35,70,.10)}.payment-actions .mini-action.danger{color:#ef4444;border-color:#ffd8d8}.payment-actions .mini-action.danger:hover{background:#fff5f5}
.payment-table-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;color:#65758b;font-size:14px;margin-top:16px;padding:2px 4px}.payment-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px}.payment-table-footer .pager-button{width:auto;min-width:40px;height:40px;padding:0 13px;border:1px solid #d3deeb;border-radius:10px;background:#fff;color:#274665;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;white-space:nowrap;cursor:pointer;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}.payment-table-footer .payment-page-number{padding:0;min-width:40px}.payment-table-footer .pager-button:hover:not(.active):not(:disabled){border-color:#7194c1;background:#f2f7fd;color:#143e72;box-shadow:0 4px 10px rgba(18,57,108,.07);transform:translateY(-1px)}.payment-table-footer .pager-button.active{background:var(--blue,#2f6fed);border-color:var(--blue,#2f6fed);color:#fff;box-shadow:0 4px 10px rgba(47,111,237,.18)}.payment-table-footer .pager-button:disabled{opacity:.45;cursor:not-allowed}.payment-table-footer .pager-button:focus-visible{outline:3px solid rgba(47,111,237,.18);outline-offset:2px}
html[data-theme="dark"] .payment-table-footer .pager-button{background:var(--surface,#172033);border-color:#40516b;color:#dbeafe}html[data-theme="dark"] .payment-table-footer .pager-button:hover:not(.active):not(:disabled){background:#1e3150;border-color:#5d7da5}html[data-theme="dark"] .payment-table-footer .pager-button.active{background:#2563a8;border-color:#60a5fa;color:#fff}
@media(max-width:1180px){.payment-kpi-grid{grid-template-columns:repeat(2,1fr)}.payment-toolbar-panel{grid-template-columns:1fr}.payment-filter-group{justify-content:flex-start}.payment-new-button{width:100%}}
@media(max-width:700px){.payment-kpi-grid{grid-template-columns:1fr}.payment-toolbar-panel{padding:16px}.payment-filter{padding:0 16px}.payment-table-panel{padding:12px}.payment-table-footer{align-items:flex-start;flex-direction:column;padding:4px}.payment-pagination{width:100%;justify-content:flex-start;overflow-x:auto;padding:2px 0 5px}.payment-search input{padding-left:18px}}
@media(max-width:420px){.payment-table-footer .payment-page-nav span{display:none}.payment-table-footer .payment-page-nav{min-width:40px;padding:0}}


/* AJUSTE: tabla de Administración en español y más legible */
.management-table th{
  white-space:nowrap;
  line-height:1.15;
}
.management-table td{
  vertical-align:middle;
}


/* ADMINISTRACIÓN: USUARIOS */
.users-hero{margin-bottom:22px}
.users-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px}
.users-kpi{min-height:104px;padding:20px;display:flex;align-items:center;gap:16px}
.users-kpi>span{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;font-size:22px}
.users-kpi>span.blue{background:#eaf1ff;color:#2f6fed}.users-kpi>span.green{background:#e8f8ed;color:#16a34a}.users-kpi>span.orange{background:#fff1d6;color:#f59e0b}.users-kpi>span.red{background:#ffecef;color:#ef4444}
.users-kpi strong{display:block;font-size:26px;color:#0d2a52;line-height:1;margin-bottom:6px}.users-kpi small{color:#65758b;font-weight:700}
.users-toolbar-panel{display:grid;grid-template-columns:minmax(260px,410px) 1fr auto;align-items:center;gap:18px;padding:20px 22px;margin-bottom:22px}
.users-search{height:50px;border:1px solid #d7e2ef;border-radius:14px;background:#fff;overflow:hidden;padding:0;display:flex;align-items:stretch}
.users-search>i{width:54px;min-width:54px;height:100%;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue,#2f6fed);margin:0}
.users-search input{height:100%;flex:1;border:0;outline:0;padding:0 15px;font-size:15px;background:#fff;color:#21344d}.users-search:focus-within{border-color:#8ab4ff;box-shadow:0 0 0 4px rgba(47,111,237,.10)}
.users-filter-group{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:center}
.users-filter{min-height:40px;border:1px solid #d7e2ef;border-radius:999px;background:#fff;color:#263b58;font-weight:800;padding:0 20px;cursor:pointer}
.users-filter.active{background:var(--navy);border-color:var(--navy);color:#fff}
.users-count{font-size:14px;color:#65758b;font-weight:700}
.users-table-panel{padding:16px}.users-table{width:100%;min-width:1120px;border-collapse:separate;border-spacing:0;border:1px solid #e5edf6;border-radius:14px;overflow:hidden}
.users-table th{background:#f8fafc;color:#52657d;font-size:12px;text-align:left;padding:14px 16px;border-bottom:1px solid #e5edf6;white-space:nowrap}
.users-table td{padding:14px 16px;border-bottom:1px solid #edf2f7;font-size:14px;vertical-align:middle}.users-table tbody tr:last-child td{border-bottom:0}
.user-cell{display:flex;align-items:center;gap:13px}.user-avatar{width:42px;height:42px;border-radius:12px;background:#eaf1ff;color:#2f6fed;display:grid;place-items:center;font-weight:900}
.user-cell strong{display:block;color:#233852}.user-cell small,.users-table small{color:#708198}
.role-pill{display:inline-flex;align-items:center;min-height:28px;border-radius:8px;padding:0 10px;background:#eef4ff;color:#12396c;font-weight:800;font-size:12px}
.security-stack{display:flex;flex-direction:column;gap:4px}.mini-badge{display:inline-flex;width:max-content;align-items:center;min-height:26px;border-radius:8px;padding:0 9px;font-weight:800;font-size:12px}
.mini-badge.ok{background:#dff8ee;color:#0f8b5f}.mini-badge.warning{background:#fff1d6;color:#d97706}.danger-text{color:#ef4444!important}
.user-action-form{margin:0}.user-action-form .mini-action{width:38px;height:38px;border:1px solid #dce7f4;background:#fff;border-radius:9px;display:grid;place-items:center;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}
.user-action-form .mini-action:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,35,70,.10)}
.user-action-form .mini-action.danger{color:#ef4444;border-color:#ffd8d8}.user-action-form .mini-action.success{color:#16a34a;border-color:#bbf7d0}
@media(max-width:1180px){.users-kpi-grid{grid-template-columns:repeat(2,1fr)}.users-toolbar-panel{grid-template-columns:1fr}.users-filter-group{justify-content:flex-start}}
@media(max-width:700px){.users-kpi-grid{grid-template-columns:1fr}.users-toolbar-panel{padding:16px}.users-table-panel{padding:12px}}


/* AJUSTES USUARIOS: espacio buscador, correo separado y modal de vista */
.users-search input{
  padding-left:22px !important;
  letter-spacing:.01em;
}

.users-search > i{
  margin-right:0 !important;
}

.users-table .user-cell small{
  color:#7c8ba0;
  font-size:12px;
}

.users-actions{
  display:flex;
  align-items:center;
  gap:9px;
}

.users-actions form{
  margin:0;
}

.users-actions .mini-action{
  width:38px;
  height:38px;
  border:1px solid #dce7f4;
  background:#fff;
  border-radius:9px;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}

.users-actions .mini-action:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,35,70,.10);
}

.users-actions .mini-action.view{
  color:#12396c;
  border-color:#cfe0f5;
}

.users-actions .mini-action.view:hover{
  background:#eef4ff;
}

.users-actions .mini-action.danger{
  color:#ef4444;
  border-color:#ffd8d8;
}

.users-actions .mini-action.success{
  color:#16a34a;
  border-color:#bbf7d0;
}

.user-detail-modal{
  max-width:760px !important;
}

.user-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.user-detail-grid article{
  border:1px solid #dfe8f3;
  background:#f8fbff;
  border-radius:14px;
  padding:14px 16px;
}

.user-detail-grid small{
  display:block;
  color:#6b7d93;
  font-size:12px;
  font-weight:800;
  margin-bottom:6px;
}

.user-detail-grid strong{
  display:block;
  color:#142f55;
  font-size:15px;
  word-break:break-word;
}

@media(max-width:700px){
  .user-detail-grid{
    grid-template-columns:1fr;
  }
}


/* Modal de confirmación profesional para usuarios */
.user-confirm-modal{
  max-width:560px !important;
}

.user-confirm-modal .modal-icon.confirm{
  background:#fff4e8;
  color:#f59e0b;
}

.user-confirm-modal .modal-content{
  padding:22px 24px;
}

.user-confirm-modal .confirm-copy{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.user-confirm-modal .confirm-copy strong{
  font-size:18px;
  color:#122b52;
}

.user-confirm-modal .confirm-copy p{
  margin:0;
  font-size:14px;
  color:#657892;
  line-height:1.6;
}

.user-confirm-modal footer .primary-button,
.user-confirm-modal footer .secondary-button{
  min-width:140px;
}


/* AJUSTE ROLES Y PERMISOS: buscador profesional y acción con modal */
.table-toolbar{
  gap:16px;
}

.table-toolbar .management-search{
  width:min(430px,70%) !important;
  height:48px !important;
  border:1px solid #d7e2ef !important;
  border-radius:14px !important;
  background:#fff !important;
  overflow:hidden !important;
  padding:0 !important;
  display:flex !important;
  align-items:stretch !important;
}

.table-toolbar .management-search > i{
  width:54px !important;
  min-width:54px !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:var(--blue,#2f6fed) !important;
  margin:0 !important;
}

.table-toolbar .management-search input{
  height:100% !important;
  flex:1 !important;
  border:0 !important;
  outline:0 !important;
  padding:0 18px !important;
  font-size:15px !important;
  color:#21344d !important;
  background:#fff !important;
}

.table-toolbar .management-search:focus-within{
  border-color:#8ab4ff !important;
  box-shadow:0 0 0 4px rgba(47,111,237,.10) !important;
}

.management-action-form{
  margin:0;
}

.management-action-form .mini-action{
  width:38px !important;
  height:38px !important;
  border-radius:10px !important;
  display:grid !important;
  place-items:center !important;
  color:#2f6fed !important;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.management-action-form .mini-action:hover{
  background:#eef4ff !important;
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,35,70,.10);
}

.management-confirm-modal{
  max-width:560px !important;
}

.management-confirm-modal .modal-icon.confirm{
  background:#fff4e8;
  color:#f59e0b;
}

.management-confirm-modal .modal-content{
  padding:22px 24px;
}

.management-confirm-modal .confirm-copy{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.management-confirm-modal .confirm-copy strong{
  font-size:18px;
  color:#122b52;
}

.management-confirm-modal .confirm-copy p{
  margin:0;
  font-size:14px;
  color:#657892;
  line-height:1.6;
}

.management-confirm-modal footer .primary-button,
.management-confirm-modal footer .secondary-button{
  min-width:140px;
}


/* ADMINISTRACIÓN: AUDITORÍA */
.audit-hero{margin-bottom:22px}
.audit-toolbar-panel{display:grid;grid-template-columns:minmax(320px,520px) auto 1fr;align-items:center;gap:18px;padding:20px 22px;margin-bottom:22px}
.audit-search{height:50px;border:1px solid #d7e2ef;border-radius:14px;background:#fff;overflow:hidden;padding:0;display:flex;align-items:stretch}
.audit-search>i{width:54px;min-width:54px;height:100%;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue,#2f6fed);margin:0}
.audit-search input{height:100%;flex:1;border:0;outline:0;padding:0 18px;font-size:15px;background:#fff;color:#21344d}.audit-search:focus-within{border-color:#8ab4ff;box-shadow:0 0 0 4px rgba(47,111,237,.10)}
.audit-filter-group{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.audit-filter-group label{display:flex;align-items:center;gap:8px;color:#52657d;font-weight:800;font-size:13px}.audit-filter-group input{height:42px;border:1px solid #d7e2ef;border-radius:11px;padding:0 12px;background:#fff;color:#21344d;outline:none}.audit-filter-group input:focus{border-color:#8ab4ff;box-shadow:0 0 0 4px rgba(47,111,237,.10)}.audit-count{justify-self:end;color:#65758b;font-weight:700}
.audit-table-panel{padding:16px}.audit-table{width:100%;min-width:1120px;border-collapse:separate;border-spacing:0;border:1px solid #e5edf6;border-radius:14px;overflow:hidden}.audit-table th{background:#f8fafc;color:#52657d;font-size:12px;text-align:left;padding:14px 16px;border-bottom:1px solid #e5edf6;white-space:nowrap}.audit-table td{padding:14px 16px;border-bottom:1px solid #edf2f7;font-size:14px;vertical-align:middle}.audit-table tbody tr:last-child td{border-bottom:0}.audit-role-pill,.audit-module-pill,.audit-action-pill{display:inline-flex;align-items:center;min-height:28px;border-radius:8px;padding:0 10px;font-weight:800;font-size:12px}.audit-role-pill{background:#eef4ff;color:#12396c}.audit-module-pill{background:#e8f8ed;color:#168557}.audit-action-pill{background:#fff1d6;color:#d97706}.audit-view{width:38px!important;height:38px!important;border-radius:10px!important;color:#12396c!important;border-color:#cfe0f5!important}.audit-view:hover{background:#eef4ff!important;box-shadow:0 8px 18px rgba(15,35,70,.10)}
.audit-detail-modal{max-width:820px!important}.audit-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.audit-detail-grid article{border:1px solid #dfe8f3;background:#f8fbff;border-radius:14px;padding:14px 16px}.audit-detail-grid article.span-2{grid-column:span 2}.audit-detail-grid small{display:block;color:#6b7d93;font-size:12px;font-weight:800;margin-bottom:6px}.audit-detail-grid strong{display:block;color:#142f55;font-size:15px;word-break:break-word}.audit-detail-grid pre{white-space:pre-wrap;word-break:break-word;margin:0;color:#142f55;font-size:12px;line-height:1.5;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
@media(max-width:1100px){.audit-toolbar-panel{grid-template-columns:1fr}.audit-count{justify-self:start}.audit-filter-group{justify-content:flex-start}}
@media(max-width:700px){.audit-detail-grid{grid-template-columns:1fr}.audit-detail-grid article.span-2{grid-column:span 1}.audit-toolbar-panel,.audit-table-panel{padding:14px}}


/* AUDITORÍA: buscador con espacio, filtros profesionales y validación */
.audit-toolbar-panel{
  display:grid !important;
  grid-template-columns:minmax(360px,1fr) auto auto auto !important;
  gap:18px !important;
  align-items:center !important;
  position:relative !important;
}

.audit-search{
  height:54px !important;
  border:1px solid #d7e2ef !important;
  border-radius:14px !important;
  background:#fff !important;
  overflow:hidden !important;
  padding:0 !important;
  display:flex !important;
  align-items:stretch !important;
}

.audit-search > i{
  width:58px !important;
  min-width:58px !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:var(--blue,#2f6fed) !important;
  margin:0 !important;
}

.audit-search input{
  height:100% !important;
  flex:1 !important;
  border:0 !important;
  outline:0 !important;
  padding:0 20px !important;
  font-size:15px !important;
  color:#21344d !important;
  background:#fff !important;
}

.audit-search:focus-within{
  border-color:#8ab4ff !important;
  box-shadow:0 0 0 4px rgba(47,111,237,.10) !important;
}

.audit-filter-group{
  display:flex !important;
  align-items:center !important;
  gap:16px !important;
}

.audit-filter-group label{
  display:flex !important;
  align-items:center !important;
  gap:9px !important;
  color:#314760 !important;
  font-weight:800 !important;
}

.audit-filter-group input[type="date"]{
  height:48px !important;
  border:1px solid #d7e2ef !important;
  border-radius:12px !important;
  background:#fff !important;
  padding:0 14px !important;
  color:#21344d !important;
  outline:none !important;
}

.audit-filter-group input[type="date"]:focus{
  border-color:#8ab4ff !important;
  box-shadow:0 0 0 4px rgba(47,111,237,.10) !important;
}

.audit-filter-actions{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}

.audit-filter-actions .primary-button,
.audit-filter-actions .secondary-button{
  min-height:48px !important;
  border-radius:12px !important;
  white-space:nowrap !important;
}

.audit-date-alert{
  grid-column:1 / -1;
  background:#fff1f1;
  border:1px solid #fecaca;
  color:#b42318;
  border-radius:12px;
  padding:12px 14px;
  font-weight:800;
}

@media(max-width:1200px){
  .audit-toolbar-panel{grid-template-columns:1fr !important;}
  .audit-filter-group,.audit-filter-actions{justify-content:flex-start !important;flex-wrap:wrap !important;}
}


/* COPIAS DE SEGURIDAD */
.backup-hero{display:flex;align-items:center;justify-content:space-between;gap:18px}.backup-info-grid{display:grid;grid-template-columns:1.35fr .95fr;gap:18px;margin-top:18px}.backup-note-card,.backup-summary-card,.backups-toolbar-panel,.backup-table-panel{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 25px rgba(24,55,91,.05)}.backup-note-head{display:flex;gap:16px;align-items:flex-start}.backup-note-head .note-icon,.backup-summary-item>span{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;flex:0 0 auto;font-size:19px}.backup-note-head .note-icon.blue{background:#eaf1ff;color:var(--blue)}.backup-note-head strong{display:block;font-size:18px}.backup-note-head p{margin:5px 0 0;color:var(--muted);line-height:1.5}.backup-checklist{list-style:none;margin:18px 0 0;padding:0;display:grid;gap:10px}.backup-checklist li{display:flex;align-items:flex-start;gap:10px;color:#41536b}.backup-checklist i{color:var(--green);margin-top:2px}.backup-summary-card{display:grid;gap:15px}.backup-summary-item{display:flex;align-items:center;gap:14px;padding:6px 0}.backup-summary-item>span{background:#eaf1ff;color:var(--blue)}.backup-summary-item>span.green{background:#e8fbf1;color:var(--green)}.backup-summary-item>span.orange{background:#fff2df;color:var(--orange)}.backup-summary-item small{display:block;color:var(--muted);margin-bottom:4px}.backup-summary-item strong{font-size:17px}.backups-toolbar-panel{display:flex;align-items:center;gap:16px;margin-top:18px;flex-wrap:wrap}.backups-search{min-width:320px;flex:1}.backups-search input{padding-left:14px!important}.backups-toolbar-actions{display:flex;gap:10px;align-items:center}.backup-count{margin-left:auto;color:var(--muted);font-weight:700}.backup-table{width:100%;border-collapse:collapse;min-width:980px}.backup-table thead th{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#718096;background:#f8fafc;text-align:left;padding:14px 16px}.backup-table td{padding:15px 16px;border-top:1px solid #edf1f5;font-size:13px;vertical-align:middle}.backup-file-cell{display:flex;align-items:center;gap:12px}.backup-file-icon{width:42px;height:42px;border-radius:12px;background:#eef4ff;color:var(--blue);display:grid;place-items:center;flex:0 0 auto}.backup-file-cell strong{display:block}.backup-file-cell small{display:block;margin-top:4px;color:var(--muted);font-size:11px}.backup-type-pill,.backup-status-pill{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border-radius:999px;font-size:11px;font-weight:800}.backup-type-pill{background:#eef4ff;color:var(--blue)}.backup-status-pill.ready{background:#e8fbf1;color:#168557}.backup-actions{display:flex;align-items:center;gap:8px}.backup-actions form{margin:0}.backup-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.backup-detail-grid article{padding:14px;border:1px solid #edf1f5;border-radius:14px;background:#fbfdff}.backup-detail-grid small{display:block;color:var(--muted);margin-bottom:6px}.backup-detail-grid strong{display:block;color:var(--text);word-break:break-word}.backup-confirm-modal footer .secondary-button,.backup-detail-modal footer .secondary-button{min-width:120px}.backup-confirm-modal footer,.backup-detail-modal footer{display:flex;justify-content:flex-end;gap:10px}.backup-confirm-modal .primary-button{min-width:150px}@media(max-width:1100px){.backup-info-grid{grid-template-columns:1fr}.backup-count{width:100%;margin-left:0}}@media(max-width:760px){.backup-hero{flex-direction:column;align-items:flex-start}.backups-toolbar-panel{align-items:stretch}.backups-search{min-width:0;width:100%}.backups-toolbar-actions{width:100%;justify-content:flex-start}.backup-detail-grid{grid-template-columns:1fr}}

/* =========================
   COPIAS DE SEGURIDAD NUEVO DISEÑO
   ========================= */
.backup-hero-clean{margin-bottom:18px}
.backup-hero-clean form{display:none}
.backup-dashboard-shell{padding:18px}
.backup-toolbar-modern{display:grid;grid-template-columns:minmax(280px,1.1fr) auto auto;gap:14px;align-items:center;margin-bottom:18px}
.backup-search-form{margin:0}
.backup-search-modern{height:44px;max-width:370px;border-radius:13px;overflow:hidden;background:#fff}
.backup-search-modern i{width:48px;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue)}
.backup-search-modern input{border:0;outline:0;width:100%;padding:0 14px!important;font-size:13px}
.backup-filter-tabs{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.backup-tab{height:42px;padding:0 20px;border-radius:12px;border:1px solid #dbe4ef;background:#fff;color:#53667f;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.backup-tab.active{background:#eef4ff;color:var(--blue);border-color:#8fb0ef;box-shadow:0 0 0 2px rgba(47,111,237,.08) inset}
.backup-top-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap}
.backup-top-actions form{margin:0}
.backup-top-actions .secondary-button,.backup-top-actions .primary-button{min-height:44px}
.backup-modern-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.backup-stat-card{border:1px solid #e3e9f1;border-radius:15px;padding:16px 18px;background:#fff;display:flex;align-items:center;gap:14px;min-height:84px}
.backup-stat-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-size:20px;flex:0 0 auto}
.backup-stat-icon.blue{background:#eaf1ff;color:var(--blue)}
.backup-stat-icon.indigo{background:#eef1ff;color:#6d78e4}
.backup-stat-icon.green{background:#e8f7ec;color:var(--green)}
.backup-stat-card small{display:block;color:var(--muted);margin-bottom:5px;font-size:11px}
.backup-stat-card strong{display:block;font-size:14px;line-height:1.35}
.backup-modern-layout{display:grid;grid-template-columns:minmax(0,1.75fr) 320px;gap:18px;align-items:start}
.backup-table-wrapper-modern{padding:0;overflow:hidden}
.backup-table-modern{min-width:760px}
.backup-table-modern thead th{background:#f8fafc;color:#68788d;text-transform:none;letter-spacing:0;font-size:12px;padding:14px 16px}
.backup-table-modern td{padding:15px 16px;border-top:1px solid #edf1f5;font-size:13px;vertical-align:middle}
.backup-table-modern td.backup-file-name-cell{font-weight:700;color:#2d4463}
.backup-status-pill.success{background:#e9f8ee;color:#238451}
.backup-status-pill.auto{background:#eef4ff;color:var(--blue)}
.backup-table-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px;border-top:1px solid #edf1f5;background:#fff;color:#667991;font-size:12px}
.backup-pager{display:flex;gap:8px;align-items:center}
.pager-btn{min-width:34px;height:34px;padding:0 10px;border:1px solid #dbe4ef;border-radius:10px;background:#fff;color:#50647d;display:flex;align-items:center;justify-content:center;font-weight:700}
.pager-btn.active{background:var(--blue);border-color:var(--blue);color:#fff}
.backup-side-stack{display:grid;gap:16px}
.backup-side-card{padding:18px}
.backup-side-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}
.backup-side-head>span{width:44px;height:44px;border-radius:13px;background:#eef4ff;color:var(--blue);display:grid;place-items:center;font-size:18px;flex:0 0 auto}
.backup-side-head strong{display:block;font-size:17px}
.backup-side-head p{margin:6px 0 0;color:var(--muted);font-size:11.5px;line-height:1.5}
.backup-side-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.backup-side-list li{display:flex;align-items:flex-start;gap:10px;color:#42556f;font-size:12.5px}
.backup-side-list i{color:var(--green);margin-top:2px}
.backup-schedule-options{display:grid;gap:10px;margin-top:4px}
.backup-schedule-options label{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #eef2f6;color:#43566f}
.backup-schedule-options label:last-child{border-bottom:0}
.backup-schedule-options span{display:flex;align-items:center;gap:9px;font-size:13px}
.backup-schedule-options input{accent-color:var(--blue)}
.backup-last-run{margin-top:12px;padding-top:12px;border-top:1px solid #eef2f6;color:#60748c;font-size:12px;display:flex;align-items:center;gap:9px}
.backup-empty-modern{padding:70px 30px}
@media(max-width:1180px){.backup-toolbar-modern{grid-template-columns:1fr;justify-items:start}.backup-top-actions{justify-content:flex-start}.backup-modern-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.backup-modern-layout{grid-template-columns:1fr}}
@media(max-width:700px){.backup-modern-stats{grid-template-columns:1fr}.backup-filter-tabs{width:100%}.backup-search-modern{max-width:100%}}

/* =========================
   PERFIL DE USUARIO TOPBAR
   ========================= */
.topbar-actions{
  align-items:center;
  gap:14px;
}

.top-icon-button{
  width:46px;
  height:46px;
  border:1px solid #dfe7f2;
  border-radius:50%;
  background:#fff;
  color:#12396c;
  display:grid;
  place-items:center;
  font-size:18px;
  cursor:pointer;
  position:relative;
  transition:background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.top-icon-button:hover{
  background:#f6f9fd;
  box-shadow:0 10px 22px rgba(15,35,70,.08);
  transform:translateY(-1px);
}

.dark-mode-button{
  color:#60748c;
}

.notification.top-icon-button span,
.top-icon-button.notification span{
  position:absolute;
  right:-4px;
  top:-6px;
  background:#ef4444;
  color:#fff;
  border-radius:999px;
  font-size:10px;
  min-width:18px;
  height:18px;
  display:grid;
  place-items:center;
  border:2px solid #fff;
}

.profile-menu{
  position:relative;
}

.profile.profile-trigger{
  min-height:48px;
  border:0;
  background:transparent;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  color:#10213b;
  padding:0 2px;
}

.profile.profile-trigger .avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--navy),var(--teal));
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:900;
  flex:0 0 auto;
}

.profile.profile-trigger strong{
  font-size:15px;
  font-weight:900;
  max-width:165px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.profile-chevron{
  color:#12396c;
  transition:transform .18s ease;
}

.profile.profile-trigger[aria-expanded="true"] .profile-chevron{
  transform:rotate(180deg);
}

.profile-dropdown{
  display:none;
  position:absolute;
  right:0;
  top:calc(100% + 14px);
  width:310px;
  background:#fff;
  border:1px solid #dfe6ef;
  border-radius:18px;
  box-shadow:0 24px 65px rgba(15,35,70,.18);
  padding:16px;
  z-index:120;
}

.profile-dropdown.open{
  display:block;
}

.profile-dropdown-head{
  padding:4px 2px 14px;
  border-bottom:1px solid #edf1f5;
  display:flex;
  flex-direction:column;
  gap:5px;
}

.profile-dropdown-head strong{
  font-size:16px;
  color:#263954;
}

.profile-dropdown-head small{
  color:#6f7f95;
  word-break:break-all;
  font-size:13px;
}

.profile-dropdown a,
.profile-dropdown form button{
  width:100%;
  min-height:50px;
  border:0;
  background:#fff;
  color:#344861;
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:0 12px;
  text-align:left;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
}

.profile-dropdown a i,
.profile-dropdown form button i{
  width:22px;
  text-align:center;
  color:#6c7b90;
  font-size:17px;
}

.profile-dropdown a:hover{
  background:#f4f8fd;
  color:#12396c;
}

.profile-dropdown form{
  margin:0;
}

.profile-dropdown form button{
  color:#344861;
}

.profile-dropdown form button:hover{
  background:#fff1f1;
  color:#c03535;
}

.profile-dropdown form button:hover i{
  color:#c03535;
}

@media(max-width:850px){
  .profile.profile-trigger strong{display:none}
  .profile-dropdown{width:285px;right:-8px}
  .dark-mode-button{display:none}
}


/* CONFIGURACIÓN: NOTIFICACIONES */
.notification-hero{margin-bottom:18px}
.notifications-shell{padding:18px}
.notifications-toolbar{display:grid;grid-template-columns:minmax(300px,.9fr) 1.45fr;gap:18px;align-items:center;margin-bottom:18px}
.notifications-search{height:52px;border:1px solid #d7e2ef;border-radius:14px;background:#fff;overflow:hidden;padding:0;display:flex;align-items:stretch}
.notifications-search>i{width:56px;min-width:56px;height:100%;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:var(--blue);margin:0}
.notifications-search input{height:100%;flex:1;border:0;outline:0;padding:0 18px!important;background:#fff;color:#21344d;font-size:15px}
.notifications-search:focus-within{border-color:#8ab4ff;box-shadow:0 0 0 4px rgba(47,111,237,.10)}
.notification-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.notification-filter{height:52px;border:1px solid #dbe4ef;border-radius:12px;background:#fff;color:#253b59;font-weight:800;display:flex;align-items:center;justify-content:center;gap:9px;cursor:pointer;transition:.18s ease}
.notification-filter:hover{background:#f7faff}
.notification-filter.active{background:linear-gradient(135deg,#2f6fed,#0a46d6);color:#fff;border-color:#2f6fed;box-shadow:0 10px 22px rgba(47,111,237,.22)}
.notification-filter i.fa-whatsapp{color:#22c55e}
.notification-filter.active i{color:#fff!important}
.notification-filter i.fa-circle{font-size:8px;color:#22c55e}
.notifications-table{width:100%;min-width:980px;border-collapse:separate;border-spacing:0;border:1px solid #dfe8f3;border-radius:14px;overflow:hidden}
.notifications-table th{background:#f8fafc;color:#475c76;font-size:13px;text-align:left;padding:16px 18px;border-bottom:1px solid #dfe8f3}
.notifications-table td{padding:14px 18px;border-bottom:1px solid #edf2f7;font-size:14px;vertical-align:middle}
.notifications-table tbody tr:last-child td{border-bottom:0}
.template-name-cell{display:flex;align-items:center;gap:14px}
.template-name-cell strong{font-size:15px;color:#203753}
.template-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:#f2f7ff;border:1px solid #dfe8f3;color:#2f6fed;font-size:17px}
.template-icon.whatsapp{background:#ecfdf3;color:#16a34a}
.template-icon.email{background:#eef4ff;color:#2f6fed}
.template-icon.system{background:#eef4ff;color:#12396c}
.template-icon.sms{background:#fff7ed;color:#ea580c}
.channel-pill{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:31px;border-radius:8px;padding:0 12px;font-weight:800;font-size:12px}
.channel-pill.email{background:#eef4ff;color:#2f6fed}
.channel-pill.whatsapp{background:#e8f8ef;color:#16a34a}
.channel-pill.system{background:#eef4ff;color:#12396c}
.channel-pill.sms{background:#fff7ed;color:#ea580c}
.template-status{display:inline-flex;align-items:center;gap:8px;min-height:31px;border-radius:9px;padding:0 13px;font-weight:800;font-size:12px}
.template-status i{font-size:8px}
.template-status.active{background:#e8f8ef;color:#168557}
.template-status.inactive{background:#fff0f0;color:#c23f3f}
.notification-actions{display:flex;align-items:center;gap:10px}
.notification-actions form{margin:0}
.notification-actions .mini-action{width:42px;height:42px;border:1px solid #dce7f4;background:#fff;border-radius:10px;color:#2f6fed;display:grid;place-items:center;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.notification-actions .mini-action:hover{background:#f3f7fd;transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,35,70,.10)}
.notification-actions .switch-button{width:44px;height:24px;border:0;border-radius:999px;background:#94a3b8;padding:3px;cursor:pointer}
.notification-actions .switch-button span{display:block;width:18px;height:18px;border-radius:50%;background:#fff;transition:.2s ease}
.notification-actions .switch-button.on{background:#2f6fed}
.notification-actions .switch-button.on span{transform:translateX(20px)}
.notifications-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px;color:#5c6e85;font-size:13px}
.notifications-pager{display:flex;align-items:center;gap:6px}
.notifications-pager button{min-width:34px;height:34px;border:1px solid #dbe4ef;background:#fff;border-radius:8px;color:#7b8ca2;font-weight:800}
.notifications-pager button.active{background:#2f6fed;color:#fff;border-color:#2f6fed}
.template-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.template-form-grid label{display:flex;flex-direction:column;gap:8px;color:#314760;font-weight:800}
.template-form-grid .span-2{grid-column:1/-1}
.template-form-grid textarea{min-height:130px;resize:vertical}
.template-help{background:#eef7ff;border:1px solid #d8e9ff;color:#365b8b;border-radius:12px;padding:12px 14px;font-size:13px;line-height:1.45}
.template-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.template-detail-grid article{border:1px solid #dfe8f3;background:#f8fbff;border-radius:14px;padding:14px 16px}
.template-detail-grid .span-2{grid-column:1/-1}
.template-detail-grid small{display:block;color:#6b7d93;font-size:12px;font-weight:800;margin-bottom:7px}
.template-detail-grid strong,.template-detail-grid p{display:block;color:#142f55;font-size:15px;word-break:break-word;margin:0;line-height:1.55}
.template-detail-modal footer{display:flex;justify-content:flex-end}
@media(max-width:1180px){.notifications-toolbar{grid-template-columns:1fr}.notification-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.notification-filters{grid-template-columns:1fr 1fr}.template-form-grid,.template-detail-grid{grid-template-columns:1fr}.template-form-grid .span-2,.template-detail-grid .span-2{grid-column:auto}}


/* CORRECCIÓN MODAL NOTIFICACIONES: encabezado profesional y sin código visible */
.template-modal-professional{
  width:min(860px, calc(100vw - 42px)) !important;
  max-width:860px !important;
  border-radius:18px !important;
  overflow:hidden !important;
}

.template-modal-professional form{
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
}

.template-modal-professional .template-modal-header{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:18px !important;
  padding:26px 30px 20px !important;
  border-bottom:0 !important;
}

.template-modal-professional .template-modal-title{
  display:flex !important;
  align-items:center !important;
  gap:18px !important;
  min-width:0 !important;
}

.template-modal-professional .modal-icon{
  width:58px !important;
  height:58px !important;
  border-radius:16px !important;
  flex:0 0 58px !important;
  display:grid !important;
  place-items:center !important;
  background:#eef4ff !important;
  color:#2f6fed !important;
  font-size:25px !important;
}

.template-modal-professional h2{
  margin:0 0 6px !important;
  color:#0f2a4d !important;
  font-size:25px !important;
  line-height:1.15 !important;
}

.template-modal-professional p{
  margin:0 !important;
  color:#6b7d93 !important;
  font-size:14px !important;
}

.template-modal-professional .modal-close{
  position:static !important;
  width:46px !important;
  height:46px !important;
  border-radius:12px !important;
  flex:0 0 46px !important;
  background:#fff !important;
  border:1px solid #dce7f4 !important;
  box-shadow:0 8px 18px rgba(15,35,70,.08) !important;
  color:#12396c !important;
}

.template-modal-professional .modal-content.template-form-grid{
  padding:18px 30px 28px !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:18px 24px !important;
}

.template-modal-professional .template-form-grid label{
  gap:9px !important;
  color:#2d405a !important;
  font-size:14px !important;
  font-weight:800 !important;
}

.template-modal-professional .input-shell{
  min-height:48px !important;
  border-radius:12px !important;
  overflow:hidden !important;
}

.template-modal-professional .input-shell > i{
  width:50px !important;
  min-width:50px !important;
  background:#eef4ff !important;
  border-right:1px solid #dce7f5 !important;
  color:#2f6fed !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.template-modal-professional .input-shell input,
.template-modal-professional .input-shell select{
  height:48px !important;
  padding:0 16px !important;
  font-size:15px !important;
}

.template-modal-professional .textarea-shell{
  align-items:stretch !important;
}

.template-modal-professional .textarea-shell > i{
  align-self:stretch !important;
  padding-top:17px !important;
  align-items:flex-start !important;
}

.template-modal-professional textarea{
  min-height:120px !important;
  padding:18px 16px !important;
  font-size:15px !important;
  line-height:1.55 !important;
}

.template-modal-professional .template-help{
  margin-top:2px !important;
  padding:13px 16px !important;
  border-radius:12px !important;
  background:#eef7ff !important;
  border:1px solid #d8e9ff !important;
}

.template-modal-professional footer{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:12px !important;
  padding:18px 30px 26px !important;
  background:#fff !important;
  border-top:1px solid #edf2f7 !important;
}

.template-modal-professional footer .secondary-button,
.template-modal-professional footer .primary-button{
  min-height:48px !important;
  border-radius:12px !important;
  padding:0 22px !important;
}

@media(max-width:760px){
  .template-modal-professional .modal-content.template-form-grid{
    grid-template-columns:1fr !important;
  }
  .template-modal-professional .template-form-grid .span-2{
    grid-column:auto !important;
  }
}


/* CORRECCIÓN FINAL: inputs y textarea del modal de notificaciones al ancho completo */
.template-modal-professional .modal-content.template-form-grid{
  align-items:start !important;
}

.template-modal-professional .template-form-grid label{
  min-width:0 !important;
}

.template-modal-professional .template-form-grid .input-shell{
  width:100% !important;
  max-width:none !important;
  box-sizing:border-box !important;
}

.template-modal-professional .template-form-grid .input-shell input,
.template-modal-professional .template-form-grid .input-shell select,
.template-modal-professional .template-form-grid .input-shell textarea{
  width:100% !important;
  max-width:none !important;
  flex:1 1 auto !important;
  box-sizing:border-box !important;
}

.template-modal-professional .template-form-grid .textarea-shell{
  display:flex !important;
  width:100% !important;
  max-width:none !important;
  min-height:128px !important;
}

.template-modal-professional .template-form-grid .textarea-shell textarea{
  min-width:0 !important;
  height:128px !important;
  overflow:auto !important;
}

.template-modal-professional .template-form-grid .span-2 .input-shell{
  grid-column:1 / -1 !important;
}

.template-modal-professional input::placeholder,
.template-modal-professional textarea::placeholder{
  color:#8a98aa !important;
}


/* CONFIGURACIÓN: FORMATO DE TICKETS */
.ticket-hero{margin-bottom:16px}
.ticket-tabs{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}
.ticket-tab{height:44px;border:1px solid #dbe4ef;border-radius:12px;background:#fff;color:#253b59;font-weight:800;padding:0 16px;display:flex;align-items:center;gap:9px;cursor:pointer}
.ticket-tab.active{background:#0f3f7a;color:#fff;border-color:#0f3f7a;box-shadow:0 10px 22px rgba(15,63,122,.16)}
.ticket-tab-panel{display:none}
.ticket-tab-panel.active{display:block}
.ticket-series-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:18px}
.ticket-series-card{padding:24px}
.ticket-section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.ticket-section-title h3{margin:0 0 7px;color:#0f2a4d;font-size:22px}
.ticket-section-title p{margin:0;color:#64758d}
.ticket-section-title.with-icon{justify-content:flex-start;align-items:center}
.ticket-section-title.with-icon>span{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:#eef4ff;color:#2f6fed;font-size:18px}
.ticket-series-toolbar{display:grid;grid-template-columns:minmax(270px,1fr) auto;gap:16px;align-items:center;margin-bottom:18px}
.ticket-search{height:50px;border:1px solid #d7e2ef;border-radius:14px;background:#fff;overflow:hidden;padding:0;display:flex;align-items:stretch}
.ticket-search>i{width:56px;min-width:56px;height:100%;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:#2f6fed;margin:0}
.ticket-search input{height:100%;flex:1;border:0;outline:0;padding:0 18px!important;background:#fff;color:#21344d;font-size:15px}
.ticket-filter-group{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.ticket-filter{height:46px;border:1px solid #dbe4ef;border-radius:11px;background:#fff;color:#253b59;font-weight:800;padding:0 15px;display:flex;align-items:center;gap:8px;cursor:pointer}
.ticket-filter.active{background:#eef4ff;color:#2f6fed;border-color:#8fb0ef;box-shadow:0 0 0 2px rgba(47,111,237,.08) inset}
.ticket-filter i.fa-circle{font-size:8px;color:#22c55e}
.ticket-series-table{width:100%;min-width:850px;border-collapse:separate;border-spacing:0;border:1px solid #dfe8f3;border-radius:14px;overflow:hidden}
.ticket-series-table th{background:#f8fafc;color:#475c76;font-size:13px;text-align:left;padding:16px 18px;border-bottom:1px solid #dfe8f3}
.ticket-series-table td{padding:14px 18px;border-bottom:1px solid #edf2f7;font-size:14px;vertical-align:middle}
.ticket-doc-cell{display:flex;align-items:center;gap:14px}
.ticket-doc-cell span{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:#f2f7ff;border:1px solid #dfe8f3;color:#2f6fed}
.ticket-doc-cell strong{font-size:15px;color:#203753}
.ticket-status{display:inline-flex;align-items:center;gap:8px;min-height:31px;border-radius:9px;padding:0 13px;font-weight:800;font-size:12px}
.ticket-status i{font-size:8px}
.ticket-status.active{background:#e8f8ef;color:#168557}
.ticket-status.inactive{background:#fff0f0;color:#c23f3f}
.ticket-actions{display:flex;align-items:center;gap:10px}
.ticket-actions form{margin:0}
.ticket-actions .mini-action{width:40px;height:40px;border:1px solid #dce7f4;background:#fff;border-radius:10px;color:#2f6fed;display:grid;place-items:center;cursor:pointer;transition:.16s ease}
.ticket-actions .mini-action:hover{background:#f3f7fd;transform:translateY(-1px);box-shadow:0 8px 18px rgba(15,35,70,.10)}
.ticket-actions .switch-button{width:44px;height:24px;border:0;border-radius:999px;background:#94a3b8;padding:3px;cursor:pointer}
.ticket-actions .switch-button span{display:block;width:18px;height:18px;border-radius:50%;background:#fff;transition:.2s ease}
.ticket-actions .switch-button.on{background:#2f6fed}
.ticket-actions .switch-button.on span{transform:translateX(20px)}
.ticket-table-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0 0;color:#5c6e85;font-size:13px}
.ticket-pager{display:flex;gap:8px}
.ticket-pager button{min-width:38px;height:38px;border:1px solid #dbe4ef;border-radius:10px;background:#fff;color:#6f7f93}
.ticket-pager button.active{background:#2f6fed;color:#fff;border-color:#2f6fed}
.ticket-side-stack{display:grid;gap:18px}
.ticket-side-card{padding:24px;display:flex;gap:18px;align-items:flex-start;min-height:132px}
.ticket-side-card>span{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;font-size:24px}
.ticket-side-card>span.green{background:#e8f8ef;color:#16a34a}
.ticket-side-card>span.blue{background:#eef4ff;color:#2f6fed}
.ticket-side-card>span.purple{background:#f0eaff;color:#7c3aed}
.ticket-side-card strong{display:block;color:#0f2a4d;font-size:24px;margin:2px 0 5px}
.ticket-side-card small{display:block;font-weight:900;color:#0f2a4d;font-size:15px}
.ticket-side-card p{margin:8px 0 0;color:#64758d;line-height:1.45}
.ticket-config-layout{display:grid;grid-template-columns:minmax(0,1.4fr) 470px;gap:18px}
.ticket-config-card{padding:26px}
.ticket-divider{height:1px;background:#edf2f7;margin:18px 0}
.ticket-config-card h4{margin:0 0 16px;color:#0f2a4d;font-size:16px}
.ticket-switch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 22px}
.ticket-option{display:flex;align-items:center;gap:11px;color:#2d405a;font-weight:700}
.ticket-option input{display:none}
.ticket-option span{width:42px;height:24px;border-radius:999px;background:#94a3b8;position:relative;flex:0 0 auto}
.ticket-option span:after{content:'';position:absolute;left:3px;top:3px;width:18px;height:18px;background:#fff;border-radius:50%;transition:.2s}
.ticket-option input:checked+span{background:#2f6fed}
.ticket-option input:checked+span:after{transform:translateX(18px)}
.ticket-select-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:22px}
.ticket-select-grid label{display:flex;flex-direction:column;gap:9px;font-weight:800;color:#2d405a}
.ticket-select-grid .input-shell{height:48px;border-radius:12px;overflow:hidden}
.ticket-select-grid .input-shell>i{width:48px;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:#2f6fed}
.ticket-select-grid select{border:0;outline:0;width:100%;padding:0 14px}
.ticket-print-type{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:24px}
.ticket-print-type label{border:1px solid #dbe4ef;border-radius:12px;display:flex;align-items:center;gap:14px;padding:16px;background:#fff;cursor:pointer}
.ticket-print-type label.active{border-color:#2f6fed;box-shadow:0 0 0 2px rgba(47,111,237,.08) inset;background:#f7fbff}
.ticket-print-type strong{display:block;color:#0f2a4d}
.ticket-print-type small{display:block;color:#64758d;margin-top:4px}
.ticket-config-actions{display:grid;grid-template-columns:1fr .7fr;gap:16px;padding-top:18px;border-top:1px solid #edf2f7}
.ticket-preview-card{padding:26px}
.ticket-receipt-preview{width:330px;max-width:100%;margin:0 auto;background:#fff;border:1px solid #dfe8f3;box-shadow:0 18px 45px rgba(15,35,70,.12);padding:22px 22px 24px;position:relative}
.ticket-receipt-preview:before,.ticket-receipt-preview:after{content:'';position:absolute;left:0;right:0;height:8px;background:radial-gradient(circle at 8px 4px,transparent 7px,#fff 8px) repeat-x;background-size:16px 8px}
.ticket-receipt-preview:before{top:-6px}.ticket-receipt-preview:after{bottom:-6px;transform:rotate(180deg)}
.receipt-top{display:flex;align-items:center;justify-content:center;gap:14px;text-align:left}
.receipt-logo{width:72px;height:72px;border-radius:16px;display:grid;place-items:center;overflow:hidden}
.receipt-logo img{width:100%;height:100%;object-fit:contain}
.receipt-top h4{font-size:20px;margin:0 0 4px;color:#0f2a4d}
.receipt-top p{font-size:12px;margin:0;color:#4e5f76;line-height:1.35}
.dash{height:1px;border-top:2px dashed #b7c6d9;margin:14px 0}
.receipt-title{text-align:center;font-size:18px!important;margin:0!important}
.receipt-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #edf2f7;padding:6px 0;font-size:13px}
.receipt-row span{color:#30455f}.receipt-row i{width:18px;color:#0f2a4d}
.receipt-row.total{font-size:16px;border-bottom:0}
.qr-box{width:88px;height:88px;margin:10px auto;display:grid;place-items:center;background:repeating-linear-gradient(45deg,#111 0 4px,#fff 4px 8px);color:transparent}
.receipt-footer{text-align:center;margin:12px 0 0;color:#0f2a4d;font-weight:800}
.ticket-footer-layout{display:grid;grid-template-columns:minmax(0,1.1fr) .9fr;gap:18px}
.ticket-footer-editor,.ticket-footer-preview{padding:26px}
.ticket-footer-editor h3,.ticket-footer-preview h3,.ticket-preview-large h3{margin:0 0 7px;color:#0f2a4d;font-size:22px}
.ticket-footer-editor p,.ticket-footer-preview p{margin:0 0 22px;color:#64758d}
.ticket-editor-box{border:1px solid #d7e2ef;border-radius:14px;overflow:hidden;background:#fff;margin-top:10px}
.ticket-editor-toolbar{height:52px;background:#f7f9fd;border-bottom:1px solid #d7e2ef;display:flex;align-items:center;gap:22px;padding:0 22px;color:#0f3f7a}
.ticket-editor-box textarea{width:100%;min-height:170px;border:0;outline:0;padding:20px;font-size:15px;line-height:1.65;resize:vertical}
.ticket-variables{border:1px solid #d7e2ef;border-radius:14px;background:#f7fbff;padding:18px;margin-top:18px}
.ticket-variables strong,.ticket-variables small{display:block}.ticket-variables strong{color:#0f2a4d}.ticket-variables small{color:#64758d;margin:4px 0 12px}
.ticket-variables div{display:grid;grid-template-columns:150px 1fr;gap:12px;align-items:center;margin:8px 0}
.ticket-variables code{background:#dceaff;color:#2f6fed;border-radius:8px;padding:6px 10px;font-weight:800}
.ticket-note{margin:16px 0;color:#64758d;display:flex;gap:10px;align-items:center}
.ticket-note i{color:#2f6fed}
.ticket-footer-actions{display:flex;justify-content:flex-end;gap:14px;margin-top:20px}
.receipt-paper.mini{width:360px;max-width:100%;margin:0 auto;background:#fff;border-radius:16px;box-shadow:0 18px 45px rgba(15,35,70,.12);padding:34px 28px}
.receipt-line{display:flex;justify-content:space-between;margin:12px 0}
.receipt-line.small{font-size:13px}
.receipt-total{display:flex;justify-content:space-between;font-size:19px;font-weight:900;margin:14px 0;color:#0f2a4d}
.footer-preview-text{border:2px solid #a8c8ff;border-radius:12px;padding:18px;line-height:1.65;margin-top:16px}
.ticket-preview-layout{display:grid;grid-template-columns:380px minmax(0,1fr);gap:18px}
.ticket-preview-options{display:grid;gap:18px}
.preview-option-card{padding:22px;display:flex;gap:18px;align-items:center}
.preview-option-card>span{width:56px;height:56px;border-radius:16px;background:#eef4ff;color:#2f6fed;display:grid;place-items:center;font-size:24px;flex:0 0 auto}
.preview-option-card small{display:block;color:#64758d;font-weight:800;margin-bottom:6px}
.preview-option-card strong{display:block;color:#0f2a4d;font-size:19px;line-height:1.4}
.preview-option-card.form-card{display:block}.preview-option-card.form-card label{font-weight:800;color:#0f2a4d}.preview-option-card.form-card .input-shell{margin-top:12px;height:48px;border-radius:12px;overflow:hidden}
.ticket-preview-large{padding:26px;text-align:center}
.ticket-preview-large .ticket-receipt-preview{width:390px;margin-top:10px}
.preview-large-actions{display:flex;justify-content:center;gap:18px;margin-top:28px}
.series-form-grid,.series-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.series-form-grid label{display:flex;flex-direction:column;gap:8px;font-weight:800;color:#314760}
.series-form-grid .input-shell{height:48px;border-radius:12px;overflow:hidden}
.series-form-grid .input-shell>i{width:50px;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#eef4ff;border-right:1px solid #dce7f5;color:#2f6fed}
.series-form-grid input,.series-form-grid select{border:0;outline:0;width:100%;padding:0 15px}
.series-detail-grid article{border:1px solid #dfe8f3;background:#f8fbff;border-radius:14px;padding:14px 16px}
.series-detail-grid small{display:block;color:#6b7d93;font-size:12px;font-weight:800;margin-bottom:7px}
.series-detail-grid strong{display:block;color:#142f55;font-size:15px}
@media(max-width:1200px){.ticket-series-layout,.ticket-config-layout,.ticket-footer-layout,.ticket-preview-layout{grid-template-columns:1fr}.ticket-switch-grid,.ticket-select-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ticket-series-toolbar{grid-template-columns:1fr}.ticket-side-stack{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:780px){.ticket-side-stack,.ticket-switch-grid,.ticket-select-grid,.ticket-print-type{grid-template-columns:1fr}.ticket-filter-group{width:100%}.ticket-footer-actions,.preview-large-actions{flex-direction:column}.series-form-grid,.series-detail-grid{grid-template-columns:1fr}}


/* FIX GLOBAL: evita que overlays/modales ocultos bloqueen clics */
.app-modal:not(.open),
.global-search-overlay:not(.open),
.mobile-overlay:not(.open){
  display:none!important;
  pointer-events:none!important;
}

.app-modal.open,
.global-search-overlay.open{
  pointer-events:auto!important;
}

.ticket-hero,
.ticket-tabs,
.ticket-tab,
.ticket-tab-panel,
.ticket-tab-panel.active,
.ticket-series-card,
.ticket-series-toolbar,
.ticket-filter-group,
.ticket-actions,
.ticket-side-stack{
  position:relative!important;
  pointer-events:auto!important;
}


/* FIX DEFINITIVO FORMATO TICKETS CLICK */
.app-modal:not(.open),
.global-search-overlay:not(.open),
.mobile-overlay:not(.open){
  display:none!important;
  pointer-events:none!important;
}

.ticket-tabs,
.ticket-tabs *,
.ticket-tab-panel.active,
.ticket-tab-panel.active *,
.ticket-series-card,
.ticket-series-card *,
.ticket-actions,
.ticket-actions *,
.ticket-filter-group,
.ticket-filter-group *{
  pointer-events:auto!important;
}


/* FIX FINAL FORMATO TICKETS: secciones visibles y JS aislado */
.ticket-format-module [data-ticket-panel]{display:none!important;}
.ticket-format-module [data-ticket-panel].active{display:block!important;}
.ticket-format-module .ticket-receipt-preview,
.ticket-format-module .receipt-paper{
  color:#0f2a4d!important;
  background:#fff!important;
  opacity:1!important;
  visibility:visible!important;
}
.ticket-format-module .ticket-receipt-preview *{
  visibility:visible!important;
}
.ticket-format-module .ticket-preview-card{
  min-height:540px;
}
.ticket-format-module .ticket-preview-card .ticket-receipt-preview{
  margin-top:10px;
}
.ticket-format-module .ticket-footer-layout,
.ticket-format-module .ticket-preview-layout,
.ticket-format-module .ticket-config-layout,
.ticket-format-module .ticket-series-layout{
  opacity:1!important;
  visibility:visible!important;
}


/* FIX PROFESIONAL CONFIGURACIÓN DEL TICKET */
.ticket-format-module .ticket-print-type input[type="radio"]{
  accent-color:#2f6fed;
}

.ticket-format-module .ticket-print-type label{
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.ticket-format-module .ticket-print-type label:not(.active){
  border-color:#dbe4ef!important;
  background:#fff!important;
  box-shadow:none!important;
}

.ticket-format-module .ticket-print-type label.active{
  border-color:#2f6fed!important;
  background:#f7fbff!important;
  box-shadow:0 0 0 2px rgba(47,111,237,.08) inset!important;
}

.ticket-format-module .ticket-preview-card{
  min-height:620px;
  overflow:visible!important;
}

.ticket-format-module .ticket-preview-card .ticket-receipt-preview{
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
  min-height:initial!important;
  height:auto!important;
  color:#0f2a4d!important;
}

.ticket-format-module .ticket-receipt-preview{
  width:330px;
  max-width:100%;
  margin:0 auto;
  background:#fff!important;
  border:1px solid #dfe8f3;
  box-shadow:0 18px 45px rgba(15,35,70,.12);
  padding:22px 22px 24px;
  position:relative;
  color:#0f2a4d!important;
  font-family:inherit;
}

.ticket-format-module .ticket-receipt-preview *{
  color:inherit;
  opacity:1!important;
  visibility:visible!important;
}

.ticket-format-module .ticket-receipt-preview .receipt-logo img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}

.ticket-format-module .ticket-receipt-preview.is-a4{
  width:420px;
  min-height:520px;
  padding:34px 34px 38px;
}

.ticket-format-module .ticket-receipt-preview.is-a4:before,
.ticket-format-module .ticket-receipt-preview.is-a4:after{
  display:none;
}

.ticket-format-module .receipt-brand-text{
  text-align:center;
}

.ticket-format-module .receipt-brand-text h4{
  font-size:20px;
  margin:0 0 5px;
}

.ticket-format-module .receipt-letters{
  margin:8px 0;
  font-size:12px;
  color:#40536d!important;
}

.ticket-format-module .ticket-option input[type="checkbox"]{
  display:none!important;
}

/* Evita que el estado hover/focus de otros controles tape la vista previa */
.ticket-format-module [data-ticket-panel="config"]{
  min-height:680px;
}


/* ===============================
   FIX LIMPIO: FORMATO DE TICKETS
   =============================== */
.ticket-format-module [data-ticket-panel]{
  display:none!important;
}
.ticket-format-module [data-ticket-panel].active{
  display:block!important;
}

.ticket-format-module .ticket-print-type input[type="radio"]{
  accent-color:#2f6fed;
}
.ticket-format-module .ticket-print-type label{
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.ticket-format-module .ticket-print-type label:not(.active){
  border-color:#dbe4ef!important;
  background:#fff!important;
  box-shadow:none!important;
}
.ticket-format-module .ticket-print-type label.active{
  border-color:#2f6fed!important;
  background:#f7fbff!important;
  box-shadow:0 0 0 2px rgba(47,111,237,.08) inset!important;
}

.ticket-format-module .ticket-live-preview-wrap{
  display:flex;
  justify-content:center;
  padding-top:8px;
}
.ticket-format-module .ticket-preview-card{
  min-height:620px;
  overflow:visible!important;
}

.ticket-format-module .ticket-receipt-preview{
  display:block!important;
  width:330px;
  max-width:100%;
  margin:0 auto;
  background:#fff!important;
  border:1px solid #dfe8f3;
  box-shadow:0 18px 45px rgba(15,35,70,.12);
  padding:22px 22px 24px;
  position:relative;
  color:#0f2a4d!important;
  font-family:inherit;
  opacity:1!important;
  visibility:visible!important;
  min-height:auto!important;
  height:auto!important;
}
.ticket-format-module .ticket-receipt-preview *{
  color:inherit;
  opacity:1!important;
  visibility:visible!important;
}
.ticket-format-module .ticket-receipt-preview:before,
.ticket-format-module .ticket-receipt-preview:after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  height:8px;
  background:radial-gradient(circle at 8px 4px,transparent 7px,#fff 8px) repeat-x;
  background-size:16px 8px;
}
.ticket-format-module .ticket-receipt-preview:before{top:-6px}
.ticket-format-module .ticket-receipt-preview:after{bottom:-6px;transform:rotate(180deg)}
.ticket-format-module .ticket-receipt-preview.is-a4{
  width:420px;
  min-height:520px;
  padding:34px;
}
.ticket-format-module .ticket-receipt-preview.is-a4:before,
.ticket-format-module .ticket-receipt-preview.is-a4:after{
  display:none;
}

.ticket-format-module .receipt-top{
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:14px;
  text-align:left;
}
.ticket-format-module .receipt-logo{
  width:72px;
  height:72px;
  border-radius:16px;
  display:grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 auto;
}
.ticket-format-module .receipt-logo img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
}
.ticket-format-module .receipt-top h4,
.ticket-format-module .receipt-brand-text h4{
  font-size:20px;
  margin:0 0 4px;
  color:#0f2a4d!important;
}
.ticket-format-module .receipt-top p,
.ticket-format-module .receipt-brand-text p{
  font-size:12px;
  margin:0;
  color:#4e5f76!important;
  line-height:1.35;
}
.ticket-format-module .receipt-brand-text{text-align:center}
.ticket-format-module .dash{
  height:1px;
  border-top:2px dashed #b7c6d9;
  margin:14px 0;
}
.ticket-format-module .receipt-title{
  text-align:center;
  font-size:18px!important;
  margin:0!important;
  color:#0f2a4d!important;
}
.ticket-format-module .receipt-row{
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid #edf2f7;
  padding:6px 0;
  font-size:13px;
}
.ticket-format-module .receipt-row span{color:#30455f!important}
.ticket-format-module .receipt-row i{width:18px;color:#0f2a4d!important}
.ticket-format-module .receipt-row.total{
  font-size:16px;
  border-bottom:0;
  font-weight:900;
}
.ticket-format-module .receipt-letters{
  margin:8px 0;
  font-size:12px;
  color:#40536d!important;
}
.ticket-format-module .qr-box{
  width:88px;
  height:88px;
  margin:10px auto;
  display:grid!important;
  place-items:center;
  background:repeating-linear-gradient(45deg,#111 0 4px,#fff 4px 8px);
  color:transparent!important;
  border:1px solid #111;
}
.ticket-format-module .receipt-footer{
  text-align:center;
  margin:12px 0 0;
  color:#0f2a4d!important;
  font-weight:800;
}
.ticket-format-module .ticket-option input[type="checkbox"]{
  display:none!important;
}

/* Evita overlays invisibles bloqueando clics */
.app-modal:not(.open),
.global-search-overlay:not(.open),
.mobile-overlay:not(.open){
  display:none!important;
  pointer-events:none!important;
}


/* =========================================================
   FORMATO DE TICKETS - ESTABILIZACIÓN FINAL
   ========================================================= */
.ticket-format-module [data-ticket-panel]{
  display:none!important;
}
.ticket-format-module [data-ticket-panel].active{
  display:block!important;
}

.ticket-format-module .ticket-tab,
.ticket-format-module .ticket-filter,
.ticket-format-module .mini-action,
.ticket-format-module [data-ticket-new-series],
.ticket-format-module [data-save-ticket-config],
.ticket-format-module [data-reset-ticket-config],
.ticket-format-module [data-ticket-show-preview]{
  cursor:pointer!important;
  pointer-events:auto!important;
}

.ticket-format-module .ticket-print-type input[type="radio"]{
  accent-color:#2f6fed;
}

.ticket-format-module .ticket-print-type label:not(.active){
  border-color:#dbe4ef!important;
  background:#fff!important;
  box-shadow:none!important;
}

.ticket-format-module .ticket-print-type label.active{
  border-color:#2f6fed!important;
  background:#f7fbff!important;
  box-shadow:0 0 0 2px rgba(47,111,237,.08) inset!important;
}

.ticket-format-module .ticket-live-preview-wrap{
  display:flex!important;
  justify-content:center!important;
  align-items:flex-start!important;
  padding-top:8px!important;
  min-height:470px!important;
}

.ticket-format-module .ticket-preview-card{
  min-height:620px!important;
  overflow:visible!important;
}

.ticket-format-module .ticket-receipt-preview{
  display:block!important;
  width:330px!important;
  max-width:100%!important;
  margin:0 auto!important;
  background:#fff!important;
  border:1px solid #dfe8f3!important;
  box-shadow:0 18px 45px rgba(15,35,70,.12)!important;
  padding:22px 22px 24px!important;
  position:relative!important;
  color:#0f2a4d!important;
  font-family:inherit!important;
  opacity:1!important;
  visibility:visible!important;
  min-height:auto!important;
  height:auto!important;
  overflow:visible!important;
}

.ticket-format-module .ticket-receipt-preview *{
  color:inherit;
  opacity:1!important;
  visibility:visible!important;
}

.ticket-format-module .ticket-receipt-preview:before,
.ticket-format-module .ticket-receipt-preview:after{
  content:''!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  height:8px!important;
  background:radial-gradient(circle at 8px 4px,transparent 7px,#fff 8px) repeat-x!important;
  background-size:16px 8px!important;
}

.ticket-format-module .ticket-receipt-preview:before{top:-6px!important}
.ticket-format-module .ticket-receipt-preview:after{bottom:-6px!important;transform:rotate(180deg)!important}

.ticket-format-module .ticket-receipt-preview.is-a4{
  width:420px!important;
  min-height:520px!important;
  padding:34px!important;
}

.ticket-format-module .ticket-receipt-preview.is-a4:before,
.ticket-format-module .ticket-receipt-preview.is-a4:after{
  display:none!important;
}

.ticket-format-module .receipt-top{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
  text-align:left!important;
}

.ticket-format-module .receipt-logo{
  width:72px!important;
  height:72px!important;
  border-radius:16px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  flex:0 0 auto!important;
}

.ticket-format-module .receipt-logo img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
}

.ticket-format-module .receipt-top h4,
.ticket-format-module .receipt-brand-text h4{
  font-size:20px!important;
  margin:0 0 4px!important;
  color:#0f2a4d!important;
}

.ticket-format-module .receipt-top p,
.ticket-format-module .receipt-brand-text p{
  font-size:12px!important;
  margin:0!important;
  color:#4e5f76!important;
  line-height:1.35!important;
}

.ticket-format-module .receipt-brand-text{text-align:center!important}

.ticket-format-module .dash{
  height:1px!important;
  border-top:2px dashed #b7c6d9!important;
  margin:14px 0!important;
}

.ticket-format-module .receipt-title{
  text-align:center!important;
  font-size:18px!important;
  margin:0!important;
  color:#0f2a4d!important;
}

.ticket-format-module .receipt-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  border-bottom:1px solid #edf2f7!important;
  padding:6px 0!important;
  font-size:13px!important;
}

.ticket-format-module .receipt-row span{color:#30455f!important}
.ticket-format-module .receipt-row i{width:18px!important;color:#0f2a4d!important}

.ticket-format-module .receipt-row.total{
  font-size:16px!important;
  border-bottom:0!important;
  font-weight:900!important;
}

.ticket-format-module .receipt-letters{
  margin:8px 0!important;
  font-size:12px!important;
  color:#40536d!important;
}

.ticket-format-module .qr-box{
  width:88px!important;
  height:88px!important;
  margin:10px auto!important;
  display:grid!important;
  place-items:center!important;
  background:repeating-linear-gradient(45deg,#111 0 4px,#fff 4px 8px)!important;
  color:transparent!important;
  border:1px solid #111!important;
}

.ticket-format-module .receipt-footer{
  text-align:center!important;
  margin:12px 0 0!important;
  color:#0f2a4d!important;
  font-weight:800!important;
}

.ticket-format-module .ticket-option input[type="checkbox"]{
  display:none!important;
}

/* No permitir overlays ocultos bloqueando clics */
.app-modal:not(.open),
.global-search-overlay:not(.open),
.mobile-overlay:not(.open){
  display:none!important;
  pointer-events:none!important;
}


/* =========================================================
   FORMATO DE TICKETS - MODULAR Y ESTABLE
   ========================================================= */
.ticket-format-module [data-ticket-panel]{
  display:none!important;
}
.ticket-format-module [data-ticket-panel].active{
  display:block!important;
}

.ticket-format-module .ticket-tab,
.ticket-format-module .ticket-filter,
.ticket-format-module .mini-action,
.ticket-format-module [data-ticket-new-series],
.ticket-format-module [data-save-ticket-config],
.ticket-format-module [data-reset-ticket-config],
.ticket-format-module [data-ticket-show-preview]{
  cursor:pointer!important;
  pointer-events:auto!important;
}

.ticket-format-module .ticket-print-type input[type="radio"]{
  accent-color:#2f6fed;
}

.ticket-format-module .ticket-print-type label:not(.active){
  border-color:#dbe4ef!important;
  background:#fff!important;
  box-shadow:none!important;
}

.ticket-format-module .ticket-print-type label.active{
  border-color:#2f6fed!important;
  background:#f7fbff!important;
  box-shadow:0 0 0 2px rgba(47,111,237,.08) inset!important;
}

.ticket-format-module .ticket-live-preview-wrap{
  display:flex!important;
  justify-content:center!important;
  align-items:flex-start!important;
  padding-top:8px!important;
  min-height:470px!important;
}

.ticket-format-module .ticket-preview-card{
  min-height:620px!important;
  overflow:visible!important;
}

.ticket-format-module .ticket-receipt-preview{
  display:block!important;
  width:330px!important;
  max-width:100%!important;
  margin:0 auto!important;
  background:#fff!important;
  border:1px solid #dfe8f3!important;
  box-shadow:0 18px 45px rgba(15,35,70,.12)!important;
  padding:22px 22px 24px!important;
  position:relative!important;
  color:#0f2a4d!important;
  font-family:inherit!important;
  opacity:1!important;
  visibility:visible!important;
  min-height:auto!important;
  height:auto!important;
  overflow:visible!important;
}

.ticket-format-module .ticket-receipt-preview *{
  color:inherit;
  opacity:1!important;
  visibility:visible!important;
}

.ticket-format-module .ticket-receipt-preview:before,
.ticket-format-module .ticket-receipt-preview:after{
  content:''!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  height:8px!important;
  background:radial-gradient(circle at 8px 4px,transparent 7px,#fff 8px) repeat-x!important;
  background-size:16px 8px!important;
}

.ticket-format-module .ticket-receipt-preview:before{top:-6px!important}
.ticket-format-module .ticket-receipt-preview:after{bottom:-6px!important;transform:rotate(180deg)!important}

.ticket-format-module .ticket-receipt-preview.is-a4{
  width:420px!important;
  min-height:520px!important;
  padding:34px!important;
}

.ticket-format-module .ticket-receipt-preview.is-a4:before,
.ticket-format-module .ticket-receipt-preview.is-a4:after{
  display:none!important;
}

.ticket-format-module .receipt-top{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
  text-align:left!important;
}

.ticket-format-module .receipt-logo{
  width:72px!important;
  height:72px!important;
  border-radius:16px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  flex:0 0 auto!important;
}

.ticket-format-module .receipt-logo img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  display:block!important;
}

.ticket-format-module .receipt-top h4,
.ticket-format-module .receipt-brand-text h4{
  font-size:20px!important;
  margin:0 0 4px!important;
  color:#0f2a4d!important;
}

.ticket-format-module .receipt-top p,
.ticket-format-module .receipt-brand-text p{
  font-size:12px!important;
  margin:0!important;
  color:#4e5f76!important;
  line-height:1.35!important;
}

.ticket-format-module .receipt-brand-text{text-align:center!important}

.ticket-format-module .dash{
  height:1px!important;
  border-top:2px dashed #b7c6d9!important;
  margin:14px 0!important;
}

.ticket-format-module .receipt-title{
  text-align:center!important;
  font-size:18px!important;
  margin:0!important;
  color:#0f2a4d!important;
}

.ticket-format-module .receipt-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  border-bottom:1px solid #edf2f7!important;
  padding:6px 0!important;
  font-size:13px!important;
}

.ticket-format-module .receipt-row span{color:#30455f!important}
.ticket-format-module .receipt-row i{width:18px!important;color:#0f2a4d!important}

.ticket-format-module .receipt-row.total{
  font-size:16px!important;
  border-bottom:0!important;
  font-weight:900!important;
}

.ticket-format-module .receipt-letters{
  margin:8px 0!important;
  font-size:12px!important;
  color:#40536d!important;
}

.ticket-format-module .qr-box{
  width:88px!important;
  height:88px!important;
  margin:10px auto!important;
  display:grid!important;
  place-items:center!important;
  background:repeating-linear-gradient(45deg,#111 0 4px,#fff 4px 8px)!important;
  color:transparent!important;
  border:1px solid #111!important;
}

.ticket-format-module .receipt-footer{
  text-align:center!important;
  margin:12px 0 0!important;
  color:#0f2a4d!important;
  font-weight:800!important;
}

.ticket-format-module .ticket-option input[type="checkbox"]{
  display:none!important;
}

/* Evita overlays ocultos bloqueando clics */
.app-modal:not(.open),
.global-search-overlay:not(.open),
.mobile-overlay:not(.open){
  display:none!important;
  pointer-events:none!important;
}


/* =========================================================
   DATOS DE LA EMPRESA - REDISEÑO PROFESIONAL
   ========================================================= */
.company-profile-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:24px;
  align-items:start;
}

.company-profile-main{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.company-section-card{
  padding:22px;
  border:1px solid rgba(17,52,91,.10);
  box-shadow:0 16px 44px rgba(12,40,78,.06);
}

.company-section-title,
.company-aside-title{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:18px;
}

.company-section-title > span,
.company-aside-title > span{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
  flex:0 0 auto;
}

.company-section-title h3,
.company-aside-title h3{
  margin:0;
  font-size:18px;
  color:#0b2a52;
}

.company-section-title p{
  margin:4px 0 0;
  color:#667797;
  font-size:13px;
}

.company-fields{
  display:grid;
  gap:16px 18px;
}

.company-fields.cols-3{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.company-fields .field{
  min-width:0;
}

.company-fields .input-shell,
.company-profile-layout .input-shell{
  min-height:48px;
  border-radius:12px;
}

.company-tax-check{
  margin-top:16px;
}

.company-footer-textarea{
  width:100%;
  min-height:116px;
  resize:vertical;
  border:1px solid #d8e2f1;
  border-radius:14px;
  padding:14px 16px;
  background:#fff;
  color:#102a4c;
  font:inherit;
  outline:none;
}

.company-footer-textarea:focus{
  border-color:#2f6fed;
  box-shadow:0 0 0 3px rgba(47,111,237,.10);
}

.company-textarea-help{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:8px;
  color:#71819e;
  font-size:12px;
}

.company-actions{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding-bottom:8px;
}

.company-actions .primary-button,
.company-actions .secondary-button{
  min-width:210px;
  justify-content:center;
}

.company-profile-aside{
  display:flex;
  flex-direction:column;
  gap:16px;
  position:sticky;
  top:96px;
}

.company-summary-card,
.company-status-card,
.company-advice-card{
  padding:22px;
  border:1px solid rgba(17,52,91,.10);
  box-shadow:0 16px 44px rgba(12,40,78,.06);
}

.company-summary-card h2{
  margin:8px 0 16px;
  color:#0b2a52;
  font-size:22px;
}

.company-summary-card ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.company-summary-card li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color:#344966;
  line-height:1.35;
  font-size:13px;
}

.company-summary-card li i{
  color:#2f6fed;
  width:18px;
  margin-top:2px;
}

.company-preview-btn{
  margin-top:18px;
  width:100%;
  justify-content:center;
}

.company-status-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:6px;
}

.company-status-list div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#40536d;
  font-size:13px;
}

.company-status-list span{
  display:flex;
  align-items:center;
  gap:8px;
}

.company-status-list i{
  color:#22a06b;
}

.company-status-list strong{
  background:#e9f8f0;
  color:#1a8c5c;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
}

.company-progress{
  margin-top:18px;
}

.company-progress > div{
  display:flex;
  justify-content:space-between;
  color:#40536d;
  margin-bottom:8px;
  font-size:13px;
}

.company-progress strong{
  color:#2f6fed;
}

.company-progress em{
  display:block;
  height:7px;
  background:#e8eef8;
  border-radius:999px;
  overflow:hidden;
}

.company-progress em i{
  display:block;
  height:100%;
  background:#2f6fed;
  border-radius:inherit;
}

.company-advice-card{
  display:flex;
  gap:14px;
  background:linear-gradient(135deg,#f7fbff,#ffffff);
}

.company-advice-card > span{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
  flex:0 0 auto;
}

.company-advice-card h3{
  margin:0 0 6px;
  color:#0b2a52;
}

.company-advice-card p{
  margin:0;
  color:#52647f;
  font-size:13px;
  line-height:1.45;
}

@media (max-width: 1200px){
  .company-profile-layout{
    grid-template-columns:1fr;
  }
  .company-profile-aside{
    position:static;
    grid-row:auto;
  }
}

@media (max-width: 820px){
  .company-fields.cols-3{
    grid-template-columns:1fr;
  }
  .company-actions{
    flex-direction:column;
  }
  .company-actions .primary-button,
  .company-actions .secondary-button{
    width:100%;
  }
}


/* =========================================================
   MODALES DE USUARIO: PERFIL, CUENTA Y SOPORTE
   ========================================================= */
.profile-dropdown .profile-dropdown-action{
  width:100%;
  border:0;
  background:transparent;
  display:flex;
  align-items:center;
  gap:14px;
  padding:13px 16px;
  color:#0f2a4d;
  font:inherit;
  text-align:left;
  cursor:pointer;
  border-radius:12px;
}

.profile-dropdown .profile-dropdown-action:hover{
  background:#f1f6ff;
  color:#155fe8;
}

.profile-dropdown .profile-dropdown-action i{
  width:22px;
  color:#7b8aa2;
}

.user-suite-modal .modal-backdrop{
  backdrop-filter:blur(2px);
}

.user-modal-window{
  width:min(980px, calc(100vw - 40px));
  max-height:calc(100vh - 60px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:22px;
}

.user-modal-window.profile-modal-window{
  width:min(960px, calc(100vw - 40px));
}

.user-modal-window.account-modal-window{
  width:min(1040px, calc(100vw - 40px));
}

.user-modal-window.support-modal-window{
  width:min(1050px, calc(100vw - 40px));
}

.user-modal-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  padding:26px 30px;
  border-bottom:1px solid #e2eaf5;
  background:#fff;
}

.user-modal-header > div{
  display:flex;
  gap:16px;
  align-items:center;
}

.user-modal-header h2{
  margin:0;
  color:#0b2a52;
  font-size:25px;
}

.user-modal-header p{
  margin:4px 0 0;
  color:#6b7b96;
}

.user-modal-window .modal-content{
  padding:24px 30px;
  overflow:auto;
}

.user-modal-window footer{
  padding:18px 30px;
  display:flex;
  justify-content:flex-end;
  gap:14px;
  border-top:1px solid #e2eaf5;
  background:#fff;
}

.user-profile-summary{
  display:grid;
  grid-template-columns:150px 1fr 300px;
  gap:26px;
  align-items:center;
  margin-bottom:24px;
}

.user-profile-avatar{
  width:136px;
  height:136px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:46px;
  font-weight:800;
  color:white;
  background:linear-gradient(135deg,#0b4b83,#09a3a5);
  box-shadow:0 18px 36px rgba(8,72,110,.18);
}

.user-profile-summary h3{
  margin:0 0 8px;
  color:#0b2a52;
  font-size:24px;
}

.user-profile-summary p{
  margin:10px 0 0;
  color:#62738f;
}

.user-role-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:#eef5ff;
  color:#2869e8;
  padding:7px 12px;
  border-radius:10px;
  font-weight:700;
}

.user-photo-card{
  border:1px solid #dce6f4;
  border-radius:16px;
  padding:18px;
  display:flex;
  align-items:center;
  gap:16px;
}

.user-photo-card > span{
  width:58px;
  height:58px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
  font-size:22px;
}

.user-photo-card strong,
.user-photo-card small{
  display:block;
}

.user-photo-card small{
  color:#7887a0;
  margin:4px 0 12px;
}

.user-modal-grid{
  display:grid;
  gap:16px 20px;
}

.user-modal-grid.cols-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.user-modal-grid .span-2{
  grid-column:1 / -1;
}

.user-modal-card{
  border:1px solid #dce6f4;
  border-radius:18px;
  padding:20px;
  background:#fff;
}

.account-modal-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.account-modal-layout aside{
  grid-row:1 / span 2;
  grid-column:2;
}

.user-card-title{
  display:flex;
  gap:14px;
  align-items:center;
  margin-bottom:18px;
}

.user-card-title > span{
  width:46px;
  height:46px;
  border-radius:15px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
  font-size:19px;
}

.user-card-title h3{
  margin:0;
  color:#0b2a52;
}

.user-card-title p{
  margin:4px 0 0;
  color:#687891;
  font-size:13px;
}

.switch-row,
.setting-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:13px 0;
  border-top:1px solid #eef2f7;
}

.switch-row:first-of-type,
.setting-line:first-of-type{
  border-top:0;
}

.switch-row span,
.setting-line span{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.switch-row small,
.setting-line small{
  color:#74839b;
  font-size:12px;
}

.switch-row input[type="checkbox"]{
  width:44px;
  height:24px;
  accent-color:#2f6fed;
}

.setting-line select{
  min-width:190px;
  height:44px;
  border:1px solid #d8e2f1;
  border-radius:12px;
  padding:0 14px;
  background:#fff;
  color:#102a4c;
  font:inherit;
}

.session-box{
  display:flex;
  gap:14px;
  align-items:center;
  border:1px solid #e0e8f4;
  border-radius:14px;
  padding:14px;
  margin-bottom:12px;
}

.session-box > span{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
}

.session-box strong,
.session-box small{
  display:block;
}

.session-box small{
  color:#74839b;
  margin-top:3px;
}

.security-tips{
  background:#f7fbff;
  border:1px solid #d8e8ff;
  border-radius:14px;
  padding:16px;
  margin-top:14px;
}

.security-tips strong{
  display:block;
  color:#0b2a52;
  margin-bottom:10px;
}

.security-tips p{
  margin:8px 0;
  color:#40536d;
}

.security-tips i{
  color:#2f6fed;
  margin-right:8px;
}

.support-action-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-bottom:18px;
}

.support-action{
  border:1px solid #dce6f4;
  background:#fff;
  border-radius:16px;
  padding:18px;
  display:grid;
  grid-template-columns:58px 1fr auto;
  gap:16px;
  align-items:center;
  text-align:left;
  cursor:pointer;
}

.support-action:hover{
  border-color:#2f6fed;
  box-shadow:0 12px 28px rgba(47,111,237,.10);
}

.support-action > span{
  width:58px;
  height:58px;
  border-radius:16px;
  display:grid;
  place-items:center;
  font-size:24px;
}

.support-action .blue{background:#eef5ff;color:#2f6fed}
.support-action .orange{background:#fff4e5;color:#f59e0b}
.support-action .green{background:#eafaf1;color:#20a866}

.support-action strong,
.support-action small{
  display:block;
}

.support-action small{
  color:#6e7f99;
  margin-top:4px;
  line-height:1.35;
}

.support-modal-grid{
  display:grid;
  grid-template-columns:1fr 350px;
  gap:18px;
}

.faq-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.faq-list button{
  border:1px solid #dce6f4;
  background:#fff;
  border-radius:12px;
  padding:14px 16px;
  display:flex;
  justify-content:space-between;
  color:#0f2a4d;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.support-side{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.support-side h3{
  margin:0 0 14px;
  color:#0b2a52;
}

.support-side p{
  display:flex;
  gap:12px;
  margin:12px 0;
  color:#40536d;
}

.support-side p i{
  width:32px;
  height:32px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
  flex:0 0 auto;
}

.support-side p span{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.support-side p small,
.support-side p span:not(strong){
  color:#6e7f99;
}

.support-status{
  display:flex;
  align-items:center;
  gap:12px;
  background:#eafaf1;
  border:1px solid #bdebd0;
  border-radius:14px;
  padding:14px;
  color:#188753;
}

.support-status span{
  display:flex;
  flex-direction:column;
}

.support-status small{
  color:#2f875b;
}

@media (max-width: 980px){
  .user-profile-summary,
  .account-modal-layout,
  .support-modal-grid,
  .support-action-grid{
    grid-template-columns:1fr;
  }

  .account-modal-layout aside{
    grid-column:auto;
    grid-row:auto;
  }

  .user-modal-grid.cols-2{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   AJUSTES FUNCIONALES MODALES USUARIO
   ========================================================= */
.user-modal-window form{
  display:flex;
  flex-direction:column;
  min-height:0;
  max-height:inherit;
}

.user-modal-window form > .modal-content{
  flex:1;
  min-height:0;
}

.password-eye{
  border:0;
  background:transparent;
  color:#67809d;
  width:42px;
  height:100%;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.icon-switch-row{
  display:grid!important;
  grid-template-columns:42px 1fr auto;
  gap:12px!important;
  align-items:center!important;
}

.switch-row-icon{
  width:36px!important;
  height:36px!important;
  border-radius:12px;
  display:grid!important;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
}

.switch-row .modern-switch-input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.modern-switch{
  width:46px;
  height:26px;
  border-radius:999px;
  background:#d9e3f2;
  position:relative;
  display:inline-block;
  flex:0 0 auto;
  box-shadow:inset 0 0 0 1px rgba(15,42,77,.08);
}

.modern-switch:before{
  content:'';
  position:absolute;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  top:3px;
  left:3px;
  box-shadow:0 2px 8px rgba(15,42,77,.22);
  transition:transform .18s ease;
}

.modern-switch-input:checked + .modern-switch{
  background:#2f6fed;
}

.modern-switch-input:checked + .modern-switch:before{
  transform:translateX(20px);
}

.support-action{
  text-decoration:none!important;
  color:#0f2a4d!important;
}

.faq-answer{
  display:none;
  border:1px solid #dce6f4;
  border-top:0;
  border-radius:0 0 12px 12px;
  margin:-10px 0 8px;
  padding:14px 16px;
  color:#52647f;
  background:#f8fbff;
  line-height:1.45;
}

.faq-answer.open{
  display:block;
}

.faq-list button.active{
  border-color:#2f6fed;
  color:#155fe8;
  border-radius:12px 12px 0 0;
  background:#f7fbff;
}

.support-request-form{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid #e6edf6;
}

.support-request-form h3{
  margin:0 0 14px;
  color:#0b2a52;
}

.support-request-grid{
  display:grid;
  grid-template-columns:1fr 180px 150px;
  gap:12px;
  margin-bottom:12px;
}

.support-request-form .field input,
.support-request-form .field select,
.support-request-form .field textarea{
  width:100%;
  border:1px solid #d8e2f1;
  border-radius:12px;
  padding:12px 14px;
  background:#fff;
  color:#102a4c;
  font:inherit;
}

.support-request-form .field textarea{
  min-height:96px;
  resize:vertical;
}

@media (max-width: 980px){
  .support-request-grid{
    grid-template-columns:1fr;
  }
  .icon-switch-row{
    grid-template-columns:42px 1fr auto;
  }
}


/* =========================================================
   HISTORIAL DE CAJAS - TABLA LIMPIA, DETALLE Y PDF
   ========================================================= */
.cash-history-panel{
  padding:26px;
}

.cash-panel-head.clean-head{
  border-bottom:1px solid #e5edf7;
  padding-bottom:20px;
  margin-bottom:20px;
}

.cash-history-toolbar{
  display:grid;
  grid-template-columns:minmax(260px, 1fr) 240px auto;
  gap:14px;
  margin-bottom:20px;
  align-items:center;
}

.cash-history-toolbar select{
  height:52px;
  border:1px solid #d8e2f1;
  border-radius:14px;
  padding:0 16px;
  background:#fff;
  color:#102a4c;
  font:inherit;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.cash-history-toolbar select:focus{
  border-color:#6f9eea;
  box-shadow:0 0 0 3px rgba(47,111,237,.10);
}

.cash-history-search{
  min-height:52px;
  border-radius:14px;
  border-color:#d8e2f1;
  background:#fff;
}

.cash-history-search>i{
  align-self:stretch;
  width:52px;
  display:grid;
  place-items:center;
  background:#eef4ff;
  color:#2f6fed;
  border-right:1px solid #d8e4f4;
  font-size:16px;
}

.cash-history-search input{
  min-height:52px;
  padding:0 16px!important;
  color:#102a4c;
  font:inherit;
}

.cash-history-search input::placeholder{
  color:#7d8da5;
  opacity:1;
}

.cash-history-clear{
  min-height:52px;
  padding:0 20px;
  border:1px solid #cbd8e8;
  border-radius:14px;
  background:#fff;
  color:#15365f;
  box-shadow:0 4px 12px rgba(15,42,77,.05);
  white-space:nowrap;
  transition:background .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}

.cash-history-clear:hover{
  background:#f5f9ff;
  border-color:#8fb0df;
  box-shadow:0 7px 16px rgba(15,42,77,.08);
  transform:translateY(-1px);
}

.cash-history-clear:focus-visible{
  outline:none;
  border-color:#2f6fed;
  box-shadow:0 0 0 3px rgba(47,111,237,.14);
}

.cash-history-table th,
.cash-history-table td{
  white-space:nowrap;
  vertical-align:middle;
}

.cash-history-table td strong{
  display:inline;
}

.cash-ok{
  color:#0f2a4d;
}

.cash-balance{
  color:#d93025;
}

.cash-history-actions{
  display:flex;
  gap:8px;
  align-items:center;
}

.cash-history-actions .mini-action{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:14px;
  border:1px solid #dbe4ef;
  background:#fff;
  color:#0f4f91;
  text-decoration:none;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  font-size:16px;
  line-height:1;
}

.cash-history-actions .mini-action:hover{
  background:#f3f7fd;
  border-color:#c7d8ea;
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,35,70,.10);
}

.cash-history-actions .mini-action i{
  pointer-events:none;
}

.cash-history-actions .mini-action.view{
  color:#0f4f91;
  border-color:#cbdcf0;
}

.cash-history-actions .mini-action.view:hover{
  background:#eef5ff;
  color:#0a3d78;
  border-color:#9fc0e8;
}

.cash-history-actions .mini-action.pdf{
  color:#ef4444;
  border-color:#ffd8d8;
}

.cash-history-actions .mini-action.pdf:hover{
  background:#fff5f5;
  border-color:#ffbdbd;
}

.cash-history-footer{
  color:#667797;
  font-size:14px;
  padding-top:16px;
}

.cash-session-modal{
  width:min(640px, calc(100vw - 36px));
  max-height:calc(100vh - 48px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.cash-session-modal .modal-content{
  overflow:auto;
}

.cash-session-block{
  padding:8px 0 18px;
  border-bottom:1px solid #e6edf6;
}

.cash-session-block:last-child{
  border-bottom:0;
}

.cash-session-block h3{
  display:flex;
  align-items:center;
  gap:10px;
  color:#0b2a52;
  margin:0 0 16px;
  font-size:16px;
}

.cash-session-block h3 i{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  color:#2f6fed;
  border-radius:10px;
}

.cash-session-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 20px;
}

.cash-session-grid div,
.cash-session-summary div{
  display:flex;
  justify-content:space-between;
  gap:16px;
  color:#40536d;
}

.cash-session-grid small{
  color:#7887a0;
  font-size:13px;
}

.cash-session-grid strong,
.cash-session-summary strong{
  color:#0f2a4d;
  text-align:right;
}

.cash-session-summary{
  display:flex;
  flex-direction:column;
  gap:12px;
}

html[data-theme="dark"] .cash-history-search,
html[data-theme="dark"] .cash-history-toolbar select,
html[data-theme="dark"] .cash-history-clear{
  background:#101b2c;
  border-color:#2d3d55;
  color:#e5edf8;
}

html[data-theme="dark"] .cash-history-search>i{
  background:#172844;
  border-right-color:#2d3d55;
  color:#7fb0ff;
}

html[data-theme="dark"] .cash-history-search input{
  color:#e5edf8;
}

html[data-theme="dark"] .cash-history-search input::placeholder{
  color:#8ea0b8;
}

html[data-theme="dark"] .cash-history-clear:hover{
  background:#18263b;
  border-color:#4d6f9f;
}

@media (max-width: 900px){
  .cash-history-toolbar{
    grid-template-columns:1fr;
  }
  .cash-history-clear{
    width:100%;
  }
  .cash-session-grid{
    grid-template-columns:1fr;
  }
}

/* =========================
   ACCESOS RÁPIDOS EN TOPBAR
   ========================= */
.top-shortcuts{display:flex;align-items:center;gap:10px}
.shortcut-button{position:relative}
.shortcut-badge{position:absolute;right:-4px;top:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;border:2px solid #fff;font-size:10px;font-weight:800;display:grid;place-items:center;line-height:1}
.shortcut-indicator{position:absolute;right:1px;bottom:3px;width:10px;height:10px;border-radius:50%;border:2px solid #fff;background:#cbd5e1}
.shortcut-indicator.online{background:#22c55e}
.quick-topbar-modal-window{width:min(1080px,100%);max-height:90vh}
.quick-modal-body{display:grid;gap:18px}
.quick-status-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-radius:18px;border:1px solid #dbe6f3;background:#f8fbff}
.quick-status-card strong{display:block;font-size:15px;color:#183153}
.quick-status-card small{display:block;margin-top:4px;color:#64748b}
.status-pill-dot{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}
.status-pill-dot i{font-size:10px}
.status-pill-dot.success{background:#eaf9ef;color:#12813d}
.quick-kpi-grid{display:grid;gap:12px}
.quick-kpi-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.quick-kpi-grid article{padding:16px;border-radius:16px;background:#fff;border:1px solid #e2e8f0;display:flex;flex-direction:column;gap:6px}
.quick-kpi-grid article small{color:#718198;font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.quick-kpi-grid article strong{font-size:15px;color:#0f2747;line-height:1.35}
.quick-summary-note{display:flex;align-items:center;gap:10px;color:#60748c;font-size:13px;padding:0 2px}
.quick-form-grid{align-items:start}
.topbar-modal-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:18px;background:#fff}
.mini-data-table{width:100%;border-collapse:separate;border-spacing:0;min-width:720px}
.mini-data-table thead th{background:#f8fafc;color:#64748b;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;padding:13px 14px;border-bottom:1px solid #e2e8f0;text-align:left;white-space:nowrap}
.mini-data-table td{padding:14px;border-bottom:1px solid #edf2f7;color:#1f3656;font-size:13px;vertical-align:middle}
.mini-data-table tbody tr:last-child td{border-bottom:0}
.mini-data-table .align-right{text-align:right}
.table-status{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;background:#eef4ff;color:#275ecf;font-size:11.5px;font-weight:800;white-space:nowrap}
.table-status.neutral{background:#f1f5f9;color:#475569}
.table-action-form{display:inline-flex;margin:0}
.table-action-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;border-radius:11px;border:1px solid #d7e1ed;background:#fff;color:#12396c;font-weight:800;font-size:12px;text-decoration:none;cursor:pointer;white-space:nowrap}
.table-action-button:hover{background:#f6f9fd}
.table-action-button.whatsapp{background:#e8f9ef;border-color:#b8edc7;color:#11803f}
.table-action-button.warning{background:#fff6e8;border-color:#f3d7a1;color:#b36a00}
.table-action-button.disabled{background:#f8fafc;border-color:#e2e8f0;color:#94a3b8;cursor:not-allowed}
.empty-mini-state{padding:50px 24px;text-align:center;display:grid;place-items:center;gap:8px;color:#64748b}
.empty-mini-state i{font-size:28px;color:#93c5fd}
.empty-mini-state strong{color:#163258;font-size:17px}
.empty-mini-state.compact{padding:32px 24px}
.quick-topbar-modal-window footer a{display:inline-flex;align-items:center;gap:8px;text-decoration:none}

@media(max-width:1240px){
  .topbar-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end}
  .top-shortcuts{order:3;width:100%;justify-content:flex-end}
}
@media(max-width:900px){
  .quick-kpi-grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .top-shortcuts{width:100%;justify-content:space-between}
  .quick-kpi-grid.cols-4{grid-template-columns:1fr}
  .topbar-modal-table-wrap{border-radius:14px}
  .table-action-button{padding:8px 10px}
}


/* =========================================================
   TOPBAR COMPACTO GLOBAL - SIN TÍTULO NI SUBTÍTULO
   ========================================================= */
.topbar.topbar-compact{
  min-height:84px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:18px 28px;
  gap:0;
}

.topbar.topbar-compact .topbar-actions{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
}

.topbar.topbar-compact .search-box{
  margin-right:auto;
  min-width:430px;
  max-width:650px;
  flex:0 1 650px;
  justify-content:flex-start;
}

.topbar.topbar-compact .top-shortcuts{
  flex:0 0 auto;
}

.topbar.topbar-compact .notification-menu,
.topbar.topbar-compact .profile-menu{
  flex:0 0 auto;
}

@media(max-width:1240px){
  .topbar.topbar-compact{
    padding:16px 22px;
  }
  .topbar.topbar-compact .topbar-actions{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .topbar.topbar-compact .search-box{
    min-width:320px;
    max-width:none;
    flex:1 1 520px;
  }
  .topbar.topbar-compact .top-shortcuts{
    order:2;
    width:auto;
    justify-content:flex-end;
  }
}

@media(max-width:760px){
  .topbar.topbar-compact .search-box{
    flex:1 1 100%;
    min-width:0;
    order:1;
  }
  .topbar.topbar-compact .top-shortcuts{
    order:2;
    width:100%;
    justify-content:flex-start;
  }
}


/* =========================================================
   ROLES Y PERMISOS - LISTA + MATRIZ
   ========================================================= */
.roles-module{display:grid;gap:18px}
.roles-hero{align-items:center}
.roles-tabs-shell{padding:0;overflow:hidden}
.roles-tabs{display:flex;gap:0;border-bottom:1px solid #e2e8f0;padding:0 22px;background:#fff}
.roles-tab{height:58px;padding:0 22px;border:0;background:transparent;color:#64748b;font:inherit;font-weight:900;cursor:pointer;border-bottom:3px solid transparent;display:flex;align-items:center;gap:9px}
.roles-tab.active{color:#0d5be1;border-color:#0d5be1}
.roles-panel{display:none}
.roles-panel.active{display:block}
.roles-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px;border-bottom:1px solid #e2e8f0}
.roles-search{max-width:520px;width:100%}
.roles-kpis{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.roles-kpis span{background:#f3f7fc;color:#52657f;border-radius:12px;padding:9px 13px;font-size:13px}
.roles-kpis strong{color:#103769}
.roles-table-wrap,.permissions-matrix-wrap{overflow:auto}
.roles-table,.permissions-matrix{width:100%;border-collapse:separate;border-spacing:0}
.roles-table th,.roles-table td,.permissions-matrix th,.permissions-matrix td{border-bottom:1px solid #e8edf5;padding:15px 16px;text-align:left;vertical-align:middle}
.roles-table th,.permissions-matrix th{background:#f8fafc;color:#64748b;text-transform:uppercase;font-size:11px;letter-spacing:.06em;white-space:nowrap}
.roles-table td{color:#19324f;font-size:13px}
.role-user-count{display:inline-flex;align-items:center;gap:7px;color:#33506f}
.mini-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}
.mini-pill.green{background:#e9f8f0;color:#168650}
.mini-pill.gray{background:#eef2f7;color:#64748b}
.role-actions{display:flex;align-items:center;gap:8px}
.role-actions form{margin:0}
.permissions-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;border-bottom:1px solid #e2e8f0}
.permissions-toolbar h3{margin:0;color:#0f2a4d;font-size:20px}
.permissions-toolbar p{margin:4px 0 0;color:#64748b;font-size:13px}
.permission-legend{display:flex;gap:14px;align-items:center;color:#64748b;font-size:13px}
.permission-legend span{display:flex;gap:7px;align-items:center}
.legend-dot{width:26px;height:14px;border-radius:999px;background:#cbd5e1;display:inline-block;position:relative}
.legend-dot:before{content:'';position:absolute;width:10px;height:10px;border-radius:50%;background:white;top:2px;left:2px}
.legend-dot.on{background:#0d5be1}
.legend-dot.on:before{left:14px}
.permissions-matrix{min-width:980px}
.permissions-matrix th:not(.permission-name-col),.permissions-matrix td:not(.permission-name){text-align:center}
.permissions-matrix .permission-name-col{width:300px;position:sticky;left:0;z-index:3}
.permissions-matrix .permission-name{position:sticky;left:0;background:#fff;z-index:2;min-width:300px}
.permission-name strong{display:block;color:#17314f;font-size:13px}
.permission-name small{display:block;color:#7b8aa2;margin-top:4px;font-size:11.5px}
.permission-group-row td{background:#eef4fb!important;color:#12396c;font-weight:900;text-transform:uppercase;letter-spacing:.04em;font-size:12px;position:sticky;left:0;z-index:4}
.permission-group-row i{margin-right:9px;color:#0d5be1}
.matrix-switch{display:inline-block;position:relative;width:42px;height:23px;cursor:pointer}
.matrix-switch input{position:absolute;opacity:0;pointer-events:none}
.matrix-switch span{position:absolute;inset:0;border-radius:999px;background:#d9e3ef;box-shadow:inset 0 0 0 1px rgba(15,42,77,.08);transition:.18s ease}
.matrix-switch span:before{content:'';position:absolute;width:17px;height:17px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(15,42,77,.22);transition:.18s ease}
.matrix-switch input:checked+span{background:#0d5be1}
.matrix-switch input:checked+span:before{transform:translateX(19px)}
.permissions-actions{display:flex;justify-content:flex-end;gap:14px;padding:18px 22px;border-top:1px solid #e2e8f0;background:#fff}
.role-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.role-detail-grid div{padding:14px;border:1px solid #e2e8f0;border-radius:14px}
.role-detail-grid small{display:block;color:#64748b;margin-bottom:6px}
.role-detail-grid strong{color:#0f2a4d}
@media(max-width:900px){
 .roles-toolbar,.permissions-toolbar{align-items:flex-start;flex-direction:column}
 .roles-kpis{width:100%}
 .permissions-actions{flex-direction:column}
 .permissions-actions .primary-button,.permissions-actions .secondary-button{width:100%;justify-content:center}
 .role-detail-grid{grid-template-columns:1fr}
}


/* =========================================================
   TOAST GLOBAL PROFESIONAL
   ========================================================= */
[data-auto-dismiss].app-toast{
  position:fixed!important;
  top:96px!important;
  right:28px!important;
  left:auto!important;
  z-index:9999!important;
  width:min(430px, calc(100vw - 44px))!important;
  min-height:64px!important;
  margin:0!important;
  padding:16px 16px 16px 18px!important;
  display:grid!important;
  grid-template-columns:42px 1fr 34px!important;
  align-items:center!important;
  gap:12px!important;
  border-radius:16px!important;
  border:1px solid #dbe7f4!important;
  background:#fff!important;
  color:#0f2a4d!important;
  box-shadow:0 22px 60px rgba(15,42,77,.18)!important;
  transform:translateY(calc(var(--toast-index, 0) * 78px))!important;
  opacity:1!important;
  animation:toastSlideIn .28s ease both!important;
  overflow:hidden!important;
}

[data-auto-dismiss].app-toast::before{
  content:''!important;
  position:absolute!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:4px!important;
  background:#22a06b!important;
}

[data-auto-dismiss].app-toast .toast-icon,
[data-auto-dismiss].app-toast > i{
  width:36px!important;
  height:36px!important;
  border-radius:50%!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  font-size:18px!important;
  background:#e9f8f0!important;
  color:#168650!important;
}

[data-auto-dismiss].app-toast .toast-content{
  display:block!important;
  min-width:0!important;
  font-weight:800!important;
  line-height:1.35!important;
  color:#0f2a4d!important;
}

[data-auto-dismiss].app-toast .toast-content span,
[data-auto-dismiss].app-toast .toast-content strong{
  color:inherit!important;
}

[data-auto-dismiss].app-toast .toast-close{
  width:32px!important;
  height:32px!important;
  border:0!important;
  border-radius:10px!important;
  background:transparent!important;
  color:#64748b!important;
  cursor:pointer!important;
  display:grid!important;
  place-items:center!important;
  font-size:14px!important;
}

[data-auto-dismiss].app-toast .toast-close:hover{
  background:#f1f5f9!important;
  color:#0f2a4d!important;
}

[data-auto-dismiss].app-toast.toast-success::before{background:#22a06b!important}
[data-auto-dismiss].app-toast.toast-success .toast-icon,
[data-auto-dismiss].app-toast.toast-success > i{background:#e9f8f0!important;color:#168650!important}

[data-auto-dismiss].app-toast.toast-error::before{background:#e54848!important}
[data-auto-dismiss].app-toast.toast-error .toast-icon,
[data-auto-dismiss].app-toast.toast-error > i{background:#fff0f0!important;color:#d93025!important}

[data-auto-dismiss].app-toast.toast-warning::before{background:#f59e0b!important}
[data-auto-dismiss].app-toast.toast-warning .toast-icon,
[data-auto-dismiss].app-toast.toast-warning > i{background:#fff7e6!important;color:#b76b00!important}

[data-auto-dismiss].app-toast.toast-info::before{background:#2f6fed!important}
[data-auto-dismiss].app-toast.toast-info .toast-icon,
[data-auto-dismiss].app-toast.toast-info > i{background:#eef5ff!important;color:#2f6fed!important}

[data-auto-dismiss].app-toast.notification-hiding{
  opacity:0!important;
  transform:translateY(calc(var(--toast-index, 0) * 78px - 10px)) translateX(24px)!important;
  transition:opacity .28s ease, transform .28s ease!important;
}

@keyframes toastSlideIn{
  from{
    opacity:0;
    transform:translateY(calc(var(--toast-index, 0) * 78px - 10px)) translateX(24px);
  }
  to{
    opacity:1;
    transform:translateY(calc(var(--toast-index, 0) * 78px));
  }
}

@media(max-width:760px){
  [data-auto-dismiss].app-toast{
    top:18px!important;
    right:14px!important;
    left:14px!important;
    width:auto!important;
    grid-template-columns:38px 1fr 32px!important;
  }
}


/* =========================================================
   PREFERENCIA DE FUENTE DEL SISTEMA
   ========================================================= */
.font-preview-comic{
  font-family:"Comic Neue", cursive!important;
}

.font-preview-arial{
  font-family:Arial, sans-serif!important;
}


/* =========================================================
   CORRECCIÓN MATRIZ DE PERMISOS - GRUPOS A LA IZQUIERDA
   ========================================================= */
.roles-module .permissions-matrix .permission-group-row td{
  background:#eef4fb!important;
  border-bottom:1px solid #e1e9f4!important;
  padding:12px 16px!important;
}

.roles-module .permissions-matrix .permission-group-row .permission-group-name{
  position:sticky!important;
  left:0!important;
  z-index:5!important;
  color:#12396c!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
  font-size:12px!important;
  text-align:left!important;
  min-width:300px!important;
  white-space:nowrap!important;
}

.roles-module .permissions-matrix .permission-group-row .permission-group-name i{
  margin-right:9px!important;
  color:#0d5be1!important;
}

.roles-module .permissions-matrix .permission-group-row .permission-group-spacer{
  color:transparent!important;
  text-align:center!important;
}

.roles-module .permissions-matrix .permission-group-row .permission-group-spacer::after{
  content:''!important;
}


/* =========================================================
   SUCURSALES - VISTA LIMPIA + MODALES PROFESIONALES
   ========================================================= */
.branches-module{display:grid;gap:18px}
.branches-hero{align-items:center}
.branches-card{padding:0;overflow:hidden}
.branches-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;border-bottom:1px solid #e2eaf5}
.branches-search{max-width:520px;width:100%}
.branches-toolbar select{height:48px;border:1px solid #d8e2f1;border-radius:13px;background:#fff;color:#102a4c;padding:0 16px;font:inherit;min-width:190px}
.branches-table-wrap{overflow:auto}
.branches-table{width:100%;border-collapse:separate;border-spacing:0;min-width:980px}
.branches-table th{background:#f8fafc;color:#64748b;text-transform:uppercase;font-size:11px;letter-spacing:.06em;padding:15px 16px;text-align:left;border-bottom:1px solid #e2e8f0}
.branches-table td{padding:18px 16px;border-bottom:1px solid #edf2f7;color:#17314f;vertical-align:middle}
.branch-name-cell{display:flex;align-items:center;gap:14px}
.branch-name-cell>span{width:42px;height:42px;border-radius:12px;background:#eef5ff;color:#2f6fed;display:grid;place-items:center;font-size:18px}
.branch-name-cell strong{display:block}
.branch-name-cell small{display:inline-flex;margin-top:5px;background:#dff7e8;color:#15854b;border-radius:7px;padding:4px 7px;font-size:11px;font-weight:800}
.branch-contact{display:flex;flex-direction:column;gap:8px;color:#334e6d}
.branch-contact i,.muted-icon{color:#6f83a0;margin-right:7px}
.branch-actions{display:flex;gap:8px;align-items:center}
.branch-actions form{margin:0}
.branches-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;color:#64748b}
.branches-footer div{display:flex;gap:10px}
.branches-footer div span{background:#f1f6fd;color:#31506f;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800}
.branch-form-modal{width:min(960px,calc(100vw - 40px));max-height:calc(100vh - 50px);display:flex;flex-direction:column;overflow:hidden}
.branch-form-modal form{display:flex;flex-direction:column;max-height:inherit;min-height:0}
.branch-form-modal .modal-content{overflow:auto}
.branch-form-grid{display:grid!important;grid-template-columns:1fr 1fr;gap:14px!important}
.branch-form-card{border:1px solid #dce6f4;border-radius:16px;padding:16px;background:#fff}
.branch-form-card h3{margin:0 0 14px;color:#0b2a52;font-size:15px;display:flex;align-items:center;gap:9px}
.branch-form-card h3 i{color:#2f6fed}
.branch-form-card .field{display:block;margin-bottom:13px}
.branch-form-card .field:last-child{margin-bottom:0}
.branch-form-card .field>span{display:block;font-weight:800;color:#334a67;margin-bottom:7px;font-size:13px}
.branch-inline{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}
.branch-inline.three{grid-template-columns:1fr 1fr 1fr}
.branch-inline .switch-row{border:0;padding:0;min-height:56px}
.textarea-shell textarea{border:0;outline:0;background:transparent;width:100%;resize:vertical;padding:12px 12px 12px 0;font:inherit;color:#102a4c}
.branch-detail-modal{width:min(920px,calc(100vw - 40px));max-height:calc(100vh - 50px);display:flex;flex-direction:column;overflow:hidden}
.branch-detail-modal .modal-content{overflow:auto}
.branch-detail-grid{display:grid!important;grid-template-columns:1fr 1fr;gap:14px!important}
.branch-detail-grid section{border:1px solid #dce6f4;border-radius:16px;padding:18px;background:#fff}
.branch-detail-grid h3{margin:0 0 14px;color:#0b2a52;font-size:15px}
.branch-detail-grid p{display:grid;grid-template-columns:150px 1fr;gap:12px;margin:10px 0;color:#64748b}
.branch-detail-grid p span{color:#64748b}
.branch-detail-grid p strong{color:#102a4c;text-align:left;word-break:break-word}
.branch-detail-grid section:last-child:nth-child(odd){grid-column:1 / -1}
@media(max-width:980px){
  .branches-toolbar{flex-direction:column;align-items:stretch}
  .branches-toolbar select{width:100%}
  .branch-form-grid,.branch-detail-grid{grid-template-columns:1fr!important}
  .branch-inline,.branch-inline.three{grid-template-columns:1fr}
  .branches-footer{flex-direction:column;align-items:flex-start}
}


/* =========================================================
   CORRECCIÓN MODAL SUCURSALES - ENCABEZADO Y ESPACIADO
   ========================================================= */
.branch-form-modal{
  border-radius:22px!important;
  overflow:hidden!important;
  background:#fff!important;
}

.branch-form-modal form{
  display:flex!important;
  flex-direction:column!important;
  max-height:calc(100vh - 50px)!important;
  min-height:0!important;
}

.branch-form-modal form>header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:24px 28px!important;
  border-bottom:1px solid #e2eaf5!important;
  background:#fff!important;
  position:sticky!important;
  top:0!important;
  z-index:5!important;
}

.branch-form-modal form>header>div{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  min-width:0!important;
}

.branch-form-modal form>header .modal-icon{
  width:52px!important;
  height:52px!important;
  border-radius:16px!important;
  flex:0 0 auto!important;
}

.branch-form-modal form>header h2{
  margin:0!important;
  color:#0b2a52!important;
  font-size:22px!important;
  line-height:1.15!important;
}

.branch-form-modal form>header p{
  margin:5px 0 0!important;
  color:#6f7f95!important;
  font-size:13px!important;
  line-height:1.35!important;
}

.branch-form-modal form>header .modal-close{
  width:42px!important;
  height:42px!important;
  border-radius:13px!important;
  flex:0 0 auto!important;
}

.branch-form-modal .branch-form-grid{
  padding:24px 28px!important;
  overflow:auto!important;
  flex:1 1 auto!important;
  min-height:0!important;
}

.branch-form-modal form>footer{
  display:flex!important;
  justify-content:flex-end!important;
  gap:12px!important;
  padding:18px 28px!important;
  border-top:1px solid #e2eaf5!important;
  background:#fff!important;
  position:sticky!important;
  bottom:0!important;
  z-index:5!important;
}

.branch-form-modal form>footer .primary-button,
.branch-form-modal form>footer .secondary-button{
  min-width:120px!important;
}

@media(max-width:760px){
  .branch-form-modal form>header{
    padding:20px!important;
  }
  .branch-form-modal .branch-form-grid{
    padding:20px!important;
  }
  .branch-form-modal form>footer{
    padding:16px 20px!important;
    flex-direction:column!important;
  }
  .branch-form-modal form>footer .primary-button,
  .branch-form-modal form>footer .secondary-button{
    width:100%!important;
  }
}


/* =========================================================
   SUCURSALES - ALINEACIÓN DE CAMPOS Y ESTADO FUNCIONAL
   ========================================================= */
.branch-form-card .branch-inline{
  align-items:start!important;
}

.branch-form-card .branch-inline .field{
  margin-bottom:0!important;
  align-self:start!important;
}

.branch-form-card .branch-inline .field>span{
  min-height:20px!important;
  display:block!important;
}

.branch-form-card .branch-inline .input-shell{
  height:56px!important;
}

.branch-form-card .branch-inline.three{
  align-items:start!important;
}

.branch-form-card .branch-inline.three .field{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
}

.branch-form-card .branch-inline.three .field>span{
  min-height:20px!important;
  line-height:20px!important;
}

.branch-form-card .branch-inline.three .input-shell{
  margin-top:0!important;
}

.branch-form-card select:not([disabled]){
  cursor:pointer!important;
  background:#fff!important;
}

.branch-form-card select:disabled{
  cursor:not-allowed!important;
  opacity:.75!important;
}

.branch-form-card .switch-row{
  align-self:end!important;
  min-height:56px!important;
  margin-bottom:0!important;
}


/* =========================================================
   SUCURSALES - CORRECCIÓN BUSCADOR
   ========================================================= */
.branches-module .branches-toolbar{
  align-items:center!important;
}

.branches-module .branches-search{
  height:52px!important;
  max-width:560px!important;
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:0 16px!important;
  border:1px solid #d8e2f1!important;
  border-radius:16px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

.branches-module .branches-search i{
  width:22px!important;
  height:22px!important;
  display:grid!important;
  place-items:center!important;
  color:#6f83a0!important;
  flex:0 0 auto!important;
  font-size:16px!important;
}

.branches-module .branches-search input{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:#102a4c!important;
  font:inherit!important;
  padding:0!important;
}

.branches-module .branches-search input:focus,
.branches-module .branches-search input:focus-visible{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}

.branches-module .branches-search:focus-within{
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.10)!important;
}

.branches-module .branches-toolbar select{
  height:52px!important;
  border-radius:16px!important;
}

.branches-module .branch-contact span{
  max-width:190px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

@media(max-width:980px){
  .branches-module .branches-search{
    max-width:none!important;
  }
}


/* =========================================================
   COPIAS DE SEGURIDAD - ACCIONES Y PROGRAMACIÓN FUNCIONAL
   ========================================================= */
.backup-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  justify-content:flex-start!important;
}

.backup-actions form{
  margin:0!important;
  display:inline-flex!important;
}

.backup-actions .mini-action{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  padding:0!important;
  border:1px solid #d7e2f1!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#2f6fed!important;
  display:inline-grid!important;
  place-items:center!important;
  line-height:1!important;
  text-decoration:none!important;
  cursor:pointer!important;
  box-sizing:border-box!important;
}

.backup-actions .mini-action i{
  margin:0!important;
  font-size:15px!important;
  line-height:1!important;
  display:block!important;
}

.backup-actions .mini-action:hover{
  background:#f3f7ff!important;
}

.backup-actions .mini-action.danger{
  color:#ef4444!important;
  border-color:#ffd2d2!important;
}

.backup-actions .mini-action.danger:hover{
  background:#fff2f2!important;
}

.backup-filter-tabs{
  display:flex!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}

.backup-schedule-card .backup-side-head,
.backup-schedule-info .backup-side-head{
  margin-bottom:16px!important;
}

.backup-schedule-form{
  display:grid!important;
  gap:15px!important;
}

.backup-switch-row{
  display:grid!important;
  grid-template-columns:1fr auto auto!important;
  gap:12px!important;
  align-items:center!important;
  padding:14px 0!important;
  border-bottom:1px solid #e8eef6!important;
}

.backup-switch-row span:first-child strong{
  display:block!important;
  color:#102a4c!important;
  font-size:14px!important;
}

.backup-switch-row span:first-child small{
  display:block!important;
  color:#6f7f95!important;
  margin-top:4px!important;
  line-height:1.35!important;
}

.backup-schedule-form .field{
  display:block!important;
  margin:0!important;
}

.backup-schedule-form .field>span{
  display:block!important;
  color:#334a67!important;
  font-weight:800!important;
  margin-bottom:7px!important;
  font-size:13px!important;
}

.backup-schedule-form .input-shell{
  width:100%!important;
  height:48px!important;
}

.backup-schedule-form select,
.backup-schedule-form input[type="time"]{
  width:100%!important;
  height:100%!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#102a4c!important;
  font:inherit!important;
}

.backup-schedule-note{
  display:flex!important;
  gap:12px!important;
  align-items:flex-start!important;
  border:1px solid #d8e6ff!important;
  background:linear-gradient(135deg,#eef5ff,#f6faff)!important;
  border-radius:14px!important;
  padding:13px 14px!important;
  color:#315a93!important;
  line-height:1.4!important;
  font-size:13px!important;
}

.backup-schedule-note i{
  color:#2f6fed!important;
  margin-top:2px!important;
}

.backup-save-schedule{
  width:100%!important;
  min-height:48px!important;
}

.backup-info-lines{
  display:grid!important;
  gap:12px!important;
}

.backup-info-lines p{
  display:flex!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0!important;
  color:#6f7f95!important;
}

.backup-info-lines strong{
  color:#102a4c!important;
  text-align:right!important;
}

.backup-info-lines .schedule-on{
  color:#168650!important;
}

.backup-info-lines .schedule-off{
  color:#ef4444!important;
}

.backup-info-help{
  display:block!important;
  margin-top:14px!important;
  color:#6f7f95!important;
  line-height:1.45!important;
}

.backup-weekday-field{
  transition:.2s ease!important;
}


/* =========================================================
   SERVICIOS - CATEGORÍAS DE PRENDAS
   ========================================================= */
body .management-hero .management-title h2{
  letter-spacing:.01em;
}


/* =========================================================
   CATÁLOGO DE SERVICIOS - TABLA PROFESIONAL SIN CÓDIGO
   ========================================================= */
.services-catalog-module{display:grid;gap:18px}
.services-catalog-hero{align-items:center}
.services-catalog-card{padding:0;overflow:hidden}
.services-catalog-toolbar{
  display:grid!important;
  grid-template-columns:minmax(260px,520px) 1fr auto!important;
  gap:18px!important;
  align-items:end!important;
  padding:22px!important;
  border-bottom:1px solid #e2eaf5!important;
}
.services-catalog-toolbar .catalog-search{
  height:52px!important;
  border-radius:16px!important;
  border:1px solid #d8e2f1!important;
  background:#fff!important;
  padding:0!important;
  display:flex!important;
  align-items:stretch!important;
  gap:0!important;
  overflow:hidden!important;
}
.services-catalog-toolbar .catalog-search i{color:#6f83a0!important}
.services-catalog-toolbar .catalog-search input{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  width:100%!important;
  height:100%!important;
  font:inherit!important;
  color:#102a4c!important;
  padding:0!important;
}
.services-catalog-toolbar .catalog-search:focus-within{
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.10)!important;
}
.catalog-filters{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:14px!important;
}
.catalog-filters label{display:block!important}
.catalog-filters span{
  display:block!important;
  font-size:12px!important;
  color:#64748b!important;
  font-weight:800!important;
  margin-bottom:6px!important;
}
.catalog-filters select{
  width:100%!important;
  height:48px!important;
  border:1px solid #d8e2f1!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
  font:inherit!important;
}
.catalog-count{color:#64748b;font-size:13px;align-self:center;white-space:nowrap}
.services-catalog-table-wrap{overflow:auto}
.services-catalog-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1100px}
.services-catalog-table th{
  background:#f8fafc!important;
  color:#64748b!important;
  font-size:11px!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
  padding:14px 16px!important;
  text-align:left!important;
  border-bottom:1px solid #e2e8f0!important;
  white-space:nowrap!important;
}
.services-catalog-table td{
  padding:16px!important;
  border-bottom:1px solid #edf2f7!important;
  color:#17314f!important;
  vertical-align:middle!important;
}
.service-category-badge{
  display:inline-flex!important;
  align-items:center!important;
  gap:9px!important;
  border-radius:11px!important;
  padding:8px 10px!important;
  background:#eef5ff!important;
  color:#1f5fd1!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.service-category-badge i{
  width:20px!important;
  text-align:center!important;
}
.service-name-cell strong{
  display:block!important;
  color:#0f2a4d!important;
  font-weight:900!important;
}
.service-name-cell small{
  display:block!important;
  margin-top:4px!important;
  color:#64748b!important;
  max-width:320px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.mini-pill.red{
  background:#fff0f0!important;
  color:#d93025!important;
}
.catalog-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.catalog-actions form{
  margin:0!important;
  display:inline-flex!important;
}
.catalog-switch-button{
  width:44px!important;
  height:26px!important;
  border:0!important;
  border-radius:999px!important;
  background:#cbd5e1!important;
  padding:3px!important;
  cursor:pointer!important;
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  transition:.18s ease!important;
}
.catalog-switch-button span{
  width:20px!important;
  height:20px!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(15,42,77,.20)!important;
  transition:.18s ease!important;
}
.catalog-switch-button.active{
  background:#0d5be1!important;
}
.catalog-switch-button.active span{
  transform:translateX(18px)!important;
}
.services-catalog-footer{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:16px 22px!important;
  color:#64748b!important;
  font-size:13px!important;
}
.service-detail-modal{width:min(760px,calc(100vw - 40px))}
.service-detail-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
.service-detail-grid article{
  border:1px solid #dce6f4!important;
  border-radius:14px!important;
  padding:14px!important;
  background:#fff!important;
}
.service-detail-grid article.span-2{grid-column:1 / -1}
.service-detail-grid small{
  display:block!important;
  color:#64748b!important;
  margin-bottom:6px!important;
}
.service-detail-grid strong{
  color:#0f2a4d!important;
  word-break:break-word!important;
}
@media(max-width:1050px){
  .services-catalog-toolbar{
    grid-template-columns:1fr!important;
    align-items:stretch!important;
  }
  .catalog-filters{grid-template-columns:1fr!important}
  .catalog-count{justify-self:start}
}
@media(max-width:720px){
  .service-detail-grid{grid-template-columns:1fr!important}
  .services-catalog-footer{flex-direction:column;align-items:flex-start!important}
}


/* =========================================================
   CATEGORÍAS DE PRENDAS - VISTA FINAL PROFESIONAL
   ========================================================= */
.garment-categories-module{display:grid;gap:18px}
.garment-categories-card{padding:0;overflow:hidden}
.garment-categories-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:22px!important;
  border-bottom:1px solid #e2eaf5!important;
}
.garment-category-search{
  height:52px!important;
  max-width:520px!important;
  width:100%!important;
  border:1px solid #d8e2f1!important;
  border-radius:16px!important;
  background:#fff!important;
  padding:0!important;
  display:flex!important;
  align-items:stretch!important;
  gap:0!important;
  overflow:hidden!important;
}
.garment-category-search i{color:#6f83a0!important}
.garment-category-search input{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  width:100%!important;
  height:100%!important;
  font:inherit!important;
  color:#102a4c!important;
  padding:0!important;
}
.garment-category-search:focus-within{
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.10)!important;
}
.garment-category-count{color:#64748b;font-size:13px;white-space:nowrap}
.garment-categories-table-wrap{overflow:auto}
.garment-categories-table{width:100%;border-collapse:separate;border-spacing:0;min-width:960px}
.garment-categories-table th{
  background:#f8fafc!important;
  color:#64748b!important;
  font-size:11px!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
  padding:14px 16px!important;
  text-align:left!important;
  border-bottom:1px solid #e2e8f0!important;
  white-space:nowrap!important;
}
.garment-categories-table td{
  padding:15px 16px!important;
  border-bottom:1px solid #edf2f7!important;
  color:#17314f!important;
  vertical-align:middle!important;
}
.garment-category-name{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}
.garment-category-name span{
  width:36px!important;
  height:36px!important;
  border-radius:11px!important;
  background:#eef5ff!important;
  color:#2f6fed!important;
  display:grid!important;
  place-items:center!important;
}
.garment-category-name strong{font-weight:900!important;color:#0f2a4d!important}
.garment-category-description{
  display:block!important;
  max-width:560px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.garment-category-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.garment-category-actions form{
  margin:0!important;
  display:inline-flex!important;
}
.garment-category-actions .action-button{
  width:40px!important;
  height:40px!important;
}
.garment-categories-footer{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:16px 22px!important;
  color:#64748b!important;
  font-size:13px!important;
}
.category-form-modal{width:min(980px,calc(100vw - 40px));overflow:hidden!important}
.category-form-modal form{display:flex!important;flex-direction:column!important;max-height:calc(100vh - 50px)!important}
.category-form-modal form>header{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  padding:24px 28px!important;
  border-bottom:1px solid #e2eaf5!important;
}
.category-form-modal form>header>div{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
}
.category-form-modal .category-form-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr 220px!important;
  gap:16px!important;
  padding:24px 28px!important;
}
.category-form-modal .category-form-grid .field{display:block!important;margin:0!important}
.category-form-modal .category-form-grid .field>span{
  display:block!important;
  font-size:13px!important;
  font-weight:800!important;
  color:#334a67!important;
  margin-bottom:8px!important;
}
.category-form-modal .category-form-grid .input-shell{height:56px!important}
.category-form-modal .category-form-grid .span-2{grid-column:1 / -1}
.category-form-modal .textarea-shell{height:auto!important;align-items:stretch!important}
.category-form-modal .textarea-shell textarea{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  width:100%!important;
  min-height:110px!important;
  resize:vertical!important;
  padding:14px!important;
  font:inherit!important;
  color:#102a4c!important;
}
.category-form-modal form>footer{
  display:flex!important;
  justify-content:flex-end!important;
  gap:12px!important;
  padding:18px 28px!important;
  border-top:1px solid #e2eaf5!important;
}
.category-detail-modal{width:min(760px,calc(100vw - 40px))}
.category-detail-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
.category-detail-grid article{
  border:1px solid #dce6f4!important;
  border-radius:14px!important;
  padding:14px!important;
  background:#fff!important;
}
.category-detail-grid article.span-2{grid-column:1 / -1}
.category-detail-grid small{display:block!important;color:#64748b!important;margin-bottom:6px!important}
.category-detail-grid strong{color:#0f2a4d!important;word-break:break-word!important}
.mini-pill i{
  font-size:7px!important;
  margin-right:6px!important;
}
@media(max-width:900px){
  .category-form-modal .category-form-grid{grid-template-columns:1fr!important}
  .garment-categories-toolbar{flex-direction:column;align-items:stretch!important}
  .garment-category-search{max-width:none!important}
}
@media(max-width:700px){
  .garment-categories-footer{flex-direction:column;align-items:flex-start!important}
  .category-detail-grid{grid-template-columns:1fr!important}
}


/* =========================================================
   CATÁLOGO DE PRENDAS / ARTÍCULOS - AJUSTE FINAL
   ========================================================= */
.catalog-items-table{
  min-width:920px!important;
}
.catalog-items-table th:nth-child(2),
.catalog-items-table td:nth-child(2){
  width:38%!important;
}
.unit-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:92px!important;
  padding:7px 10px!important;
  border-radius:999px!important;
  background:#f1f6fd!important;
  color:#31506f!important;
  font-weight:800!important;
}
.services-catalog-footer span:last-child{
  color:#31506f!important;
}


/* =========================================================
   SERVICIOS - MATRIZ DE TARIFAS
   ========================================================= */
.tariffs-module{display:grid;gap:18px}
.tariffs-card{padding:0;overflow:hidden}
.tariffs-toolbar{
  display:grid!important;
  grid-template-columns:minmax(320px,1.45fr) 220px 220px auto auto!important;
  gap:14px!important;
  align-items:end!important;
  padding:22px!important;
  border-bottom:1px solid #e2eaf5!important;
}
.tariffs-search{
  height:52px!important;
  border:1px solid #d8e2f1!important;
  border-radius:16px!important;
  background:#fff!important;
  padding:0!important;
  display:flex!important;
  align-items:stretch!important;
  gap:0!important;
  overflow:hidden!important;
}
.tariffs-search input{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  width:100%!important;
  height:100%!important;
  font:inherit!important;
  color:#102a4c!important;
  padding:0 16px!important;
  min-width:0!important;
  flex:1 1 auto!important;
}
.tariffs-search i{
  width:54px!important;
  min-width:54px!important;
  display:grid!important;
  place-items:center!important;
  color:#2f6fed!important;
  background:#eef4ff!important;
  border-right:1px solid #d8e2f1!important;
}
.tariffs-search:focus-within{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.tariff-filter span{
  display:block!important;
  font-size:12px!important;
  color:#64748b!important;
  font-weight:800!important;
  margin-bottom:6px!important;
}
.tariff-filter select{
  width:100%!important;
  height:52px!important;
  border:1px solid #d8e2f1!important;
  border-radius:16px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
  font:inherit!important;
}

.tariffs-export-button{
  height:52px!important;
  padding:0 20px!important;
  border:1px solid #cbdcf0!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#173b67!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  box-shadow:0 2px 8px rgba(15,35,70,.04)!important;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
  white-space:nowrap!important;
}
.tariffs-export-button:hover{
  background:#f3f7fd!important;
  border-color:#9fc0e8!important;
  box-shadow:0 8px 18px rgba(15,35,70,.10)!important;
  transform:translateY(-1px)!important;
}
.tariffs-export-button:focus-visible{
  outline:0!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.16)!important;
}
[data-theme="dark"] .tariffs-export-button,.theme-dark .tariffs-export-button{
  background:#17263a!important;
  border-color:#36516f!important;
  color:#e7eef8!important;
}
[data-theme="dark"] .tariffs-export-button:hover,.theme-dark .tariffs-export-button:hover{
  background:#1f3652!important;
  border-color:#5c84ad!important;
}

.tariffs-table-wrap{overflow:auto;max-width:100%}
.tariffs-table{width:100%;min-width:1500px;border-collapse:separate;border-spacing:0}
.tariffs-table th{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  background:#f8fafc!important;
  color:#31506f!important;
  font-size:12px!important;
  font-weight:900!important;
  padding:14px 12px!important;
  text-align:left!important;
  border-bottom:1px solid #dce6f4!important;
  border-right:1px solid #e8eef6!important;
  white-space:nowrap!important;
}
.tariffs-table th i{color:#2f6fed!important;margin-right:7px!important}
.tariffs-table td{
  padding:9px 12px!important;
  border-bottom:1px solid #edf2f7!important;
  border-right:1px solid #f0f4f8!important;
  color:#17314f!important;
  vertical-align:middle!important;
}
.tariffs-table .drag-col{width:34px!important;text-align:center!important;color:#9aa8ba!important}
.tariff-item-name{display:block!important;min-width:210px!important;font-weight:800!important;color:#0f2a4d!important}
.price-input{
  display:flex!important;
  align-items:center!important;
  width:116px!important;
  height:38px!important;
  border:1px solid #d8e2f1!important;
  border-radius:9px!important;
  background:#fff!important;
  overflow:hidden!important;
}
.price-input span{
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  width:34px!important;
  color:#6f83a0!important;
  background:#f5f8fc!important;
  border-right:1px solid #e0e8f3!important;
}
.price-input input{
  width:78px!important;
  height:100%!important;
  border:0!important;
  outline:0!important;
  text-align:right!important;
  padding:0 8px!important;
  font:inherit!important;
  color:#102a4c!important;
  background:transparent!important;
}
.price-input:focus-within{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.tariffs-footer{
  display:flex!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:16px 22px!important;
  color:#64748b!important;
  border-top:1px solid #e2eaf5!important;
  font-size:13px!important;
}
.tariffs-footer i{color:#2f6fed!important;margin-right:8px!important}
@media(max-width:1200px){
  .tariffs-toolbar{grid-template-columns:1fr 1fr!important}
  .tariff-count{justify-self:start}
}
@media(max-width:720px){
  .tariffs-toolbar{grid-template-columns:1fr!important}
  .tariffs-footer{flex-direction:column!important;align-items:flex-start!important}
}


/* =========================================================
   PAGINACIÓN TABLAS - CATÁLOGO Y TARIFAS
   ========================================================= */
.table-pagination{
  display:inline-flex!important;
  align-items:center!important;
  gap:10px!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
.table-pagination button{
  width:38px!important;
  height:38px!important;
  border:1px solid #d8e2f1!important;
  background:#fff!important;
  color:#2f6fed!important;
  border-radius:11px!important;
  display:grid!important;
  place-items:center!important;
  cursor:pointer!important;
  transition:.18s ease!important;
}
.table-pagination button:hover:not(:disabled){
  background:#eef5ff!important;
  border-color:#9ec0ff!important;
}
.table-pagination button:disabled{
  opacity:.45!important;
  cursor:not-allowed!important;
}
.table-pagination span{
  min-width:104px!important;
  text-align:center!important;
  color:#31506f!important;
  font-weight:800!important;
  font-size:13px!important;
}
.catalog-pagination-footer,
.tariffs-pagination-footer{
  display:grid!important;
  grid-template-columns:1fr auto 1fr!important;
  align-items:center!important;
}
.catalog-pagination-footer>span:last-child,
.tariffs-pagination-footer>span:last-child{
  justify-self:end!important;
}
@media(max-width:900px){
  .catalog-pagination-footer,
  .tariffs-pagination-footer{
    grid-template-columns:1fr!important;
    gap:12px!important;
    align-items:flex-start!important;
  }
  .catalog-pagination-footer>span:last-child,
  .tariffs-pagination-footer>span:last-child{
    justify-self:start!important;
  }
}


/* =========================================================
   REPORTES - VENTAS PROFESIONAL
   ========================================================= */
.sales-report-module{display:grid;gap:18px}
.sales-report-filters{
  display:grid!important;
  grid-template-columns:160px 160px 260px 220px auto auto auto!important;
  gap:16px!important;
  align-items:end!important;
  padding:22px!important;
}
.sales-report-filters label span{
  display:block!important;
  font-size:12px!important;
  color:#64748b!important;
  font-weight:800!important;
  margin-bottom:7px!important;
}
.sales-report-filters input,
.sales-report-filters select{
  width:100%!important;
  height:52px!important;
  border:1px solid #d8e2f1!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
  font:inherit!important;
  outline:0!important;
}
.sales-report-filters input:focus,
.sales-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.sales-export-pdf i{color:#e53935!important}
.sales-export-excel i{color:#16a34a!important}
.sales-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
}
.sales-kpi{
  padding:22px!important;
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
}
.sales-kpi>span{
  width:56px!important;height:56px!important;border-radius:16px!important;
  background:#eef5ff!important;color:#2f6fed!important;display:grid!important;place-items:center!important;
  font-size:22px!important;
}
.sales-kpi small,.sales-method small{display:block!important;color:#64748b!important;font-weight:800!important}
.sales-kpi strong{
  display:block!important;font-size:26px!important;line-height:1.15!important;color:#0f2a4d!important;margin:3px 0!important;
}
.sales-kpi em{font-style:normal!important;color:#009b5a!important;font-size:13px!important}
.sales-method-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
}
.sales-method{
  padding:18px 22px!important;
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  align-items:center!important;
  gap:16px!important;
}
.sales-method>span{
  width:52px!important;height:52px!important;border-radius:15px!important;
  background:#eafaf1!important;color:#16a34a!important;display:grid!important;place-items:center!important;font-size:22px!important;
}
.sales-method strong{font-size:22px!important;color:#0f2a4d!important}
.sales-method em{
  font-style:normal!important;
  color:#16a34a!important;
  background:#dcfce7!important;
  padding:7px 10px!important;
  border-radius:10px!important;
  font-weight:900!important;
}
.sales-report-table-card{padding:0!important;overflow:hidden}
.sales-table-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:22px!important;
  border-bottom:1px solid #e2eaf5!important;
}
.sales-report-search{
  max-width:540px!important;width:100%!important;height:52px!important;
  border:1px solid #d8e2f1!important;border-radius:16px!important;background:#fff!important;
  padding:0 16px!important;display:flex!important;align-items:center!important;gap:12px!important;overflow:hidden!important;
}
.sales-report-search input{
  border:0!important;outline:0!important;background:transparent!important;width:100%!important;height:100%!important;
  color:#102a4c!important;font:inherit!important;padding:0!important;
}
.sales-report-search i{color:#6f83a0!important}
.sales-report-table-wrap{overflow:auto}
.sales-report-table{width:100%;border-collapse:separate;border-spacing:0;min-width:980px}
.sales-report-table th{
  background:#f8fafc!important;color:#64748b!important;font-size:11px!important;text-transform:uppercase!important;letter-spacing:.06em!important;
  padding:14px 16px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important;
}
.sales-report-table td{
  padding:14px 16px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important;
}
.sales-report-table td strong{color:#0f2a4d!important;font-weight:900!important}
.sales-actions{display:flex!important;align-items:center!important;gap:8px!important}
.sales-actions .pdf-action i{color:#e53935!important}
.sales-detail-modal{width:min(760px,calc(100vw - 40px))}
.sales-detail-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
.sales-detail-grid article{
  border:1px solid #dce6f4!important;border-radius:14px!important;padding:14px!important;background:#fff!important;
}
.sales-detail-grid small{display:block!important;color:#64748b!important;margin-bottom:6px!important}
.sales-detail-grid strong{color:#0f2a4d!important;font-size:18px!important}
@media(max-width:1280px){
  .sales-report-filters{grid-template-columns:repeat(2,1fr)!important}
  .sales-kpi-grid,.sales-method-grid{grid-template-columns:repeat(2,1fr)!important}
}
@media(max-width:760px){
  .sales-report-filters,.sales-kpi-grid,.sales-method-grid{grid-template-columns:1fr!important}
  .sales-table-toolbar{flex-direction:column!important;align-items:stretch!important}
  .sales-detail-grid{grid-template-columns:1fr!important}
}
@media print{
  .sidebar,.topbar,.sales-report-filters .primary-button,.sales-report-filters .secondary-button,.sales-actions{display:none!important}
  .content{margin:0!important;padding:20px!important}
  .panel{box-shadow:none!important}
}


/* =========================================================
   INVENTARIO - CATEGORÍAS PROFESIONAL
   ========================================================= */
.inventory-categories-module{display:grid;gap:18px}
.inventory-categories-card{padding:0!important;overflow:hidden}
.inventory-categories-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:22px!important;
  border-bottom:1px solid #e2eaf5!important;
}
.inventory-category-search{
  height:52px!important;
  max-width:540px!important;
  width:100%!important;
  border:1px solid #d8e2f1!important;
  border-radius:16px!important;
  background:#fff!important;
  padding:0!important;
  display:flex!important;
  align-items:stretch!important;
  gap:0!important;
  overflow:hidden!important;
}
.inventory-category-search i{color:#6f83a0!important}
.inventory-category-search input{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  width:100%!important;
  height:100%!important;
  font:inherit!important;
  color:#102a4c!important;
  padding:0!important;
}
.inventory-category-search:focus-within{
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.10)!important;
}
.inventory-category-count{
  color:#64748b!important;
  background:#f5f8fc!important;
  border:1px solid #e2eaf5!important;
  padding:9px 14px!important;
  border-radius:999px!important;
  white-space:nowrap!important;
}
.inventory-categories-table-wrap{overflow:auto}
.inventory-categories-table{width:100%;border-collapse:separate;border-spacing:0;min-width:880px}
.inventory-categories-table th{
  background:#f8fafc!important;
  color:#64748b!important;
  font-size:11px!important;
  text-transform:uppercase!important;
  letter-spacing:.06em!important;
  padding:14px 16px!important;
  text-align:left!important;
  border-bottom:1px solid #e2e8f0!important;
  white-space:nowrap!important;
}
.inventory-categories-table td{
  padding:15px 16px!important;
  border-bottom:1px solid #edf2f7!important;
  color:#17314f!important;
  vertical-align:middle!important;
}
.inventory-category-name{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}
.inventory-category-name span{
  width:36px!important;
  height:36px!important;
  border-radius:11px!important;
  background:#eef5ff!important;
  color:#2f6fed!important;
  display:grid!important;
  place-items:center!important;
}
.inventory-category-name strong{font-weight:900!important;color:#0f2a4d!important}
.inventory-category-description{
  display:block!important;
  max-width:620px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.inventory-category-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.inventory-category-actions form{
  display:inline-flex!important;
  margin:0!important;
}
.inventory-categories-footer{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:16px 22px!important;
  color:#64748b!important;
  font-size:13px!important;
}
.inventory-category-form-modal{width:min(900px,calc(100vw - 40px));overflow:hidden!important}
.inventory-category-form-modal form{display:flex!important;flex-direction:column!important;max-height:calc(100vh - 50px)!important}
.inventory-category-form-modal form>header{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  padding:24px 28px!important;
  border-bottom:1px solid #e2eaf5!important;
}
.inventory-category-form-modal form>header>div{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
}
.inventory-category-form-grid{
  display:grid!important;
  grid-template-columns:1fr 220px!important;
  gap:16px!important;
  padding:24px 28px!important;
}
.inventory-category-form-grid .field{display:block!important;margin:0!important}
.inventory-category-form-grid .field>span{
  display:block!important;
  font-size:13px!important;
  font-weight:800!important;
  color:#334a67!important;
  margin-bottom:8px!important;
}
.inventory-category-form-grid .input-shell{height:56px!important}
.inventory-category-form-grid .span-2{grid-column:1 / -1}
.inventory-category-form-grid .textarea-shell{
  height:auto!important;
  align-items:stretch!important;
}
.inventory-category-form-grid .textarea-shell textarea{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  width:100%!important;
  min-height:110px!important;
  resize:vertical!important;
  padding:14px!important;
  font:inherit!important;
  color:#102a4c!important;
}
.inventory-category-form-modal form>footer{
  display:flex!important;
  justify-content:flex-end!important;
  gap:12px!important;
  padding:18px 28px!important;
  border-top:1px solid #e2eaf5!important;
}
.inventory-category-detail-modal{width:min(720px,calc(100vw - 40px))}
.inventory-category-detail-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
.inventory-category-detail-grid article{
  border:1px solid #dce6f4!important;
  border-radius:14px!important;
  padding:14px!important;
  background:#fff!important;
}
.inventory-category-detail-grid article.span-2{grid-column:1 / -1}
.inventory-category-detail-grid small{display:block!important;color:#64748b!important;margin-bottom:6px!important}
.inventory-category-detail-grid strong{color:#0f2a4d!important;word-break:break-word!important}
@media(max-width:760px){
  .inventory-categories-toolbar,.inventory-categories-footer{flex-direction:column!important;align-items:stretch!important}
  .inventory-category-form-grid,.inventory-category-detail-grid{grid-template-columns:1fr!important}
}


/* =========================================================
   NUEVA ORDEN - FLUJO DE MODALIDAD DINÁMICO
   ========================================================= */
.order-step.step-skipped{
  opacity:.45!important;
  pointer-events:auto!important;
}
.order-step.step-skipped .step-icon{
  background:#eef2f6!important;
  color:#94a3b8!important;
}
.store-mode-note{
  display:flex!important;
  align-items:flex-start!important;
  gap:14px!important;
  padding:18px!important;
  border:1px solid #dbeafe!important;
  background:#f0f7ff!important;
  border-radius:16px!important;
  margin:16px 0!important;
}
.store-mode-note.hidden{display:none!important}
.store-mode-note span{
  width:48px!important;
  height:48px!important;
  border-radius:14px!important;
  background:#e6f0ff!important;
  color:#0d3f7c!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 48px!important;
}
.store-mode-note strong{
  display:block!important;
  color:#0f2a4d!important;
  font-weight:900!important;
  margin-bottom:4px!important;
}
.store-mode-note p{
  margin:0!important;
  color:#64748b!important;
}
#deliveryFields.store-compact label:not(.span-2){
  display:none!important;
}
#deliveryFields.store-compact{
  grid-template-columns:1fr!important;
}
#deliveryFields.store-compact .span-2{
  grid-column:1 / -1!important;
}
#addItemTopButton.hidden{display:none!important}
.empty-items.hidden{display:none!important}
.choice-card{
  cursor:pointer!important;
}
.choice-card.active{
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.10)!important;
}
.modal-window #itemPrice::placeholder{
  color:#94a3b8!important;
}


/* =========================================================
   REPORTES - ÓRDENES PROFESIONAL
   ========================================================= */
.orders-report-module{display:grid;gap:18px}
.orders-report-filters{
  display:grid!important;
  grid-template-columns:minmax(140px,160px) minmax(140px,160px) minmax(160px,180px) minmax(170px,190px) minmax(160px,180px) auto auto auto!important;
  gap:16px!important;
  align-items:end!important;
  padding:22px!important;
}
.orders-report-filters > .primary-button,
.orders-report-filters > .secondary-button{
  white-space:nowrap!important;
  min-width:max-content!important;
}
.orders-report-filters > .secondary-button{
  padding-inline:16px!important;
}
@media(max-width:1560px){
  .orders-report-filters{
    grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important;
  }
}
@media(max-width:1280px){
  .orders-report-filters{
    grid-template-columns:repeat(3,minmax(180px,1fr))!important;
  }
  .orders-report-filters > .primary-button,
  .orders-report-filters > .secondary-button{
    width:100%!important;
    justify-content:center!important;
  }
}
.orders-report-filters label span{
  display:block!important;
  font-size:12px!important;
  color:#64748b!important;
  font-weight:800!important;
  margin-bottom:7px!important;
}
.orders-report-filters input,
.orders-report-filters select{
  width:100%!important;
  height:52px!important;
  border:1px solid #d8e2f1!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
  font:inherit!important;
  outline:0!important;
}
.orders-report-filters input:focus,
.orders-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.orders-export-pdf i{color:#e53935!important}
.orders-export-excel i{color:#16a34a!important}
.orders-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
}
.orders-kpi{
  padding:22px!important;
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
}
.orders-kpi>span{
  width:56px!important;height:56px!important;border-radius:16px!important;
  background:#eef5ff!important;color:#2f6fed!important;display:grid!important;place-items:center!important;
  font-size:22px!important;
}
.orders-kpi.warning>span{background:#fff4e5!important;color:#f59e0b!important}
.orders-kpi.success>span{background:#eafaf1!important;color:#16a34a!important}
.orders-kpi small{display:block!important;color:#64748b!important;font-weight:800!important}
.orders-kpi strong{
  display:block!important;font-size:26px!important;line-height:1.15!important;color:#0f2a4d!important;margin:3px 0!important;
}
.orders-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.orders-report-content{
  display:grid!important;
  grid-template-columns:minmax(0,1.15fr) minmax(380px,.85fr)!important;
  gap:18px!important;
}
.orders-status-card,.orders-chart-card{padding:0!important;overflow:hidden}
.orders-status-card header,.orders-chart-card header{
  padding:22px 24px 8px!important;
}
.orders-status-card h3,.orders-chart-card h3{
  margin:0!important;
  color:#0f2a4d!important;
  font-size:18px!important;
}
.orders-status-table-wrap{padding:14px 20px 20px!important;overflow:auto!important}
.orders-status-table{width:100%;border-collapse:separate;border-spacing:0;min-width:720px}
.orders-status-table th{
  background:#f8fafc!important;color:#334a67!important;font-size:12px!important;
  padding:14px 16px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important;
}
.orders-status-table td{
  padding:14px 16px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important;
}
.orders-status-table tfoot td{
  font-weight:900!important;color:#0f2a4d!important;background:#fbfdff!important;
}
.status-dot{
  --status-color:#2f6fed;
  display:inline-block!important;
  width:10px!important;
  height:10px!important;
  border-radius:50%!important;
  background:var(--status-color)!important;
  margin-right:10px!important;
  vertical-align:middle!important;
}
.percent-cell{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.percent-cell span{
  width:84px!important;height:8px!important;border-radius:999px!important;background:#e8eef6!important;overflow:hidden!important;
}
.percent-cell span b{
  display:block!important;height:100%!important;border-radius:999px!important;background:#2f6fed!important;
}
.percent-cell strong{font-weight:900!important;color:#0f2a4d!important}
.mini-view-button{
  height:38px!important;
  padding:0 14px!important;
  border-radius:10px!important;
  font-size:13px!important;
}
.orders-status-view-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-width:82px!important;
  height:40px!important;
  padding:0 14px!important;
  border:1px solid #cbd8e8!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#0f3f78!important;
  font-weight:800!important;
  line-height:1!important;
  box-shadow:0 1px 2px rgba(15,42,77,.04)!important;
  cursor:pointer!important;
  transition:border-color .2s ease,background-color .2s ease,box-shadow .2s ease,transform .2s ease!important;
}
.orders-status-view-button:hover{
  border-color:#8caed4!important;
  background:#f5f9ff!important;
  box-shadow:0 4px 12px rgba(15,63,120,.10)!important;
  transform:translateY(-1px)!important;
}
.orders-status-view-button:focus-visible{
  outline:3px solid rgba(47,111,237,.18)!important;
  outline-offset:2px!important;
}
.orders-donut-layout{
  display:grid!important;
  grid-template-columns:230px 1fr!important;
  align-items:center!important;
  gap:28px!important;
  padding:28px 30px 34px!important;
}
.orders-donut{
  width:220px!important;
  height:220px!important;
  border-radius:50%!important;
  background:var(--donut)!important;
  display:grid!important;
  place-items:center!important;
  position:relative!important;
  box-shadow:inset 0 0 0 1px rgba(15,42,77,.05)!important;
}
.orders-donut:after{
  content:''!important;
  position:absolute!important;
  width:104px!important;
  height:104px!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 10px 25px rgba(15,42,77,.08)!important;
}
.orders-donut div{
  position:relative!important;
  z-index:2!important;
  text-align:center!important;
  color:#0f2a4d!important;
}
.orders-donut strong{display:block!important;font-size:30px!important;line-height:1!important}
.orders-donut span{font-size:13px!important;color:#64748b!important}
.orders-chart-legend{
  display:grid!important;
  gap:14px!important;
}
.orders-chart-legend div{
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  align-items:center!important;
  gap:10px!important;
}
.orders-chart-legend small{font-size:13px!important;color:#334a67!important}
.orders-chart-legend strong{font-size:13px!important;color:#0f2a4d!important}
.orders-pagination-card{
  display:grid!important;
  grid-template-columns:1fr auto auto!important;
  gap:18px!important;
  align-items:center!important;
  padding:18px 24px!important;
  color:#64748b!important;
}
.orders-pagination-card select{
  height:42px!important;
  border:1px solid #d8e2f1!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
}
.orders-status-modal{width:min(1080px,calc(100vw - 40px))}
.orders-modal-table-wrap{overflow:auto!important}
.orders-modal-table{width:100%;border-collapse:separate;border-spacing:0;min-width:850px}
.orders-modal-table th{
  background:#f8fafc!important;color:#64748b!important;font-size:11px!important;
  text-transform:uppercase!important;letter-spacing:.06em!important;
  padding:12px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important;
}
.orders-modal-table td{
  padding:12px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important;
}
@media(max-width:1380px){
  .orders-report-content{grid-template-columns:1fr!important}
}
@media(max-width:900px){
  .orders-kpi-grid{grid-template-columns:repeat(2,1fr)!important}
  .orders-donut-layout{grid-template-columns:1fr!important;justify-items:center!important}
  .orders-pagination-card{grid-template-columns:1fr!important}
}
@media(max-width:640px){
  .orders-report-filters,.orders-kpi-grid{grid-template-columns:1fr!important}
}
@media print{
  .sidebar,.topbar,.orders-report-filters .primary-button,.orders-report-filters .secondary-button,.mini-view-button,.orders-pagination-card{display:none!important}
  .content{margin:0!important;padding:20px!important}
  .panel{box-shadow:none!important}
}


/* =========================================================
   REPORTES - PRODUCCIÓN PROFESIONAL
   ========================================================= */
.production-report-module{display:grid;gap:18px}
.production-report-filters{
  display:grid!important;
  grid-template-columns:minmax(140px,160px) minmax(140px,160px) minmax(180px,210px) minmax(170px,190px) minmax(170px,190px) auto auto auto!important;
  gap:16px!important;
  align-items:end!important;
  padding:22px!important;
}
.production-report-filters label span{
  display:block!important;
  font-size:12px!important;
  color:#64748b!important;
  font-weight:800!important;
  margin-bottom:7px!important;
}
.production-report-filters input,
.production-report-filters select{
  width:100%!important;
  height:52px!important;
  border:1px solid #d8e2f1!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
  font:inherit!important;
  outline:0!important;
}
.production-report-filters input:focus,
.production-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.production-report-filters>.primary-button,
.production-report-filters>.secondary-button{
  white-space:nowrap!important;
  min-width:max-content!important;
}
.production-report-filters>.secondary-button{padding-inline:16px!important}
.production-export-pdf i{color:#e53935!important}
.production-export-excel i{color:#16a34a!important}
.production-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
}
.production-kpi{
  padding:22px!important;
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
}
.production-kpi>span{
  width:56px!important;height:56px!important;border-radius:16px!important;
  background:#eef5ff!important;color:#2f6fed!important;display:grid!important;place-items:center!important;
  font-size:22px!important;
}
.production-kpi.quality>span{background:#eef5ff!important;color:#2f6fed!important}
.production-kpi.ready>span{background:#eafaf1!important;color:#16a34a!important}
.production-kpi small{display:block!important;color:#64748b!important;font-weight:800!important}
.production-kpi strong{
  display:block!important;font-size:26px!important;line-height:1.15!important;color:#0f2a4d!important;margin:3px 0!important;
}
.production-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.production-report-content{
  display:grid!important;
  grid-template-columns:minmax(0,1.05fr) minmax(460px,.95fr)!important;
  gap:18px!important;
}
.production-status-card,.production-chart-card{padding:0!important;overflow:hidden}
.production-status-card header,.production-chart-card header{padding:22px 24px 8px!important}
.production-status-card h3,.production-chart-card h3{
  margin:0!important;
  color:#0f2a4d!important;
  font-size:18px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.production-status-card h3 i,.production-chart-card h3 i{color:#2f6fed!important}
.production-status-table-wrap{padding:14px 20px 20px!important;overflow:auto!important}
.production-status-table{width:100%;border-collapse:separate;border-spacing:0;min-width:720px}
.production-status-table th{
  background:#f8fafc!important;color:#334a67!important;font-size:12px!important;
  padding:14px 16px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important;
}
.production-status-table td{
  padding:13px 16px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important;
}
.production-status-table tfoot td{font-weight:900!important;color:#0f2a4d!important;background:#fbfdff!important}
.production-percent-cell{display:flex!important;align-items:center!important;gap:10px!important}
.production-percent-cell span{
  width:84px!important;height:8px!important;border-radius:999px!important;background:#e8eef6!important;overflow:hidden!important;
}
.production-percent-cell span b{
  display:block!important;height:100%!important;border-radius:999px!important;background:#2f6fed!important;
}
.production-percent-cell strong{font-weight:900!important;color:#0f2a4d!important}
.production-donut-layout{
  display:grid!important;
  grid-template-columns:250px 1fr!important;
  align-items:center!important;
  gap:30px!important;
  padding:28px 30px 34px!important;
}
.production-donut{
  width:230px!important;
  height:230px!important;
  border-radius:50%!important;
  background:var(--donut)!important;
  display:grid!important;
  place-items:center!important;
  position:relative!important;
  box-shadow:inset 0 0 0 1px rgba(15,42,77,.05)!important;
}
.production-donut:after{
  content:''!important;
  position:absolute!important;
  width:108px!important;
  height:108px!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 10px 25px rgba(15,42,77,.08)!important;
}
.production-donut div{
  position:relative!important;
  z-index:2!important;
  text-align:center!important;
  color:#0f2a4d!important;
}
.production-donut strong{display:block!important;font-size:30px!important;line-height:1!important}
.production-donut span{font-size:13px!important;color:#64748b!important}
.production-chart-legend{display:grid!important;gap:14px!important}
.production-chart-legend div{
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  align-items:center!important;
  gap:10px!important;
}
.production-chart-legend small{font-size:13px!important;color:#334a67!important}
.production-chart-legend strong{font-size:13px!important;color:#0f2a4d!important}
.production-pagination-card{
  display:grid!important;
  grid-template-columns:1fr auto auto!important;
  gap:18px!important;
  align-items:center!important;
  padding:18px 24px!important;
  color:#64748b!important;
}
.production-pagination-card select{
  height:42px!important;
  border:1px solid #d8e2f1!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
}
.production-stage-modal{width:min(1080px,calc(100vw - 40px))}
.production-modal-table-wrap{overflow:auto!important}
.production-modal-table{width:100%;border-collapse:separate;border-spacing:0;min-width:850px}
.production-modal-table th{
  background:#f8fafc!important;color:#64748b!important;font-size:11px!important;
  text-transform:uppercase!important;letter-spacing:.06em!important;
  padding:12px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important;
}
.production-modal-table td{padding:12px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important}
@media(max-width:1560px){
  .production-report-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}
}
@media(max-width:1380px){
  .production-report-content{grid-template-columns:1fr!important}
}
@media(max-width:1280px){
  .production-report-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}
  .production-report-filters>.primary-button,
  .production-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}
@media(max-width:900px){
  .production-kpi-grid{grid-template-columns:repeat(2,1fr)!important}
  .production-donut-layout{grid-template-columns:1fr!important;justify-items:center!important}
  .production-pagination-card{grid-template-columns:1fr!important}
}
@media(max-width:640px){
  .production-report-filters,.production-kpi-grid{grid-template-columns:1fr!important}
}
@media print{
  .sidebar,.topbar,.production-report-filters .primary-button,.production-report-filters .secondary-button,.mini-view-button,.production-pagination-card{display:none!important}
  .content{margin:0!important;padding:20px!important}
  .panel{box-shadow:none!important}
}


/* =========================================================
   REPORTES - CLIENTES PROFESIONAL
   ========================================================= */
.clients-report-module{display:grid;gap:18px}
.clients-report-filters{
  display:grid!important;
  grid-template-columns:minmax(140px,160px) minmax(140px,160px) minmax(210px,240px) minmax(210px,240px) auto auto auto!important;
  gap:16px!important;
  align-items:end!important;
  padding:22px!important;
}
.clients-report-filters label span{
  display:block!important;
  font-size:12px!important;
  color:#64748b!important;
  font-weight:800!important;
  margin-bottom:7px!important;
}
.clients-report-filters input,
.clients-report-filters select{
  width:100%!important;
  height:52px!important;
  border:1px solid #d8e2f1!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#102a4c!important;
  padding:0 14px!important;
  font:inherit!important;
  outline:0!important;
}
.clients-report-filters input:focus,
.clients-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.clients-report-filters>.primary-button,
.clients-report-filters>.secondary-button{
  white-space:nowrap!important;
  min-width:max-content!important;
}
.clients-report-filters>.secondary-button{padding-inline:16px!important}
.clients-export-pdf i{color:#e53935!important}
.clients-export-excel i{color:#16a34a!important}
.clients-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:16px!important;
}
.clients-kpi{
  padding:22px!important;
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
}
.clients-kpi>span{
  width:56px!important;height:56px!important;border-radius:16px!important;
  background:#eef5ff!important;color:#2f6fed!important;display:grid!important;place-items:center!important;
  font-size:22px!important;
}
.clients-kpi.balance>span{background:#eef5ff!important;color:#2f6fed!important}
.clients-kpi.frequent>span{background:#eef5ff!important;color:#2f6fed!important}
.clients-kpi small{display:block!important;color:#64748b!important;font-weight:800!important}
.clients-kpi strong{
  display:block!important;font-size:26px!important;line-height:1.15!important;color:#0f2a4d!important;margin:3px 0!important;
}
.clients-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.clients-report-content{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(440px,1fr)!important;
  gap:18px!important;
}
.clients-type-card,.clients-chart-card,.clients-highlight-card{padding:0!important;overflow:hidden}
.clients-type-card header,.clients-chart-card header,.clients-highlight-card header{
  padding:18px 22px 8px!important;
}
.clients-highlight-card header{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding-bottom:14px!important;
}
.clients-type-card h3,.clients-chart-card h3,.clients-highlight-card h3{
  margin:0!important;
  color:#0f2a4d!important;
  font-size:18px!important;
}
.clients-type-table-wrap{padding:8px 18px 18px!important;overflow:auto!important}
.clients-type-table{width:100%;border-collapse:separate;border-spacing:0;min-width:620px}
.clients-type-table th{
  background:#f8fafc!important;color:#334a67!important;font-size:12px!important;
  padding:14px 16px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important;
}
.clients-type-table td{
  padding:14px 16px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important;
}
.clients-type-table tfoot td{font-weight:900!important;color:#0f2a4d!important;background:#fbfdff!important}
.clients-donut-layout{
  display:grid!important;
  grid-template-columns:230px 1fr!important;
  align-items:center!important;
  gap:26px!important;
  padding:22px 30px 28px!important;
}
.clients-donut{
  width:200px!important;height:200px!important;border-radius:50%!important;
  background:var(--donut)!important;display:grid!important;place-items:center!important;
  position:relative!important;box-shadow:inset 0 0 0 1px rgba(15,42,77,.05)!important;
}
.clients-donut:after{
  content:''!important;position:absolute!important;width:92px!important;height:92px!important;border-radius:50%!important;
  background:#fff!important;box-shadow:0 10px 25px rgba(15,42,77,.08)!important;
}
.clients-donut div{position:relative!important;z-index:2!important;text-align:center!important;color:#0f2a4d!important}
.clients-donut strong{display:block!important;font-size:28px!important;line-height:1!important}
.clients-donut span{font-size:13px!important;color:#64748b!important}
.clients-chart-legend{display:grid!important;gap:14px!important}
.clients-chart-legend div{
  display:grid!important;grid-template-columns:auto 1fr auto!important;align-items:center!important;gap:10px!important;
}
.clients-chart-legend small{font-size:13px!important;color:#334a67!important}
.clients-chart-legend strong{font-size:13px!important;color:#0f2a4d!important}
.clients-highlight-search{
  height:44px!important;
  width:min(320px,100%)!important;
  border:1px solid #d8e2f1!important;
  border-radius:12px!important;
  background:#fff!important;
  padding:0 14px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.clients-highlight-search input{
  border:0!important;outline:0!important;background:transparent!important;width:100%!important;height:100%!important;
  font:inherit!important;color:#102a4c!important;padding:0!important;
}
.clients-highlight-search i{color:#6f83a0!important}
.clients-highlight-table-wrap{overflow:auto!important}
.clients-highlight-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1050px}
.clients-highlight-table th{
  background:#f8fafc!important;color:#334a67!important;font-size:12px!important;
  padding:13px 16px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important;
}
.clients-highlight-table td{
  padding:13px 16px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important;
}
.clients-highlight-table td strong{display:block!important;color:#0f2a4d!important;font-weight:900!important}
.clients-highlight-table td small{display:block!important;color:#64748b!important;margin-top:3px!important}
.clients-pagination-card{
  display:grid!important;
  grid-template-columns:1fr auto auto!important;
  gap:18px!important;
  align-items:center!important;
  padding:14px 18px 18px!important;
  color:#64748b!important;
}
.clients-pagination-card select{
  height:42px!important;border:1px solid #d8e2f1!important;border-radius:12px!important;
  background:#fff!important;color:#102a4c!important;padding:0 14px!important;
}
.client-report-detail-modal{width:min(760px,calc(100vw - 40px))}
.client-report-detail-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
.client-report-detail-grid article{
  border:1px solid #dce6f4!important;border-radius:14px!important;padding:14px!important;background:#fff!important;
}
.client-report-detail-grid article.span-2{grid-column:1 / -1}
.client-report-detail-grid small{display:block!important;color:#64748b!important;margin-bottom:6px!important}
.client-report-detail-grid strong{color:#0f2a4d!important;word-break:break-word!important}
@media(max-width:1560px){
  .clients-report-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}
}
@media(max-width:1380px){
  .clients-report-content{grid-template-columns:1fr!important}
}
@media(max-width:1280px){
  .clients-report-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}
  .clients-report-filters>.primary-button,
  .clients-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}
@media(max-width:900px){
  .clients-kpi-grid{grid-template-columns:repeat(2,1fr)!important}
  .clients-donut-layout{grid-template-columns:1fr!important;justify-items:center!important}
  .clients-pagination-card{grid-template-columns:1fr!important}
  .clients-highlight-card header{flex-direction:column!important;align-items:stretch!important}
}
@media(max-width:640px){
  .clients-report-filters,.clients-kpi-grid{grid-template-columns:1fr!important}
}
@media print{
  .sidebar,.topbar,.clients-report-filters .primary-button,.clients-report-filters .secondary-button,.mini-view-button,.clients-pagination-card{display:none!important}
  .content{margin:0!important;padding:20px!important}
  .panel{box-shadow:none!important}
}


/* =========================================================
   REPORTES - CAJA PROFESIONAL
   ========================================================= */
.cash-report-module{display:grid;gap:18px}
.cash-report-filters{
  display:grid!important;
  grid-template-columns:minmax(140px,160px) minmax(140px,160px) minmax(190px,210px) minmax(170px,190px) minmax(170px,190px) auto auto auto!important;
  gap:16px!important;
  align-items:end!important;
  padding:22px!important;
}
.cash-report-filters label span{display:block!important;font-size:12px!important;color:#64748b!important;font-weight:800!important;margin-bottom:7px!important}
.cash-report-filters input,.cash-report-filters select{
  width:100%!important;height:52px!important;border:1px solid #d8e2f1!important;border-radius:14px!important;background:#fff!important;color:#102a4c!important;padding:0 14px!important;font:inherit!important;outline:0!important
}
.cash-report-filters input:focus,.cash-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.cash-report-filters>.primary-button,.cash-report-filters>.secondary-button{white-space:nowrap!important;min-width:max-content!important}
.cash-report-filters>.secondary-button{padding-inline:16px!important}
.cash-export-pdf i{color:#e53935!important}.cash-export-excel i{color:#16a34a!important}
.cash-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important}
.cash-kpi{padding:22px!important;display:flex!important;align-items:center!important;gap:16px!important}
.cash-kpi>span{
  width:56px!important;height:56px!important;border-radius:16px!important;background:#eef5ff!important;color:#2f6fed!important;display:grid!important;place-items:center!important;font-size:22px!important
}
.cash-kpi small{display:block!important;color:#64748b!important;font-weight:800!important}
.cash-kpi strong{display:block!important;font-size:26px!important;line-height:1.15!important;color:#0f2a4d!important;margin:3px 0!important}
.cash-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.cash-report-content{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(440px,1fr)!important;gap:18px!important}
.cash-method-card,.cash-chart-card,.cash-daily-card{padding:0!important;overflow:hidden}
.cash-method-card header,.cash-chart-card header,.cash-daily-card header{padding:18px 22px 8px!important}
.cash-daily-card header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;padding-bottom:14px!important}
.cash-method-card h3,.cash-chart-card h3,.cash-daily-card h3{margin:0!important;color:#0f2a4d!important;font-size:18px!important}
.cash-method-table-wrap,.cash-daily-table-wrap,.cash-modal-table-wrap{overflow:auto!important}
.cash-method-table-wrap{padding:8px 18px 18px!important}
.cash-method-table{width:100%;border-collapse:separate;border-spacing:0;min-width:620px}
.cash-method-table th,.cash-daily-table th,.cash-modal-table th{
  background:#f8fafc!important;color:#334a67!important;font-size:12px!important;padding:13px 16px!important;text-align:left!important;border-bottom:1px solid #e2e8f0!important
}
.cash-method-table td,.cash-daily-table td,.cash-modal-table td{padding:13px 16px!important;border-bottom:1px solid #edf2f7!important;color:#17314f!important}
.cash-method-table tfoot td{font-weight:900!important;color:#0f2a4d!important;background:#fbfdff!important}
.cash-method-table td:first-child{display:flex!important;align-items:center!important;gap:12px!important}
.cash-method-icon{width:34px!important;height:34px!important;border-radius:9px!important;display:grid!important;place-items:center!important;color:#fff!important;background:#22c5c7!important}
.cash-method-1{background:#8b5cf6!important}.cash-method-2{background:#2f6fed!important}.cash-method-3{background:#22c55e!important}
.cash-percent-cell{display:flex!important;align-items:center!important;gap:10px!important}
.cash-percent-cell span{width:150px!important;height:8px!important;border-radius:999px!important;background:#e8eef6!important;overflow:hidden!important}
.cash-percent-cell span b{display:block!important;height:100%!important;border-radius:999px!important;background:#0d3f7c!important}
.cash-percent-cell strong{font-weight:900!important;color:#0f2a4d!important;min-width:42px!important;text-align:right!important}
.cash-donut-layout{display:grid!important;grid-template-columns:230px 1fr!important;align-items:center!important;gap:26px!important;padding:22px 30px 28px!important}
.cash-donut{width:210px!important;height:210px!important;border-radius:50%!important;background:var(--donut)!important;display:grid!important;place-items:center!important;position:relative!important;box-shadow:inset 0 0 0 1px rgba(15,42,77,.05)!important}
.cash-donut:after{content:''!important;position:absolute!important;width:98px!important;height:98px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 10px 25px rgba(15,42,77,.08)!important}
.cash-donut div{position:relative!important;z-index:2!important;text-align:center!important;color:#0f2a4d!important}
.cash-donut strong{display:block!important;font-size:20px!important;line-height:1.1!important}.cash-donut span{font-size:12px!important;color:#64748b!important}
.cash-chart-legend{display:grid!important;gap:14px!important}
.cash-chart-legend div{display:grid!important;grid-template-columns:auto 1fr auto auto!important;align-items:center!important;gap:10px!important}
.cash-chart-legend small{font-size:13px!important;color:#334a67!important}.cash-chart-legend strong,.cash-chart-legend em{font-size:13px!important;color:#0f2a4d!important;font-style:normal!important}
.cash-daily-search{height:44px!important;width:min(360px,100%)!important;border:1px solid #d8e2f1!important;border-radius:12px!important;background:#fff!important;padding:0 14px!important;display:flex!important;align-items:center!important;gap:10px!important}
.cash-daily-search input{border:0!important;outline:0!important;background:transparent!important;width:100%!important;height:100%!important;font:inherit!important;color:#102a4c!important;padding:0!important}
.cash-daily-search i{color:#6f83a0!important}
.cash-daily-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1050px}
.cash-pagination-card{display:grid!important;grid-template-columns:1fr auto auto!important;gap:18px!important;align-items:center!important;padding:14px 18px 18px!important;color:#64748b!important}
.cash-pagination-card select{height:42px!important;border:1px solid #d8e2f1!important;border-radius:12px!important;background:#fff!important;color:#102a4c!important;padding:0 14px!important}
.cash-day-modal{width:min(1080px,calc(100vw - 40px))}
.cash-modal-table{width:100%;border-collapse:separate;border-spacing:0;min-width:850px}
@media(max-width:1560px){.cash-report-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}}
@media(max-width:1380px){.cash-report-content{grid-template-columns:1fr!important}}
@media(max-width:1280px){
  .cash-report-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}
  .cash-report-filters>.primary-button,.cash-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}
@media(max-width:900px){
  .cash-kpi-grid{grid-template-columns:repeat(2,1fr)!important}
  .cash-donut-layout{grid-template-columns:1fr!important;justify-items:center!important}
  .cash-pagination-card{grid-template-columns:1fr!important}
  .cash-daily-card header{flex-direction:column!important;align-items:stretch!important}
}
@media(max-width:640px){.cash-report-filters,.cash-kpi-grid{grid-template-columns:1fr!important}}
@media print{
  .sidebar,.topbar,.cash-report-filters .primary-button,.cash-report-filters .secondary-button,.mini-view-button,.cash-pagination-card{display:none!important}
  .content{margin:0!important;padding:20px!important}.panel{box-shadow:none!important}
}

.inventory-report-module{display:grid;gap:18px}
.inventory-report-filters{display:grid!important;grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important;gap:16px!important;align-items:end!important}
.inventory-report-filters label span{display:block!important;font-size:12px!important;color:#64748b!important;font-weight:800!important;margin-bottom:7px!important}
.inventory-report-filters input,.inventory-report-filters select{width:100%!important;height:44px!important;border:1px solid #d9e2f1!important;border-radius:14px!important;padding:0 14px!important;background:#fff!important;color:#0f172a!important;font-size:14px!important}
.inventory-report-filters input:focus,.inventory-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.inventory-report-filters>.primary-button,.inventory-report-filters>.secondary-button{white-space:nowrap!important;min-width:max-content!important}
.inventory-report-filters>.secondary-button{padding-inline:16px!important}
.inventory-export-pdf i{color:#ef4444!important}.inventory-export-excel i{color:#22c55e!important}
.inventory-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important}
.inventory-kpi{display:flex!important;gap:16px!important;align-items:center!important;padding:18px 20px!important}
.inventory-kpi>span{width:56px!important;height:56px!important;border-radius:18px!important;display:grid!important;place-items:center!important;background:#edf3ff!important;color:#2f6fed!important;font-size:25px!important;flex:0 0 auto!important}
.inventory-kpi>div{display:grid!important;gap:4px!important}
.inventory-kpi small{font-size:14px!important;font-weight:800!important;color:#334155!important}
.inventory-kpi strong{font-size:18px!important;color:#0f172a!important}
.inventory-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.inventory-kpi.warning>span{background:#fff6df!important;color:#d97706!important}
.inventory-kpi.danger>span{background:#ffe8e8!important;color:#ef4444!important}
.inventory-kpi.success>span{background:#e7f8ec!important;color:#16a34a!important}
.inventory-report-content{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr)!important;gap:18px!important}
.inventory-summary-card header,.inventory-chart-card header,.inventory-detail-card header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:14px!important}
.inventory-summary-card h3,.inventory-chart-card h3,.inventory-detail-card h3{font-size:16px!important;font-weight:900!important;color:#183153!important}
.inventory-summary-table-wrap,.inventory-detail-table-wrap{overflow:auto!important}
.inventory-summary-table,.inventory-detail-table{width:100%!important;border-collapse:separate!important;border-spacing:0!important}
.inventory-summary-table th,.inventory-summary-table td,.inventory-detail-table th,.inventory-detail-table td{padding:12px 14px!important;border-bottom:1px solid #e8eef7!important;text-align:left!important;font-size:14px!important}
.inventory-summary-table thead th,.inventory-detail-table thead th{font-size:12px!important;letter-spacing:.01em!important;text-transform:none!important;color:#64748b!important;font-weight:800!important;background:#f8fbff!important}
.inventory-summary-table tfoot td{font-weight:800!important;color:#183153!important;background:#fbfdff!important}
.inventory-donut-layout{display:grid!important;grid-template-columns:240px 1fr!important;gap:22px!important;align-items:center!important;min-height:260px!important}
.inventory-donut{width:180px!important;height:180px!important;border-radius:999px!important;background:var(--donut)!important;display:grid!important;place-items:center!important;margin:0 auto!important;position:relative!important}
.inventory-donut::after{content:"";position:absolute!important;inset:24px!important;border-radius:999px!important;background:#fff!important;box-shadow:inset 0 0 0 1px #edf2fb!important}
.inventory-donut>div{position:relative!important;z-index:1!important;display:grid!important;place-items:center!important;text-align:center!important;gap:2px!important}
.inventory-donut strong{font-size:28px!important;color:#183153!important;font-weight:900!important}
.inventory-donut span{font-size:14px!important;color:#64748b!important}
.inventory-chart-legend{display:grid!important;gap:14px!important}
.inventory-chart-legend div{display:grid!important;grid-template-columns:auto 1fr auto!important;gap:10px!important;align-items:center!important}
.inventory-chart-legend small{font-size:14px!important;color:#334155!important}
.inventory-chart-legend strong{font-size:14px!important;color:#183153!important}
.inventory-detail-search{max-width:360px!important;min-width:280px!important}
.inventory-detail-search input{width:100%!important;border:none!important;background:transparent!important;outline:none!important;font-size:14px!important}
.inventory-pagination-card{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;margin-top:14px!important;flex-wrap:wrap!important}
.inventory-pagination-card select{height:40px!important;border-radius:12px!important;border:1px solid #d9e2f1!important;padding:0 12px!important;background:#fff!important}
.inventory-report-detail-modal{max-width:760px!important}
.inventory-report-detail-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
.inventory-report-detail-grid article{padding:14px!important;border:1px solid #e6edf7!important;border-radius:14px!important;background:#fbfdff!important;display:grid!important;gap:6px!important}
.inventory-report-detail-grid article.span-2{grid-column:span 2!important}
.inventory-report-detail-grid small{font-size:12px!important;color:#64748b!important;font-weight:800!important}
.inventory-report-detail-grid strong{font-size:15px!important;color:#183153!important}
@media(max-width:1560px){.inventory-report-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}}
@media(max-width:1380px){.inventory-report-content{grid-template-columns:1fr!important}}
@media(max-width:1280px){.inventory-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.inventory-report-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}.inventory-report-filters>.primary-button,.inventory-report-filters>.secondary-button{width:100%!important;justify-content:center!important}.inventory-donut-layout{grid-template-columns:1fr!important;justify-items:center!important;text-align:center!important}}
@media(max-width:760px){.inventory-report-detail-grid{grid-template-columns:1fr!important}.inventory-report-detail-grid article.span-2{grid-column:auto!important}}
@media(max-width:640px){.inventory-report-filters,.inventory-kpi-grid{grid-template-columns:1fr!important}}
@media print{.inventory-report-filters .primary-button,.inventory-report-filters .secondary-button,.inventory-pagination-card,.mini-view-button,.sidebar,.topbar{display:none!important}.inventory-report-module{gap:10px!important}.inventory-report-content,.inventory-kpi-grid{grid-template-columns:1fr!important}.inventory-detail-card,.inventory-summary-card,.inventory-chart-card,.inventory-kpi,.inventory-report-hero,.inventory-report-filters{break-inside:avoid!important}.inventory-donut-layout{grid-template-columns:1fr!important}}


/* =========================================================
   REPORTES - DELIVERY PROFESIONAL
   ========================================================= */
.delivery-report-module{display:grid;gap:18px}
.delivery-report-filters{
  display:grid!important;
  grid-template-columns:minmax(140px,160px) minmax(140px,160px) minmax(180px,200px) minmax(180px,200px) minmax(180px,210px) auto auto auto!important;
  gap:16px!important;
  align-items:end!important;
  padding:22px!important;
}
.delivery-report-filters label span{display:block!important;font-size:12px!important;color:#64748b!important;font-weight:800!important;margin-bottom:7px!important}
.delivery-report-filters input,.delivery-report-filters select{
  width:100%!important;height:44px!important;border:1px solid #d9e2f1!important;border-radius:14px!important;padding:0 14px!important;background:#fff!important;color:#0f172a!important;font-size:14px!important
}
.delivery-report-filters input:focus,.delivery-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.delivery-report-filters>.primary-button,.delivery-report-filters>.secondary-button{white-space:nowrap!important;min-width:max-content!important}
.delivery-export-pdf i{color:#ef4444!important}.delivery-export-excel i{color:#22c55e!important}
.delivery-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important}
.delivery-kpi{display:flex!important;gap:16px!important;align-items:center!important;padding:18px 20px!important}
.delivery-kpi>span{width:56px!important;height:56px!important;border-radius:18px!important;display:grid!important;place-items:center!important;background:#edf3ff!important;color:#2f6fed!important;font-size:25px!important;flex:0 0 auto!important}
.delivery-kpi>div{display:grid!important;gap:4px!important}
.delivery-kpi small{font-size:14px!important;font-weight:800!important;color:#334155!important}
.delivery-kpi strong{font-size:18px!important;color:#0f172a!important}
.delivery-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.delivery-kpi.warning>span{background:#fff6df!important;color:#f59e0b!important}
.delivery-kpi.purple>span{background:#f3e8ff!important;color:#8b5cf6!important}
.delivery-kpi.success>span{background:#e7f8ec!important;color:#16a34a!important}
.delivery-report-content{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(440px,1fr)!important;gap:18px!important}
.delivery-summary-card header,.delivery-chart-card header,.delivery-detail-card header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:14px!important}
.delivery-summary-card h3,.delivery-chart-card h3,.delivery-detail-card h3{font-size:16px!important;font-weight:900!important;color:#183153!important}
.delivery-summary-table-wrap,.delivery-detail-table-wrap{overflow:auto!important}
.delivery-summary-table,.delivery-detail-table{width:100%!important;border-collapse:separate!important;border-spacing:0!important}
.delivery-summary-table th,.delivery-summary-table td,.delivery-detail-table th,.delivery-detail-table td{padding:12px 14px!important;border-bottom:1px solid #e8eef7!important;text-align:left!important;font-size:14px!important}
.delivery-summary-table thead th,.delivery-detail-table thead th{font-size:12px!important;color:#64748b!important;font-weight:800!important;background:#f8fbff!important}
.delivery-summary-table tfoot td{font-weight:800!important;color:#183153!important;background:#fbfdff!important}
.delivery-donut-layout{display:grid!important;grid-template-columns:240px 1fr!important;gap:22px!important;align-items:center!important;min-height:260px!important}
.delivery-donut{width:180px!important;height:180px!important;border-radius:999px!important;background:var(--donut)!important;display:grid!important;place-items:center!important;margin:0 auto!important;position:relative!important}
.delivery-donut::after{content:"";position:absolute!important;inset:24px!important;border-radius:999px!important;background:#fff!important;box-shadow:inset 0 0 0 1px #edf2fb!important}
.delivery-donut>div{position:relative!important;z-index:1!important;display:grid!important;place-items:center!important;text-align:center!important;gap:2px!important}
.delivery-donut strong{font-size:28px!important;color:#183153!important;font-weight:900!important}
.delivery-donut span{font-size:14px!important;color:#64748b!important}
.delivery-chart-legend{display:grid!important;gap:14px!important}
.delivery-chart-legend div{display:grid!important;grid-template-columns:auto 1fr auto!important;gap:10px!important;align-items:center!important}
.delivery-chart-legend small{font-size:14px!important;color:#334155!important}
.delivery-chart-legend strong{font-size:14px!important;color:#183153!important}
.delivery-detail-search{max-width:420px!important;margin-bottom:12px!important}
.delivery-detail-search input{width:100%!important;border:none!important;background:transparent!important;outline:none!important;font-size:14px!important}
.delivery-detail-table{min-width:1180px!important}
.delivery-pagination-card{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;margin-top:14px!important;flex-wrap:wrap!important}
.delivery-pagination-card select{height:40px!important;border-radius:12px!important;border:1px solid #d9e2f1!important;padding:0 12px!important;background:#fff!important}
.delivery-report-detail-modal{max-width:880px!important}
.delivery-report-detail-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
.delivery-report-detail-grid article{padding:14px!important;border:1px solid #e6edf7!important;border-radius:14px!important;background:#fbfdff!important;display:grid!important;gap:6px!important}
.delivery-report-detail-grid article.span-2{grid-column:span 2!important}
.delivery-report-detail-grid article.span-3{grid-column:1 / -1!important}
.delivery-report-detail-grid small{font-size:12px!important;color:#64748b!important;font-weight:800!important}
.delivery-report-detail-grid strong{font-size:15px!important;color:#183153!important}
.icon-action-button{width:40px!important;height:38px!important;padding:0!important;display:inline-grid!important;place-items:center!important;border-radius:10px!important}
@media(max-width:1560px){.delivery-report-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}}
@media(max-width:1380px){.delivery-report-content{grid-template-columns:1fr!important}}
@media(max-width:1280px){.delivery-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.delivery-report-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}.delivery-report-filters>.primary-button,.delivery-report-filters>.secondary-button{width:100%!important;justify-content:center!important}.delivery-donut-layout{grid-template-columns:1fr!important;justify-items:center!important;text-align:center!important}}
@media(max-width:760px){.delivery-report-detail-grid{grid-template-columns:1fr!important}.delivery-report-detail-grid article.span-2,.delivery-report-detail-grid article.span-3{grid-column:auto!important}}
@media(max-width:640px){.delivery-report-filters,.delivery-kpi-grid{grid-template-columns:1fr!important}}
@media print{.delivery-report-filters .primary-button,.delivery-report-filters .secondary-button,.delivery-pagination-card,.mini-view-button,.icon-action-button,.sidebar,.topbar{display:none!important}.delivery-report-module{gap:10px!important}.delivery-report-content,.delivery-kpi-grid{grid-template-columns:1fr!important}.delivery-detail-card,.delivery-summary-card,.delivery-chart-card,.delivery-kpi,.delivery-report-hero,.delivery-report-filters{break-inside:avoid!important}.delivery-donut-layout{grid-template-columns:1fr!important}}

/* =========================================================
   REPORTES - INCIDENCIAS PROFESIONAL
   ========================================================= */
.incidents-report-module{display:grid;gap:18px}
.incidents-report-filters{display:grid!important;grid-template-columns:minmax(140px,160px) minmax(140px,160px) minmax(220px,250px) minmax(180px,200px) minmax(180px,200px) auto auto auto!important;gap:16px!important;align-items:end!important;padding:22px!important}
.incidents-report-filters label span{display:block!important;font-size:12px!important;color:#64748b!important;font-weight:800!important;margin-bottom:7px!important}
.incidents-report-filters input,.incidents-report-filters select{width:100%!important;height:44px!important;border:1px solid #d9e2f1!important;border-radius:14px!important;padding:0 14px!important;background:#fff!important;color:#0f172a!important;font-size:14px!important;outline:none!important}
.incidents-report-filters input:focus,.incidents-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.incidents-report-filters>.primary-button,.incidents-report-filters>.secondary-button{white-space:nowrap!important;min-width:max-content!important}
.incidents-export-pdf i{color:#ef4444!important}.incidents-export-excel i{color:#16a34a!important}
.incidents-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important}
.incidents-kpi{display:flex!important;gap:16px!important;align-items:center!important;padding:18px 20px!important}
.incidents-kpi>span{width:56px!important;height:56px!important;border-radius:18px!important;display:grid!important;place-items:center!important;background:#edf3ff!important;color:#2f6fed!important;font-size:25px!important;flex:0 0 auto!important}
.incidents-kpi>div{display:grid!important;gap:4px!important}
.incidents-kpi small{font-size:14px!important;font-weight:800!important;color:#334155!important}
.incidents-kpi strong{font-size:22px!important;color:#0f172a!important;line-height:1!important}
.incidents-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.incidents-kpi.warning>span{background:#fff6df!important;color:#d97706!important}
.incidents-kpi.review>span{background:#edf3ff!important;color:#2f6fed!important}
.incidents-kpi.success>span{background:#e7f8ec!important;color:#16a34a!important}
.incidents-report-content{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(440px,1fr)!important;gap:18px!important}
.incidents-summary-card header,.incidents-chart-card header,.incidents-detail-card header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:14px!important}
.incidents-summary-card h3,.incidents-chart-card h3,.incidents-detail-card h3{display:flex!important;align-items:center!important;gap:9px!important;font-size:16px!important;font-weight:900!important;color:#183153!important;margin:0!important}
.incidents-summary-card h3 i,.incidents-chart-card h3 i,.incidents-detail-card h3 i{color:#2f6fed!important}
.incidents-summary-table-wrap,.incidents-detail-table-wrap{overflow:auto!important}
.incidents-summary-table,.incidents-detail-table{width:100%!important;border-collapse:separate!important;border-spacing:0!important}
.incidents-summary-table th,.incidents-summary-table td,.incidents-detail-table th,.incidents-detail-table td{padding:12px 14px!important;border-bottom:1px solid #e8eef7!important;text-align:left!important;font-size:14px!important;vertical-align:middle!important}
.incidents-summary-table thead th,.incidents-detail-table thead th{font-size:12px!important;color:#64748b!important;font-weight:800!important;background:#f8fbff!important}
.incidents-summary-table tfoot td{font-weight:800!important;color:#183153!important;background:#f3f7ff!important}
.incidents-donut-layout{display:grid!important;grid-template-columns:250px 1fr!important;gap:24px!important;align-items:center!important;min-height:260px!important}
.incidents-donut{width:190px!important;height:190px!important;border-radius:999px!important;background:var(--donut)!important;display:grid!important;place-items:center!important;margin:0 auto!important;position:relative!important}
.incidents-donut::after{content:"";position:absolute!important;inset:28px!important;border-radius:999px!important;background:#fff!important;box-shadow:inset 0 0 0 1px #edf2fb!important}
.incidents-donut>div{position:relative!important;z-index:1!important;display:grid!important;place-items:center!important;text-align:center!important;gap:2px!important}
.incidents-donut span{font-size:14px!important;color:#64748b!important}.incidents-donut strong{font-size:30px!important;color:#183153!important;font-weight:900!important;line-height:1!important}
.incidents-chart-legend{display:grid!important;gap:18px!important}
.incidents-chart-legend div{display:grid!important;grid-template-columns:auto 1fr auto!important;gap:10px!important;align-items:center!important}
.incidents-chart-legend small{font-size:14px!important;color:#334155!important}.incidents-chart-legend strong{font-size:14px!important;color:#183153!important}
.incidents-detail-card header{grid-template-columns:auto minmax(260px,360px) auto!important;display:grid!important}
.incidents-detail-card header>span{color:#64748b!important;font-size:13px!important;justify-self:end!important}
.incidents-detail-search{height:40px!important;border:1px solid #d9e2f1!important;border-radius:12px!important;background:#fff!important;display:flex!important;align-items:center!important;gap:10px!important;padding:0 12px!important;max-width:360px!important}
.incidents-detail-search input{width:100%!important;border:none!important;background:transparent!important;outline:none!important;font-size:14px!important;color:#183153!important}
.incidents-detail-search i{color:#6b7f99!important}
.incidents-detail-table{min-width:1060px!important}
.incidents-pagination-card{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;margin-top:14px!important;flex-wrap:wrap!important}
.incidents-pagination-card select{height:40px!important;border-radius:12px!important;border:1px solid #d9e2f1!important;padding:0 12px!important;background:#fff!important}
.incident-report-detail-modal{max-width:900px!important}
.incident-report-detail-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
.incident-report-detail-grid article{padding:14px!important;border:1px solid #e6edf7!important;border-radius:14px!important;background:#fbfdff!important;display:grid!important;gap:6px!important}
.incident-report-detail-grid article.span-2{grid-column:span 2!important}.incident-report-detail-grid article.span-3{grid-column:1 / -1!important}
.incident-report-detail-grid small{font-size:12px!important;color:#64748b!important;font-weight:800!important}.incident-report-detail-grid strong{font-size:15px!important;color:#183153!important;white-space:pre-wrap!important}
@media(max-width:1560px){.incidents-report-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}}
@media(max-width:1380px){.incidents-report-content{grid-template-columns:1fr!important}.incidents-detail-card header{grid-template-columns:1fr!important}.incidents-detail-card header>span{justify-self:start!important}.incidents-detail-search{max-width:100%!important}}
@media(max-width:1280px){.incidents-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.incidents-report-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}.incidents-report-filters>.primary-button,.incidents-report-filters>.secondary-button{width:100%!important;justify-content:center!important}.incidents-donut-layout{grid-template-columns:1fr!important;justify-items:center!important;text-align:center!important}}
@media(max-width:760px){.incident-report-detail-grid{grid-template-columns:1fr!important}.incident-report-detail-grid article.span-2,.incident-report-detail-grid article.span-3{grid-column:auto!important}}
@media(max-width:640px){.incidents-report-filters,.incidents-kpi-grid{grid-template-columns:1fr!important}}
@media print{.incidents-report-filters .primary-button,.incidents-report-filters .secondary-button,.incidents-pagination-card,.mini-view-button,.sidebar,.topbar{display:none!important}.incidents-report-module{gap:10px!important}.incidents-report-content,.incidents-kpi-grid{grid-template-columns:1fr!important}.incidents-detail-card,.incidents-summary-card,.incidents-chart-card,.incidents-kpi,.incidents-report-hero,.incidents-report-filters{break-inside:avoid!important}.incidents-donut-layout{grid-template-columns:1fr!important}}

/* =========================================================
   REPORTES - RENTABILIDAD PROFESIONAL
   ========================================================= */
.profit-report-module{display:grid;gap:18px}
.profit-report-filters{display:grid!important;grid-template-columns:minmax(140px,160px) minmax(140px,160px) minmax(250px,1fr) minmax(250px,1fr) auto auto auto!important;gap:16px!important;align-items:end!important;padding:22px!important}
.profit-report-filters label span{display:block!important;font-size:12px!important;color:#64748b!important;font-weight:800!important;margin-bottom:7px!important}
.profit-report-filters input,.profit-report-filters select{width:100%!important;height:44px!important;border:1px solid #d9e2f1!important;border-radius:14px!important;padding:0 14px!important;background:#fff!important;color:#0f172a!important;font-size:14px!important}
.profit-report-filters input:focus,.profit-report-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.profit-report-filters>.primary-button,.profit-report-filters>.secondary-button{white-space:nowrap!important;min-width:max-content!important}
.profit-export-pdf i{color:#ef4444!important}.profit-export-excel i{color:#22c55e!important}
.profit-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important}
.profit-kpi{display:flex!important;gap:16px!important;align-items:center!important;padding:18px 20px!important}
.profit-kpi>span{width:56px!important;height:56px!important;border-radius:18px!important;display:grid!important;place-items:center!important;background:#edf3ff!important;color:#2f6fed!important;font-size:25px!important;flex:0 0 auto!important}
.profit-kpi>div{display:grid!important;gap:4px!important}
.profit-kpi small{font-size:14px!important;font-weight:800!important;color:#334155!important}
.profit-kpi strong{font-size:22px!important;color:#0f172a!important;line-height:1.1!important}
.profit-kpi em{font-style:normal!important;color:#64748b!important;font-size:13px!important}
.profit-kpi.danger>span{background:#ffe8e8!important;color:#ef4444!important}
.profit-kpi.success>span{background:#e7f8ec!important;color:#16a34a!important}
.profit-kpi.purple>span{background:#f3e8ff!important;color:#7c3aed!important}
.profit-report-content{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(440px,1fr)!important;gap:18px!important}
.profit-summary-card header,.profit-chart-card header,.profit-detail-card header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:14px!important}
.profit-summary-card h3,.profit-chart-card h3,.profit-detail-card h3{font-size:16px!important;font-weight:900!important;color:#183153!important}
.profit-summary-table-wrap,.profit-detail-table-wrap{overflow:auto!important}
.profit-summary-table,.profit-detail-table{width:100%!important;border-collapse:separate!important;border-spacing:0!important}
.profit-summary-table th,.profit-summary-table td,.profit-detail-table th,.profit-detail-table td{padding:12px 14px!important;border-bottom:1px solid #e8eef7!important;text-align:left!important;font-size:14px!important}
.profit-summary-table thead th,.profit-detail-table thead th{font-size:12px!important;color:#64748b!important;font-weight:800!important;background:#f8fbff!important}
.profit-summary-table tfoot td{font-weight:800!important;color:#183153!important;background:#fbfdff!important}
.profit-percent-cell{display:flex!important;align-items:center!important;gap:10px!important}
.profit-percent-cell span{width:160px!important;height:8px!important;border-radius:999px!important;background:#e8eef6!important;overflow:hidden!important;display:block!important}
.profit-percent-cell span b{display:block!important;height:100%!important;border-radius:999px!important;background:var(--bar,#2f6fed)!important}
.profit-percent-cell strong{min-width:52px!important;color:#183153!important;font-weight:800!important}
.profit-donut-layout{display:grid!important;grid-template-columns:240px 1fr!important;gap:22px!important;align-items:center!important;min-height:260px!important}
.profit-donut{width:180px!important;height:180px!important;border-radius:999px!important;background:var(--donut)!important;display:grid!important;place-items:center!important;margin:0 auto!important;position:relative!important}
.profit-donut::after{content:"";position:absolute!important;inset:24px!important;border-radius:999px!important;background:#fff!important;box-shadow:inset 0 0 0 1px #edf2fb!important}
.profit-donut>div{position:relative!important;z-index:1!important;display:grid!important;place-items:center!important;text-align:center!important;gap:2px!important}
.profit-donut strong{font-size:17px!important;color:#183153!important;font-weight:900!important}
.profit-donut span{font-size:12px!important;color:#64748b!important}
.profit-chart-legend{display:grid!important;gap:14px!important}
.profit-chart-legend div{display:grid!important;grid-template-columns:auto 1fr auto!important;gap:10px!important;align-items:center!important}
.profit-chart-legend small{font-size:14px!important;color:#334155!important}
.profit-chart-legend strong{font-size:14px!important;color:#183153!important}
.profit-chart-legend p{margin:8px 0 0!important;color:#64748b!important;font-size:13px!important}
.profit-detail-search{max-width:320px!important;min-width:250px!important}
.profit-detail-search input{width:100%!important;border:none!important;background:transparent!important;outline:none!important;font-size:14px!important}
.profit-detail-table{min-width:1050px!important}
.profit-positive{color:#16a34a!important;font-weight:900!important}
.profit-pagination-card{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;margin-top:14px!important;flex-wrap:wrap!important}
.profit-pagination-card select{height:40px!important;border-radius:12px!important;border:1px solid #d9e2f1!important;padding:0 12px!important;background:#fff!important}
.profit-report-detail-modal{max-width:820px!important}
.profit-report-detail-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
.profit-report-detail-grid article{padding:14px!important;border:1px solid #e6edf7!important;border-radius:14px!important;background:#fbfdff!important;display:grid!important;gap:6px!important}
.profit-report-detail-grid article.span-3{grid-column:1 / -1!important}
.profit-report-detail-grid small{font-size:12px!important;color:#64748b!important;font-weight:800!important}
.profit-report-detail-grid strong{font-size:15px!important;color:#183153!important}
@media(max-width:1560px){.profit-report-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}}
@media(max-width:1380px){.profit-report-content{grid-template-columns:1fr!important}}
@media(max-width:1280px){.profit-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.profit-report-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}.profit-report-filters>.primary-button,.profit-report-filters>.secondary-button{width:100%!important;justify-content:center!important}.profit-donut-layout{grid-template-columns:1fr!important;justify-items:center!important;text-align:center!important}}
@media(max-width:760px){.profit-report-detail-grid{grid-template-columns:1fr!important}.profit-report-detail-grid article.span-3{grid-column:auto!important}}
@media(max-width:640px){.profit-report-filters,.profit-kpi-grid{grid-template-columns:1fr!important}}
@media print{.profit-report-filters .primary-button,.profit-report-filters .secondary-button,.profit-pagination-card,.mini-view-button,.sidebar,.topbar{display:none!important}.profit-report-module{gap:10px!important}.profit-report-content,.profit-kpi-grid{grid-template-columns:1fr!important}.profit-detail-card,.profit-summary-card,.profit-chart-card,.profit-kpi,.profit-report-hero,.profit-report-filters{break-inside:avoid!important}.profit-donut-layout{grid-template-columns:1fr!important}}

/* AVANCE 038: controles contenidos del reporte de rentabilidad */
.profit-report-filters .profit-export-button{
  min-height:44px!important;
  padding:0 16px!important;
  border:1px solid #b8c9df!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#173b6c!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.profit-report-filters .profit-export-button:hover{background:#f7faff!important;border-color:#7fa4d4!important;transform:translateY(-1px)!important}
.profit-report-filters .profit-export-button:focus-visible{outline:3px solid rgba(47,111,237,.18)!important;outline-offset:2px!important}
.profit-report-filters .profit-export-button-pdf i{color:#ef4444!important}
.profit-report-filters .profit-export-button-excel i{color:#16a34a!important}
.profit-summary-table .profit-summary-view-button{
  min-width:74px!important;
  min-height:38px!important;
  padding:0 12px!important;
  border:1px solid #c7d5e8!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#123f75!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.profit-summary-table .profit-summary-view-button:hover{background:#edf5ff!important;border-color:#79a2d5!important}
.profit-detail-card .profit-detail-search-contained{
  width:min(100%,360px)!important;
  max-width:360px!important;
  min-width:280px!important;
  height:48px!important;
  padding:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  border:1px solid #c8d6e8!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
.profit-detail-card .profit-detail-search-contained>i{
  width:48px!important;
  height:100%!important;
  flex:0 0 48px!important;
  display:grid!important;
  place-items:center!important;
  color:#2f6fed!important;
  background:#eef4ff!important;
  border-right:1px solid #d4dfef!important;
}
.profit-detail-card .profit-detail-search-contained input{
  flex:1 1 auto!important;
  min-width:0!important;
  height:100%!important;
  padding:0 16px!important;
  color:#172b4d!important;
}
.profit-detail-card .profit-detail-search-contained input::placeholder{color:#8190a6!important;opacity:1!important}
.profit-detail-card .profit-detail-search-contained:focus-within{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.12)!important}
html[data-theme="dark"] .profit-report-filters .profit-export-button,
html[data-theme="dark"] .profit-summary-table .profit-summary-view-button,
html[data-theme="dark"] .profit-detail-card .profit-detail-search-contained{background:#162337!important;border-color:#40536f!important;color:#e6eefb!important}
html[data-theme="dark"] .profit-detail-card .profit-detail-search-contained>i{background:#1d3150!important;border-right-color:#40536f!important}
html[data-theme="dark"] .profit-detail-card .profit-detail-search-contained input{color:#eef4ff!important}
@media(max-width:760px){
  .profit-detail-card>header{align-items:stretch!important;flex-direction:column!important}
  .profit-detail-card .profit-detail-search-contained{width:100%!important;max-width:none!important;min-width:0!important}
}

/* AVANCE 039: controles y distribución del reporte de incidencias */
.incidents-report-filters{
  grid-template-columns:minmax(128px,142px) minmax(128px,142px) minmax(180px,1fr) minmax(132px,150px) minmax(118px,135px) auto auto auto!important;
  gap:12px!important;
}
.incidents-report-filters .incidents-export-button{
  min-width:88px!important;
  min-height:44px!important;
  padding:0 14px!important;
  border:1px solid #b8c9df!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#173b6c!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.incidents-report-filters .incidents-export-button:hover{background:#f7faff!important;border-color:#7fa4d4!important;transform:translateY(-1px)!important}
.incidents-report-filters .incidents-export-button:focus-visible{outline:3px solid rgba(47,111,237,.18)!important;outline-offset:2px!important}
.incidents-report-filters .incidents-export-pdf i{color:#ef4444!important}
.incidents-report-filters .incidents-export-excel i{color:#16a34a!important}
.incidents-summary-table .incidents-view-button,
.incidents-detail-table .incidents-view-button{
  min-width:74px!important;
  min-height:38px!important;
  padding:0 12px!important;
  border:1px solid #c7d5e8!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#123f75!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.incidents-summary-table .incidents-view-button:hover,
.incidents-detail-table .incidents-view-button:hover{background:#edf5ff!important;border-color:#79a2d5!important}
.incidents-detail-card .incidents-detail-search-contained{
  width:min(100%,390px)!important;
  max-width:390px!important;
  min-width:280px!important;
  height:48px!important;
  padding:0!important;
  gap:0!important;
  overflow:hidden!important;
  border:1px solid #c8d6e8!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
.incidents-detail-card .incidents-detail-search-contained>i{
  width:48px!important;
  height:100%!important;
  flex:0 0 48px!important;
  display:grid!important;
  place-items:center!important;
  color:#2f6fed!important;
  background:#eef4ff!important;
  border-right:1px solid #d4dfef!important;
}
.incidents-detail-card .incidents-detail-search-contained input{height:100%!important;min-width:0!important;padding:0 16px!important}
.incidents-detail-card .incidents-detail-search-contained input::placeholder{color:#8190a6!important;opacity:1!important}
.incidents-detail-card .incidents-detail-search-contained:focus-within{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.12)!important}
html[data-theme="dark"] .incidents-report-filters .incidents-export-button,
html[data-theme="dark"] .incidents-summary-table .incidents-view-button,
html[data-theme="dark"] .incidents-detail-table .incidents-view-button,
html[data-theme="dark"] .incidents-detail-card .incidents-detail-search-contained{background:#162337!important;border-color:#40536f!important;color:#e6eefb!important}
html[data-theme="dark"] .incidents-detail-card .incidents-detail-search-contained>i{background:#1d3150!important;border-right-color:#40536f!important}
html[data-theme="dark"] .incidents-detail-card .incidents-detail-search-contained input{color:#eef4ff!important}
@media(max-width:1450px){
  .incidents-report-filters{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
  .incidents-report-filters>.primary-button,.incidents-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}
@media(max-width:760px){
  .incidents-detail-card>header{align-items:stretch!important;grid-template-columns:1fr!important}
  .incidents-detail-card .incidents-detail-search-contained{width:100%!important;max-width:none!important;min-width:0!important}
}

/* AVANCE 040: controles y distribución del reporte de delivery */
.delivery-report-filters{
  grid-template-columns:minmax(128px,142px) minmax(128px,142px) minmax(142px,1fr) minmax(132px,150px) minmax(145px,175px) auto auto auto!important;
  gap:12px!important;
}
.delivery-report-filters .delivery-export-button{
  min-width:88px!important;
  min-height:44px!important;
  padding:0 14px!important;
  border:1px solid #b8c9df!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#173b6c!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.delivery-report-filters .delivery-export-button:hover{background:#f7faff!important;border-color:#7fa4d4!important;transform:translateY(-1px)!important}
.delivery-report-filters .delivery-export-button:focus-visible{outline:3px solid rgba(47,111,237,.18)!important;outline-offset:2px!important}
.delivery-report-filters .delivery-export-pdf i{color:#ef4444!important}
.delivery-report-filters .delivery-export-excel i{color:#16a34a!important}
.delivery-summary-table .delivery-view-button{
  min-width:74px!important;
  min-height:38px!important;
  padding:0 12px!important;
  border:1px solid #c7d5e8!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#123f75!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.delivery-summary-table .delivery-view-button:hover{background:#edf5ff!important;border-color:#79a2d5!important}
.delivery-detail-card .delivery-detail-search-contained{
  width:min(100%,390px)!important;
  max-width:390px!important;
  min-width:280px!important;
  height:48px!important;
  padding:0!important;
  margin-bottom:16px!important;
  gap:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  border:1px solid #c8d6e8!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
.delivery-detail-card .delivery-detail-search-contained>i{
  width:48px!important;
  height:100%!important;
  flex:0 0 48px!important;
  display:grid!important;
  place-items:center!important;
  color:#2f6fed!important;
  background:#eef4ff!important;
  border-right:1px solid #d4dfef!important;
}
.delivery-detail-card .delivery-detail-search-contained input{height:100%!important;min-width:0!important;padding:0 16px!important;color:#172b4d!important}
.delivery-detail-card .delivery-detail-search-contained input::placeholder{color:#8190a6!important;opacity:1!important}
.delivery-detail-card .delivery-detail-search-contained:focus-within{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.12)!important}
html[data-theme="dark"] .delivery-report-filters .delivery-export-button,
html[data-theme="dark"] .delivery-summary-table .delivery-view-button,
html[data-theme="dark"] .delivery-detail-card .delivery-detail-search-contained{background:#162337!important;border-color:#40536f!important;color:#e6eefb!important}
html[data-theme="dark"] .delivery-detail-card .delivery-detail-search-contained>i{background:#1d3150!important;border-right-color:#40536f!important}
html[data-theme="dark"] .delivery-detail-card .delivery-detail-search-contained input{color:#eef4ff!important}
@media(max-width:1450px){
  .delivery-report-filters{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
  .delivery-report-filters>.primary-button,.delivery-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}
@media(max-width:760px){
  .delivery-detail-card .delivery-detail-search-contained{width:100%!important;max-width:none!important;min-width:0!important}
}

/* AVANCE 041: controles del reporte de inventario */
.inventory-report-filters .inventory-export-button{
  min-width:88px!important;
  min-height:44px!important;
  padding:0 14px!important;
  border:1px solid #b8c9df!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#173b6c!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.inventory-report-filters .inventory-export-button:hover{background:#f7faff!important;border-color:#7fa4d4!important;transform:translateY(-1px)!important}
.inventory-report-filters .inventory-export-button:focus-visible{outline:3px solid rgba(47,111,237,.18)!important;outline-offset:2px!important}
.inventory-report-filters .inventory-export-pdf i{color:#ef4444!important}
.inventory-report-filters .inventory-export-excel i{color:#16a34a!important}
.inventory-summary-table .inventory-view-button,
.inventory-detail-table .inventory-view-button{
  min-width:74px!important;
  min-height:38px!important;
  padding:0 12px!important;
  border:1px solid #c7d5e8!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#123f75!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.inventory-summary-table .inventory-view-button:hover,
.inventory-detail-table .inventory-view-button:hover{background:#edf5ff!important;border-color:#79a2d5!important}
.inventory-detail-card .inventory-detail-search-contained{
  width:min(100%,390px)!important;
  max-width:390px!important;
  min-width:280px!important;
  height:48px!important;
  padding:0!important;
  gap:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  border:1px solid #c8d6e8!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
.inventory-detail-card .inventory-detail-search-contained>i{
  width:48px!important;
  height:100%!important;
  flex:0 0 48px!important;
  display:grid!important;
  place-items:center!important;
  color:#2f6fed!important;
  background:#eef4ff!important;
  border-right:1px solid #d4dfef!important;
}
.inventory-detail-card .inventory-detail-search-contained input{height:100%!important;min-width:0!important;padding:0 16px!important;color:#172b4d!important}
.inventory-detail-card .inventory-detail-search-contained input::placeholder{color:#8190a6!important;opacity:1!important}
.inventory-detail-card .inventory-detail-search-contained:focus-within{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.12)!important}
html[data-theme="dark"] .inventory-report-filters .inventory-export-button,
html[data-theme="dark"] .inventory-summary-table .inventory-view-button,
html[data-theme="dark"] .inventory-detail-table .inventory-view-button,
html[data-theme="dark"] .inventory-detail-card .inventory-detail-search-contained{background:#162337!important;border-color:#40536f!important;color:#e6eefb!important}
html[data-theme="dark"] .inventory-detail-card .inventory-detail-search-contained>i{background:#1d3150!important;border-right-color:#40536f!important}
html[data-theme="dark"] .inventory-detail-card .inventory-detail-search-contained input{color:#eef4ff!important}
@media(max-width:760px){
  .inventory-detail-card>header{align-items:stretch!important;flex-direction:column!important}
  .inventory-detail-card .inventory-detail-search-contained{width:100%!important;max-width:none!important;min-width:0!important}
}

/* AVANCE 042: controles y distribución del reporte de caja */
.cash-report-filters{
  grid-template-columns:minmax(128px,142px) minmax(128px,142px) minmax(160px,1fr) minmax(145px,175px) minmax(125px,145px) auto auto auto!important;
  gap:12px!important;
}
.cash-report-filters .cash-export-button{
  min-width:92px!important;
  width:auto!important;
  height:52px!important;
  min-height:52px!important;
  padding:0 15px!important;
  border-radius:14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}
.cash-daily-table .cash-view-button{
  min-width:74px!important;
  min-height:38px!important;
  padding:0 12px!important;
  border:1px solid #c7d5e8!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#123f75!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.cash-daily-table .cash-view-button:hover{background:#edf5ff!important;border-color:#79a2d5!important}
.cash-daily-card .cash-daily-search-contained{
  width:min(100%,390px)!important;
  max-width:390px!important;
  min-width:280px!important;
  height:48px!important;
  padding:0!important;
  gap:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  border:1px solid #c8d6e8!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
.cash-daily-card .cash-daily-search-contained>i{
  width:48px!important;
  height:100%!important;
  flex:0 0 48px!important;
  display:grid!important;
  place-items:center!important;
  color:#2f6fed!important;
  background:#eef4ff!important;
  border-right:1px solid #d4dfef!important;
}
.cash-daily-card .cash-daily-search-contained input{height:100%!important;min-width:0!important;padding:0 16px!important;color:#172b4d!important}
.cash-daily-card .cash-daily-search-contained input::placeholder{color:#8190a6!important;opacity:1!important}
.cash-daily-card .cash-daily-search-contained:focus-within{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.12)!important}
html[data-theme="dark"] .cash-daily-table .cash-view-button,
html[data-theme="dark"] .cash-daily-card .cash-daily-search-contained{background:#162337!important;border-color:#40536f!important;color:#e6eefb!important}
html[data-theme="dark"] .cash-daily-card .cash-daily-search-contained>i{background:#1d3150!important;border-right-color:#40536f!important}
html[data-theme="dark"] .cash-daily-card .cash-daily-search-contained input{color:#eef4ff!important}
@media(max-width:1450px){
  .cash-report-filters{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
  .cash-report-filters>.primary-button,.cash-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}
@media(max-width:760px){
  .cash-daily-card .cash-daily-search-contained{width:100%!important;max-width:none!important;min-width:0!important}
}

/* AVANCE 043: paginación real y acciones del reporte de clientes */
.clients-type-table .clients-view-button,
.clients-highlight-table .clients-view-button{
  min-width:74px!important;min-height:38px!important;padding:0 12px!important;
  border:1px solid #c7d5e8!important;border-radius:10px!important;background:#fff!important;color:#123f75!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.clients-type-table .clients-view-button:hover,.clients-highlight-table .clients-view-button:hover{background:#edf5ff!important;border-color:#79a2d5!important}
.clients-highlight-search{margin:0!important}
.clients-highlight-search input[type="hidden"]{display:none!important}
.clients-per-page-form{margin:0!important}
.clients-pagination-card .table-pagination{display:flex!important;align-items:center!important;gap:8px!important}
.clients-pagination-card .table-pagination a,
.clients-pagination-card .table-pagination .pagination-disabled{
  width:40px!important;height:40px!important;border:1px solid #d8e2f1!important;border-radius:10px!important;
  display:grid!important;place-items:center!important;text-decoration:none!important;background:#fff!important;color:#2f6fed!important;
}
.clients-pagination-card .table-pagination a:hover{background:#edf5ff!important;border-color:#79a2d5!important}
.clients-pagination-card .table-pagination .pagination-disabled{color:#b8c4d5!important;background:#f8fafc!important;cursor:not-allowed!important}
.clients-pagination-card .pagination-current{min-width:70px!important;text-align:center!important;font-weight:800!important;color:#183153!important}
html[data-theme="dark"] .clients-type-table .clients-view-button,
html[data-theme="dark"] .clients-highlight-table .clients-view-button,
html[data-theme="dark"] .clients-pagination-card .table-pagination a{background:#162337!important;border-color:#40536f!important;color:#e6eefb!important}
html[data-theme="dark"] .clients-pagination-card .table-pagination .pagination-disabled{background:#111c2d!important;border-color:#30415a!important;color:#60718a!important}
html[data-theme="dark"] .clients-pagination-card .pagination-current{color:#e6eefb!important}

/* AVANCE 044: controles e icono del reporte de producción */
.production-report-filters{
  grid-template-columns:minmax(128px,142px) minmax(128px,142px) minmax(150px,1fr) minmax(135px,155px) minmax(135px,155px) auto auto auto!important;
  gap:12px!important;
}
.production-report-filters .production-export-button{
  min-width:92px!important;width:auto!important;height:52px!important;min-height:52px!important;padding:0 15px!important;
  border-radius:14px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
}
.production-kpi:first-child>span i{display:inline-block!important;font-size:22px!important;line-height:1!important}
.production-status-table .production-view-button{
  min-width:74px!important;min-height:38px!important;padding:0 12px!important;
  border:1px solid #c7d5e8!important;border-radius:10px!important;background:#fff!important;color:#123f75!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.production-status-table .production-view-button:hover{background:#edf5ff!important;border-color:#79a2d5!important}
html[data-theme="dark"] .production-status-table .production-view-button{background:#162337!important;border-color:#40536f!important;color:#e6eefb!important}
@media(max-width:1450px){
  .production-report-filters{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
  .production-report-filters>.primary-button,.production-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}

/* AVANCE 045: distribución y exportaciones del reporte de órdenes */
.orders-report-filters{
  grid-template-columns:minmax(128px,142px) minmax(128px,142px) minmax(150px,1fr) minmax(145px,170px) minmax(125px,145px) auto auto auto!important;
  gap:12px!important;
}
.orders-report-filters .orders-export-button{
  min-width:92px!important;width:auto!important;height:52px!important;min-height:52px!important;padding:0 15px!important;
  border-radius:14px!important;background:#fff!important;font-weight:800!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  box-shadow:0 3px 10px rgba(15,42,77,.06)!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease!important;
}
.orders-report-filters .orders-export-button:hover{transform:translateY(-1px)!important;box-shadow:0 8px 18px rgba(15,35,70,.10)!important}
.orders-report-filters .orders-export-pdf{color:#d93636!important;border:1.5px solid #f3bcbc!important}
.orders-report-filters .orders-export-pdf:hover{color:#b42323!important;background:#fff5f5!important;border-color:#ef9f9f!important}
.orders-report-filters .orders-export-excel{color:#18864b!important;border:1.5px solid #a9dfbe!important}
.orders-report-filters .orders-export-excel:hover{color:#116b3a!important;background:#f2fbf6!important;border-color:#80ce9d!important}
.orders-report-filters .orders-export-pdf i{color:#ef4444!important}
.orders-report-filters .orders-export-excel i{color:#16a34a!important}
.orders-report-filters .orders-export-button:focus-visible{outline:0!important;box-shadow:0 0 0 3px rgba(47,111,237,.14)!important}
html[data-theme="dark"] .orders-report-filters .orders-export-button{background:#142238!important}
html[data-theme="dark"] .orders-report-filters .orders-export-pdf{color:#ff9a9a!important;border-color:#7b3e49!important}
html[data-theme="dark"] .orders-report-filters .orders-export-excel{color:#8ee5ae!important;border-color:#356c4b!important}
@media(max-width:1450px){
  .orders-report-filters{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
  .orders-report-filters>.primary-button,.orders-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}

/* AVANCE 046: separación derecha del reporte de ventas */
.sales-report-filters{
  grid-template-columns:minmax(135px,150px) minmax(135px,150px) minmax(205px,1fr) minmax(185px,220px) auto auto auto!important;
  gap:14px!important;
  padding:22px 30px 22px 22px!important;
}
.sales-report-filters>.primary-button,.sales-report-filters>.secondary-button{justify-self:stretch!important}
@media(max-width:1450px){
  .sales-report-filters{grid-template-columns:repeat(4,minmax(150px,1fr))!important;padding:22px!important}
  .sales-report-filters>.primary-button,.sales-report-filters>.secondary-button{width:100%!important;justify-content:center!important}
}
@media(max-width:1280px){.sales-report-filters{grid-template-columns:repeat(2,minmax(150px,1fr))!important}}
@media(max-width:760px){.sales-report-filters{grid-template-columns:1fr!important}}

/* AVANCE 047: iconos de navegación en tarifas */
.tariff-scope-tabs a{gap:9px!important}
.tariff-scope-tabs .tariff-tab-icon{
  width:32px!important;height:32px!important;flex:0 0 32px!important;border-radius:9px!important;
  display:grid!important;place-items:center!important;background:#f1f5fa!important;color:#7b8ca5!important;
  transition:background .18s ease,color .18s ease,transform .18s ease!important;
}
.tariff-scope-tabs a:hover .tariff-tab-icon{background:#e8f0ff!important;color:#2f6fed!important;transform:translateY(-1px)!important}
.tariff-scope-tabs a.active .tariff-tab-icon{background:#e9f1ff!important;color:#2f6fed!important}
.tariff-scope-tabs .tariff-tab-icon i{font-size:14px!important;line-height:1!important}
html[data-theme="dark"] .tariff-scope-tabs .tariff-tab-icon{background:#1a2940!important;color:#8fa2bd!important}
html[data-theme="dark"] .tariff-scope-tabs a.active .tariff-tab-icon,
html[data-theme="dark"] .tariff-scope-tabs a:hover .tariff-tab-icon{background:#1c3761!important;color:#8fbbff!important}
@media(max-width:700px){
  .tariff-scope-tabs{overflow-x:auto!important;scrollbar-width:thin!important}
  .tariff-scope-tabs a{flex:0 0 auto!important;white-space:nowrap!important}
}

/* AVANCE 048: exportaciones del historial de clientes */
.history-orders-filters .history-export-button{
  min-width:92px!important;min-height:44px!important;padding:0 15px!important;border-radius:12px!important;
  background:#fff!important;font-weight:800!important;display:inline-flex!important;align-items:center!important;
  justify-content:center!important;gap:8px!important;box-shadow:0 2px 8px rgba(15,42,77,.05)!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease!important;
}
.history-orders-filters .history-export-button:hover{transform:translateY(-1px)!important;box-shadow:0 7px 16px rgba(15,35,70,.09)!important}
.history-orders-filters .history-export-pdf{color:#d93636!important;border:1.5px solid #f3bcbc!important}
.history-orders-filters .history-export-pdf:hover{color:#b42323!important;background:#fff5f5!important;border-color:#ef9f9f!important}
.history-orders-filters .history-export-excel{color:#18864b!important;border:1.5px solid #a9dfbe!important}
.history-orders-filters .history-export-excel:hover{color:#116b3a!important;background:#f2fbf6!important;border-color:#80ce9d!important}
.history-orders-filters .history-export-button:focus-visible{outline:0!important;box-shadow:0 0 0 3px rgba(47,111,237,.14)!important}
html[data-theme="dark"] .history-orders-filters .history-export-button{background:#142238!important}
html[data-theme="dark"] .history-orders-filters .history-export-pdf{color:#ff9a9a!important;border-color:#7b3e49!important}
html[data-theme="dark"] .history-orders-filters .history-export-excel{color:#8ee5ae!important;border-color:#356c4b!important}


/* Directorio de clientes: filtros, columnas y acciones */
.customer-filter-toolbar{align-items:stretch;display:grid;grid-template-columns:minmax(260px,1.65fr) minmax(180px,.8fr) minmax(180px,.8fr) auto auto;gap:10px}
.customer-filter-toolbar .customer-search{height:48px}
.customer-filter-field{height:48px;border:1px solid #d9e2ed;border-radius:11px;background:#fff;padding:6px 12px;display:flex;flex-direction:column;justify-content:center;min-width:0}
.customer-filter-field span{font-size:9px;color:#718096;line-height:1.1}
.customer-filter-field select{border:0;outline:0;background:transparent;color:var(--navy);font-size:11px;font-weight:750;padding:1px 0 0;width:100%}
.customer-directory-table{min-width:1120px}.customer-directory-table th.actions-heading{text-align:center}.customer-directory-table td:last-child{width:150px}
.customer-row-actions{align-items:center;justify-content:center;gap:8px;white-space:nowrap}
.customer-action-icon{width:38px!important;height:38px!important;border-radius:11px!important;font-size:14px;background:#fff!important}
.customer-action-icon:hover{border-color:#a9c3e9!important;background:#f5f9ff!important;color:#075acb!important}
.customer-status-form{margin:0;display:inline-flex}
.customer-status-switch{width:48px;height:28px;border:0;border-radius:999px;background:#cfd7e3;padding:3px;cursor:pointer;transition:background .2s ease;display:flex;align-items:center}
.customer-status-switch span{width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(15,35,65,.22);transform:translateX(0);transition:transform .2s ease}
.customer-status-switch.is-active{background:#0b63e5}.customer-status-switch.is-active span{transform:translateX(20px)}
.customer-status-switch:focus-visible{outline:3px solid rgba(47,111,237,.25);outline-offset:2px}
.customer-directory-table tr.inactive-row td{background:#fbfcfe;color:#7a8799}.customer-directory-table tr.inactive-row .customer-avatar{filter:grayscale(.5);opacity:.72}
@media(max-width:1150px){.customer-filter-toolbar{grid-template-columns:1fr 1fr}.customer-filter-toolbar .customer-search{grid-column:1/-1}.customer-filter-toolbar .secondary-button{min-width:120px}}
@media(max-width:650px){.customer-filter-toolbar{grid-template-columns:1fr}.customer-filter-toolbar .customer-search{grid-column:auto}}

/* =========================================================
   CLIENTES - HISTORIAL GENERAL DE ÓRDENES PROFESIONAL
   ========================================================= */
.history-orders-module{display:grid;gap:18px}
.history-orders-filters{display:grid!important;grid-template-columns:minmax(320px,1.7fr) minmax(150px,.7fr) minmax(160px,.8fr) minmax(150px,.7fr) minmax(150px,.7fr) auto auto auto!important;gap:16px!important;align-items:end!important;padding:22px!important}
.history-orders-filters label span{display:block!important;font-size:12px!important;color:#64748b!important;font-weight:800!important;margin-bottom:7px!important}
.history-orders-filters input,.history-orders-filters select{width:100%!important;height:44px!important;border:1px solid #d9e2f1!important;border-radius:14px!important;padding:0 14px!important;background:#fff!important;color:#0f172a!important;font-size:14px!important;outline:0!important}
.history-orders-filters input:focus,.history-orders-filters select:focus{border-color:#2f6fed!important;box-shadow:0 0 0 3px rgba(47,111,237,.10)!important}
.history-search-field{height:44px!important;border:1px solid #d9e2f1!important;border-radius:14px!important;background:#fff!important;display:flex!important;align-items:center!important;overflow:hidden!important}
.history-search-field i{width:44px!important;height:100%!important;display:grid!important;place-items:center!important;color:#71839a!important}
.history-search-field input{border:0!important;background:transparent!important;height:100%!important;padding:0 12px 0 0!important;box-shadow:none!important}
.history-orders-filters>.primary-button,.history-orders-filters>.secondary-button{white-space:nowrap!important;min-width:max-content!important}
.history-export-pdf i{color:#ef4444!important}.history-export-excel i{color:#16a34a!important}
.history-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important}
.history-kpi{display:flex!important;gap:16px!important;align-items:center!important;padding:20px!important}
.history-kpi>span{width:56px!important;height:56px!important;border-radius:18px!important;display:grid!important;place-items:center!important;background:#edf7ff!important;color:#2f6fed!important;font-size:24px!important;flex:0 0 auto!important}
.history-kpi.warning>span{background:#fff5df!important;color:#f59e0b!important}.history-kpi.success>span{background:#eaf9ef!important;color:#16a34a!important}.history-kpi.purple>span{background:#f4edff!important;color:#7c3aed!important}
.history-kpi small{font-size:14px!important;color:#64748b!important;font-weight:800!important;display:block!important}.history-kpi strong{font-size:24px!important;color:#0f2a4d!important;display:block!important;margin-top:4px!important}
.history-orders-card{padding:0!important;overflow:hidden!important}.history-orders-card header{padding:20px 24px 14px!important;border-bottom:1px solid #e8eef7!important}.history-orders-card h3{margin:0!important;font-size:20px!important;color:#0f2a4d!important}.history-orders-card p{margin:3px 0 0!important;color:#64748b!important;font-size:13px!important}
.history-table-wrap{overflow:auto!important}.history-orders-table{width:100%!important;border-collapse:separate!important;border-spacing:0!important;min-width:1100px!important}.history-orders-table th{font-size:12px!important;text-transform:uppercase!important;letter-spacing:.035em!important;color:#64748b!important;background:#f8fafc!important;text-align:left!important;padding:14px 18px!important;border-bottom:1px solid #e8eef7!important}.history-orders-table td{padding:14px 18px!important;border-bottom:1px solid #edf2f7!important;font-size:14px!important;color:#183153!important;vertical-align:middle!important}.history-orders-table tr:hover td{background:#fbfdff!important}.history-orders-table td strong{font-weight:900!important;color:#0f2a4d!important}.history-row-actions{display:flex!important;gap:9px!important;align-items:center!important;justify-content:flex-start!important}.history-action-icon{width:38px!important;height:38px!important;border:1px solid #dbe5f2!important;background:#fff!important;border-radius:11px!important;color:#0d3f7c!important;display:grid!important;place-items:center!important;text-decoration:none!important;cursor:pointer!important}.history-action-icon:hover{border-color:#2f6fed!important;background:#f3f7ff!important}.history-status-switch{width:48px!important;height:28px!important;border:0!important;border-radius:999px!important;background:#cfd7e3!important;padding:3px!important;cursor:pointer!important;transition:background .2s ease!important;display:flex!important;align-items:center!important}.history-status-switch span{width:22px!important;height:22px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 2px 5px rgba(15,35,65,.22)!important;transform:translateX(0)!important;transition:transform .2s ease!important}.history-status-switch.is-active{background:#0b63e5!important}.history-status-switch.is-active span{transform:translateX(20px)!important}
.history-pagination-card{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:16px 18px!important;flex-wrap:wrap!important}.history-pagination-card select{height:42px!important;border-radius:12px!important;border:1px solid #d9e2f1!important;padding:0 12px!important;background:#fff!important;color:#0f2a4d!important}.history-order-detail-modal{max-width:760px!important}.history-order-detail-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}.history-order-detail-grid article{padding:14px!important;border:1px solid #e6edf7!important;border-radius:14px!important;background:#fbfdff!important;display:grid!important;gap:6px!important}.history-order-detail-grid article.span-2{grid-column:span 2!important}.history-order-detail-grid small{font-size:12px!important;color:#64748b!important;font-weight:800!important}.history-order-detail-grid strong{font-size:15px!important;color:#183153!important;word-break:break-word!important}
@media(max-width:1560px){.history-orders-filters{grid-template-columns:repeat(4,minmax(180px,1fr)) auto auto auto!important}.history-search-field{grid-column:1 / -1!important}}
@media(max-width:1200px){.history-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.history-orders-filters{grid-template-columns:repeat(3,minmax(180px,1fr))!important}.history-orders-filters>.primary-button,.history-orders-filters>.secondary-button{width:100%!important;justify-content:center!important}}
@media(max-width:760px){.history-orders-filters,.history-kpi-grid{grid-template-columns:1fr!important}.history-search-field{grid-column:auto!important}.history-order-detail-grid{grid-template-columns:1fr!important}.history-order-detail-grid article.span-2{grid-column:auto!important}}
@media print{.history-orders-filters .primary-button,.history-orders-filters .secondary-button,.history-pagination-card,.history-action-icon,.history-status-switch,.sidebar,.topbar{display:none!important}.history-orders-module{gap:10px!important}.history-kpi-grid{grid-template-columns:repeat(2,1fr)!important}.history-orders-card,.history-kpi,.history-orders-hero,.history-orders-filters{break-inside:avoid!important}}


/* =========================================================
   SIDEBAR ORGANIZADO POR SECCIONES
   - Solo visible con sidebar expandido.
   - En sidebar colapsado no se muestran separadores.
   ========================================================= */
.sidebar-section{
  margin:18px 10px 8px!important;
  padding:0 0 7px!important;
  border-bottom:1px solid #cfd9e8!important;
  color:#15345a!important;
  font-size:11px!important;
  font-weight:900!important;
  letter-spacing:.055em!important;
  text-transform:uppercase!important;
  line-height:1.1!important;
  white-space:nowrap!important;
}
.sidebar-section:first-child{margin-top:8px!important}
.sidebar-section span{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important}
.sidebar.collapsed .sidebar-section{display:none!important}
.sidebar.collapsed .sidebar-nav{padding-top:8px!important}
.sidebar.collapsed .nav-group + .sidebar-section,
.sidebar.collapsed .nav-link + .sidebar-section{display:none!important}


/* Nueva orden compacta - adaptación operativa */
.compact-order-page{max-width:1500px;margin:0 auto}.compact-order-card{background:#fff;border:1px solid #dbe5f0;border-radius:22px;box-shadow:0 18px 48px rgba(15,50,90,.08);overflow:visible}.compact-order-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px 28px;border-bottom:1px solid #e5edf6}.compact-order-header h2{margin:4px 0 2px;font-size:1.45rem;color:#102f58}.compact-order-header p{margin:0;color:#75879e}.compact-order-header-actions{display:flex;gap:10px;flex-wrap:wrap}.compact-order-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;padding:22px}.compact-order-main{display:grid;gap:16px}.compact-section{border:1px solid #dfe8f2;border-radius:16px;background:#fff;padding:18px}.compact-section-title{display:flex;align-items:center;gap:10px;color:#123e73;font-weight:800;margin-bottom:14px}.compact-section-title i{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#eaf2ff;color:#1557a0}.compact-fields-grid{display:grid;gap:12px}.compact-fields-3{grid-template-columns:repeat(3,minmax(0,1fr))}.compact-new-customer{align-self:end;min-height:46px}.compact-customer-preview{display:flex;align-items:center;gap:12px;background:#f5f8fc;border:1px solid #dce6f1;border-radius:12px;padding:12px 14px;margin-top:12px}.compact-customer-preview>i{font-size:1.8rem;color:#1d5d9f}.compact-customer-preview div{display:flex;flex-direction:column}.compact-customer-preview span{font-size:.82rem;color:#75879e}.compact-customer-preview.empty>i{color:#aab8c8}.compact-mode-selector{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.mode-pill{display:flex;align-items:center;gap:8px;border:1px solid #cedbeb;border-radius:10px;padding:10px 13px;cursor:pointer;color:#415a77;background:#fff;font-weight:700}.mode-pill input{position:absolute;opacity:0}.mode-pill.active{background:#123f76;border-color:#123f76;color:#fff;box-shadow:0 8px 20px rgba(18,63,118,.18)}.compact-notes{display:block;margin-top:12px}.quick-item-row{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(180px,1fr) 120px 110px auto;gap:10px;align-items:end}.quick-add{min-height:46px;white-space:nowrap}.compact-items-table-wrap{margin-top:14px;border:1px solid #dfe8f2;border-radius:12px;overflow:hidden}.compact-items-table thead th{background:#e8f0ff;color:#183d6c}.compact-items-table td small{display:block;color:#7c8ca1;margin-top:3px}.table-inline-input{width:90px;border:1px solid #ccd9e8;border-radius:8px;padding:8px;text-align:right}.compact-empty-items{display:flex;min-height:150px;align-items:center;justify-content:center;flex-direction:column;gap:6px;color:#7c8ca1}.compact-empty-items i{font-size:2rem;color:#9cb3cc}.compact-empty-items strong{color:#344b65}.compact-order-summary{position:sticky;top:92px;height:max-content;border:1px solid #dbe5f0;border-radius:18px;background:#fbfdff;padding:18px;box-shadow:0 14px 35px rgba(24,62,105,.08)}.summary-generate-button{width:100%;margin-top:15px;justify-content:center}.icon-action{border:0;background:#edf4ff;color:#14599e;width:34px;height:34px;border-radius:8px;cursor:pointer}.icon-action.danger{background:#fff0f0;color:#dc3545}.hidden{display:none!important}
@media(max-width:1180px){.compact-order-grid{grid-template-columns:1fr}.compact-order-summary{position:static}.compact-fields-3{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-item-row{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-add{grid-column:span 2}.compact-new-customer{align-self:stretch}}
@media(max-width:700px){.compact-order-header{align-items:flex-start;flex-direction:column}.compact-order-header-actions{width:100%}.compact-order-header-actions>*{flex:1;justify-content:center}.compact-order-grid{padding:12px}.compact-section{padding:14px}.compact-fields-3,.quick-item-row{grid-template-columns:1fr}.quick-add{grid-column:auto}.field.span-2{grid-column:auto}.compact-mode-selector{display:grid;grid-template-columns:1fr 1fr}.compact-items-table{min-width:850px}}

/* Ajustes finales de Nueva orden: una sola acción y selector vertical */
.compact-order-header{justify-content:flex-start}
.compact-order-header-actions{display:none!important}
.customer-combobox{position:relative;min-width:0}
.customer-results{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:120;display:block;max-height:360px;overflow-y:auto;overflow-x:hidden;background:#fff;border:1px solid #cfdbea;border-radius:14px;box-shadow:0 18px 42px rgba(20,49,84,.18);padding:6px}
.customer-results[hidden]{display:none!important}
.customer-result-option{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:12px;border:0;border-bottom:1px solid #edf2f7;background:#fff;padding:11px 12px;text-align:left;cursor:pointer;color:#18324f;font-family:inherit}
.customer-result-option:last-child{border-bottom:0}
.customer-result-option:hover,.customer-result-option:focus{background:#f3f7fc;outline:0}
.customer-result-option .customer-result-avatar{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:#eaf2ff;color:#124b87;flex:0 0 auto}
.customer-result-copy{display:block;min-width:0}
.customer-result-copy strong{display:block;font-size:.93rem;line-height:1.25;color:#132f50;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.customer-result-copy small{display:block;margin-top:4px;font-size:.78rem;line-height:1.3;color:#71839a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.customer-result-empty{padding:18px;text-align:center;color:#71839a;font-size:.86rem}
.customer-results::-webkit-scrollbar{width:8px}.customer-results::-webkit-scrollbar-track{background:#f5f7fa;border-radius:999px}.customer-results::-webkit-scrollbar-thumb{background:#b8c6d6;border-radius:999px}
@media(max-width:700px){.customer-results{max-height:300px}.customer-result-copy strong,.customer-result-copy small{white-space:normal}}

/* Nueva orden: formulario de ancho completo sin resumen lateral */
.compact-order-grid{grid-template-columns:minmax(0,1fr)}
.compact-order-main{width:100%}
.compact-final-summary{background:#f9fbfe}
.final-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.final-summary-item,.final-summary-total{display:flex;flex-direction:column;gap:5px;border:1px solid #dce6f1;border-radius:12px;background:#fff;padding:13px 14px;min-width:0}
.final-summary-item span,.final-summary-total span{font-size:.78rem;color:#74869d}
.final-summary-item strong{color:#173d69;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.final-summary-total{background:#123f76;border-color:#123f76;color:#fff}
.final-summary-total span,.final-summary-total strong{color:#fff}
.final-summary-total strong{font-size:1.35rem}
.compact-submit-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:15px;padding-top:15px;border-top:1px solid #dce6f1}
.compact-submit-row p{display:flex;align-items:center;gap:8px;margin:0;color:#6f8298;font-size:.86rem}
.compact-submit-row p i{color:#1d5d9f}
.compact-final-generate{min-width:190px;justify-content:center}
@media(max-width:1000px){.final-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.final-summary-grid{grid-template-columns:1fr}.compact-submit-row{align-items:stretch;flex-direction:column}.compact-final-generate{width:100%}}

/* ===== Detalle de orden y acciones rápidas (AVANCE 13) ===== */
.order-list-actions{gap:8px;flex-wrap:nowrap}.order-list-actions form{margin:0}.action-button.disabled,.action-button:disabled{opacity:.42;cursor:not-allowed;filter:grayscale(.35)}
.production-card-focused{outline:3px solid rgba(37,99,235,.24);box-shadow:0 0 0 7px rgba(37,99,235,.08),0 18px 45px rgba(15,23,42,.12)}
@keyframes productionFocusPulse{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}.production-card-pulse{animation:productionFocusPulse .7s ease 2}
.order-breadcrumb{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:#71809a;font-size:13px}.order-breadcrumb a{color:#52647f;text-decoration:none}.order-breadcrumb i{font-size:9px}.order-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:18px}.order-detail-heading h1{margin:0;color:#102f5c;font-size:25px}.order-detail-heading p{margin:5px 0 0;color:#76859d}.order-detail-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.order-detail-top-actions form{margin:0}.detail-outline-button,.detail-primary-button,.detail-back-button{min-height:44px;border-radius:9px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font:inherit;font-weight:700;text-decoration:none;cursor:pointer}.detail-outline-button{border:1px solid #ced9e8;background:#fff;color:#123d74}.detail-outline-button:hover{border-color:#7fa4d5;background:#f7faff}.detail-outline-button.danger{color:#e32e2e}.detail-outline-button.whatsapp{color:#13a85b}.detail-outline-button:disabled{opacity:.45;cursor:not-allowed}.detail-primary-button{border:0;background:#123f78;color:#fff}.detail-back-button{order:-1;border:1px solid #dce4ee;background:#fff;color:#4f647f;padding:0 14px}
.order-overview-card{padding:24px 26px;margin-bottom:16px}.order-overview-identity{display:flex;align-items:center;gap:18px;margin-bottom:23px}.order-overview-icon{width:70px;height:70px;border-radius:50%;display:grid;place-items:center;background:#eef4fb;color:#154b87;font-size:28px}.order-code-line{display:flex;align-items:center;gap:12px}.order-code-line h2{margin:0;font-size:24px;color:#153660}.order-overview-identity small{color:#8290a5}.order-overview-data{display:grid;grid-template-columns:1.35fr repeat(6,minmax(105px,1fr));gap:0}.order-overview-data>div{min-width:0;padding:0 20px;border-left:1px solid #e3e9f1}.order-overview-data>div:first-child{border-left:0;padding-left:96px}.order-overview-data span,.order-overview-data small{display:block;color:#8190a6;font-size:12px}.order-overview-data strong{display:block;color:#172f52;margin:6px 0 4px;font-size:14px}.order-overview-data .overview-total{font-size:23px;color:#113f79}
.order-quick-actions{display:flex;align-items:stretch;padding:0;margin-bottom:16px;overflow:hidden}.order-quick-actions form{display:flex;flex:1;margin:0}.quick-action{flex:1;min-height:68px;border:0;border-right:1px solid #e1e7ef;background:#fff;color:#143d72;display:flex;align-items:center;justify-content:center;gap:11px;font:inherit;font-weight:700;text-decoration:none;cursor:pointer}.quick-action:hover:not(:disabled){background:#f7faff}.quick-action:disabled{opacity:.4;cursor:not-allowed}.quick-action i{font-size:20px}.quick-action.featured{margin:12px;min-height:46px;border-radius:8px;border:0;background:#123f78;color:#fff}.order-detail-note{display:flex;gap:14px;align-items:flex-start;margin-bottom:16px}.order-detail-note i{color:#2b6cb0;margin-top:3px}.order-detail-note p{margin:4px 0 0;color:#607089}.order-items-panel{padding:0;margin-bottom:16px;overflow:hidden}.order-items-panel header{padding:18px 20px 4px}.order-items-panel h3{margin:0;color:#19395f}.order-detail-table th,.order-detail-table td{padding:15px 18px}.order-detail-table th{background:#f6f8fb}.order-financial-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:16px}.finance-card{background:#fff;border:1px solid #e1e7ef;border-radius:13px;padding:18px;display:flex;align-items:center;gap:14px;box-shadow:0 8px 24px rgba(15,42,75,.04)}.finance-card i{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;background:#eef5fb;color:#164f8e}.finance-card span{display:block;color:#7f8da2;font-size:12px}.finance-card strong{display:block;margin-top:5px;font-size:19px;color:#173b67}.finance-card.balance i,.finance-card.balance strong{color:#ec3333}.finance-card.balance i{background:#fff0f0}.finance-card.total{background:#123f78;border-color:#123f78}.finance-card.total i{background:rgba(255,255,255,.14);color:#fff}.finance-card.total span,.finance-card.total strong{color:#fff}
.order-history{padding:0;overflow:hidden;margin-bottom:16px}
.order-history summary{list-style:none;cursor:pointer;padding:22px 26px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e6edf5;color:#173b67;font-weight:800;font-size:16px}
.order-history summary::-webkit-details-marker{display:none}
.order-history-summary-left{display:flex;align-items:center;gap:16px}
.order-history-summary-left .fa-clock-rotate-left{font-size:28px;color:#18457d}
.order-history-caret{font-size:18px;color:#173b67;transition:transform .2s ease}
.order-history:not([open]) .order-history-caret{transform:-webkit-rotate(-90deg);transform:rotate(-90deg)}
.order-history-count{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 14px;border-radius:14px;background:#eef4fb;color:#5b6f8c;font-weight:800}
.order-history-list{padding:18px 26px 12px}
.order-history-item{position:relative;display:grid;grid-template-columns:28px 1fr;gap:20px;padding:18px 0}
.order-history-item+.order-history-item{border-top:1px solid #edf2f7}
.order-history-item.empty{display:block;padding:6px 0 14px}
.order-history-item.empty p{margin:0;color:#73839a}
.order-history-marker{position:relative;width:22px;height:22px;border-radius:50%;background:var(--history-state-color,#4caf50);box-shadow:0 0 0 8px rgba(15,23,42,.03);margin-top:4px}
.order-history-item:not(:last-child) .order-history-marker::after{content:"";position:absolute;left:50%;top:28px;transform:translateX(-50%);width:2px;height:calc(100% + 34px);background:#e7edf4}
.order-history-content{min-width:0}
.order-history-meta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.order-history-meta time{font-size:17px;color:#70829b;font-weight:700}
.order-history-content p{margin:0;color:#163154;font-size:18px;line-height:1.45}
@media(max-width:680px){.order-history summary{padding:18px}.order-history-summary-left{gap:12px;flex-wrap:wrap}.order-history-summary-left .fa-clock-rotate-left{font-size:24px}.order-history-list{padding:14px 18px 8px}.order-history-item{grid-template-columns:20px 1fr;gap:14px}.order-history-marker{width:16px;height:16px;box-shadow:none}.order-history-item:not(:last-child) .order-history-marker::after{top:22px;height:calc(100% + 28px)}.order-history-meta time{font-size:15px}.order-history-content p{font-size:16px}}

@media(max-width:1450px){.order-overview-data{grid-template-columns:repeat(4,1fr);row-gap:20px}.order-overview-data>div,.order-overview-data>div:first-child{padding:0 16px;border-left:1px solid #e3e9f1}.order-overview-data>div:nth-child(1),.order-overview-data>div:nth-child(5){border-left:0}.order-financial-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1050px){.order-detail-heading{flex-direction:column}.order-detail-top-actions{justify-content:flex-start}.order-overview-data{grid-template-columns:repeat(2,1fr)}.order-overview-data>div:nth-child(odd){border-left:0}.order-quick-actions{display:grid;grid-template-columns:repeat(3,1fr)}.quick-action{border-bottom:1px solid #e1e7ef}.order-financial-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){.order-detail-top-actions>*{flex:1}.order-overview-data{grid-template-columns:1fr}.order-overview-data>div{border-left:0!important;border-top:1px solid #e6ebf2;padding:12px 0!important}.order-overview-data>div:first-child{border-top:0}.order-quick-actions{grid-template-columns:repeat(2,1fr)}.order-financial-summary{grid-template-columns:1fr}}


/* Corrección visual del botón destacado Producción/Entregar */
.quick-action.featured:hover:not(:disabled),
.quick-action.featured:focus-visible:not(:disabled){
  background:#0d3262;
  color:#fff;
  box-shadow:0 8px 18px rgba(18,63,120,.24);
  transform:translateY(-1px);
}
.quick-action.featured:hover:not(:disabled) i,
.quick-action.featured:hover:not(:disabled) span,
.quick-action.featured:focus-visible:not(:disabled) i,
.quick-action.featured:focus-visible:not(:disabled) span{
  color:#fff;
}
.quick-action.featured:disabled{
  background:#eef3f9;
  color:#c5cfdd;
  opacity:1;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}
.quick-action.featured:disabled i,
.quick-action.featured:disabled span{
  color:#c5cfdd;
}

/* Dashboard simplificado con datos reales */
.dashboard-kpis-clean .kpi-card{min-height:145px}
.dashboard-kpis-clean .kpi-card small{font-weight:700;color:#708199}
.dashboard-kpis-clean .trend-up{color:#079455!important}.dashboard-kpis-clean .trend-down{color:#d92d20!important}.dashboard-kpis-clean .trend-neutral{color:#667085!important}
.dashboard-main-clean{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,.95fr);gap:20px;margin-top:20px}
.dashboard-weekly-panel,.dashboard-status-clean{min-height:390px}
.dashboard-weekly-panel .panel-head strong .trend-up{color:#079455}.dashboard-weekly-panel .panel-head strong .trend-down{color:#d92d20}.dashboard-weekly-panel .panel-head strong .trend-neutral{color:#667085}
.real-income-chart{position:relative;height:300px;margin-top:18px;padding-bottom:36px}
.real-income-chart svg{width:100%;height:245px;overflow:visible}
.chart-grid-lines line{stroke:#e7edf5;stroke-width:1}
.real-chart-labels{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;color:#718096;font-size:12px;text-align:center;margin:0 20px}
.chart-empty-message{position:absolute;inset:72px 30px auto;display:flex;align-items:center;justify-content:center;color:#718096;background:rgba(255,255,255,.84);padding:18px;border-radius:12px}
.dashboard-status-clean .donut{flex:0 0 170px}
.dashboard-recent-panel{margin-top:20px;padding:22px}
.dashboard-recent-table{min-width:900px!important}
.dashboard-recent-table th,.dashboard-recent-table td{vertical-align:middle}
.dashboard-status-pill{display:inline-flex;align-items:center;padding:7px 11px;border-radius:999px;background:color-mix(in srgb,var(--dashboard-state) 14%,white);color:var(--dashboard-state);font-weight:800;font-size:12px;white-space:nowrap}
.dashboard-detail-link{display:inline-flex;align-items:center;gap:8px;color:#2f6fed;font-weight:800;white-space:nowrap}
.dashboard-detail-link:hover{color:#12396c}
.dashboard-empty-row{text-align:center!important;color:#718096;padding:42px!important}
@supports not (background:color-mix(in srgb,red 10%,white)){.dashboard-status-pill{background:#eef4ff}}
@media(max-width:1050px){.dashboard-main-clean{grid-template-columns:1fr}.dashboard-weekly-panel,.dashboard-status-clean{min-height:auto}}
@media(max-width:700px){.real-chart-labels{font-size:10px}.dashboard-recent-panel{padding:16px}}

/* =========================================================
   AVANCE 52 - DASHBOARD: CONTROLES CON BORDE VISIBLE
   Refuerza pestañas analíticas y acciones de órdenes recientes.
   ========================================================= */
.dashboard-tabs-panel .dashboard-tab{
  min-height:46px;
  border:1px solid #ccd9e9;
  background:#fff;
  color:#536985;
  box-shadow:0 2px 7px rgba(15,42,77,.035);
}

.dashboard-tabs-panel .dashboard-tab:not(.active):hover{
  border-color:#8eb0df;
  background:#f3f7ff;
  color:#174f95;
  box-shadow:0 6px 14px rgba(15,42,77,.08);
  transform:translateY(-1px);
}

.dashboard-tabs-panel .dashboard-tab.active,
.dashboard-tabs-panel .dashboard-tab[aria-selected="true"]{
  border-color:#17457f!important;
  background:#17457f!important;
  color:#fff!important;
}

.dashboard-orders-link,
.dashboard-detail-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  min-height:40px!important;
  padding:0 14px!important;
  border:1px solid #c9d8ea!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#174f95!important;
  font-weight:800!important;
  line-height:1!important;
  text-decoration:none!important;
  white-space:nowrap!important;
  box-shadow:0 2px 7px rgba(15,42,77,.035)!important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}

.dashboard-orders-link:hover,
.dashboard-detail-link:hover{
  border-color:#86aadd!important;
  background:#f3f7ff!important;
  color:#123e78!important;
  box-shadow:0 7px 16px rgba(15,42,77,.09)!important;
  transform:translateY(-1px);
}

.dashboard-orders-link:focus-visible,
.dashboard-detail-link:focus-visible,
.dashboard-tabs-panel .dashboard-tab:focus-visible{
  outline:0!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.17)!important;
}

.dashboard-detail-link{
  min-height:36px!important;
  padding:0 12px!important;
  font-size:.76rem!important;
}

html[data-theme="dark"] .dashboard-tabs-panel .dashboard-tab:not(.active){
  background:#101b2c;
  border-color:#344a68;
  color:#c7d4e6;
  box-shadow:none;
}

html[data-theme="dark"] .dashboard-tabs-panel .dashboard-tab:not(.active):hover{
  background:#172a43;
  border-color:#5579a8;
  color:#fff;
}

html[data-theme="dark"] .dashboard-orders-link,
html[data-theme="dark"] .dashboard-detail-link{
  background:#101b2c!important;
  border-color:#38506d!important;
  color:#cfe0f6!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .dashboard-orders-link:hover,
html[data-theme="dark"] .dashboard-detail-link:hover{
  background:#1a2d48!important;
  border-color:#5c7fae!important;
  color:#fff!important;
}

@media(max-width:700px){
  .dashboard-recent-panel>.panel-head{
    align-items:flex-start;
    gap:12px;
  }
  .dashboard-orders-link{
    min-height:38px!important;
    padding:0 12px!important;
    font-size:.74rem!important;
  }
  .dashboard-detail-link{
    min-width:104px;
  }
}

@media(max-width:520px){
  .dashboard-recent-panel>.panel-head{
    flex-direction:column;
  }
  .dashboard-orders-link{
    width:100%;
  }
}


/* =========================================================
   MODO OSCURO GLOBAL PROFESIONAL
   Se activa con: <html data-theme="dark">
   ========================================================= */
:root{
  --surface:#ffffff;
  --surface-soft:#f8fafc;
  --surface-raised:#ffffff;
  --surface-hover:#f3f7fc;
  --text-strong:#10213b;
  --text-soft:#6f7f95;
  --border-theme:#dfe6ef;
  --shadow-theme:0 10px 25px rgba(24,55,91,.05);
  --input-bg:#ffffff;
  --overlay-theme:rgba(9,23,43,.55);
}
html[data-theme="dark"]{
  --navy:#5d9cff;
  --blue:#72a7ff;
  --teal:#3fd1d6;
  --green:#50d68b;
  --orange:#ffbd45;
  --purple:#a987ff;
  --bg:#0b1220;
  --text:#e7eef9;
  --muted:#9aacbf;
  --line:#26364b;
  --surface:#111c2d;
  --surface-soft:#162337;
  --surface-raised:#18263a;
  --surface-hover:#1d2e45;
  --text-strong:#f2f6fc;
  --text-soft:#9aacbf;
  --border-theme:#2b3c53;
  --shadow-theme:0 12px 32px rgba(0,0,0,.28);
  --input-bg:#101b2b;
  --overlay-theme:rgba(2,7,16,.78);
  --scroll-track:#0e1827;
  --scroll-thumb:#40546d;
  --scroll-thumb-hover:#58708d;
}
html[data-theme="dark"],html[data-theme="dark"] body{background:var(--bg);color:var(--text)}
html[data-theme="dark"] body{color-scheme:dark}
html[data-theme="dark"] .app-shell,html[data-theme="dark"] .main-shell,html[data-theme="dark"] .page-content{background:var(--bg)}
html[data-theme="dark"] .sidebar,html[data-theme="dark"] .topbar{background:#0f1a2a;border-color:var(--line);box-shadow:none}
html[data-theme="dark"] .brand-copy strong,html[data-theme="dark"] .topbar h1,html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] h5,html[data-theme="dark"] h6{color:var(--text-strong)}
html[data-theme="dark"] .brand-copy span,html[data-theme="dark"] .topbar p,html[data-theme="dark"] small,html[data-theme="dark"] .muted{color:var(--text-soft)}
html[data-theme="dark"] .nav-link{color:#b7c5d8}
html[data-theme="dark"] .nav-link.active,html[data-theme="dark"] .nav-link:hover{background:#1b3150;color:#eef5ff;border-left-color:#72a7ff}
html[data-theme="dark"] .submenu a{color:#94a8c0}
html[data-theme="dark"] .submenu a:hover,html[data-theme="dark"] .submenu a.active{background:#172941;color:#e9f2ff;border-left-color:#72a7ff}
html[data-theme="dark"] .sidebar-section-title,html[data-theme="dark"] .nav-section-title{color:#7790ae;border-color:var(--line)}
html[data-theme="dark"] .support-box{background:#142238;border-color:var(--line)}

/* Superficies y tarjetas */
html[data-theme="dark"] .panel,html[data-theme="dark"] .kpi-card,html[data-theme="dark"] .management-card,html[data-theme="dark"] .summary-card,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .filter-card,html[data-theme="dark"] .content-card,html[data-theme="dark"] .dashboard-card,html[data-theme="dark"] .order-card,html[data-theme="dark"] .client-card,html[data-theme="dark"] .finance-card:not(.total),html[data-theme="dark"] .order-overview-card,html[data-theme="dark"] .order-items-panel,html[data-theme="dark"] .order-history,html[data-theme="dark"] .wizard-card,html[data-theme="dark"] .wizard-main,html[data-theme="dark"] .wizard-pane,html[data-theme="dark"] .live-order-summary,html[data-theme="dark"] .modal-window,html[data-theme="dark"] .profile-dropdown,html[data-theme="dark"] .notification-dropdown,html[data-theme="dark"] .shortcut-modal-card,html[data-theme="dark"] .app-dropdown,html[data-theme="dark"] .dropdown-menu{background:var(--surface)!important;border-color:var(--border-theme)!important;color:var(--text)!important;box-shadow:var(--shadow-theme)}
html[data-theme="dark"] .kpi-card.blue,html[data-theme="dark"] .kpi-card.orange,html[data-theme="dark"] .kpi-card.green,html[data-theme="dark"] .kpi-card.teal{background:var(--surface-raised)!important}
html[data-theme="dark"] .panel-head,html[data-theme="dark"] .card-header,html[data-theme="dark"] .table-header,html[data-theme="dark"] .modal-window>header,html[data-theme="dark"] .modal-window>form>footer,html[data-theme="dark"] .modal-window>footer{background:var(--surface)!important;border-color:var(--border-theme)!important}

/* Botones de cabecera y dropdowns */
html[data-theme="dark"] .top-icon-button,html[data-theme="dark"] .profile-trigger,html[data-theme="dark"] .search-box,html[data-theme="dark"] .global-search-trigger{background:var(--input-bg)!important;border-color:var(--border-theme)!important;color:var(--text)!important}
html[data-theme="dark"] .top-icon-button:hover,html[data-theme="dark"] .profile-trigger:hover,html[data-theme="dark"] .search-box:hover{background:var(--surface-hover)!important}
html[data-theme="dark"] .dark-mode-button[aria-pressed="true"]{background:#213b5d!important;color:#ffd66b!important;border-color:#3e5d83!important}
html[data-theme="dark"] .notification-item,html[data-theme="dark"] .profile-dropdown a,html[data-theme="dark"] .profile-dropdown button{color:var(--text)!important;border-color:var(--border-theme)!important}
html[data-theme="dark"] .notification-item:hover,html[data-theme="dark"] .profile-dropdown a:hover,html[data-theme="dark"] .profile-dropdown button:hover{background:var(--surface-hover)!important}

/* Formularios */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .input-shell,html[data-theme="dark"] .select-shell,html[data-theme="dark"] .search-input,html[data-theme="dark"] .form-control{background:var(--input-bg)!important;color:var(--text)!important;border-color:var(--border-theme)!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#71849d!important}
html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus,html[data-theme="dark"] .input-shell:focus-within{border-color:#72a7ff!important;box-shadow:0 0 0 3px rgba(114,167,255,.16)!important}
html[data-theme="dark"] select option{background:#111c2d;color:#e7eef9}
html[data-theme="dark"] input:disabled,html[data-theme="dark"] select:disabled,html[data-theme="dark"] textarea:disabled{background:#0d1726!important;color:#657991!important;opacity:1}
html[data-theme="dark"] label,html[data-theme="dark"] .field-label{color:#c4d1e2}
html[data-theme="dark"] .money-shell>b,html[data-theme="dark"] .input-addon{background:#1b2b41!important;color:#b7c8dc!important;border-color:var(--border-theme)!important}

/* Tablas */
html[data-theme="dark"] table,html[data-theme="dark"] .data-table,html[data-theme="dark"] .items-table{color:var(--text)}
html[data-theme="dark"] thead th,html[data-theme="dark"] .data-table th,html[data-theme="dark"] .items-table th{background:#162338!important;color:#aebdd0!important;border-color:var(--border-theme)!important}
html[data-theme="dark"] tbody td,html[data-theme="dark"] .data-table td,html[data-theme="dark"] .items-table td{background:transparent!important;color:var(--text)!important;border-color:var(--border-theme)!important}
html[data-theme="dark"] tbody tr:hover td{background:#17273c!important}
html[data-theme="dark"] .table-responsive,html[data-theme="dark"] .items-table-wrap{border-color:var(--border-theme)!important}

/* Botones */
html[data-theme="dark"] .outline-button,html[data-theme="dark"] .secondary-button,html[data-theme="dark"] .detail-outline-button,html[data-theme="dark"] .icon-action,html[data-theme="dark"] .action-button,html[data-theme="dark"] .pagination-button{background:var(--surface-raised)!important;border-color:#38506d!important;color:#dbe8f8!important}
html[data-theme="dark"] .outline-button:hover,html[data-theme="dark"] .secondary-button:hover,html[data-theme="dark"] .detail-outline-button:hover,html[data-theme="dark"] .icon-action:hover,html[data-theme="dark"] .action-button:hover{background:#223754!important;color:#fff!important}
html[data-theme="dark"] button:disabled,html[data-theme="dark"] .disabled{opacity:.5;cursor:not-allowed}
html[data-theme="dark"] .quick-action{background:var(--surface)!important;color:#dce9f8!important;border-color:var(--border-theme)!important}
html[data-theme="dark"] .quick-action:hover:not(:disabled){background:var(--surface-hover)!important;color:#fff!important}
html[data-theme="dark"] .quick-action.featured{background:#1e5b9f!important;color:#fff!important}
html[data-theme="dark"] .quick-action.featured:hover:not(:disabled){background:#174b84!important;color:#fff!important;box-shadow:0 8px 20px rgba(0,0,0,.3)}

/* Dashboard y gráficos */
html[data-theme="dark"] .fake-chart svg{border-color:var(--border-theme);background:repeating-linear-gradient(to bottom,transparent 0,transparent 66px,#25364c 67px)}
html[data-theme="dark"] .donut:after{background:var(--surface)}
html[data-theme="dark"] .donut strong{color:var(--text-strong)}
html[data-theme="dark"] .progress{background:#293950}
html[data-theme="dark"] .recent-orders-table,html[data-theme="dark"] .dashboard-orders{background:var(--surface)}
html[data-theme="dark"] canvas{filter:saturate(.96) brightness(.95)}

/* Wizard, selector de cliente y tarjetas de selección */
html[data-theme="dark"] .order-step,html[data-theme="dark"] .choice-card,html[data-theme="dark"] .review-card,html[data-theme="dark"] .selection-preview,html[data-theme="dark"] .payment-summary,html[data-theme="dark"] .empty-items,html[data-theme="dark"] .summary-help,html[data-theme="dark"] .information-banner{background:var(--surface-soft)!important;border-color:var(--border-theme)!important;color:var(--text)!important}
html[data-theme="dark"] .choice-card.active{background:#1a3150!important;border-color:#5d91d8!important}
html[data-theme="dark"] .customer-dropdown,html[data-theme="dark"] .customer-options,html[data-theme="dark"] .customer-results{background:var(--surface)!important;border-color:var(--border-theme)!important;box-shadow:0 18px 45px rgba(0,0,0,.38)!important}
html[data-theme="dark"] .customer-option,html[data-theme="dark"] .customer-result{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border-theme)!important}
html[data-theme="dark"] .customer-option:hover,html[data-theme="dark"] .customer-result:hover{background:var(--surface-hover)!important}

/* Detalle de orden */
html[data-theme="dark"] .order-overview-data>div{border-color:var(--border-theme)!important}
html[data-theme="dark"] .order-overview-data strong,html[data-theme="dark"] .order-code-line h2,html[data-theme="dark"] .order-items-panel h3,html[data-theme="dark"] .finance-card strong{color:var(--text-strong)}
html[data-theme="dark"] .finance-card.balance{background:#251a24!important;border-color:#5b3240!important}
html[data-theme="dark"] .order-history summary{border-color:var(--border-theme);color:var(--text-strong)}
html[data-theme="dark"] .order-history-item+.order-history-item{border-color:var(--border-theme)}
html[data-theme="dark"] .order-history-item:not(:last-child) .order-history-marker::after{background:#314258}
html[data-theme="dark"] .order-history-content p{color:#dce6f4}

/* Modales, overlays, alertas y menús */
html[data-theme="dark"] .modal-backdrop{background:var(--overlay-theme)}
html[data-theme="dark"] .modal-close{background:#1e2d43;color:#c6d4e5}
html[data-theme="dark"] .app-toast{background:#17263a!important;color:#edf4ff!important;border-color:#344b67!important;box-shadow:0 18px 45px rgba(0,0,0,.38)!important}
html[data-theme="dark"] .flash,html[data-theme="dark"] .alert,html[data-theme="dark"] .management-flash{color:var(--text)!important}

/* Etiquetas semánticas mantienen contraste */
html[data-theme="dark"] .status-badge,html[data-theme="dark"] .state-pill,html[data-theme="dark"] .badge{filter:saturate(.9) brightness(.92)}
html[data-theme="dark"] .stock-alert{background:#2a1920;border-color:#63313c}
html[data-theme="dark"] .empty-state,html[data-theme="dark"] .empty-state strong{color:#9fb0c5!important}

/* Componentes genéricos con fondos blancos residuales */
html[data-theme="dark"] [style*="background: #fff"],html[data-theme="dark"] [style*="background:#fff"],html[data-theme="dark"] [style*="background: white"],html[data-theme="dark"] [style*="background:white"]{background:var(--surface)!important}
html[data-theme="dark"] hr{border-color:var(--border-theme)}
html[data-theme="dark"] ::selection{background:#315f9c;color:#fff}

/* Scrollbars */
html[data-theme="dark"] *{scrollbar-color:var(--scroll-thumb) var(--scroll-track)}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:var(--scroll-track)}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:var(--scroll-thumb);border-color:var(--scroll-track)}
html[data-theme="dark"] ::-webkit-scrollbar-corner{background:var(--scroll-track)}

/* Transición controlada: evita animar dimensiones y romper layouts */
@media (prefers-reduced-motion:no-preference){
  html.theme-ready body,html.theme-ready .sidebar,html.theme-ready .topbar,html.theme-ready .panel,html.theme-ready .kpi-card,html.theme-ready input,html.theme-ready select,html.theme-ready textarea,html.theme-ready button,html.theme-ready a{transition:background-color .22s ease,color .22s ease,border-color .22s ease,box-shadow .22s ease}
}

/* Login restaurado con fondo fotográfico de lavandería, sin textos en el panel izquierdo */
.auth-shell.auth-shell-image{
    grid-template-columns:minmax(520px,58%) minmax(420px,42%);
    background:#f5f8fc;
}
.auth-brand-panel.auth-brand-image{
    padding:0;
    background-image:url('../img/login-lavanderia-bg.png');
    background-size:cover;
    background-position:left center;
    background-repeat:no-repeat;
    min-height:100vh;
}
.auth-brand-panel.auth-brand-image::after{display:none}
.auth-shell-image .auth-form-panel{
    position:relative;
    background:rgba(246,249,253,.92);
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
    padding:44px;
}
.auth-shell-image .login-card{
    width:min(500px,100%);
    padding:42px;
    border-radius:26px;
    box-shadow:0 26px 70px rgba(30,62,104,.15);
}
@media(max-width:1050px){
    .auth-shell.auth-shell-image{grid-template-columns:52% 48%}
    .auth-shell-image .auth-form-panel{padding:28px}
}
@media(max-width:900px){
    .auth-shell.auth-shell-image{
        display:grid;
        grid-template-columns:1fr;
        background-image:linear-gradient(rgba(244,248,253,.82),rgba(244,248,253,.9)),url('../img/login-lavanderia-bg.png');
        background-size:cover;
        background-position:left center;
    }
    .auth-shell-image .auth-brand-image{display:none}
    .auth-shell-image .auth-form-panel{background:transparent;min-height:100vh;padding:24px}
}

/* Páginas de error del sistema */
.public-error-body{margin:0;min-height:100vh;display:grid;place-items:center;background:#f3f7fc;padding:24px;font-family:inherit;color:#14355f}
.system-error-page{position:relative;min-height:430px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:54px 28px;overflow:hidden}
.public-error-body .system-error-page{width:min(680px,100%);min-height:430px;background:#fff;border:1px solid #dfe8f3;border-radius:24px;box-shadow:0 24px 70px rgba(15,53,95,.12)}
.system-error-code{position:absolute;inset:auto 0 20px;text-align:center;font-size:190px;line-height:1;font-weight:900;color:rgba(27,78,137,.045);pointer-events:none}
.system-error-icon{position:relative;width:82px;height:82px;border-radius:24px;display:grid;place-items:center;background:#eaf2ff;color:#2468d7;font-size:34px;margin-bottom:20px}
.system-error-page h1{position:relative;margin:0 0 12px;color:var(--text-primary,#14355f);font-size:30px}
.system-error-page p{position:relative;max-width:650px;margin:0;color:var(--text-muted,#73839a);font-size:16px;line-height:1.65}
.system-error-actions{position:relative;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:28px}
.system-error-actions a{text-decoration:none}
[data-theme="dark"] .public-error-body{background:#0b1422;color:#e7eef8}
[data-theme="dark"] .public-error-body .system-error-page{background:#111d2d;border-color:#26364a}
[data-theme="dark"] .system-error-code{color:rgba(91,151,230,.06)}
@media(max-width:640px){.system-error-page{min-height:360px;padding:38px 20px}.system-error-code{font-size:120px}.system-error-page h1{font-size:25px}}

/* Administración · Usuarios: tabla limpia y acciones completas */
.user-cell.user-cell-clean{display:flex;align-items:center;min-height:44px}.user-cell.user-cell-clean strong{display:block;color:var(--text-primary,#173b67);font-weight:700;line-height:1.35}.users-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.mini-action.edit{color:#0f4f91;border-color:#cbdcf0;background:var(--surface,#fff)}.mini-action.edit:hover{background:#eef5ff;color:#0a3d78;border-color:#9fc0e8}.theme-dark .user-cell.user-cell-clean strong,[data-theme="dark"] .user-cell.user-cell-clean strong{color:#e7eef8}.theme-dark .mini-action.edit,[data-theme="dark"] .mini-action.edit{background:#17263a;border-color:#36516f;color:#8fc1ff}.theme-dark .mini-action.edit:hover,[data-theme="dark"] .mini-action.edit:hover{background:#1f3652;color:#fff;border-color:#5c84ad}

/* Modal compacto de creación/edición de usuarios */
.user-management-modal{width:min(972px,calc(100vw - 32px));max-height:min(90vh,920px);border-radius:24px;overflow:hidden}
.user-management-modal>header{padding:22px 28px}
.user-management-modal>form{display:flex;flex-direction:column;min-height:0}
.user-management-modal .modal-content.user-management-form{display:block;padding:20px 28px 24px;overflow:auto;min-height:0}
.user-management-form .user-form-section{margin:0 0 24px}
.user-management-form .user-form-section:last-child{margin-bottom:0}
.user-management-form .user-form-section h3{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:#163b6a;font-size:17px}
.user-management-form .user-form-section h3 span{width:28px;height:28px;border-radius:9px;display:inline-grid;place-items:center;background:#eaf2ff;color:#1767d6;font-size:13px;font-weight:800}
.user-management-form .user-form-section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 22px}
.user-management-form .field{margin:0;min-width:0}
.user-management-form .field>span{display:block;margin-bottom:8px;color:#334b6b;font-weight:700;font-size:14px}
.user-management-form .input-shell{min-height:56px;border-radius:13px}
.user-management-form .input-shell input,.user-management-form .input-shell select{min-height:54px}
.user-management-form .password-shell{position:relative}
.user-management-form .password-shell input{padding-right:52px}
.user-management-form .password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:10px;background:transparent;color:#345c8d;display:grid;place-items:center;cursor:pointer}
.user-management-form .password-toggle:hover{background:#edf4ff;color:#0e57b7}
.user-management-form .field-help,.user-management-form .field-error{display:block;margin-top:7px;font-size:12px}
.user-management-form .field-help{color:#75869d}
.user-management-form .field-error{color:#dc3545}
.user-management-modal footer{position:sticky;bottom:0;padding:16px 28px;background:#fff;border-top:1px solid #e4ebf3;z-index:2}
.user-management-modal footer .primary-button,.user-management-modal footer .secondary-button{min-height:48px;padding:0 22px}
@media(max-width:760px){.user-management-modal{width:calc(100vw - 18px);max-height:94vh;border-radius:18px}.user-management-modal>header{padding:18px}.user-management-modal .modal-content.user-management-form{padding:16px 18px 20px}.user-management-form .user-form-section-grid{grid-template-columns:1fr;gap:14px}.user-management-modal footer{padding:14px 18px}}
html[data-theme="dark"] .user-management-form .user-form-section h3{color:#dce8f7}
html[data-theme="dark"] .user-management-form .user-form-section h3 span{background:#18345a;color:#7cb6ff}
html[data-theme="dark"] .user-management-form .field>span{color:#c7d6e8}
html[data-theme="dark"] .user-management-form .password-toggle{color:#9bb8da}
html[data-theme="dark"] .user-management-form .password-toggle:hover{background:#203551;color:#d9e9fa}
html[data-theme="dark"] .user-management-modal footer{background:var(--surface)!important;border-color:var(--border-theme)!important}


/* =========================================================
   LOADER GLOBAL DE NAVEGACIÓN
   Ligero: solo overlay suave + spinner CSS, sin imágenes ni librerías.
   ========================================================= */
.page-loader{
    position:fixed;
    inset:0;
    z-index:99999;
    display:grid;
    place-items:center;
    background:rgba(238,244,251,.54);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .14s ease,visibility 0s linear .14s;
}
.page-loader.is-visible{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition:opacity .14s ease;
}
.page-loader-spinner{
    width:46px;
    height:46px;
    border:5px solid rgba(32,103,211,.18);
    border-top-color:#1767d6;
    border-right-color:#2c7cf0;
    border-radius:50%;
    animation:page-loader-spin .72s linear infinite;
    filter:drop-shadow(0 5px 12px rgba(18,67,128,.15));
}
html[data-theme="dark"] .page-loader{
    background:rgba(7,15,27,.58);
}
html[data-theme="dark"] .page-loader-spinner{
    border-color:rgba(126,181,255,.18);
    border-top-color:#79b5ff;
    border-right-color:#3d8df5;
    filter:drop-shadow(0 5px 14px rgba(0,0,0,.32));
}
@keyframes page-loader-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){
    .page-loader{transition:none}
    .page-loader-spinner{animation-duration:1.4s}
}

/* =========================================================
   CONFIGURACIÓN PROFESIONAL DE TICKETS
   ========================================================= */
.ticket-format-hero{margin-bottom:14px}.ticket-tabs{display:flex;gap:8px;padding:8px;margin-bottom:16px;overflow:auto}.ticket-tabs a{display:flex;align-items:center;gap:9px;padding:11px 15px;border-radius:10px;color:var(--text);text-decoration:none;white-space:nowrap;font-weight:700}.ticket-tabs a:hover,.ticket-tabs a.active{background:#eaf2ff;color:#155bc5}.ticket-config-grid,.ticket-footer-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,.8fr);gap:18px}.ticket-config-card,.ticket-live-preview,.ticket-footer-editor,.ticket-footer-preview{padding:22px}.ticket-config-card>header,.ticket-live-preview>header{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border);padding-bottom:14px;margin-bottom:18px}.ticket-config-card h3,.ticket-live-preview h3,.ticket-footer-grid h3,.ticket-preview-main h3,.ticket-series-card h3{margin:0;color:var(--text)}.ticket-config-card h4{margin:18px 0 13px;color:var(--text)}.ticket-switch-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 22px}.ticket-switch-row{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--text)}.ticket-switch-row .switch{position:relative;width:34px;height:20px;flex:none}.ticket-switch-row .switch input{position:absolute;opacity:0}.ticket-switch-row .switch i{display:block;width:100%;height:100%;border-radius:999px;background:#cbd5e1;transition:.2s}.ticket-switch-row .switch i::after{content:"";display:block;width:14px;height:14px;border-radius:50%;background:white;transform:translate(3px,3px);transition:.2s;box-shadow:0 1px 4px rgba(0,0,0,.2)}.ticket-switch-row .switch input:checked+i{background:#1767e8}.ticket-switch-row .switch input:checked+i::after{transform:translate(17px,3px)}.ticket-divider{height:1px;background:var(--border);margin:20px 0}.ticket-select-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.ticket-select-grid label,.ticket-footer-editor label,.ticket-series-modal label{display:grid;gap:7px;font-size:12px;font-weight:700;color:var(--text)}.ticket-select-grid select,.ticket-footer-editor textarea,.ticket-series-modal input,.ticket-series-modal select,.ticket-series-card input[type=search]{width:100%;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);padding:12px}.ticket-print-types{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ticket-print-types label{display:flex;gap:12px;align-items:center;border:1px solid var(--border);border-radius:11px;padding:15px;cursor:pointer}.ticket-print-types label:has(input:checked){border-color:#1767e8;background:#eff6ff}.ticket-print-types span{display:grid;gap:3px}.ticket-print-types small{color:var(--muted)}.ticket-config-card>footer{display:grid;grid-template-columns:1fr .65fr;gap:12px;margin-top:22px}.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 16px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-weight:700;cursor:pointer}.ticket-receipt-real{width:min(100%,365px);margin:10px auto;background:#fff;color:#102a4d;padding:22px;box-shadow:0 14px 35px rgba(15,42,75,.12);font-family:Arial,sans-serif;font-size:12px;position:relative}.ticket-receipt-real::after{content:"";position:absolute;left:0;right:0;bottom:-8px;height:9px;background:linear-gradient(135deg,transparent 6px,#fff 0) 0 0/12px 12px repeat-x}.ticket-receipt-real.small{font-size:10px}.ticket-receipt-real.large{font-size:14px}.ticket-brand{display:flex;align-items:center;gap:13px}.ticket-brand img{width:58px;height:58px;object-fit:contain}.ticket-brand h4{font-size:19px;margin:0 0 4px}.ticket-brand p{margin:2px 0;font-size:10px}.ticket-receipt-real hr{border:0;border-top:1px dashed #90a4bd;margin:12px 0}.ticket-title,.ticket-number{text-align:center;margin:4px}.ticket-number{font-weight:700}.ticket-receipt-real .receipt-row{display:flex;justify-content:space-between;gap:14px;padding:4px 0}.ticket-receipt-real table{width:100%;border-collapse:collapse}.ticket-receipt-real th,.ticket-receipt-real td{padding:5px 2px;text-align:left}.ticket-receipt-real th:last-child,.ticket-receipt-real td:last-child{text-align:right}.ticket-receipt-real .total{font-size:15px}.ticket-qr{display:grid;place-items:center;gap:4px;margin:15px auto}.ticket-qr i{font-size:70px}.ticket-qr small{font-size:9px;color:#62748b}.ticket-footer-copy{text-align:center;margin:14px 0 2px;font-style:italic}.ticket-footer-editor>p,.ticket-footer-preview>p,.ticket-series-card header p{color:var(--muted);margin-top:5px}.ticket-variable-box{display:grid;grid-template-columns:max-content 1fr;gap:9px 14px;background:var(--soft);border:1px solid var(--border);border-radius:12px;padding:15px;margin:16px 0}.ticket-variable-box strong,.ticket-variable-box p{grid-column:1/-1;margin:0}.ticket-variable-box code{color:#1767e8;background:#eaf2ff;padding:4px 7px;border-radius:6px}.footer-receipt{width:min(100%,390px);margin:18px auto;background:#fff;color:#102a4d;padding:24px;box-shadow:0 12px 30px rgba(15,42,75,.12)}.footer-receipt>div{display:flex;justify-content:space-between;margin:10px 0}.footer-receipt .big{font-size:17px}.footer-preview-text{display:block!important;border:1px solid #1767e8;border-radius:10px;padding:18px;white-space:pre-line;line-height:1.7;margin-top:18px!important}.ticket-preview-layout{display:grid;grid-template-columns:310px 1fr;gap:18px}.ticket-preview-meta{display:grid;gap:14px;align-content:start}.ticket-preview-meta article{display:flex;align-items:center;gap:16px;padding:20px}.ticket-preview-meta article>i{width:50px;height:50px;border-radius:14px;background:#eaf2ff;color:#1767e8;display:grid;place-items:center;font-size:22px}.ticket-preview-meta span,.ticket-preview-meta strong{display:block}.ticket-preview-meta span{color:var(--muted);font-size:12px}.ticket-preview-meta strong{margin-top:5px}.ticket-preview-main{padding:22px}.ticket-preview-actions{display:flex;justify-content:center;gap:12px;margin-top:18px}.ticket-series-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px}.ticket-series-card{padding:22px}.ticket-series-card>header{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:16px}.ticket-series-card>header input{max-width:340px}.ticket-series-summary{display:grid;gap:14px;align-content:start}.ticket-series-summary article{display:flex;gap:16px;align-items:flex-start;padding:20px}.ticket-series-summary i{width:50px;height:50px;border-radius:14px;background:#eaf2ff;color:#1767e8;display:grid;place-items:center;font-size:22px}.ticket-series-summary i.green{color:#16a34a;background:#ecfdf3}.ticket-series-summary i.purple{color:#7c3aed;background:#f4f0ff}.ticket-series-summary strong,.ticket-series-summary span,.ticket-series-summary small{display:block}.ticket-series-summary strong{font-size:20px}.ticket-series-summary span{font-weight:700;margin:5px 0}.ticket-series-summary small{color:var(--muted)}.table-actions{display:flex;align-items:center;gap:8px}.switch-button{width:38px;height:22px;border:0;border-radius:999px;background:#cbd5e1;padding:3px;cursor:pointer}.switch-button i{display:block;width:16px;height:16px;border-radius:50%;background:white;transition:.2s}.switch-button.active{background:#1767e8}.switch-button.active i{transform:translateX(16px)}.ticket-series-modal .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.ticket-series-modal>header{display:flex!important}.ticket-series-modal form>footer{display:flex;justify-content:flex-end;gap:10px}.ticket-series-modal .modal-body{padding:22px}
html[data-theme="dark"] .ticket-tabs a.active,html[data-theme="dark"] .ticket-tabs a:hover,html[data-theme="dark"] .ticket-print-types label:has(input:checked){background:#17345c;color:#dcebff}.ticket-receipt-real,.footer-receipt{color:#102a4d!important}
@media(max-width:1100px){.ticket-config-grid,.ticket-footer-grid,.ticket-series-layout{grid-template-columns:1fr}.ticket-preview-layout{grid-template-columns:1fr}.ticket-preview-meta{grid-template-columns:repeat(2,1fr)}.ticket-switch-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.ticket-switch-grid,.ticket-select-grid,.ticket-print-types,.ticket-preview-meta,.ticket-series-modal .grid-2{grid-template-columns:1fr}.ticket-config-card>footer{grid-template-columns:1fr}.ticket-series-card>header{align-items:stretch;flex-direction:column}.ticket-preview-actions{flex-direction:column}}
@media print{body *{visibility:hidden!important}#printableTicket,#printableTicket *{visibility:visible!important}#printableTicket{position:absolute;left:0;top:0;width:100%}.ticket-receipt-real{box-shadow:none;margin:0 auto}}


/* FORMATO DE TICKETS V2 - aislamiento visual y prevención de desbordamientos */
.ticket-module-v2{width:100%;max-width:100%;min-width:0;overflow-x:clip;font-family:inherit}
.ticket-module-v2,.ticket-module-v2 *{box-sizing:border-box}
.ticket-module-v2 .ticket-config-grid,
.ticket-module-v2 .ticket-footer-grid,
.ticket-module-v2 .ticket-preview-layout,
.ticket-module-v2 .ticket-series-layout{width:100%;max-width:100%;min-width:0}
.ticket-module-v2 .ticket-config-grid>* ,
.ticket-module-v2 .ticket-footer-grid>* ,
.ticket-module-v2 .ticket-preview-layout>* ,
.ticket-module-v2 .ticket-series-layout>*{min-width:0;max-width:100%}
.ticket-module-v2 .ticket-live-preview,
.ticket-module-v2 .ticket-preview-main,
.ticket-module-v2 .ticket-footer-preview{overflow:hidden}
.ticket-module-v2 .ticket-v2-canvas{width:100%;max-width:100%;min-height:260px;padding:18px;display:flex;align-items:flex-start;justify-content:center;overflow:auto;background:linear-gradient(180deg,rgba(238,244,251,.72),rgba(248,250,252,.94));border-radius:12px;contain:layout paint}
.ticket-module-v2 .ticket-receipt-real{flex:0 0 auto;width:365px;max-width:100%;margin:0;background:#fff!important;color:#102a4d!important;padding:22px;box-shadow:0 14px 35px rgba(15,42,75,.12);font-family:Arial,Helvetica,sans-serif!important;font-size:12px;line-height:1.35;position:relative;overflow:visible;isolation:isolate}
.ticket-module-v2 .ticket-receipt-real *{font-family:inherit!important;box-sizing:border-box;color:inherit}
.ticket-module-v2 .ticket-receipt-real.small{font-size:10px}.ticket-module-v2 .ticket-receipt-real.large{font-size:14px}
.ticket-module-v2 .ticket-receipt-real .ticket-brand{display:flex;align-items:center;gap:13px;min-width:0}
.ticket-module-v2 .ticket-receipt-real .ticket-brand img{display:block;width:58px;height:58px;max-width:58px;object-fit:contain;flex:0 0 58px}
.ticket-module-v2 .ticket-receipt-real .ticket-brand>div{min-width:0;overflow-wrap:anywhere}
.ticket-module-v2 .ticket-receipt-real table{table-layout:fixed;width:100%}
.ticket-module-v2 .ticket-receipt-real th,.ticket-module-v2 .ticket-receipt-real td{overflow-wrap:anywhere}
.ticket-module-v2 .ticket-receipt-real::after{z-index:-1}
.ticket-module-v2 #printableTicket{width:100%;max-width:100%;min-width:0;overflow:hidden}
.ticket-module-v2 .ticket-preview-main #printableTicket .ticket-v2-canvas{min-height:520px;align-items:center}
.ticket-module-v2 .ticket-live-preview .ticket-v2-canvas{min-height:540px;padding:16px 10px}
.ticket-module-v2 .ticket-footer-editor textarea{font-family:inherit!important;line-height:1.55;resize:vertical}
.ticket-module-v2 .ticket-tabs{max-width:100%;overflow-x:auto;overflow-y:hidden}
.ticket-module-v2 .ticket-tabs a{font-family:inherit!important}
.ticket-module-v2 .ticket-series-card .table-responsive{max-width:100%;overflow:auto}
html[data-theme="dark"] .ticket-module-v2 .ticket-v2-canvas{background:linear-gradient(180deg,#111d2d,#0d1724)}
html[data-theme="dark"] .ticket-module-v2 .ticket-receipt-real{background:#fff!important;color:#102a4d!important}
@media(max-width:1200px){
 .ticket-module-v2 .ticket-live-preview .ticket-v2-canvas{min-height:auto}
 .ticket-module-v2 .ticket-preview-main #printableTicket .ticket-v2-canvas{min-height:440px}
}
@media(max-width:700px){
 .ticket-module-v2 .ticket-v2-canvas{padding:12px 6px}
 .ticket-module-v2 .ticket-receipt-real{width:320px;padding:17px}
}
@media print{
 body *{visibility:hidden!important}
 .ticket-module-v2 #printableTicket,.ticket-module-v2 #printableTicket *{visibility:visible!important}
 .ticket-module-v2 #printableTicket{position:absolute;inset:0;width:100%;overflow:visible!important}
 .ticket-module-v2 #printableTicket .ticket-v2-canvas{padding:0;background:none;overflow:visible;min-height:0}
 .ticket-module-v2 #printableTicket .ticket-receipt-real{box-shadow:none;max-width:none}
}


/* =========================================================
   FORMATO DE TICKETS V3 - AISLAMIENTO DEFINITIVO
   ========================================================= */
.ticket-module-v2{
  isolation:isolate;
  overflow:visible;
}
.ticket-module-v2 .ticket-config-grid{
  grid-template-columns:minmax(0,1.55fr) minmax(300px,.72fr);
  align-items:start;
}
.ticket-module-v2 .ticket-live-preview,
.ticket-module-v2 .ticket-preview-main{
  min-width:0;
  overflow:hidden;
}
.ticket-module-v2 .ticket-v2-canvas{
  position:relative;
  width:100%;
  min-width:0;
  max-width:100%;
  min-height:360px;
  padding:20px 12px;
  overflow:hidden;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  contain:layout paint style;
  isolation:isolate;
}
.ticket-module-v2 .ticket-receipt-real{
  position:relative;
  z-index:1;
  flex:0 0 auto;
  width:320px;
  max-width:calc(100% - 8px);
  min-width:0;
  overflow:hidden;
  background:#fff!important;
  color:#102a4d!important;
  font-family:Arial,Helvetica,sans-serif!important;
  line-height:1.35;
}
/* Do not force text fonts onto icon glyphs. */
.ticket-module-v2 .ticket-receipt-real *{
  box-sizing:border-box;
}
.ticket-module-v2 .ticket-receipt-real .fa-solid,
.ticket-module-v2 .ticket-receipt-real .fas{
  font-family:"Font Awesome 6 Free"!important;
  font-weight:900!important;
}
.ticket-module-v2 .ticket-receipt-real .fa-regular,
.ticket-module-v2 .ticket-receipt-real .far{
  font-family:"Font Awesome 6 Free"!important;
  font-weight:400!important;
}
.ticket-module-v2 .ticket-receipt-real .fa-brands,
.ticket-module-v2 .ticket-receipt-real .fab{
  font-family:"Font Awesome 6 Brands"!important;
  font-weight:400!important;
}
.ticket-module-v2 .ticket-receipt-real img{
  display:block;
  max-width:100%;
}
.ticket-module-v2 .ticket-receipt-real .ticket-brand h4,
.ticket-module-v2 .ticket-receipt-real .ticket-brand p,
.ticket-module-v2 .ticket-receipt-real .receipt-row,
.ticket-module-v2 .ticket-receipt-real table,
.ticket-module-v2 .ticket-receipt-real .ticket-footer-copy{
  font-family:Arial,Helvetica,sans-serif!important;
}
.ticket-module-v2 .ticket-receipt-real table{
  table-layout:fixed;
  overflow:hidden;
}
.ticket-module-v2 .ticket-receipt-real th,
.ticket-module-v2 .ticket-receipt-real td{
  white-space:normal;
  overflow-wrap:anywhere;
}
.ticket-module-v2 .ticket-live-preview .ticket-v2-canvas{
  min-height:430px;
}
.ticket-module-v2 .ticket-preview-main #printableTicket{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
}
.ticket-module-v2 .ticket-preview-main #printableTicket .ticket-v2-canvas{
  min-height:560px;
  align-items:center;
}
@media(max-width:1200px){
  .ticket-module-v2 .ticket-config-grid{grid-template-columns:1fr}
  .ticket-module-v2 .ticket-live-preview .ticket-v2-canvas{min-height:420px}
}
@media(max-width:700px){
  .ticket-module-v2 .ticket-v2-canvas{padding:14px 6px}
  .ticket-module-v2 .ticket-receipt-real{width:300px;max-width:100%;padding:16px}
}

/* FORMATO DE TICKETS V4 - vista previa reactiva en tiempo real */
.ticket-module-v2 .ticket-receipt-real [hidden]{display:none!important}
.ticket-module-v2 .ticket-receipt-real.ticket-paper-58{width:250px}
.ticket-module-v2 .ticket-receipt-real.ticket-paper-80{width:320px}
.ticket-module-v2 .ticket-receipt-real.ticket-paper-a4{width:700px;min-height:880px}
.ticket-module-v2 .ticket-receipt-real.ticket-margin-compact{padding:12px}
.ticket-module-v2 .ticket-receipt-real.ticket-margin-normal{padding:22px}
.ticket-module-v2 .ticket-receipt-real.ticket-margin-wide{padding:34px}
.ticket-module-v2 .ticket-receipt-real.small{font-size:10px}
.ticket-module-v2 .ticket-receipt-real.medium{font-size:12px}
.ticket-module-v2 .ticket-receipt-real.large{font-size:14px}
.ticket-module-v2 .ticket-total-words{margin:6px 0 8px;font-size:.9em;font-style:italic;line-height:1.35}
.ticket-module-v2 .ticket-note{margin:8px 0;padding:7px 8px;border:1px dashed #cad5e3;border-radius:5px;font-size:.92em;line-height:1.35}
.ticket-module-v2 .ticket-live-preview .ticket-v2-canvas[data-paper-width="A4"]{min-height:500px;overflow:hidden}
.ticket-module-v2 .ticket-live-preview .ticket-v2-canvas[data-paper-width="A4"] .ticket-receipt-real{transform:scale(.43);transform-origin:top center;margin-bottom:-500px}
.ticket-module-v2 .ticket-preview-main .ticket-v2-canvas[data-paper-width="A4"]{overflow:auto;align-items:flex-start}
.ticket-module-v2 .ticket-v2-canvas[data-paper-width="58mm"] .ticket-receipt-real{max-width:250px}
.ticket-module-v2 .ticket-v2-canvas[data-paper-width="80mm"] .ticket-receipt-real{max-width:320px}
.ticket-module-v2 .ticket-print-types label:has(input:checked){border-color:#2f74e8;background:#eef5ff}
@media(max-width:700px){
 .ticket-module-v2 .ticket-live-preview .ticket-v2-canvas[data-paper-width="A4"] .ticket-receipt-real{transform:scale(.36);margin-bottom:-560px}
 .ticket-module-v2 .ticket-receipt-real.ticket-paper-58{width:230px}
 .ticket-module-v2 .ticket-receipt-real.ticket-paper-80{width:290px}
}
@media print{
 .ticket-module-v2 #printableTicket .ticket-receipt-real.ticket-paper-58{width:58mm}
 .ticket-module-v2 #printableTicket .ticket-receipt-real.ticket-paper-80{width:80mm}
 .ticket-module-v2 #printableTicket .ticket-receipt-real.ticket-paper-a4{width:210mm;min-height:297mm}
 .ticket-module-v2 #printableTicket .ticket-receipt-real{transform:none!important;margin:0 auto!important}
}

/* Operaciones > Nueva orden: botón Nuevo cliente */
.compact-order-page .compact-new-customer{
  align-self:end!important;
  min-height:58px!important;
  width:100%!important;
  padding:0 22px!important;
  border:1px solid #cbd8e8!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#123f78!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:0 4px 12px rgba(18,63,120,.05)!important;
  text-decoration:none!important;
  cursor:pointer!important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.compact-order-page .compact-new-customer i{
  color:inherit!important;
  font-size:16px!important;
}
.compact-order-page .compact-new-customer:hover,
.compact-order-page .compact-new-customer:focus-visible{
  background:#f2f7fd!important;
  border-color:#8eabd0!important;
  color:#0d3262!important;
  box-shadow:0 8px 18px rgba(18,63,120,.12)!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}
.compact-order-page .compact-new-customer:active{
  transform:translateY(0)!important;
  box-shadow:0 3px 8px rgba(18,63,120,.08)!important;
}
html[data-theme="dark"] .compact-order-page .compact-new-customer{
  background:#172b46!important;
  border-color:#38506d!important;
  color:#e7f0fb!important;
  box-shadow:0 4px 14px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] .compact-order-page .compact-new-customer:hover,
html[data-theme="dark"] .compact-order-page .compact-new-customer:focus-visible{
  background:#223b5b!important;
  border-color:#5c7ea7!important;
  color:#fff!important;
}
@media(max-width:1180px){
  .compact-order-page .compact-new-customer{align-self:stretch!important;min-height:52px!important}
}
@media(max-width:700px){
  .compact-order-page .compact-fields-3{grid-template-columns:1fr!important}
  .compact-order-page .field.span-2{grid-column:auto!important}
}

/* Nueva orden: selector buscable de servicios */
.quick-item-row.quick-item-row-single-service{grid-template-columns:minmax(360px,1fr) 150px 140px auto}
.service-combobox{position:relative;min-width:0}
.service-search-shell{height:46px;display:grid;grid-template-columns:48px minmax(0,1fr) 44px;align-items:center;border:1px solid #cedbeb;border-radius:12px;background:#fff;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}
.service-search-shell:focus-within{border-color:#6f9ff0;box-shadow:0 0 0 3px rgba(47,111,237,.12)}
.service-search-icon{height:100%;display:grid;place-items:center;background:#f2f6fc;color:#8296ad;font-size:16px}
.service-search-shell input{width:100%;height:100%;border:0;outline:0;background:transparent;color:#18324f;font:inherit;padding:0 14px}
.service-search-shell input::placeholder{color:#7d8da1}
.service-toggle{height:100%;border:0;background:transparent;color:#244b75;cursor:pointer;display:grid;place-items:center}
.service-toggle:hover{background:#f3f7fc}
.service-results{position:absolute;top:calc(100% + 7px);left:0;right:0;z-index:150;max-height:320px;overflow:auto;background:#fff;border:1px solid #cfdaE7;border-radius:13px;box-shadow:0 18px 42px rgba(20,49,84,.18);padding:6px}
.service-results[hidden]{display:none!important}
.service-result-option{width:100%;display:grid;grid-template-columns:40px minmax(0,1fr);gap:11px;align-items:center;border:0;border-bottom:1px solid #edf2f7;background:#fff;padding:10px 11px;text-align:left;color:#18324f;font:inherit;cursor:pointer;border-radius:8px}
.service-result-option[hidden]{display:none!important}
.service-result-option:last-of-type{border-bottom:0}
.service-result-option:hover,.service-result-option:focus,.service-result-option.is-highlighted{background:#edf4ff;outline:0}
.service-result-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#eaf2ff;color:#1557a0}
.service-result-copy{min-width:0}
.service-result-copy strong,.service-result-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.service-result-copy strong{font-size:.92rem}
.service-result-copy small{font-size:.76rem;color:#7b8ca1;margin-top:3px}
.service-result-empty{padding:18px;text-align:center;color:#7b8ca1}
.service-results::-webkit-scrollbar{width:8px}.service-results::-webkit-scrollbar-track{background:#f5f7fa;border-radius:999px}.service-results::-webkit-scrollbar-thumb{background:#b8c6d6;border-radius:999px}
html[data-theme="dark"] .service-search-shell,html[data-theme="dark"] .service-results,html[data-theme="dark"] .service-result-option{background:var(--surface)!important;border-color:var(--border-theme)!important;color:var(--text-theme)!important}
html[data-theme="dark"] .service-search-icon,html[data-theme="dark"] .service-result-icon{background:var(--surface-soft)!important;color:#70a7ff!important}
html[data-theme="dark"] .service-search-shell input{color:var(--text-theme)!important}
html[data-theme="dark"] .service-result-option:hover,html[data-theme="dark"] .service-result-option:focus,html[data-theme="dark"] .service-result-option.is-highlighted{background:var(--surface-soft)!important}
html[data-theme="dark"] .service-result-copy small,html[data-theme="dark"] .service-result-empty{color:var(--muted-theme)!important}
@media(max-width:1180px){.quick-item-row.quick-item-row-single-service{grid-template-columns:minmax(280px,1fr) 140px 120px auto}}
@media(max-width:760px){.quick-item-row.quick-item-row-single-service{grid-template-columns:1fr}.quick-item-row.quick-item-row-single-service .quick-add{grid-column:auto}.service-results{max-height:280px}}

/* Flujos de producción configurables por servicio */
.service-flow-config{border:1px solid var(--border,#dfe7f1);border-radius:14px;padding:18px;background:var(--surface-soft,#f8fbff)}
.service-flow-heading{margin-bottom:14px}.service-flow-heading>div{display:grid;grid-template-columns:auto 1fr;column-gap:10px}.service-flow-heading i{grid-row:1/3;color:#1f5f9e;font-size:20px}.service-flow-heading strong{color:var(--text-strong,#173b67)}.service-flow-heading small{color:var(--text-muted,#718096)}
.service-stage-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}.service-stage-option{display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:10px;padding:12px;border:1px solid var(--border,#dfe7f1);border-radius:11px;background:var(--surface,#fff);cursor:pointer}.service-stage-option.selected{border-color:#2f6fed;background:rgba(47,111,237,.08)}.service-stage-option input{width:17px;height:17px}.service-stage-order{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#eaf2fb;color:#164f8e;font-weight:800}.service-stage-option strong,.service-stage-option small{display:block}.service-stage-option small{font-size:11px;color:var(--text-muted,#718096);margin-top:2px}.service-flow-note{margin:14px 0 0;color:var(--text-muted,#718096);font-size:12px}.service-flow-note i{color:#2f6fed;margin-right:7px}
.production-flow-board{display:grid;gap:18px}.production-flow-order{padding:0;overflow:hidden}.production-flow-order-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:22px 24px;border-bottom:1px solid var(--border,#e4eaf2)}.production-flow-title-line{display:flex;align-items:center;gap:12px}.production-flow-title-line h2{margin:0;color:var(--text-strong,#173b67)}.production-flow-order-head p{margin:6px 0 0;color:var(--text-muted,#718096)}.production-flow-order-meta{display:flex;gap:18px;flex-wrap:wrap;color:var(--text-muted,#607089);font-size:13px}.production-flow-order-meta i{color:#2f6fed;margin-right:6px}.production-item-list{padding:18px 24px 24px;display:grid;gap:14px}.production-item-card{border:1px solid var(--border,#e1e8f0);border-radius:14px;background:var(--surface,#fff);overflow:hidden}.production-item-card.completed{border-color:#bfe7cc;background:rgba(34,197,94,.04)}.production-item-main{display:grid;grid-template-columns:42px minmax(160px,1.3fr) minmax(150px,1fr) minmax(170px,1.2fr);align-items:center;gap:16px;padding:17px}.production-item-index{width:38px;height:38px;border-radius:12px;background:#eaf2fb;color:#174f89;display:grid;place-items:center;font-weight:900}.production-item-info strong,.production-current-stage strong{display:block;color:var(--text-strong,#173b67)}.production-item-info small,.production-current-stage small{display:block;color:var(--text-muted,#718096);margin-top:4px}.production-item-progress>div:first-child{display:flex;justify-content:space-between;font-size:12px;color:var(--text-muted,#718096);margin-bottom:7px}.production-progress-track{height:8px;background:#e9eef5;border-radius:999px;overflow:hidden}.production-progress-track span{display:block;height:100%;background:#2f6fed;border-radius:999px}.production-stage-action{display:grid;grid-template-columns:1fr auto;gap:12px;padding:14px 17px;background:var(--surface-soft,#f7faff);border-top:1px solid var(--border,#e1e8f0)}.production-stage-action input{min-height:43px;border:1px solid var(--border,#dce5ef);border-radius:10px;padding:0 13px;background:var(--surface,#fff);color:var(--text,#243b53)}.production-item-complete{padding:12px 17px;border-top:1px solid #ccebd6;color:#16803c;font-weight:800}.production-item-complete i{margin-right:8px}
[data-theme="dark"] .service-flow-config,[data-theme="dark"] .production-stage-action{background:#172335}[data-theme="dark"] .service-stage-option,[data-theme="dark"] .production-item-card{background:#101a29}[data-theme="dark"] .production-progress-track{background:#26344a}
@media(max-width:900px){.service-stage-list{grid-template-columns:1fr}.production-flow-order-head{flex-direction:column}.production-item-main{grid-template-columns:42px 1fr}.production-current-stage,.production-item-progress{grid-column:2}.production-stage-action{grid-template-columns:1fr}}

/* =========================================================
   DASHBOARD ANALÍTICO — VENTANAS COMPACTAS
   ========================================================= */
.dashboard-filter-panel{padding:16px 18px;margin-bottom:18px}.dashboard-period-form{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}.dashboard-period-field{display:grid;gap:6px;min-width:190px}.dashboard-period-field label{font-size:.78rem;color:var(--muted);font-weight:700}.dashboard-period-field input{min-height:44px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);padding:0 12px}.dashboard-filter-summary{margin-left:auto;color:var(--muted);font-size:.85rem;display:inline-flex;align-items:center;gap:8px;padding-bottom:11px}
.dashboard-analytics-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.dashboard-kpi-window{border:1px solid var(--border);border-radius:17px;background:var(--surface);box-shadow:0 8px 24px rgba(15,38,70,.05);padding:18px;display:flex;align-items:center;gap:15px;min-height:118px}.dashboard-kpi-window.blue{background:linear-gradient(135deg,var(--surface),rgba(47,111,237,.07))}.dashboard-kpi-window.orange{background:linear-gradient(135deg,var(--surface),rgba(245,158,11,.08))}.dashboard-kpi-window.green{background:linear-gradient(135deg,var(--surface),rgba(34,181,115,.08))}.dashboard-kpi-window.teal{background:linear-gradient(135deg,var(--surface),rgba(33,184,189,.08))}.dashboard-kpi-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-size:1.25rem;background:rgba(47,111,237,.1);color:#2f6fed;flex:0 0 auto}.dashboard-kpi-window.orange .dashboard-kpi-icon{background:rgba(245,158,11,.13);color:#f59e0b}.dashboard-kpi-window.green .dashboard-kpi-icon{background:rgba(34,181,115,.12);color:#22b573}.dashboard-kpi-window.teal .dashboard-kpi-icon{background:rgba(33,184,189,.12);color:#21b8bd}.dashboard-kpi-window span{display:block;color:var(--muted);font-size:.86rem}.dashboard-kpi-window strong{display:block;color:var(--text);font-size:1.55rem;line-height:1.2;margin:4px 0}.dashboard-kpi-window small{font-size:.76rem;color:var(--muted)}
.dashboard-analytics-grid{display:grid;gap:16px;margin-bottom:16px}.dashboard-analytics-grid-primary{grid-template-columns:2fr 1fr 1fr}.dashboard-analytics-grid-secondary{grid-template-columns:2fr 1fr 1fr}.dashboard-analytics-grid-bottom{grid-template-columns:2fr 1fr 1fr;align-items:stretch}.dashboard-window{min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:17px;box-shadow:0 8px 24px rgba(15,38,70,.05);padding:18px;position:relative;overflow:hidden}.dashboard-window-wide{min-height:330px}.dashboard-window-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.dashboard-window-head h2{font-size:1rem;margin:0;color:var(--text)}.dashboard-window-head small{display:block;color:var(--muted);font-size:.76rem;margin-top:3px}.dashboard-window-head>a{font-size:.78rem;color:var(--primary);font-weight:700}.dashboard-window-head>strong{font-size:1.15rem;color:var(--text)}
.dashboard-svg-chart{position:relative;min-height:235px}.dashboard-svg-chart svg{display:block;width:100%;height:230px;overflow:visible}.dashboard-grid-lines line{stroke:var(--border);stroke-width:1}.dashboard-chart-labels{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(42px,1fr);gap:0;color:var(--muted);font-size:.68rem;text-align:center;margin-top:-10px}.dashboard-chart-labels-scroll{overflow:hidden}.dashboard-chart-empty{position:absolute;inset:70px 20px auto;display:grid;place-items:center;color:var(--muted);font-size:.82rem}.dashboard-inline-legend{display:flex;gap:12px;font-size:.75rem;color:var(--muted)}.dashboard-inline-legend span{display:flex;align-items:center;gap:6px}.dashboard-inline-legend i{width:18px;height:3px;border-radius:999px}.dashboard-inline-legend .current{background:#2f6fed}.dashboard-inline-legend .previous{background:#64748b}
.dashboard-donut-layout{display:grid;grid-template-columns:140px 1fr;align-items:center;gap:16px;min-height:195px}.dashboard-donut{width:136px;aspect-ratio:1;border-radius:50%;display:grid;place-items:center;position:relative}.dashboard-donut.small{width:118px}.dashboard-donut:after{content:"";position:absolute;inset:24%;border-radius:50%;background:var(--surface);box-shadow:inset 0 0 0 1px var(--border)}.dashboard-donut span{position:relative;z-index:1;text-align:center;font-size:.66rem;color:var(--muted);max-width:85px}.dashboard-donut strong{display:block;color:var(--text);font-size:.9rem;margin-top:3px;white-space:nowrap}.dashboard-legend{list-style:none;padding:0;margin:0;display:grid;gap:10px;min-width:0}.dashboard-legend.compact{gap:7px}.dashboard-legend li{display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:8px;color:var(--text);font-size:.75rem;min-width:0}.dashboard-legend li i{width:8px;height:8px;border-radius:50%;background:var(--dot)}.dashboard-legend b{font-weight:700;white-space:nowrap}.dashboard-window-action{display:flex;justify-content:center;align-items:center;gap:8px;border:1px solid var(--border);border-radius:11px;padding:10px;color:var(--primary);font-weight:700;font-size:.78rem;margin-top:10px}
.dashboard-window-table{grid-column:span 2}.dashboard-compact-table{width:100%;border-collapse:collapse;font-size:.76rem}.dashboard-compact-table th{color:var(--muted);font-weight:700;text-align:left;border-bottom:1px solid var(--border);padding:10px 9px;white-space:nowrap}.dashboard-compact-table td{border-bottom:1px solid var(--border);padding:11px 9px;color:var(--text);white-space:nowrap}.dashboard-compact-table tbody tr:last-child td{border-bottom:0}.dashboard-compact-table td a{color:var(--primary);font-weight:700}.dashboard-status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;background:color-mix(in srgb,var(--dashboard-state) 15%,transparent);color:var(--dashboard-state);font-weight:700;font-size:.69rem}
.dashboard-ranking-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}.dashboard-ranking-list li{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:9px;font-size:.74rem}.dashboard-rank-number{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:rgba(47,111,237,.1);color:#2f6fed;font-weight:800}.dashboard-ranking-list b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.dashboard-ranking-list strong{font-size:.72rem;color:var(--text);white-space:nowrap}.dashboard-rank-track{height:4px;border-radius:999px;background:var(--border);overflow:hidden;margin-top:6px}.dashboard-rank-track span{display:block;height:100%;background:#2f6fed;border-radius:inherit}.dashboard-ranking-empty{display:block!important;color:var(--muted);padding:18px 0}.dashboard-finance-compare{display:grid;gap:10px}.dashboard-finance-compare>div{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);padding:8px 0;color:var(--muted);font-size:.8rem}.dashboard-finance-compare strong{color:var(--text)}.dashboard-finance-compare .result{border:0;border-radius:11px;background:rgba(47,111,237,.08);padding:12px;color:var(--primary);font-weight:800}.dashboard-finance-compare .result strong{color:var(--primary)}
[data-theme="dark"] .dashboard-kpi-window,[data-theme="dark"] .dashboard-window{box-shadow:none}.trend-up{color:#16a46b!important}.trend-down{color:#ef4444!important}.trend-neutral{color:var(--muted)!important}
@media(max-width:1250px){.dashboard-analytics-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-analytics-grid-primary,.dashboard-analytics-grid-secondary{grid-template-columns:1fr 1fr}.dashboard-window-wide{grid-column:span 2}.dashboard-analytics-grid-bottom{grid-template-columns:1fr 1fr}.dashboard-window-table{grid-column:span 2}}
@media(max-width:760px){.dashboard-analytics-kpis,.dashboard-analytics-grid-primary,.dashboard-analytics-grid-secondary,.dashboard-analytics-grid-bottom{grid-template-columns:1fr}.dashboard-window-wide,.dashboard-window-table{grid-column:auto}.dashboard-filter-summary{margin-left:0;width:100%;padding:0}.dashboard-period-field{min-width:100%}.dashboard-period-form .primary-button,.dashboard-period-form .outline-button{flex:1}.dashboard-donut-layout{grid-template-columns:1fr;justify-items:center}.dashboard-legend{width:100%}.dashboard-chart-labels{font-size:.6rem}.dashboard-window{padding:15px}}

/* =========================================================
   DASHBOARD — ANÁLISIS ORGANIZADO EN PESTAÑAS
   Mantiene el resumen operativo original y agrupa gráficos
   secundarios debajo de Órdenes recientes.
   ========================================================= */
.dashboard-tabs-panel{margin-top:20px;padding:0;overflow:hidden}
.dashboard-tabs-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface)}
.dashboard-tabs{display:flex;align-items:center;gap:4px;overflow-x:auto;scrollbar-width:thin}
.dashboard-tab{min-height:43px;padding:0 16px;border:0;border-radius:10px;background:transparent;color:var(--text);font:inherit;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;cursor:pointer;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
.dashboard-tab:hover{background:color-mix(in srgb,var(--primary) 7%,transparent);color:var(--primary)}
.dashboard-tab.active{background:color-mix(in srgb,var(--primary) 11%,var(--surface));color:var(--primary);box-shadow:inset 0 -2px 0 var(--primary)}
.dashboard-tab-period-form{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.dashboard-tab-period-form input{height:39px;max-width:138px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);padding:0 9px;font:inherit;font-size:.75rem}
.dashboard-tab-period-form>span{color:var(--muted)}
.dashboard-tab-period-form .outline-button{min-height:39px;padding:0 12px}
.dashboard-tab-content{padding:16px;background:color-mix(in srgb,var(--page-bg,#f4f7fb) 65%,var(--surface));animation:dashboardTabFade .18s ease}
.dashboard-tab-content[hidden]{display:none!important}
@keyframes dashboardTabFade{from{opacity:.35;transform:translateY(3px)}to{opacity:1;transform:none}}
.dashboard-tab-grid{display:grid;gap:14px;align-items:stretch}
.dashboard-tab-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.dashboard-tab-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.dashboard-tab-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-tab-grid .dashboard-window{box-shadow:none;min-height:250px}
.dashboard-tab-grid .dashboard-window-wide{min-height:330px}
.dashboard-mini-kpis{display:grid;gap:12px}
.dashboard-mini-kpis>div{padding:15px;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--primary) 5%,var(--surface));display:flex;align-items:center;justify-content:space-between;gap:12px}
.dashboard-mini-kpis span{color:var(--muted);font-size:.82rem}.dashboard-mini-kpis strong{color:var(--text);font-size:1.15rem}
.dashboard-service-revenue{display:grid;gap:4px}.dashboard-service-revenue>div{display:flex;justify-content:space-between;gap:15px;padding:12px 3px;border-bottom:1px solid var(--border);font-size:.8rem}.dashboard-service-revenue>div:last-child{border-bottom:0}.dashboard-service-revenue span{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-service-revenue strong{white-space:nowrap;color:var(--primary)}
.dashboard-ranking-list.large{gap:15px}
[data-theme="dark"] .dashboard-tab-content{background:#101927}
@media(max-width:1280px){.dashboard-tab-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-tab-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-tab-grid.three>article:last-child{grid-column:span 2}}
@media(max-width:900px){.dashboard-tabs-head{align-items:stretch;flex-direction:column}.dashboard-tab-period-form{width:100%;flex-wrap:wrap}.dashboard-tab-period-form input{max-width:none;flex:1;min-width:135px}.dashboard-tab-grid.four,.dashboard-tab-grid.three,.dashboard-tab-grid.two{grid-template-columns:1fr}.dashboard-tab-grid.three>article:last-child{grid-column:auto}}
@media(max-width:560px){.dashboard-tabs-head{padding:10px}.dashboard-tab-content{padding:10px}.dashboard-tab{padding:0 12px}.dashboard-tab-period-form .outline-button{width:100%}}

/* =========================================================
   DASHBOARD — AJUSTE VISUAL FINAL DE PESTAÑAS Y VENTANAS
   Separa controles, refuerza la pestaña activa y evita
   leyendas amontonadas en tarjetas analíticas compactas.
   ========================================================= */
.dashboard-tabs-panel{
  border-radius:20px;
  border:1px solid var(--border);
  box-shadow:0 10px 30px rgba(15,38,70,.055);
}
.dashboard-tabs-head{
  padding:16px 18px;
  gap:22px;
  background:var(--surface);
}
.dashboard-tabs{
  gap:8px;
  padding:5px;
  border:1px solid var(--border);
  border-radius:14px;
  background:color-mix(in srgb,var(--page-bg,#f4f7fb) 72%,var(--surface));
}
.dashboard-tab{
  min-height:42px;
  padding:0 17px;
  border:1px solid transparent;
  border-radius:10px;
  color:var(--muted);
  box-shadow:none;
}
.dashboard-tab:hover{
  border-color:color-mix(in srgb,var(--primary) 22%,var(--border));
  background:color-mix(in srgb,var(--primary) 7%,var(--surface));
  color:var(--primary);
}
.dashboard-tab.active{
  border-color:color-mix(in srgb,var(--primary) 35%,var(--border));
  background:var(--primary);
  color:#fff;
  box-shadow:0 7px 16px rgba(20,69,129,.18);
}
.dashboard-tab.active i{color:#fff}
.dashboard-tab-period-form{
  gap:10px;
  padding-left:18px;
  border-left:1px solid var(--border);
}
.dashboard-period-control{
  display:grid;
  gap:4px;
  min-width:145px;
}
.dashboard-period-control>span{
  padding-left:3px;
  color:var(--muted);
  font-size:.66rem;
  font-weight:700;
  letter-spacing:.02em;
}
.dashboard-tab-period-form .dashboard-period-control input{
  width:100%;
  max-width:none;
  height:42px;
  padding:0 11px;
  border-radius:10px;
  background:color-mix(in srgb,var(--page-bg,#f4f7fb) 42%,var(--surface));
}
.dashboard-period-separator{align-self:end;padding-bottom:12px;color:var(--muted)}
.dashboard-period-apply{align-self:end;min-height:42px!important;padding:0 17px!important}
.dashboard-tab-content{padding:20px;background:color-mix(in srgb,var(--page-bg,#f4f7fb) 73%,var(--surface))}
.dashboard-tab-grid{gap:18px}
.dashboard-tab-grid .dashboard-window{
  min-height:230px;
  padding:20px;
  border-radius:16px;
  border:1px solid color-mix(in srgb,var(--border) 88%,transparent);
  box-shadow:0 5px 18px rgba(15,38,70,.035);
}
.dashboard-tab-grid .dashboard-window-wide{min-height:315px}
.dashboard-window-head{margin-bottom:18px}
.dashboard-window-head h2{line-height:1.28}
.dashboard-donut-layout{
  grid-template-columns:minmax(108px,42%) minmax(0,58%);
  gap:20px;
  min-height:170px;
}
.dashboard-donut{width:min(128px,100%);justify-self:center}
.dashboard-donut.small{width:min(112px,100%)}
.dashboard-legend{gap:9px;width:100%}
.dashboard-legend.compact{gap:8px}
.dashboard-legend li{
  grid-template-columns:10px minmax(0,1fr) minmax(66px,auto);
  column-gap:10px;
  min-height:25px;
  padding:3px 0;
  line-height:1.25;
}
.dashboard-legend li i{align-self:center}
.dashboard-legend li b{text-align:right;padding-left:8px}
.dashboard-finance-compare{display:grid;gap:8px}
.dashboard-finance-compare>div{
  min-height:48px;
  padding:11px 13px;
  border:1px solid var(--border);
  border-radius:11px;
  background:color-mix(in srgb,var(--primary) 3%,var(--surface));
}
.dashboard-finance-compare>div.result{
  background:color-mix(in srgb,#22b573 8%,var(--surface));
  border-color:color-mix(in srgb,#22b573 25%,var(--border));
}
.dashboard-mini-kpis{gap:10px}
.dashboard-mini-kpis>div{min-height:58px;padding:13px 15px}
.dashboard-ranking-list.large{gap:11px}
.dashboard-ranking-list li{padding-block:5px}
.dashboard-rank-track{margin-top:7px}
.dashboard-service-revenue{gap:2px}
.dashboard-service-revenue>div{min-height:44px;padding:10px 6px}

[data-theme="dark"] .dashboard-tabs{
  background:#0e1826;
  border-color:#26364b;
}
[data-theme="dark"] .dashboard-tab.active{color:#fff;background:#2364c7;border-color:#4f8cf0}
[data-theme="dark"] .dashboard-tab-period-form .dashboard-period-control input{background:#111d2c}

@media(max-width:1180px){
  .dashboard-tabs-head{align-items:stretch;flex-direction:column}
  .dashboard-tab-period-form{padding-left:0;padding-top:14px;border-left:0;border-top:1px solid var(--border);justify-content:flex-end}
}
@media(max-width:760px){
  .dashboard-tabs{width:100%;padding:4px}
  .dashboard-tab{flex:1 0 auto;padding:0 13px}
  .dashboard-tab-period-form{display:grid;grid-template-columns:1fr 18px 1fr;gap:8px}
  .dashboard-period-control{min-width:0}
  .dashboard-period-separator{text-align:center}
  .dashboard-period-apply{grid-column:1/-1;width:100%}
  .dashboard-tab-content{padding:12px}
  .dashboard-tab-grid{gap:12px}
  .dashboard-tab-grid .dashboard-window{min-height:auto;padding:16px}
  .dashboard-donut-layout{grid-template-columns:1fr;gap:14px;justify-items:center}
  .dashboard-legend{max-width:330px}
}

/* Dashboard tabs and donut amount resilience - AVANCE 14 final */
.dashboard-tabs{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  padding:7px;
}
.dashboard-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-width:126px;
  min-height:44px;
  padding:0 18px;
  background:transparent;
  border:1px solid transparent;
  border-radius:11px;
  font-weight:700;
  white-space:nowrap;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.dashboard-tab:hover{
  transform:translateY(-1px);
}
.dashboard-tab.active,
.dashboard-tab[aria-selected="true"]{
  background:#17457f !important;
  border-color:#17457f !important;
  color:#fff !important;
  box-shadow:0 7px 17px rgba(23,69,127,.20) !important;
}
.dashboard-tab.active i,
.dashboard-tab[aria-selected="true"] i{
  color:#fff !important;
}
.dashboard-tab:not(.active){
  color:var(--muted);
}

.dashboard-donut span{
  width:58%;
  max-width:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1.08;
  overflow:hidden;
}
.dashboard-donut-value{
  display:block;
  width:100%;
  max-width:100%;
  margin-top:5px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:clamp(.72rem,1.15vw,.92rem) !important;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.025em;
  cursor:help;
}
.dashboard-donut-value-compact{
  font-size:clamp(.74rem,1.2vw,.96rem) !important;
  letter-spacing:-.035em;
}
.dashboard-donut.small .dashboard-donut-value{
  font-size:clamp(.67rem,1vw,.84rem) !important;
}
.dashboard-donut.small .dashboard-donut-value-compact{
  font-size:clamp(.70rem,1.05vw,.88rem) !important;
}
.dashboard-legend li{
  align-items:center;
}
.dashboard-legend li b{
  min-width:72px;
  font-variant-numeric:tabular-nums;
}

@media(max-width:1280px){
  .dashboard-tab{min-width:112px;padding-inline:15px}
  .dashboard-donut-layout{grid-template-columns:minmax(102px,40%) minmax(0,60%);gap:16px}
}
@media(max-width:760px){
  .dashboard-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .dashboard-tab{min-width:0;width:100%;padding-inline:10px}
  .dashboard-donut span{width:62%}
}

/* =========================================================
   DATOS DE LA EMPRESA: LOGO Y ESTADOS REALES
   ========================================================= */
.company-logo-editor{
  display:grid;
  grid-template-columns:190px minmax(280px,1fr);
  grid-template-areas:"current drop" "current actions";
  gap:14px 22px;
  align-items:center;
}
.company-logo-current{grid-area:current;display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;color:#71819e;font-size:11px}
.company-logo-frame{width:138px;height:138px;border-radius:26px;background:#f7faff;border:1px solid #dce6f4;display:grid;place-items:center;padding:12px;overflow:hidden}
.company-logo-frame img{max-width:100%;max-height:100%;object-fit:contain;display:block}
.company-logo-drop{grid-area:drop;min-height:130px;border:1.5px dashed #99b8ee;border-radius:16px;background:#fbfdff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#667797;cursor:pointer;transition:.18s ease;padding:18px;text-align:center}
.company-logo-drop:hover{border-color:#2f6fed;background:#f4f8ff;color:#2f6fed}
.company-logo-drop input{display:none}
.company-logo-drop i{font-size:24px;color:#618ad4}
.company-logo-drop strong{font-size:14px;color:#193b68}
.company-logo-drop span{font-size:12px}
.company-logo-buttons{grid-area:actions;display:flex;gap:12px;align-items:center}
.company-logo-buttons .secondary-button,.company-logo-buttons .danger-outline-button{min-height:42px;padding:0 17px;justify-content:center}
.danger-outline-button{display:inline-flex;align-items:center;gap:8px;border:1px solid #ffc8c8;background:#fff;color:#e34b4b;border-radius:12px;font:inherit;font-weight:700;cursor:pointer}
.danger-outline-button:hover{background:#fff3f3;border-color:#f29a9a}
.danger-outline-button:disabled{opacity:.45;cursor:not-allowed}
.company-summary-logo{width:128px;height:128px;object-fit:contain;display:block;margin:2px auto 12px;padding:8px;border-radius:24px;background:#f8fbff}
.company-summary-card h2{text-align:center}
.company-status-list div.is-pending i{color:#f59e0b}
.company-status-list div.is-pending strong{background:#fff4dc;color:#b87400}
.company-status-list div.is-complete i{color:#22a06b}
.company-status-list div.is-complete strong{background:#e9f8f0;color:#1a8c5c}
.company-preview-btn{text-decoration:none}

/* Botones contenidos de Datos de la empresa */
.company-contained-button{
  min-height:44px!important;
  padding:0 17px!important;
  border:1px solid #b9c9dd!important;
  border-radius:11px!important;
  background:#fff!important;
  color:var(--navy,#12396c)!important;
  box-shadow:0 2px 6px rgba(18,57,108,.05)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-decoration:none!important;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.company-contained-button i{color:#315f96}
.company-contained-button:hover{
  border-color:#5682ba!important;
  background:#f3f7fd!important;
  box-shadow:0 5px 12px rgba(18,57,108,.09)!important;
  transform:translateY(-1px);
}
.company-contained-button:focus-visible{
  outline:3px solid rgba(47,111,237,.18)!important;
  outline-offset:2px!important;
  border-color:#2f6fed!important;
}
.company-summary-card .company-preview-btn{
  width:100%!important;
  margin-top:16px!important;
}

html[data-theme="dark"] .company-logo-frame,
html[data-theme="dark"] .company-logo-drop,
html[data-theme="dark"] .company-summary-logo{background:#14233a;border-color:#30445f}
html[data-theme="dark"] .company-logo-drop strong{color:#e9f2ff}
html[data-theme="dark"] .danger-outline-button{background:#17253a;color:#ff9b9b;border-color:#68424c}
html[data-theme="dark"] .company-contained-button{
  background:var(--surface,#172033)!important;
  color:#dbeafe!important;
  border-color:#40516b!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .company-contained-button i{color:#93c5fd}
html[data-theme="dark"] .company-contained-button:hover{
  background:#1e3150!important;
  border-color:#5d7da5!important;
}

@media(max-width:760px){
  .company-logo-editor{grid-template-columns:1fr;grid-template-areas:"current" "drop" "actions"}
  .company-logo-buttons{flex-direction:column}
  .company-logo-buttons>*{width:100%}
  .company-contained-button{min-height:46px!important}
}

/* =========================================================
   Formato de tickets: navegación segmentada coherente
   con las pestañas analíticas del Dashboard
   ========================================================= */
.ticket-module-v2 .ticket-tabs{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  margin:0 0 18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--soft);
  box-shadow:none;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}
.ticket-module-v2 .ticket-tabs a{
  min-height:52px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:0 20px;
  border:1px solid transparent;
  border-radius:13px;
  background:transparent;
  color:var(--muted);
  font-family:inherit!important;
  font-size:14px;
  font-weight:800;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.ticket-module-v2 .ticket-tabs a i{
  width:20px;
  text-align:center;
  font-size:16px;
  color:inherit;
}
.ticket-module-v2 .ticket-tabs a:hover{
  background:var(--surface);
  border-color:var(--border);
  color:var(--text);
  transform:translateY(-1px);
}
.ticket-module-v2 .ticket-tabs a.active,
.ticket-module-v2 .ticket-tabs a.active:hover{
  background:#174884;
  border-color:#174884;
  color:#fff;
  box-shadow:0 8px 18px rgba(23,72,132,.18);
  transform:none;
}
.ticket-module-v2 .ticket-tabs a:focus-visible{
  outline:3px solid rgba(23,103,232,.25);
  outline-offset:2px;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-tabs{
  background:#10243d;
  border-color:#294462;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-tabs a{
  color:#aebed1;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-tabs a:hover{
  background:#18334f;
  border-color:#365576;
  color:#eef6ff;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-tabs a.active,
html[data-theme="dark"] .ticket-module-v2 .ticket-tabs a.active:hover{
  background:#1d5ba7;
  border-color:#1d5ba7;
  color:#fff;
}
@media (max-width:760px){
  .ticket-module-v2 .ticket-tabs{
    gap:8px;
    padding:8px;
    border-radius:15px;
  }
  .ticket-module-v2 .ticket-tabs a{
    min-height:46px;
    padding:0 15px;
    font-size:13px;
  }
}

/* =========================================================
   Formato de tickets: contenedor visible en todas las pestañas
   ========================================================= */
.ticket-module-v2 .ticket-tabs a:not(.active){
  background:var(--surface);
  border-color:var(--border);
  color:var(--muted);
  box-shadow:0 1px 2px rgba(15,42,75,.03);
}
.ticket-module-v2 .ticket-tabs a:not(.active):hover{
  background:#f7faff;
  border-color:#aebfd5;
  color:var(--text);
  box-shadow:0 5px 12px rgba(15,42,75,.07);
}
@media (min-width:900px){
  .ticket-module-v2 .ticket-tabs a{
    flex:1 1 0;
  }
}
html[data-theme="dark"] .ticket-module-v2 .ticket-tabs a:not(.active){
  background:#142b45;
  border-color:#365576;
  color:#b9c9da;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-tabs a:not(.active):hover{
  background:#1a3959;
  border-color:#4a6c91;
  color:#fff;
}
/* Correo y SMTP */
.email-hero{margin-bottom:14px}.email-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:8px;margin-bottom:16px}.email-tabs a{display:flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:11px 16px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--muted);font-weight:800;text-decoration:none}.email-tabs a:hover{background:var(--soft);color:var(--text)}.email-tabs a.active{background:#164b8f;color:#fff;border-color:#164b8f;box-shadow:0 8px 18px rgba(22,75,143,.2)}.email-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.72fr);gap:18px}.email-card,.email-side>.panel,.smtp-test{padding:22px}.email-card>header{display:flex;align-items:center;gap:13px;padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid var(--border)}.email-card h2,.email-side h3,.smtp-test h3{margin:0;color:var(--text)}.email-card header p,.smtp-test p{margin:4px 0 0;color:var(--muted)}.email-card>label,.email-grid label,.notification-editor label{display:grid;gap:7px;margin-bottom:15px;font-size:12px;font-weight:800;color:var(--text)}.email-card input,.email-card select,.email-card textarea{width:100%;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);padding:12px}.email-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0 14px}.email-option{display:flex;align-items:flex-start;gap:12px;padding:14px 0;border-top:1px solid var(--border)}.email-option strong,.email-option small{display:block}.email-option small{color:var(--muted);margin-top:3px}.switch-control{position:relative;width:38px;height:22px;flex:none}.switch-control input{position:absolute;opacity:0}.switch-control i{display:block;width:38px;height:22px;border-radius:999px;background:#cbd5e1;padding:3px}.switch-control i:after{content:"";display:block;width:16px;height:16px;border-radius:50%;background:#fff;transition:.2s}.switch-control input:checked+i{background:#1767e8}.switch-control input:checked+i:after{transform:translateX(16px)}.notice-box{display:flex;gap:10px;align-items:flex-start;background:#eff6ff;border:1px solid #cfe0ff;color:#164b8f;border-radius:11px;padding:13px;margin-top:15px}.email-card>footer{display:flex;justify-content:space-between;gap:12px;margin-top:20px}.email-side{display:grid;gap:16px;align-content:start}.status-row{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border)}.status-row span{display:flex;gap:9px;align-items:center}.status-row b{font-size:12px;padding:5px 10px;border-radius:999px}.status-row b.ok{background:#e9f9ef;color:#14804a}.status-row b.pending{background:#fff5db;color:#b87300}.status-row b.error{background:#ffeaea;color:#c93636}.email-side ul{padding-left:20px;color:var(--muted);line-height:2}.status-copy{display:grid;gap:4px;padding:14px 0;border-bottom:1px solid var(--border)}.status-copy span{color:var(--text)}.status-copy small{color:var(--muted)}.smtp-test{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px}.notification-event{border:1px solid var(--border);border-radius:11px;margin-bottom:10px;background:var(--surface)}.notification-event summary{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:13px;cursor:pointer;list-style:none}.notification-event summary span strong,.notification-event summary span small{display:block}.notification-event summary span small{color:var(--muted);margin-top:3px}.notification-editor{padding:0 14px 14px;border-top:1px solid var(--border)}.notification-editor label{margin-top:13px}.variables-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:13px;background:var(--soft);border-radius:10px}.variables-line code{color:#1767e8;background:#eaf2ff;padding:4px 7px;border-radius:6px}.mail-sheet{margin-top:14px;background:#fff;color:#17304f;padding:20px;border:1px solid #dbe5f0;border-radius:10px;line-height:1.65;min-height:220px}.mail-sheet p{white-space:normal}.mail-sheet hr{border:0;border-top:1px solid #dbe5f0}.section-icon{width:48px;height:48px;border-radius:13px;background:#eaf2ff;color:#1767e8;display:grid;place-items:center;font-size:20px;flex:none}@media(max-width:900px){.email-layout{grid-template-columns:1fr}.email-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.email-tabs{display:flex;overflow:auto}.email-tabs a{min-width:180px}.email-grid{grid-template-columns:1fr}.email-card>footer,.smtp-test{flex-direction:column;align-items:stretch}}html[data-theme="dark"] .email-tabs a.active{background:#225f9f}.mail-sheet{color:#17304f!important}

/* ===== Correo y SMTP: acabado visual integrado v2 ===== */
.email-hero{
  display:flex;
  align-items:center;
  gap:16px;
  min-height:118px;
  padding:24px 28px;
  margin-bottom:16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface);
  box-shadow:0 8px 24px rgba(31,64,104,.05);
}
.email-hero .module-icon{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:#eaf2ff;
  color:#1767e8;
  font-size:24px;
}
.email-hero span{
  display:block;
  margin-bottom:4px;
  color:#1767e8;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
}
.email-hero h1{margin:0;color:var(--text);font-size:28px;line-height:1.15}
.email-hero p{margin:6px 0 0;color:var(--muted);font-size:14px}

.email-tabs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:10px;
  margin-bottom:18px;
  border:1px solid var(--border);
  border-radius:17px;
  background:var(--surface);
  box-shadow:0 6px 18px rgba(31,64,104,.045);
}
.email-tabs a{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:54px;
  padding:12px 18px;
  border:1px solid #b9c9dc;
  border-radius:13px;
  background:var(--surface);
  color:#607895;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 2px 5px rgba(31,64,104,.025);
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.email-tabs a:hover{
  background:#f3f7fc;
  border-color:#8da8c7;
  color:#164b8f;
  transform:translateY(-1px);
  box-shadow:0 7px 15px rgba(31,64,104,.08);
}
.email-tabs a.active{
  background:#164b8f;
  color:#fff;
  border-color:#164b8f;
  box-shadow:0 9px 20px rgba(22,75,143,.24);
}

.email-layout{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(300px,.72fr);
  gap:18px;
  align-items:start;
}
.email-layout>div,
.email-layout>form,
.email-layout>aside{min-width:0}
.email-card,.email-side>.panel,.smtp-test{
  border:1px solid var(--border);
  border-radius:17px;
  background:var(--surface);
  box-shadow:0 8px 22px rgba(31,64,104,.045);
}
.email-card{padding:24px}
.email-card>header{
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:18px;
  margin-bottom:20px;
  border-bottom:1px solid var(--border);
}
.email-card>header h2{font-size:20px}
.email-card>header p{font-size:13px}
.section-icon{
  width:52px;
  height:52px;
  flex:0 0 52px;
  border-radius:15px;
  background:#eaf2ff;
  color:#1767e8;
  display:grid;
  place-items:center;
  font-size:21px;
}

.email-card>label,.email-grid label,.notification-editor label{
  display:grid;
  gap:8px;
  margin-bottom:16px;
  color:var(--text);
  font-size:12px;
  font-weight:800;
}
.email-card input,.email-card select,.email-card textarea{
  width:100%;
  min-height:46px;
  padding:11px 13px;
  border:1px solid #c8d6e6 !important;
  border-radius:11px;
  background:var(--surface) !important;
  color:var(--text) !important;
  box-shadow:0 1px 2px rgba(31,64,104,.025);
  outline:none;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.email-card textarea{min-height:126px;resize:vertical}
.email-card input:focus,.email-card select:focus,.email-card textarea:focus{
  border-color:#1767e8 !important;
  box-shadow:0 0 0 3px rgba(23,103,232,.12);
}
.email-card input:disabled{
  background:#f4f7fb !important;
  color:#6c8199 !important;
}
.email-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:3px 16px;
}
.email-option{
  display:flex;
  align-items:flex-start;
  gap:13px;
  padding:15px;
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--soft);
}
.email-option+.email-option{margin-top:10px}
.email-option strong{color:var(--text)}
.email-option small{line-height:1.45}
.notice-box{border-radius:12px;padding:14px 15px}
.email-card>footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding-top:18px;
  margin-top:22px;
  border-top:1px solid var(--border);
}
.email-card>footer:has(> :only-child){justify-content:flex-end}

.email-side{display:grid;gap:16px;align-content:start}
.email-side>.panel{padding:22px}
.email-side h3{margin:0 0 12px;font-size:18px}
.status-row{padding:14px 0}
.status-copy{padding:14px 0}

.smtp-test{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:20px 22px;
  margin-top:16px;
}
.smtp-test>div{min-width:0}
.smtp-test h3{font-size:18px}
.smtp-test .secondary-button{flex:none;min-height:44px;border:1px solid #9eb4cd;background:var(--surface)}

.notifications-card .notification-event{
  overflow:hidden;
  margin-bottom:11px;
  border:1px solid #c8d6e6;
  border-radius:12px;
  background:var(--surface);
  box-shadow:0 2px 6px rgba(31,64,104,.025);
}
.notification-event summary{
  min-height:64px;
  padding:14px 16px;
}
.notification-event summary:hover{background:var(--soft)}
.notification-event[open]{border-color:#9eb8d7;box-shadow:0 6px 14px rgba(31,64,104,.07)}
.notification-event[open] summary{background:#f5f8fc}
.notification-editor{padding:16px;border-top:1px solid var(--border);background:var(--soft)}
.variables-line{margin-top:16px;border:1px solid var(--border)}
.mail-preview .mail-sheet{min-height:240px}

html[data-theme="dark"] .email-hero,
html[data-theme="dark"] .email-tabs,
html[data-theme="dark"] .email-card,
html[data-theme="dark"] .email-side>.panel,
html[data-theme="dark"] .smtp-test{background:var(--surface);border-color:#36516f}
html[data-theme="dark"] .email-hero .module-icon,
html[data-theme="dark"] .section-icon{background:#173b62;color:#7eb3ff}
html[data-theme="dark"] .email-tabs a{background:#122c47;border-color:#486888;color:#b9c9da}
html[data-theme="dark"] .email-tabs a:hover{background:#1a3959;border-color:#6283a6;color:#fff}
html[data-theme="dark"] .email-tabs a.active{background:#225f9f;border-color:#2d72b8;color:#fff}
html[data-theme="dark"] .email-card input,
html[data-theme="dark"] .email-card select,
html[data-theme="dark"] .email-card textarea{background:#102840 !important;border-color:#486888 !important;color:#e7eef7 !important}
html[data-theme="dark"] .email-card input:disabled{background:#18334f !important;color:#9fb0c3 !important}
html[data-theme="dark"] .email-option,
html[data-theme="dark"] .notification-editor{background:#102840;border-color:#36516f}
html[data-theme="dark"] .notification-event{background:#122c47;border-color:#486888}
html[data-theme="dark"] .notification-event summary:hover,
html[data-theme="dark"] .notification-event[open] summary{background:#173650}

@media(max-width:900px){
  .email-layout{grid-template-columns:1fr}
  .email-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:680px){
  .email-hero{padding:20px;min-height:104px}
  .email-hero h1{font-size:24px}
  .email-tabs{display:flex;overflow-x:auto;scrollbar-width:thin}
  .email-tabs a{min-width:190px;flex:0 0 auto}
  .email-grid{grid-template-columns:1fr}
  .email-card>footer,.smtp-test{flex-direction:column;align-items:stretch}
  .email-card>footer .primary-button,.email-card>footer .secondary-button,.smtp-test .secondary-button{width:100%;justify-content:center}
}


/* Validación del dominio interno */
.domain-field-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:1px;color:var(--muted);font-weight:500;line-height:1.4}
.domain-field-meta small:first-child{max-width:78%}
.domain-counter{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted)}
.domain-counter.limit-near{color:#b87300;font-weight:800}
.field-error{display:block;min-height:18px;color:#c93636;font-size:12px;font-weight:700;line-height:1.4}
.email-card input.is-invalid{border-color:#dc3f3f !important;box-shadow:0 0 0 3px rgba(220,63,63,.12) !important}
.email-card button:disabled{opacity:.52;cursor:not-allowed;transform:none!important;box-shadow:none!important}
.domain-example-invalid{color:var(--muted);font-style:italic}
html[data-theme="dark"] .field-error{color:#ff9a9a}
html[data-theme="dark"] .domain-counter.limit-near{color:#ffd27a}
@media(max-width:620px){.domain-field-meta{flex-direction:column;gap:5px}.domain-field-meta small:first-child{max-width:100%}}

/* Corrección visual: botón Restablecer de Dominio interno */
.email-card>footer .domain-reset-button{
  min-width:138px !important;
  min-height:46px !important;
  padding:0 18px !important;
  border:1px solid #aebfd3 !important;
  border-radius:11px !important;
  background:#ffffff !important;
  color:#153f70 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:9px !important;
  font-weight:800 !important;
  line-height:1 !important;
  box-shadow:0 2px 6px rgba(31,64,104,.06) !important;
  cursor:pointer !important;
  transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease !important;
}
.email-card>footer .domain-reset-button:hover{
  background:#f1f6fc !important;
  border-color:#6f91b8 !important;
  color:#164b8f !important;
  box-shadow:0 7px 15px rgba(31,64,104,.10) !important;
  transform:translateY(-1px);
}
.email-card>footer .domain-reset-button:focus-visible{
  outline:none !important;
  border-color:#1767e8 !important;
  box-shadow:0 0 0 3px rgba(23,103,232,.14) !important;
}
.email-card>footer .domain-reset-button:active{transform:translateY(0)}
html[data-theme="dark"] .email-card>footer .domain-reset-button{
  background:#122c47 !important;
  border-color:#557596 !important;
  color:#e7eef7 !important;
}
html[data-theme="dark"] .email-card>footer .domain-reset-button:hover{
  background:#1a3959 !important;
  border-color:#7698ba !important;
}
@media(max-width:620px){
  .email-card>footer .domain-reset-button{width:100% !important}
}


/* SMTP: prueba autenticada de envío real */
.smtp-send-test{margin-top:16px;padding:22px;display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,.9fr) auto;gap:18px;align-items:end}
.smtp-send-test h3{margin:0;color:var(--text);font-size:18px}.smtp-send-test p{margin:4px 0 0;color:var(--muted)}
.smtp-send-test label{display:grid;gap:7px;margin:0;font-size:12px;font-weight:800;color:var(--text)}
.smtp-send-test input{width:100%;min-height:44px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);padding:12px}
.smtp-send-test input:focus{outline:none;border-color:#1767e8;box-shadow:0 0 0 3px rgba(23,103,232,.12)}
.smtp-send-test .primary-button{min-height:44px;white-space:nowrap;justify-content:center}
html[data-theme="dark"] .smtp-send-test{background:var(--surface);border-color:#36516f}html[data-theme="dark"] .smtp-send-test input{background:#102840!important;border-color:#486888!important;color:#e7eef7!important}
@media(max-width:900px){.smtp-send-test{grid-template-columns:1fr 1fr}.smtp-send-copy{grid-column:1/-1}}
@media(max-width:620px){.smtp-send-test{grid-template-columns:1fr}.smtp-send-copy{grid-column:auto}.smtp-send-test .primary-button{width:100%}}


/* =========================================================
   CORRECCIÓN FINAL DE NOTIFICACIONES GLOBALES
   Evita mensajes angostos, recortados o superpuestos.
   ========================================================= */
[data-auto-dismiss].app-toast{
  top:96px!important;
  right:28px!important;
  left:auto!important;
  width:min(440px, calc(100vw - 40px))!important;
  min-width:min(320px, calc(100vw - 40px))!important;
  max-width:440px!important;
  min-height:68px!important;
  height:auto!important;
  grid-template-columns:40px minmax(0,1fr) 34px!important;
  align-items:start!important;
  overflow:visible!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  transform:translateY(var(--toast-offset, 0px))!important;
}
[data-auto-dismiss].app-toast .toast-icon,
[data-auto-dismiss].app-toast > i{
  align-self:start!important;
  flex:0 0 auto!important;
}
[data-auto-dismiss].app-toast .toast-content{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  overflow:visible!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  line-height:1.45!important;
  text-align:left!important;
}
[data-auto-dismiss].app-toast .toast-content,
[data-auto-dismiss].app-toast .toast-content *{
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
}
[data-auto-dismiss].app-toast .toast-content > span,
[data-auto-dismiss].app-toast .toast-content > strong,
[data-auto-dismiss].app-toast .toast-content > p,
[data-auto-dismiss].app-toast .toast-content > div{
  display:block!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  margin:0!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
[data-auto-dismiss].app-toast .toast-close{
  align-self:start!important;
  position:static!important;
  flex:0 0 auto!important;
}
[data-auto-dismiss].app-toast.notification-hiding{
  transform:translateY(var(--toast-offset, 0px)) translateX(28px)!important;
}
@keyframes toastSlideInFinal{
  from{opacity:0;transform:translateY(var(--toast-offset, 0px)) translateX(28px)}
  to{opacity:1;transform:translateY(var(--toast-offset, 0px)) translateX(0)}
}
[data-auto-dismiss].app-toast{animation:toastSlideInFinal .28s ease both!important}
@media(max-width:760px){
  [data-auto-dismiss].app-toast{
    top:16px!important;
    right:14px!important;
    left:14px!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    grid-template-columns:38px minmax(0,1fr) 32px!important;
  }
}

/* Módulo independiente: Plantillas de correo */
.email-template-page-header{display:flex;align-items:center;gap:18px}.email-template-page-header>div:last-child>span{font-size:12px;color:#1769e8;font-weight:700}.email-template-tabs{margin-top:14px}.email-template-workspace{display:grid;grid-template-columns:minmax(290px,380px) minmax(0,1fr);gap:20px;margin-top:18px}.email-template-info,.email-template-preview-panel,.email-template-structure{padding:24px}.email-template-info header,.email-template-preview-panel header,.email-template-structure header{display:flex;align-items:center;gap:14px}.email-template-info h3{font-size:14px;margin:24px 0 8px}.email-template-info code{display:block;padding:12px 14px;border:1px solid var(--border,#dbe5f1);border-radius:10px;background:#f6f9fd;overflow-wrap:anywhere}.email-template-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:22px;padding:13px;border:1px solid #dbe7f7;border-radius:12px;background:#f8fbff;font-size:13px}.email-template-preview-panel header{justify-content:space-between;margin-bottom:16px}.email-template-preview{display:block;width:100%;height:820px;border:1px solid #dbe5f1;border-radius:15px;background:#f3f6fb}.email-template-structure{margin-top:18px}.email-template-structure pre{margin:22px 0;padding:20px;border-radius:14px;background:#101b2d;color:#dceaff;overflow:auto;line-height:1.65}.email-template-structure .info-box,.email-template-info .info-box{margin-top:22px}.status-pill.success{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#e7f8ef;color:#168052;font-size:12px;font-weight:700}@media(max-width:980px){.email-template-workspace{grid-template-columns:1fr}.email-template-preview{height:760px}}@media(max-width:600px){.email-template-info,.email-template-preview-panel,.email-template-structure{padding:16px}.email-template-preview{height:700px}}


/* Usuario: correo interno automático y correo de recuperación */
.access-email-shell{position:relative;padding-right:104px}
.access-email-shell input[readonly]{background:#f7faff;color:#24456f;font-weight:700}
.access-email-status{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:11px;font-weight:800;color:#16803d;background:#eaf8ef;border:1px solid #bce8ca;border-radius:999px;padding:4px 8px}
.user-email-optin{display:flex!important;align-items:flex-start;gap:10px;padding:14px 16px;border:1px solid #d8e3f0;border-radius:14px;background:#f8fbff}
.user-email-optin span{display:grid;gap:3px}.user-email-optin small{color:#71839b;font-weight:400}
html[data-theme="dark"] .access-email-shell input[readonly],html[data-theme="dark"] .user-email-optin{background:#12233b;border-color:#29415f;color:#dce8f7}
@media(max-width:760px){.access-email-shell{padding-right:12px}.access-email-status{position:static;transform:none;margin-left:8px}.user-access-grid .span-2{grid-column:auto}}

/* Recuperación de contraseña */
.auth-forgot-row{display:flex;justify-content:flex-end;margin:-4px 0 6px}.auth-forgot-row a{color:#1767c7;font-weight:700;text-decoration:none}.auth-forgot-row a:hover{text-decoration:underline}
.auth-inline-help{display:block;text-align:left;color:#718198;margin:-4px 0 14px;line-height:1.4}
.auth-secondary-link{display:flex;align-items:center;justify-content:center;gap:8px;height:50px;border:1px solid #b9cff0;border-radius:13px;color:#1767c7;text-decoration:none;font-weight:700;margin-top:12px}.auth-secondary-link:hover{background:#f1f6ff}
.auth-alert-success{background:#edf9f1!important;color:#198754!important;border-color:#c9efd6!important}
.login-icon-success{background:#e8f8ed!important;color:#19a45a!important}
.auth-submit-link{display:flex;align-items:center;justify-content:center;text-decoration:none}
.password-rules{display:flex;gap:8px;flex-wrap:wrap;margin:-5px 0 10px}.password-rules span{font-size:12px;background:#eef4fb;border:1px solid #dce8f5;border-radius:999px;padding:6px 9px;color:#44617f}
.auth-security-note{display:flex;gap:9px;align-items:center;text-align:left;background:#eef5ff;border:1px solid #d3e4fa;color:#315d91;border-radius:11px;padding:12px 14px;margin:13px 0}
.password-eye{width:46px!important;height:100%;border:0;background:transparent;color:#718198;cursor:pointer}


/* LOGIN: usuario corto con dominio interno visible y dinámico */
.auth-user-control{display:flex;align-items:center;overflow:hidden!important}
.auth-user-control input{flex:1 1 auto;min-width:90px}
.auth-domain-suffix{height:100%;flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:0 14px;background:#f3f6fa;border-left:1px solid #d7e1ed;color:#6f7f94;white-space:nowrap;font-size:14px}
.auth-domain-suffix b{font-weight:700}
.auth-domain-suffix i{font-size:11px;color:#8291a5}
.auth-field-help{display:block;margin-top:7px;color:#8090a5;font-size:12px;line-height:1.35}
@media(max-width:520px){.auth-domain-suffix{padding:0 9px;font-size:12px}.auth-domain-suffix i{display:none}.auth-user-control input{min-width:70px}}


/* Validaciones funcionales del formulario Nuevo usuario */
.user-password-rules{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.user-password-rules span{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#7b8da4;background:#f5f8fc;border:1px solid #dfe8f3;border-radius:999px;padding:5px 8px;transition:.18s}.user-password-rules span i{font-size:7px}.user-password-rules span.valid{color:#15834c;background:#edf9f2;border-color:#ccebd9}.user-password-rules span.valid i{font-size:11px}.user-password-rules span.invalid{color:#c33b45;background:#fff2f3;border-color:#f2d0d4}.password-match-ok{color:#16834c!important}.field-error{color:#dc3545!important}.input-shell:has(input:invalid:not(:placeholder-shown)){border-color:#ef9aa3}.input-shell:has(input:valid:not(:placeholder-shown)){border-color:#9ed7b5}
html[data-theme="dark"] .user-password-rules span{background:#172235;border-color:#2b3a51;color:#a7b5c8}html[data-theme="dark"] .user-password-rules span.valid{background:#123526;border-color:#245d43;color:#80d3a3}html[data-theme="dark"] .user-password-rules span.invalid{background:#3a1d23;border-color:#66313b;color:#f3a1ab}

/* AVANCE 23: respeta el atributo hidden en validaciones del formulario de usuario */
.user-management-form [hidden]{display:none!important}

/* AVANCE 24: ajustes visuales del formulario Nuevo usuario */
.user-management-modal footer .user-cancel-button{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-height:48px;padding:0 22px;border:1px solid #b8c9dc!important;
  border-radius:12px;background:#fff!important;color:#173c69!important;
  box-shadow:0 2px 6px rgba(15,54,94,.05);font-weight:700;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.user-management-modal footer .user-cancel-button:hover{
  background:#f4f8fc!important;border-color:#7fa2c8!important;
  box-shadow:0 5px 14px rgba(15,54,94,.10);transform:translateY(-1px);
}
.user-management-modal footer .user-cancel-button:focus-visible{
  outline:3px solid rgba(37,99,235,.22);outline-offset:2px;
}
html[data-theme="dark"] .user-management-modal footer .user-cancel-button{
  background:var(--surface)!important;color:var(--text)!important;border-color:var(--border-theme)!important;
}
@media(max-width:760px){
  .user-management-modal footer .user-cancel-button{flex:1}
}

/* AVANCE 25: formulario rápido de cliente dinámico y validado */
#customerModal .quick-customer-modal{width:min(1120px,calc(100vw - 36px));}
#customerModal .quick-customer-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:22px 28px;padding:30px 36px;}
#customerModal .quick-customer-grid .qcg-third{grid-column:span 2;}
#customerModal .quick-customer-grid .qcg-half{grid-column:span 3;}
#customerModal .quick-customer-grid .field input,#customerModal .quick-customer-grid .field select{height:56px;}
#customerModal .quick-customer-grid .input-shell>i{min-width:56px;}
#customerModal .quick-customer-modal>header{padding:24px 34px;}
#customerModal .quick-customer-modal footer{padding:20px 34px;}
#customerModal .field-error[hidden]{display:none!important;}
#customerModal .field-help{display:block;color:var(--muted);font-size:10.5px;line-height:1.35;margin-top:1px;}
#customerModal .field-error{display:block;color:#dc3545;font-size:10.5px;line-height:1.35;margin-top:1px;font-weight:700;}
#customerModal .field-error[hidden],#customerModal [hidden]{display:none!important;}
#customerModal .secondary-button{min-width:120px;}
@media(max-width:900px){#customerModal .quick-customer-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:24px;}#customerModal .quick-customer-grid .qcg-third,#customerModal .quick-customer-grid .qcg-half{grid-column:span 1;}}
@media(max-width:760px){#customerModal .quick-customer-grid{grid-template-columns:1fr;padding:20px;}#customerModal .quick-customer-grid .qcg-third,#customerModal .quick-customer-grid .qcg-half{grid-column:1;}#customerModal .quick-customer-modal{width:min(560px,calc(100vw - 20px));}}

/* AVANCE 27: botón Cancelar visible en Registrar cliente */
#customerModal .quick-customer-modal footer .customer-cancel-button{
  min-height:48px;
  padding:0 22px;
  border:1px solid #9fb3cc !important;
  background:#ffffff !important;
  color:#12396c !important;
  border-radius:12px;
  box-shadow:0 2px 7px rgba(18,57,108,.06);
  opacity:1;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
#customerModal .quick-customer-modal footer .customer-cancel-button:hover{
  background:#f4f8fd !important;
  border-color:#6f91bc !important;
  box-shadow:0 5px 14px rgba(18,57,108,.12);
  transform:translateY(-1px);
}
#customerModal .quick-customer-modal footer .customer-cancel-button:focus-visible{
  outline:3px solid rgba(47,111,237,.20);
  outline-offset:2px;
}
#customerModal .quick-customer-modal footer .customer-cancel-button:active{transform:translateY(0);}
html[data-theme="dark"] #customerModal .quick-customer-modal footer .customer-cancel-button{
  background:var(--surface-2,#17243a) !important;
  color:var(--text-theme,#e8eef8) !important;
  border-color:var(--border-theme,#46566f) !important;
}
html[data-theme="dark"] #customerModal .quick-customer-modal footer .customer-cancel-button:hover{
  background:#22324b !important;
  border-color:#7184a3 !important;
}
@media(max-width:620px){
  #customerModal .quick-customer-modal footer .customer-cancel-button{flex:1;}
}

/* =========================================================
   CONTROL DE CAJA - BOTONES SECUNDARIOS CON CONTENEDOR
   ========================================================= */
#cashQuickModal .quick-topbar-modal-window > footer .secondary-button{
  min-height:46px;
  padding:0 20px;
  border:1px solid #b9c9dd !important;
  border-radius:12px;
  background:#ffffff !important;
  color:#12345f !important;
  box-shadow:0 2px 7px rgba(15,42,77,.06);
  font-weight:750;
  line-height:1;
  text-decoration:none;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
#cashQuickModal .quick-topbar-modal-window > footer .secondary-button:hover{
  background:#f3f7fc !important;
  border-color:#7f9fc6 !important;
  box-shadow:0 5px 14px rgba(15,42,77,.10);
  transform:translateY(-1px);
}
#cashQuickModal .quick-topbar-modal-window > footer .secondary-button:focus-visible{
  outline:3px solid rgba(47,111,237,.20);
  outline-offset:2px;
  border-color:#2f6fed !important;
}
#cashQuickModal .quick-topbar-modal-window > footer .primary-button{
  min-height:46px;
  border-radius:12px;
}
html[data-theme="dark"] #cashQuickModal .quick-topbar-modal-window > footer .secondary-button{
  background:#16253a !important;
  border-color:#40526b !important;
  color:#edf5ff !important;
  box-shadow:none;
}
html[data-theme="dark"] #cashQuickModal .quick-topbar-modal-window > footer .secondary-button:hover{
  background:#20324a !important;
  border-color:#6682a6 !important;
}
@media(max-width:640px){
  #cashQuickModal .quick-topbar-modal-window > footer{
    flex-direction:column;
    align-items:stretch;
  }
  #cashQuickModal .quick-topbar-modal-window > footer .secondary-button,
  #cashQuickModal .quick-topbar-modal-window > footer .primary-button{
    width:100%;
    justify-content:center;
  }
}

/* =========================================================
   AVANCE 29: botones Cerrar visibles en modales superiores
   ========================================================= */
#preOrdersModal .quick-topbar-modal-window > footer .secondary-button,
#undeliveredOrdersModal .quick-topbar-modal-window > footer .secondary-button,
#unclosedOrdersModal .quick-topbar-modal-window > footer .secondary-button{
  min-height:46px;
  padding:0 22px;
  border:1px solid #b9c9dd !important;
  border-radius:12px;
  background:#ffffff !important;
  color:#12345f !important;
  box-shadow:0 2px 7px rgba(15,42,77,.06);
  font-weight:750;
  line-height:1;
  opacity:1;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
#preOrdersModal .quick-topbar-modal-window > footer .secondary-button:hover,
#undeliveredOrdersModal .quick-topbar-modal-window > footer .secondary-button:hover,
#unclosedOrdersModal .quick-topbar-modal-window > footer .secondary-button:hover{
  background:#f3f7fc !important;
  border-color:#7f9fc6 !important;
  box-shadow:0 5px 14px rgba(15,42,77,.10);
  transform:translateY(-1px);
}
#preOrdersModal .quick-topbar-modal-window > footer .secondary-button:focus-visible,
#undeliveredOrdersModal .quick-topbar-modal-window > footer .secondary-button:focus-visible,
#unclosedOrdersModal .quick-topbar-modal-window > footer .secondary-button:focus-visible{
  outline:3px solid rgba(47,111,237,.20);
  outline-offset:2px;
  border-color:#2f6fed !important;
}
#preOrdersModal .quick-topbar-modal-window > footer .secondary-button:active,
#undeliveredOrdersModal .quick-topbar-modal-window > footer .secondary-button:active,
#unclosedOrdersModal .quick-topbar-modal-window > footer .secondary-button:active{
  transform:translateY(0);
}
#preOrdersModal .quick-topbar-modal-window > footer .primary-button,
#undeliveredOrdersModal .quick-topbar-modal-window > footer .primary-button,
#unclosedOrdersModal .quick-topbar-modal-window > footer .primary-button{
  min-height:46px;
  border-radius:12px;
}
html[data-theme="dark"] #preOrdersModal .quick-topbar-modal-window > footer .secondary-button,
html[data-theme="dark"] #undeliveredOrdersModal .quick-topbar-modal-window > footer .secondary-button,
html[data-theme="dark"] #unclosedOrdersModal .quick-topbar-modal-window > footer .secondary-button{
  background:#16253a !important;
  border-color:#40526b !important;
  color:#edf5ff !important;
  box-shadow:none;
}
html[data-theme="dark"] #preOrdersModal .quick-topbar-modal-window > footer .secondary-button:hover,
html[data-theme="dark"] #undeliveredOrdersModal .quick-topbar-modal-window > footer .secondary-button:hover,
html[data-theme="dark"] #unclosedOrdersModal .quick-topbar-modal-window > footer .secondary-button:hover{
  background:#20324a !important;
  border-color:#6682a6 !important;
}
@media(max-width:640px){
  #preOrdersModal .quick-topbar-modal-window > footer,
  #undeliveredOrdersModal .quick-topbar-modal-window > footer,
  #unclosedOrdersModal .quick-topbar-modal-window > footer{
    flex-direction:column;
    align-items:stretch;
  }
  #preOrdersModal .quick-topbar-modal-window > footer .secondary-button,
  #preOrdersModal .quick-topbar-modal-window > footer .primary-button,
  #undeliveredOrdersModal .quick-topbar-modal-window > footer .secondary-button,
  #undeliveredOrdersModal .quick-topbar-modal-window > footer .primary-button,
  #unclosedOrdersModal .quick-topbar-modal-window > footer .secondary-button,
  #unclosedOrdersModal .quick-topbar-modal-window > footer .primary-button{
    width:100%;
    justify-content:center;
  }
}

/* =========================================================
   AVANCE 30: botones secundarios visibles en Perfil, Cuenta y Soporte
   ========================================================= */
#userProfileModal .user-modal-window > form > footer .secondary-button,
#accountSettingsModal .user-modal-window > form > footer .secondary-button,
#supportModal .user-modal-window > form > footer .secondary-button{
  min-height:46px;
  padding:0 22px;
  border:1px solid #b9c9dd !important;
  border-radius:12px;
  background:#ffffff !important;
  color:#12345f !important;
  box-shadow:0 2px 7px rgba(15,42,77,.06);
  font-weight:750;
  line-height:1;
  opacity:1;
  text-decoration:none;
  transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
#userProfileModal .user-modal-window > form > footer .secondary-button:hover,
#accountSettingsModal .user-modal-window > form > footer .secondary-button:hover,
#supportModal .user-modal-window > form > footer .secondary-button:hover{
  background:#f3f7fc !important;
  border-color:#7f9fc6 !important;
  box-shadow:0 5px 14px rgba(15,42,77,.10);
  transform:translateY(-1px);
}
#userProfileModal .user-modal-window > form > footer .secondary-button:focus-visible,
#accountSettingsModal .user-modal-window > form > footer .secondary-button:focus-visible,
#supportModal .user-modal-window > form > footer .secondary-button:focus-visible{
  outline:3px solid rgba(47,111,237,.20);
  outline-offset:2px;
  border-color:#2f6fed !important;
}
#userProfileModal .user-modal-window > form > footer .secondary-button:active,
#accountSettingsModal .user-modal-window > form > footer .secondary-button:active,
#supportModal .user-modal-window > form > footer .secondary-button:active{
  transform:translateY(0);
}
#userProfileModal .user-modal-window > form > footer .primary-button,
#accountSettingsModal .user-modal-window > form > footer .primary-button,
#supportModal .user-modal-window > form > footer .primary-button{
  min-height:46px;
  border-radius:12px;
}
html[data-theme="dark"] #userProfileModal .user-modal-window > form > footer .secondary-button,
html[data-theme="dark"] #accountSettingsModal .user-modal-window > form > footer .secondary-button,
html[data-theme="dark"] #supportModal .user-modal-window > form > footer .secondary-button{
  background:#16253a !important;
  border-color:#40526b !important;
  color:#edf5ff !important;
  box-shadow:none;
}
html[data-theme="dark"] #userProfileModal .user-modal-window > form > footer .secondary-button:hover,
html[data-theme="dark"] #accountSettingsModal .user-modal-window > form > footer .secondary-button:hover,
html[data-theme="dark"] #supportModal .user-modal-window > form > footer .secondary-button:hover{
  background:#20324a !important;
  border-color:#6682a6 !important;
}
@media(max-width:640px){
  #userProfileModal .user-modal-window > form > footer,
  #accountSettingsModal .user-modal-window > form > footer,
  #supportModal .user-modal-window > form > footer{
    flex-direction:column;
    align-items:stretch;
  }
  #userProfileModal .user-modal-window > form > footer .secondary-button,
  #userProfileModal .user-modal-window > form > footer .primary-button,
  #accountSettingsModal .user-modal-window > form > footer .secondary-button,
  #accountSettingsModal .user-modal-window > form > footer .primary-button,
  #supportModal .user-modal-window > form > footer .secondary-button,
  #supportModal .user-modal-window > form > footer .primary-button{
    width:100%;
    justify-content:center;
  }
}

/* =========================================================
   AVANCE 32 - HISTORIAL DE CAJAS: BUSCADOR Y LIMPIAR
   Corrige el área editable del buscador y refuerza el botón.
   ========================================================= */
.cash-history-toolbar .cash-history-search{
  display:flex!important;
  align-items:stretch!important;
  width:100%!important;
  min-width:0!important;
  min-height:54px!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #cbd9ea!important;
  border-radius:14px!important;
  background:#fff!important;
  box-sizing:border-box!important;
}

.cash-history-toolbar .cash-history-search > i{
  flex:0 0 56px!important;
  width:56px!important;
  min-width:56px!important;
  min-height:54px!important;
  align-self:stretch!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
}

.cash-history-toolbar .cash-history-search input#cashHistorySearch{
  display:block!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:54px!important;
  min-height:54px!important;
  margin:0!important;
  padding:0 18px!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  box-sizing:border-box!important;
  appearance:none!important;
}

.cash-history-toolbar .cash-history-search:focus-within{
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.14)!important;
}

.cash-history-toolbar button#cashHistoryClear.cash-history-clear{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  min-width:122px!important;
  min-height:54px!important;
  height:54px!important;
  padding:0 20px!important;
  border:1.5px solid #b8c9df!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#15365f!important;
  box-shadow:0 3px 10px rgba(15,42,77,.06)!important;
  box-sizing:border-box!important;
}

.cash-history-toolbar button#cashHistoryClear.cash-history-clear:hover{
  background:#f2f7ff!important;
  border-color:#789dce!important;
  color:#0f4f91!important;
  box-shadow:0 7px 16px rgba(15,42,77,.10)!important;
}

.cash-history-toolbar button#cashHistoryClear.cash-history-clear:focus-visible{
  outline:0!important;
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.16)!important;
}

html[data-theme="dark"] .cash-history-toolbar .cash-history-search,
html[data-theme="dark"] .cash-history-toolbar button#cashHistoryClear.cash-history-clear{
  background:#101b2c!important;
  border-color:#38506d!important;
  color:#e5edf8!important;
}

html[data-theme="dark"] .cash-history-toolbar .cash-history-search input#cashHistorySearch{
  color:#e5edf8!important;
}

html[data-theme="dark"] .cash-history-toolbar button#cashHistoryClear.cash-history-clear:hover{
  background:#223754!important;
  border-color:#5b7da7!important;
  color:#fff!important;
}

@media (max-width:900px){
  .cash-history-toolbar button#cashHistoryClear.cash-history-clear{
    width:100%!important;
  }
}

/* =========================================================
   AVANCE 35 - CATEGORÍAS DE INVENTARIO: BUSCADOR UNIFICADO
   Ajusta el buscador al mismo diseño visual usado en otros módulos.
   ========================================================= */
.inventory-categories-toolbar .inventory-category-search{
  display:flex!important;
  align-items:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:600px!important;
  min-height:54px!important;
  height:54px!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #cbd9ea!important;
  border-radius:14px!important;
  background:#fff!important;
  box-sizing:border-box!important;
}

.inventory-categories-toolbar .inventory-category-search > i{
  flex:0 0 56px!important;
  width:56px!important;
  min-width:56px!important;
  min-height:54px!important;
  align-self:stretch!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  background:#eef4ff!important;
  border-right:1px solid #dce7f5!important;
  color:#2f6fed!important;
}

.inventory-categories-toolbar .inventory-category-search input#inventoryCategorySearch{
  display:block!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:54px!important;
  min-height:54px!important;
  margin:0!important;
  padding:0 18px!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  color:#17355e!important;
  box-sizing:border-box!important;
  appearance:none!important;
}

.inventory-categories-toolbar .inventory-category-search input#inventoryCategorySearch::placeholder{
  color:#8a99ad!important;
  opacity:1!important;
}

.inventory-categories-toolbar .inventory-category-search:focus-within{
  border-color:#2f6fed!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.14)!important;
}

html[data-theme="dark"] .inventory-categories-toolbar .inventory-category-search{
  background:#101a2b!important;
  border-color:#2a3e5d!important;
}

html[data-theme="dark"] .inventory-categories-toolbar .inventory-category-search input#inventoryCategorySearch{
  color:#e7eef8!important;
}

html[data-theme="dark"] .inventory-categories-toolbar .inventory-category-search input#inventoryCategorySearch::placeholder{
  color:#95a8c4!important;
}

/* =========================================================
   AVANCE 36 - REPORTES: BOTONES PDF Y EXCEL UNIFICADOS
   Ventas, Producción, Clientes y Caja.
   ========================================================= */
.sales-report-filters > .secondary-button,
.production-report-filters > .secondary-button,
.clients-report-filters > .secondary-button,
.cash-report-filters > .secondary-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  min-width:96px!important;
  height:52px!important;
  min-height:52px!important;
  padding:0 18px!important;
  border-radius:14px!important;
  background:#fff!important;
  font-weight:800!important;
  white-space:nowrap!important;
  box-shadow:0 3px 10px rgba(15,42,77,.06)!important;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease!important;
}

.sales-report-filters > .secondary-button:hover,
.production-report-filters > .secondary-button:hover,
.clients-report-filters > .secondary-button:hover,
.cash-report-filters > .secondary-button:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(15,35,70,.10)!important;
}

.sales-report-filters > .secondary-button:focus-visible,
.production-report-filters > .secondary-button:focus-visible,
.clients-report-filters > .secondary-button:focus-visible,
.cash-report-filters > .secondary-button:focus-visible{
  outline:0!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.14)!important;
}

.sales-export-pdf,
.production-export-pdf,
.clients-export-pdf,
.cash-export-pdf{
  color:#d93636!important;
  border:1.5px solid #f3bcbc!important;
}
.sales-export-pdf:hover,
.production-export-pdf:hover,
.clients-export-pdf:hover,
.cash-export-pdf:hover{
  color:#b42323!important;
  background:#fff5f5!important;
  border-color:#ef9f9f!important;
}

.sales-export-excel,
.production-export-excel,
.clients-export-excel,
.cash-export-excel{
  color:#18864b!important;
  border:1.5px solid #a9dfbe!important;
}
.sales-export-excel:hover,
.production-export-excel:hover,
.clients-export-excel:hover,
.cash-export-excel:hover{
  color:#116b3a!important;
  background:#f2fbf6!important;
  border-color:#80ce9d!important;
}

.sales-export-pdf i,
.production-export-pdf i,
.clients-export-pdf i,
.cash-export-pdf i{color:#ef4444!important}

.sales-export-excel i,
.production-export-excel i,
.clients-export-excel i,
.cash-export-excel i{color:#16a34a!important}

html[data-theme="dark"] .sales-report-filters > .secondary-button,
html[data-theme="dark"] .production-report-filters > .secondary-button,
html[data-theme="dark"] .clients-report-filters > .secondary-button,
html[data-theme="dark"] .cash-report-filters > .secondary-button{
  background:#142238!important;
}

html[data-theme="dark"] .sales-export-pdf,
html[data-theme="dark"] .production-export-pdf,
html[data-theme="dark"] .clients-export-pdf,
html[data-theme="dark"] .cash-export-pdf{
  color:#ff9a9a!important;
  border-color:#7b3e49!important;
}

html[data-theme="dark"] .sales-export-excel,
html[data-theme="dark"] .production-export-excel,
html[data-theme="dark"] .clients-export-excel,
html[data-theme="dark"] .cash-export-excel{
  color:#8ee5ae!important;
  border-color:#356c4b!important;
}

/* ===== AVANCE 37: Tarifas generales y tarifas específicas por empresa ===== */
.tariff-scope-tabs{display:flex;align-items:center;gap:0;padding:0 24px!important;overflow:hidden}
.tariff-scope-tabs a{min-height:62px;padding:0 24px;display:flex;align-items:center;border-bottom:3px solid transparent;color:#667797;font-weight:750;text-decoration:none}
.tariff-scope-tabs a.active{color:#2f6fed;border-bottom-color:#2f6fed}
.company-tariff-card{padding:0!important;overflow:hidden}
.company-tariff-toolbar{display:flex;align-items:flex-end;gap:14px;padding:22px 24px 12px;border-bottom:0}
.company-selector{display:flex;flex-direction:column;gap:7px;min-width:290px}.company-selector>span{font-size:12px;color:#667797;font-weight:700}
.company-selector select{height:48px;border:1px solid #cfdced;border-radius:12px;background:#fff;padding:0 14px;color:#17355e}
.company-tariff-status{height:38px;padding:0 13px;border:1px solid #ccebd7;border-radius:10px;background:#edf9f1;color:#278354;display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.company-tariff-status i{font-size:8px}
.company-tariff-actions{margin-left:auto;display:flex;align-items:center;gap:9px;flex-wrap:wrap}.company-tariff-actions form{margin:0}.company-tariff-actions .secondary-button{min-height:46px;white-space:nowrap}
.upload-tariff-button{color:#2f6fed!important;border-color:#9fc0e8!important}.bulk-tariff-button{color:#d97706!important;border-color:#f7c26d!important;background:#fffaf0!important}
.company-tariff-help{margin:0 24px 18px;padding:11px 14px;border-radius:10px;background:#f7faff;color:#61728d;font-size:12px;display:flex;align-items:center;gap:8px}
.company-matrix-toolbar{display:grid;grid-template-columns:minmax(280px,1.5fr) minmax(170px,.75fr) minmax(170px,.75fr) auto auto;align-items:end;gap:14px;padding:18px 24px;border-top:1px solid #e5ebf3;border-bottom:1px solid #e5ebf3}
.company-matrix-toolbar .tariffs-search{max-width:none!important}.company-matrix-toolbar .primary-button,.company-matrix-toolbar .secondary-button{height:54px;white-space:nowrap}
.company-fallback-note{margin:16px 24px 20px;padding:12px 15px;border:1px solid #bcd2f5;border-radius:10px;background:#f2f7ff;color:#2f61a9;display:flex;align-items:center;gap:9px;font-size:12px}
.price-input.fallback{border-style:dashed!important;background:#fbfdff!important}.price-input.fallback input::placeholder{color:#9aa9bc;opacity:1}
.company-tariff-empty{padding:60px 24px!important}.company-tariff-empty i{font-size:34px;color:#8aa3c5}
.tariff-operation-modal{width:min(650px,calc(100vw - 32px))!important}.tariff-operation-modal .modal-content{padding:22px!important}.tariff-import-top{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end}.tariff-import-top .secondary-button{height:48px}
.tariff-dropzone{margin-top:18px;min-height:180px;border:2px dashed #7ba7eb;border-radius:15px;background:#f8fbff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#426a9e;cursor:pointer;text-align:center}.tariff-dropzone>i{font-size:34px;color:#2f6fed}.tariff-dropzone strong{font-size:15px;color:#17355e}.tariff-dropzone input{width:auto!important;border:0!important;background:transparent!important;padding:8px!important}
.tariff-import-format{margin-top:15px;padding:12px;border:1px solid #dce6f3;border-radius:10px;display:flex;justify-content:space-between;gap:12px;color:#667797;font-size:12px}
.bulk-tariff-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:15px}.bulk-tariff-preview{margin-top:16px;padding:16px;border:1px solid #dce6f3;border-radius:13px;background:#f8fbff;display:flex;align-items:center;gap:13px}.bulk-tariff-preview>i{width:46px;height:46px;border-radius:12px;background:#eaf1ff;color:#2f6fed;display:grid;place-items:center;font-size:20px}.bulk-tariff-preview span{display:block;color:#667797;margin-top:4px}.tariff-warning{margin-top:14px;padding:12px 14px;border:1px solid #f7cf88;border-radius:10px;background:#fff8e8;color:#9a6200;display:flex;gap:9px;align-items:center}
@media(max-width:1200px){.company-tariff-toolbar{align-items:stretch;flex-wrap:wrap}.company-tariff-actions{margin-left:0;width:100%}.company-matrix-toolbar{grid-template-columns:1fr 1fr}.company-matrix-toolbar .tariffs-search{grid-column:1/-1}}
@media(max-width:700px){.tariff-scope-tabs a{padding:0 14px}.company-selector{min-width:100%}.company-tariff-actions{display:grid;grid-template-columns:1fr}.company-tariff-actions .secondary-button{width:100%}.company-matrix-toolbar{grid-template-columns:1fr}.company-matrix-toolbar .tariffs-search{grid-column:auto}.tariff-import-top,.bulk-tariff-grid{grid-template-columns:1fr}.tariff-import-format{flex-direction:column}.tariff-operation-modal footer{display:grid!important;grid-template-columns:1fr}}
html[data-theme="dark"] .tariff-scope-tabs,html[data-theme="dark"] .company-tariff-card{background:#111c2d!important}html[data-theme="dark"] .company-selector select{background:#132238;color:#e7eef8;border-color:#355171}html[data-theme="dark"] .company-tariff-help,html[data-theme="dark"] .bulk-tariff-preview{background:#14243a;color:#b8c8dc;border-color:#355171}html[data-theme="dark"] .company-fallback-note{background:#152a46;color:#a9caff;border-color:#355f91}html[data-theme="dark"] .tariff-dropzone{background:#132238;border-color:#537fb8;color:#b8c8dc}html[data-theme="dark"] .tariff-dropzone strong{color:#e7eef8}
.tariff-price-source{display:block;margin-top:6px;color:#667797;font-size:10.5px}.tariff-price-source.company{color:#278354;font-weight:700}.quick-item-row-single-service{grid-template-columns:minmax(250px,1.6fr) minmax(180px,.9fr) minmax(130px,.55fr) minmax(110px,.45fr) auto!important}@media(max-width:1050px){.quick-item-row-single-service{grid-template-columns:1fr 1fr!important}.quick-item-row-single-service .quick-service{grid-column:1/-1}.quick-item-row-single-service .quick-add{width:100%}}@media(max-width:620px){.quick-item-row-single-service{grid-template-columns:1fr!important}.quick-item-row-single-service .quick-service{grid-column:auto}}


/* =========================================================
   AVANCE 38 - TARIFAS POR EMPRESA: BOTONES DE ACCIÓN
   Define contenedores visibles y coherentes para copiar,
   importar planillas y realizar cambios masivos.
   ========================================================= */
.company-tariff-actions .copy-tariff-button,
.company-tariff-actions .upload-tariff-button,
.company-tariff-actions .bulk-tariff-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  min-height:50px!important;
  height:50px!important;
  padding:0 18px!important;
  border-width:1.5px!important;
  border-style:solid!important;
  border-radius:14px!important;
  background:#fff!important;
  font-weight:700!important;
  line-height:1!important;
  box-shadow:0 3px 10px rgba(15,42,77,.06)!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease!important;
  box-sizing:border-box!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}

.company-tariff-actions .copy-tariff-button{
  color:#173b67!important;
  border-color:#bfd0e3!important;
}
.company-tariff-actions .copy-tariff-button:hover{
  background:#f5f8fc!important;
  border-color:#94acc8!important;
}

.company-tariff-actions .upload-tariff-button{
  color:#2f6fed!important;
  border-color:#9fc0e8!important;
}
.company-tariff-actions .upload-tariff-button:hover{
  background:#eef5ff!important;
  border-color:#6f9ed8!important;
}

.company-tariff-actions .bulk-tariff-button{
  color:#d97706!important;
  border-color:#f3bd65!important;
  background:#fffaf0!important;
}
.company-tariff-actions .bulk-tariff-button:hover{
  background:#fff3dc!important;
  border-color:#e9a840!important;
}

.company-tariff-actions .copy-tariff-button:hover,
.company-tariff-actions .upload-tariff-button:hover,
.company-tariff-actions .bulk-tariff-button:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(15,35,70,.10)!important;
}

.company-tariff-actions .copy-tariff-button:focus-visible,
.company-tariff-actions .upload-tariff-button:focus-visible,
.company-tariff-actions .bulk-tariff-button:focus-visible{
  outline:none!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.15)!important;
}

html[data-theme="dark"] .company-tariff-actions .copy-tariff-button,
html[data-theme="dark"] .company-tariff-actions .upload-tariff-button{
  background:#17263a!important;
  border-color:#36516f!important;
  color:#a9ccff!important;
}
html[data-theme="dark"] .company-tariff-actions .bulk-tariff-button{
  background:#312514!important;
  border-color:#8a642a!important;
  color:#ffc56f!important;
}

@media(max-width:700px){
  .company-tariff-actions .copy-tariff-button,
  .company-tariff-actions .upload-tariff-button,
  .company-tariff-actions .bulk-tariff-button{
    width:100%!important;
  }
}

/* =========================================================
   AVANCE 39 - MODALES TARIFAS POR EMPRESA
   Corrige cabeceras, botones, dropzone y pie de modales.
   ========================================================= */
.modal-window>header,
.modal-window>form>header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:19px 22px;
  border-bottom:1px solid #e7ecf2;
  position:sticky;
  top:0;
  background:#fff;
  z-index:2;
}

.modal-window>header>div,
.modal-window>form>header>div{
  display:flex;
  gap:12px;
  align-items:flex-start;
  min-width:0;
}

.modal-window>form>header .modal-header-copy,
.modal-window>header .modal-header-copy{
  min-width:0;
}

.modal-window>form>header .modal-header-copy h2,
.modal-window>header .modal-header-copy h2{
  margin:0;
  font-size:17px;
  line-height:1.2;
}

.modal-window>form>header .modal-header-copy p,
.modal-window>header .modal-header-copy p{
  margin:4px 0 0;
  font-size:12px;
  line-height:1.45;
  color:#6d7d92;
}

.tariff-operation-modal{
  width:min(820px,calc(100vw - 36px))!important;
  max-height:min(92vh,980px)!important;
  border:1px solid #e4ebf5;
  overflow:hidden!important;
}

.tariff-operation-modal>form{
  display:flex;
  flex-direction:column;
  min-height:100%;
}

.tariff-operation-modal>form>header{
  padding:22px 26px 18px!important;
}

.tariff-operation-modal .modal-icon{
  width:50px;
  height:50px;
  border-radius:15px;
  font-size:18px;
  flex:0 0 auto;
}

.tariff-operation-modal .modal-close{
  width:42px;
  height:42px;
  flex:0 0 auto;
  border:1px solid #dfe7f2;
  background:#f8fafd;
  color:#66758c;
  display:grid;
  place-items:center;
}

.tariff-operation-modal .modal-close:hover{
  background:#eef4fb;
  color:#2b4365;
}

.tariff-operation-modal .modal-content{
  display:grid;
  gap:16px;
  padding:24px 26px 22px!important;
}

.tariff-operation-modal .field>span{
  font-size:13px;
}

.tariff-import-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:end;
}

.tariff-template-button{
  min-width:210px;
  min-height:48px!important;
  border-radius:13px!important;
}

.tariff-dropzone{
  position:relative;
  margin-top:0!important;
  min-height:245px;
  padding:24px 22px;
  border:2px dashed #7ba7eb;
  border-radius:17px;
  background:#f8fbff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#426a9e;
  cursor:pointer;
  text-align:center;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}

.tariff-dropzone:hover{
  border-color:#4e89df;
  background:#f2f8ff;
}

.tariff-dropzone.is-dragover{
  border-color:#2f6fed;
  background:#edf5ff;
  transform:translateY(-1px);
}

.tariff-file-input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  border:0!important;
  opacity:0!important;
  pointer-events:none!important;
}

.tariff-dropzone-icon{
  width:72px;
  height:72px;
  border-radius:22px;
  background:#eaf1ff;
  color:#2f6fed;
  display:grid;
  place-items:center;
  font-size:30px;
  margin-bottom:2px;
}

.tariff-dropzone strong{
  font-size:16px;
  color:#17355e;
}

.tariff-dropzone>span{
  font-size:13px;
}

.tariff-dropzone-button{
  margin-top:2px;
  min-height:40px;
  padding:0 14px;
  border:1px solid #bfd0e6;
  border-radius:11px;
  background:#fff;
  color:#173b67;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}

.tariff-file-card{
  width:min(100%,430px);
  margin-top:8px;
  padding:12px 14px;
  border:1px solid #d8e5f5;
  border-radius:14px;
  background:#fff;
  display:flex;
  align-items:center;
  gap:12px;
  box-shadow:0 4px 14px rgba(15,42,77,.05);
}

.tariff-file-card.is-empty{
  background:#fbfdff;
}

.tariff-file-card-icon{
  width:42px;
  height:42px;
  border-radius:12px;
  background:#eef4ff;
  color:#2f6fed;
  display:grid;
  place-items:center;
  font-size:18px;
  flex:0 0 auto;
}

.tariff-file-card-copy{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  text-align:left;
  min-width:0;
  flex:1;
}

.tariff-file-card-copy strong{
  width:100%;
  display:block;
  font-size:13px;
  color:#17355e;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tariff-file-card-copy small{
  display:block;
  margin-top:4px;
  color:#73849a;
  font-size:12px;
}

.tariff-file-remove{
  width:34px;
  height:34px;
  border:1px solid #d8e5f5;
  border-radius:10px;
  background:#fff;
  color:#61728d;
  display:grid;
  place-items:center;
  cursor:pointer;
  flex:0 0 auto;
}

.tariff-file-remove:hover{
  background:#f7fafc;
  color:#d14343;
}

.tariff-import-format{
  margin-top:0!important;
  padding:14px 16px;
  border:1px solid #dce6f3;
  border-radius:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  color:#667797;
  font-size:12px;
}

.tariff-import-note{
  margin:0!important;
  padding:14px 16px!important;
  border-radius:12px!important;
}

.bulk-tariff-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px;
  margin-top:0!important;
}

.company-bulk-check{
  margin-top:2px;
}

.bulk-tariff-preview{
  margin-top:0!important;
  padding:16px 18px;
  border-radius:14px;
  background:#f8fbff;
}

.bulk-tariff-preview-copy strong{
  display:block;
  color:#183659;
}

.bulk-tariff-preview-copy span{
  display:block;
  margin-top:4px;
  color:#667797;
  line-height:1.5;
}

.bulk-tariff-snapshot{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.bulk-tariff-snapshot>div{
  padding:13px 14px;
  border:1px solid #dce6f3;
  border-radius:12px;
  background:#fff;
}

.bulk-tariff-snapshot small{
  display:block;
  color:#7a8ca6;
  font-size:11px;
  margin-bottom:5px;
}

.bulk-tariff-snapshot strong{
  display:block;
  color:#183659;
  font-size:13px;
  line-height:1.4;
}

.tariff-warning{
  margin-top:0!important;
  padding:13px 15px;
  border-radius:12px;
}

.tariff-operation-modal>form>footer,
.tariff-operation-modal>footer{
  padding:16px 26px!important;
  gap:12px;
  background:#fff;
}

.tariff-operation-modal footer .secondary-button,
.tariff-operation-modal footer .primary-button{
  min-width:170px;
  min-height:48px;
  border-radius:14px;
}

.tariff-operation-modal footer .secondary-button{
  border-color:#d5dfeb;
  box-shadow:0 2px 8px rgba(15,42,77,.04);
}

html[data-theme="dark"] .modal-window>header,
html[data-theme="dark"] .modal-window>form>header,
html[data-theme="dark"] .tariff-operation-modal>form>footer,
html[data-theme="dark"] .tariff-operation-modal>footer{
  background:#111c2d;
  border-color:#2b415e;
}

html[data-theme="dark"] .tariff-operation-modal{
  border-color:#2b415e;
}

html[data-theme="dark"] .tariff-operation-modal .modal-close{
  background:#17263a;
  border-color:#355171;
  color:#a9bfd9;
}

html[data-theme="dark"] .tariff-dropzone{
  background:#132238;
  border-color:#537fb8;
  color:#b8c8dc;
}

html[data-theme="dark"] .tariff-dropzone strong,
html[data-theme="dark"] .bulk-tariff-preview-copy strong,
html[data-theme="dark"] .bulk-tariff-snapshot strong{
  color:#e7eef8;
}

html[data-theme="dark"] .tariff-dropzone-button,
html[data-theme="dark"] .tariff-file-card,
html[data-theme="dark"] .bulk-tariff-snapshot>div,
html[data-theme="dark"] .tariff-import-format{
  background:#17263a;
  border-color:#355171;
  color:#b8c8dc;
}

html[data-theme="dark"] .tariff-file-card-icon{
  background:#223551;
  color:#a9ccff;
}

html[data-theme="dark"] .tariff-file-remove{
  background:#132238;
  border-color:#355171;
  color:#b8c8dc;
}

html[data-theme="dark"] .tariff-file-card-copy small,
html[data-theme="dark"] .modal-window>form>header .modal-header-copy p,
html[data-theme="dark"] .modal-window>header .modal-header-copy p{
  color:#9fb4cb;
}

@media(max-width:700px){
  .tariff-operation-modal{
    width:min(100vw - 18px,100%)!important;
  }

  .tariff-operation-modal>form>header,
  .tariff-operation-modal .modal-content,
  .tariff-operation-modal>form>footer,
  .tariff-operation-modal>footer{
    padding-left:16px!important;
    padding-right:16px!important;
  }

  .tariff-import-top,
  .bulk-tariff-grid,
  .bulk-tariff-snapshot{
    grid-template-columns:1fr;
  }

  .tariff-template-button,
  .tariff-operation-modal footer .secondary-button,
  .tariff-operation-modal footer .primary-button{
    width:100%;
    min-width:0;
  }

  .tariff-operation-modal footer{
    display:grid!important;
    grid-template-columns:1fr;
  }
}

/* =========================================================
   AVANCE 40 - CAMBIO MASIVO: ESTRUCTURA CLÁSICA RESTAURADA
   Conserva el formulario original y corrige únicamente su interfaz.
   ========================================================= */
.tariff-bulk-classic-modal{
  width:min(760px,calc(100vw - 36px))!important;
}

.tariff-bulk-classic-modal .modal-content{
  display:block!important;
  padding:24px 26px!important;
}

.tariff-bulk-classic-modal .modal-content>.field{
  margin-bottom:16px;
}

.tariff-bulk-classic-modal .bulk-tariff-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:15px 16px!important;
  margin:0!important;
}

.tariff-bulk-classic-modal .company-bulk-check{
  margin-top:0!important;
  min-height:54px;
  padding:13px 16px!important;
  border:1px solid #dce5ef!important;
  border-radius:12px!important;
  background:#fbfcfe!important;
}

.tariff-bulk-classic-modal .bulk-tariff-preview{
  margin-top:18px!important;
  padding:17px 18px!important;
  border-radius:14px!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
}

.tariff-bulk-classic-modal .tariff-warning{
  margin-top:16px!important;
}

.tariff-bulk-classic-modal footer{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:12px!important;
}

.tariff-bulk-classic-modal footer .bulk-cancel-button{
  min-width:150px!important;
  min-height:48px!important;
  border:1.5px solid #b9c9dc!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#17355e!important;
  box-shadow:0 3px 10px rgba(15,42,77,.06)!important;
}

.tariff-bulk-classic-modal footer .bulk-cancel-button:hover{
  background:#f5f8fc!important;
  border-color:#93abc7!important;
  transform:translateY(-1px);
}

html[data-theme="dark"] .tariff-bulk-classic-modal .company-bulk-check,
html[data-theme="dark"] .tariff-bulk-classic-modal footer .bulk-cancel-button{
  background:#17263a!important;
  border-color:#355171!important;
  color:#dce8f6!important;
}

@media(max-width:700px){
  .tariff-bulk-classic-modal .bulk-tariff-grid{
    grid-template-columns:1fr!important;
  }

  .tariff-bulk-classic-modal footer{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  .tariff-bulk-classic-modal footer .bulk-cancel-button,
  .tariff-bulk-classic-modal footer .primary-button{
    width:100%!important;
  }
}


/* =========================================================
   AVANCE 41 - MODAL CAMBIO MASIVO: ESPACIADO Y SCROLL AISLADO
   ========================================================= */
.tariff-bulk-classic-modal .company-bulk-check{
  margin-top:16px!important;
}

.tariff-bulk-classic-modal .modal-content{
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable;
}

.app-modal.open{
  overscroll-behavior:contain!important;
}

html.modal-scroll-locked,
body.modal-scroll-locked{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}

/* =========================================================
   AVANCE 42 - MODAL SUBIR PLANILLA: BOTONES SECUNDARIOS
   Corrige Descargar plantilla y Cancelar sin alterar lógica.
   ========================================================= */
#companyTariffImportModal .tariff-template-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  min-width:220px!important;
  min-height:50px!important;
  height:50px!important;
  padding:0 18px!important;
  border:1.5px solid #b9cce3!important;
  border-radius:14px!important;
  background:#ffffff!important;
  color:#173b67!important;
  font-weight:700!important;
  text-decoration:none!important;
  box-shadow:0 3px 10px rgba(15,42,77,.06)!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease!important;
}

#companyTariffImportModal .tariff-template-button:hover{
  background:#f3f7fd!important;
  border-color:#8eacd0!important;
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(15,35,70,.10)!important;
}

#companyTariffImportModal .tariff-template-button:focus-visible{
  outline:none!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.15)!important;
}

#companyTariffImportModal footer .secondary-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:210px!important;
  min-height:52px!important;
  height:52px!important;
  padding:0 22px!important;
  border:1.5px solid #c7d5e5!important;
  border-radius:14px!important;
  background:#ffffff!important;
  color:#17355e!important;
  font-weight:700!important;
  box-shadow:0 3px 10px rgba(15,42,77,.05)!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease!important;
}

#companyTariffImportModal footer .secondary-button:hover{
  background:#f5f8fc!important;
  border-color:#98afca!important;
  transform:translateY(-1px)!important;
  box-shadow:0 8px 18px rgba(15,35,70,.10)!important;
}

#companyTariffImportModal footer .secondary-button:focus-visible{
  outline:none!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.15)!important;
}

#companyTariffImportModal footer .primary-button{
  min-height:52px!important;
  height:52px!important;
  border-radius:14px!important;
}

html[data-theme="dark"] #companyTariffImportModal .tariff-template-button,
html[data-theme="dark"] #companyTariffImportModal footer .secondary-button{
  background:#17263a!important;
  border-color:#36516f!important;
  color:#d8e7fb!important;
}

html[data-theme="dark"] #companyTariffImportModal .tariff-template-button:hover,
html[data-theme="dark"] #companyTariffImportModal footer .secondary-button:hover{
  background:#1d3048!important;
  border-color:#52749a!important;
}

@media(max-width:700px){
  #companyTariffImportModal .tariff-template-button,
  #companyTariffImportModal footer .secondary-button,
  #companyTariffImportModal footer .primary-button{
    width:100%!important;
    min-width:0!important;
  }
}

/* AVANCE 43 - Nueva orden y tarifario empresarial inteligente */
.quick-item-row-single-service{grid-template-columns:minmax(360px,1fr) minmax(170px,.34fr) minmax(145px,.24fr) auto!important;align-items:end}
.tariff-default-service{margin-bottom:18px}.tariff-default-service small{display:block;margin-top:7px;color:var(--text-muted,#7183a4);line-height:1.4}
@media(max-width:980px){.quick-item-row-single-service{grid-template-columns:1fr 1fr!important}.quick-item-row-single-service .quick-service{grid-column:1/-1}.quick-item-row-single-service .quick-add{width:100%}}
@media(max-width:640px){.quick-item-row-single-service{grid-template-columns:1fr!important}.quick-item-row-single-service>*{grid-column:auto!important}}

/* AVANCE 44 - Nueva orden: alineación y selector de cantidad */
.quick-item-row-single-service{
  align-items:end!important;
}
.quick-item-row-single-service .quick-price,
.quick-item-row-single-service .quick-qty{
  align-self:end;
}
.quick-item-row-single-service .quick-price .input-shell{
  margin-bottom:0!important;
}
.tariff-price-source[hidden]{
  display:none!important;
}
.quantity-stepper{
  height:46px;
  display:grid;
  grid-template-columns:44px minmax(48px,1fr) 44px;
  align-items:stretch;
  border:1px solid #cedbeb;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.quantity-stepper:focus-within{
  border-color:#6f9ff0;
  box-shadow:0 0 0 3px rgba(47,111,237,.12);
}
.quantity-stepper-button{
  border:0;
  background:#f2f6fc;
  color:#174f89;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:13px;
}
.quantity-stepper-button:first-child{border-right:1px solid #dce5ef}
.quantity-stepper-button:last-child{border-left:1px solid #dce5ef}
.quantity-stepper-button:hover{background:#e7f0fc}
.quantity-stepper-button:active{background:#dce9fa}
.quantity-stepper input{
  width:100%;
  min-width:0;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  padding:0 6px!important;
  text-align:center;
  color:#18324f;
  font:inherit;
  appearance:textfield;
  -moz-appearance:textfield;
}
.quantity-stepper input::-webkit-inner-spin-button,
.quantity-stepper input::-webkit-outer-spin-button{
  -webkit-appearance:none;
  margin:0;
}
html[data-theme="dark"] .quantity-stepper{
  background:var(--surface)!important;
  border-color:var(--border-theme)!important;
}
html[data-theme="dark"] .quantity-stepper-button{
  background:var(--surface-soft)!important;
  color:#70a7ff!important;
}
html[data-theme="dark"] .quantity-stepper input{color:var(--text-theme)!important}
/* AVANCE 45 - Promociones */
.promo-kpis{display:grid;grid-template-columns:repeat(4,1fr);padding:18px 22px;margin-top:18px}.promo-kpis article{display:flex;gap:14px;align-items:center;padding:8px 18px;border-right:1px solid var(--line)}.promo-kpis article:last-child{border:0}.promo-kpis article>span{width:48px;height:48px;border-radius:14px;display:grid;place-items:center}.promo-kpis .green{background:#e7f8ee;color:#159447}.promo-kpis .blue{background:#eaf1ff;color:#2f6fed}.promo-kpis .red{background:#fff0f0;color:#ef4444}.promo-kpis .purple{background:#f3edff;color:#8b5cf6}.promo-kpis small,.promo-kpis p{color:var(--muted);margin:0}.promo-kpis strong{font-size:24px;display:block}.promo-list-card{margin-top:18px;overflow:hidden}.promo-toolbar{display:grid;grid-template-columns:minmax(260px,1.3fr) repeat(2,minmax(160px,.6fr)) auto;gap:14px;padding:18px;border-bottom:1px solid var(--line)}.promo-toolbar select{border:1px solid var(--line);border-radius:12px;padding:0 14px;background:var(--surface);color:var(--text)}.promo-table{width:100%;border-collapse:collapse}.promo-table th,.promo-table td{padding:14px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}.promo-table th{font-size:11px;text-transform:uppercase;color:var(--muted)}.promo-name{display:flex;gap:12px;align-items:center}.promo-name>span{width:38px;height:38px;border-radius:11px;background:#eef4ff;color:#2f6fed;display:grid;place-items:center}.promo-name small,.block{display:block;color:var(--muted);margin-top:3px}.type-chip,.promo-status{display:inline-flex;align-items:center;gap:6px;border-radius:9px;padding:6px 9px}.type-chip{background:#eef4ff;color:#2f6fed}.promo-status.active{background:#e7f8ee;color:#159447}.promo-status.scheduled{background:#eaf1ff;color:#2f6fed}.promo-status.expired{background:#fff0f0;color:#ef4444}.promo-status.paused{background:#fff7e6;color:#c47b00}.promo-actions{display:flex;gap:7px}.promo-actions form{display:inline}.promo-actions a,.promo-actions button{width:35px;height:35px;border:1px solid var(--line);border-radius:10px;background:var(--surface);display:grid;place-items:center;color:#17457d;cursor:pointer}.promo-form-modal{width:min(1040px,94vw)}.promo-detail-modal{width:min(1100px,95vw)}.promo-days{border:1px solid var(--line);border-radius:13px;padding:12px;display:flex;gap:16px;flex-wrap:wrap}.promo-days legend{padding:0 6px;color:var(--muted)}.promo-switches{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.promo-switches label{border:1px solid var(--line);padding:13px;border-radius:12px;display:flex;gap:9px;align-items:center}.promo-detail-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:16px;border:1px solid var(--line);border-radius:14px}.promo-detail-summary small{display:block;color:var(--muted);margin-bottom:7px}.promo-detail-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;margin-top:18px}.promo-detail-grid>section,.promo-detail-grid>aside{border:1px solid var(--line);border-radius:14px;padding:18px}.promo-detail-grid table{width:100%;border-collapse:collapse}.promo-detail-grid th,.promo-detail-grid td{padding:9px;border-bottom:1px solid var(--line);text-align:left}.simulation{background:#f7faff;border:1px solid #dce8fb;border-radius:14px;padding:18px}.simulation p{display:flex;justify-content:space-between}.simulation .discount{color:#159447}.simulation .total{font-size:20px;color:#0b7a3d}.muted{color:var(--muted)}
@media(max-width:900px){.promo-kpis{grid-template-columns:1fr 1fr}.promo-toolbar{grid-template-columns:1fr}.promo-detail-summary{grid-template-columns:1fr 1fr}.promo-detail-grid{grid-template-columns:1fr}.promo-switches{grid-template-columns:1fr}}
.order-promotion-notice{margin-top:14px;border:1px solid #b9e5c8;background:#effbf3;border-radius:14px;padding:13px 16px;display:flex;gap:12px;align-items:center;color:#126b39}.order-promotion-notice>span{width:38px;height:38px;border-radius:11px;background:#dff5e7;display:grid;place-items:center}.order-promotion-notice small{display:block;color:#47805f;margin-top:3px}.order-promotion-notice[hidden]{display:none}

/* =========================================================
   AVANCE 47 - MODALES DE PROMOCIONES AISLADOS Y CORREGIDOS
   Evita conflictos con .modal-backdrop/.modal-content globales.
   ========================================================= */
#promotionModal.modal-backdrop,
#promotionDetailModal.modal-backdrop{
  position:fixed !important;
  inset:0 !important;
  z-index:12000 !important;
  display:none !important;
  align-items:center !important;
  justify-content:center !important;
  padding:24px !important;
  overflow:hidden !important;
  background:rgba(15,29,49,.58) !important;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
#promotionModal.modal-backdrop.open,
#promotionDetailModal.modal-backdrop.open{
  display:flex !important;
}
#promotionModal .modal-card,
#promotionDetailModal .modal-card{
  position:relative !important;
  z-index:12001 !important;
  display:flex !important;
  flex-direction:column !important;
  width:min(1040px,calc(100vw - 48px)) !important;
  max-width:100% !important;
  max-height:calc(100vh - 48px) !important;
  margin:0 !important;
  overflow:hidden !important;
  background:var(--surface,#fff) !important;
  color:var(--text,#12223b) !important;
  border:1px solid var(--line,#e2e8f0) !important;
  border-radius:22px !important;
  box-shadow:0 28px 80px rgba(8,22,42,.30) !important;
  animation:promotionModalIn .2s ease-out;
}
#promotionDetailModal .modal-card{
  width:min(1120px,calc(100vw - 48px)) !important;
}
@keyframes promotionModalIn{
  from{opacity:0;transform:translateY(12px) scale(.985)}
  to{opacity:1;transform:none}
}
#promotionModal .modal-card>header,
#promotionDetailModal .modal-card>header{
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:18px !important;
  min-height:98px !important;
  padding:20px 26px !important;
  margin:0 !important;
  background:var(--surface,#fff) !important;
  border-bottom:1px solid var(--line,#e2e8f0) !important;
}
#promotionModal .modal-title,
#promotionDetailModal .modal-title{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  min-width:0 !important;
}
#promotionModal .modal-title>span,
#promotionDetailModal .modal-title>span{
  flex:0 0 52px !important;
  width:52px !important;
  height:52px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:15px !important;
  background:#edf3ff !important;
  color:#2f6fed !important;
  font-size:20px !important;
}
#promotionModal .modal-title h3,
#promotionDetailModal .modal-title h3{
  margin:0 0 4px !important;
  font-size:20px !important;
  line-height:1.2 !important;
  color:var(--text,#12223b) !important;
}
#promotionModal .modal-title p,
#promotionDetailModal .modal-title p{
  margin:0 !important;
  color:var(--muted,#70809a) !important;
  font-size:13px !important;
}
#promotionModal .modal-close,
#promotionDetailModal .modal-close{
  flex:0 0 48px !important;
  width:48px !important;
  height:48px !important;
  display:grid !important;
  place-items:center !important;
  padding:0 !important;
  border:1px solid var(--line,#dce4ef) !important;
  border-radius:13px !important;
  background:#f7f9fc !important;
  color:#65758c !important;
  cursor:pointer !important;
  text-decoration:none !important;
}
#promotionModal .modal-close:hover,
#promotionDetailModal .modal-close:hover{
  background:#edf3ff !important;
  color:#17457d !important;
}
#promotionModal .modal-card>form,
#promotionDetailModal .modal-card{
  min-height:0 !important;
}
#promotionModal .modal-card>form{
  display:flex !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
#promotionModal .modal-content,
#promotionDetailModal .modal-content{
  position:relative !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  padding:24px 26px !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
  background:var(--surface,#fff) !important;
}
#promotionModal .modal-card footer,
#promotionDetailModal .modal-card>footer{
  position:relative !important;
  inset:auto !important;
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:12px !important;
  min-height:78px !important;
  margin:0 !important;
  padding:15px 26px !important;
  border-top:1px solid var(--line,#e2e8f0) !important;
  background:var(--surface,#fff) !important;
}
#promotionModal .modal-card footer .secondary-button,
#promotionModal .modal-card footer .primary-button,
#promotionDetailModal .modal-card>footer .secondary-button{
  min-height:48px !important;
  padding:0 22px !important;
  border-radius:13px !important;
}
body.modal-open{
  overflow:hidden !important;
  overscroll-behavior:none !important;
}
html[data-theme="dark"] #promotionModal .modal-card,
html[data-theme="dark"] #promotionDetailModal .modal-card,
html[data-theme="dark"] #promotionModal .modal-card>header,
html[data-theme="dark"] #promotionDetailModal .modal-card>header,
html[data-theme="dark"] #promotionModal .modal-content,
html[data-theme="dark"] #promotionDetailModal .modal-content,
html[data-theme="dark"] #promotionModal .modal-card footer,
html[data-theme="dark"] #promotionDetailModal .modal-card>footer{
  background:var(--surface) !important;
  border-color:var(--border-theme) !important;
  color:var(--text) !important;
}
html[data-theme="dark"] #promotionModal .modal-close,
html[data-theme="dark"] #promotionDetailModal .modal-close{
  background:var(--surface-2,#1d2a3a) !important;
  border-color:var(--border-theme) !important;
  color:var(--muted) !important;
}
@media (max-width:760px){
  #promotionModal.modal-backdrop,
  #promotionDetailModal.modal-backdrop{padding:10px !important;align-items:flex-end !important}
  #promotionModal .modal-card,
  #promotionDetailModal .modal-card{width:100% !important;max-height:calc(100vh - 20px) !important;border-radius:18px !important}
  #promotionModal .modal-card>header,
  #promotionDetailModal .modal-card>header{min-height:82px !important;padding:15px 17px !important}
  #promotionModal .modal-title>span,
  #promotionDetailModal .modal-title>span{flex-basis:44px !important;width:44px !important;height:44px !important}
  #promotionModal .modal-content,
  #promotionDetailModal .modal-content{padding:18px 17px !important}
  #promotionModal .modal-card footer,
  #promotionDetailModal .modal-card>footer{padding:13px 17px !important}
  #promotionModal .form-grid.cols-2,
  #promotionDetailModal .promo-detail-grid,
  #promotionDetailModal .promo-detail-summary{grid-template-columns:1fr !important}
  #promotionModal .span-2{grid-column:auto !important}
  #promotionModal .promo-switches{grid-template-columns:1fr !important}
}

/* AVANCE 48 - Filtros de Promociones: buscador completo y botón limpiar con contenedor */
.promo-toolbar > .input-shell{
  width:100%;
  min-width:0;
  height:52px;
  display:flex;
  align-items:center;
  overflow:hidden;
  border:1px solid #d5dfeb;
  border-radius:13px;
  background:var(--surface,#fff);
}
.promo-toolbar > .input-shell > i{
  width:52px;
  height:100%;
  flex:0 0 52px;
  display:grid;
  place-items:center;
  color:#7890ad;
  font-size:16px;
}
.promo-toolbar > .input-shell > input{
  flex:1 1 auto;
  width:100%!important;
  min-width:0;
  height:100%;
  margin:0;
  padding:0 16px 0 18px!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--text);
  font:inherit;
}
.promo-toolbar > .input-shell > input:focus{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}
.promo-toolbar > .input-shell:focus-within{
  border-color:#6f9ff0;
  box-shadow:0 0 0 3px rgba(47,111,237,.12);
}
.promo-toolbar > select{
  height:52px;
}
.promo-toolbar > #clearPromoFilters{
  min-height:52px;
  height:52px;
  padding:0 18px;
  border:1px solid #d5dfeb;
  border-radius:13px;
  background:var(--surface,#fff);
  color:var(--navy);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  white-space:nowrap;
  box-shadow:0 2px 7px rgba(15,35,65,.04);
  transition:border-color .2s,background .2s,box-shadow .2s,transform .2s;
}
.promo-toolbar > #clearPromoFilters:hover{
  border-color:#9db8df;
  background:#f7faff;
  box-shadow:0 5px 13px rgba(15,35,65,.08);
  transform:translateY(-1px);
}
.promo-toolbar > #clearPromoFilters:focus-visible{
  outline:0;
  border-color:#6f9ff0;
  box-shadow:0 0 0 3px rgba(47,111,237,.12);
}
html[data-theme="dark"] .promo-toolbar > #clearPromoFilters:hover{
  background:rgba(114,167,255,.09)!important;
}
@media(max-width:900px){
  .promo-toolbar > #clearPromoFilters{width:100%;}
}

/* AVANCE 49 - Buscador de promociones con bloque de icono destacado */
.promo-toolbar > .input-shell > i{
  background:#eef4ff;
  color:#2f6fed;
  border-right:1px solid #dce7f5;
}
html[data-theme="dark"] .promo-toolbar > .input-shell > i{
  background:rgba(114,167,255,.12)!important;
  color:#72a7ff!important;
  border-right-color:var(--border-theme)!important;
}


/* AVANCE 50 - Separación interna del texto en el buscador de Promociones */
.promo-toolbar > .input-shell > input{padding-left:18px!important;}

/* AVANCE 51 - Nueva promoción compacta y organizada */
.promo-form-modal{width:min(1180px,94vw);max-height:94vh}
.promo-form-modal>form{display:flex;flex-direction:column;min-height:0;flex:1}
.promo-form-modal .promo-form-content{padding:16px 28px 10px;overflow-y:auto;overscroll-behavior:contain}
.promo-form-section{margin:0 0 12px}
.promo-form-section h4,.promo-days-block h4,.promo-options-block h4{margin:0 0 10px;padding-bottom:7px;border-bottom:1px solid var(--line);font-size:16px;color:var(--text)}
.promo-compact-grid{gap:10px 24px}
.promo-compact-grid .field{gap:6px}
.promo-compact-grid .field>span{font-weight:600}
.promo-compact-grid .input-shell{min-height:42px}
.promo-compact-grid .textarea-shell{min-height:66px}
.promo-compact-grid .textarea-shell textarea{min-height:64px}
.promo-value-shell{padding-right:0!important}
.promo-value-shell input{padding-right:58px!important}
.promo-input-suffix{align-self:stretch;min-width:50px;display:grid;place-items:center;border-left:1px solid var(--line);color:var(--muted);font-weight:600;background:color-mix(in srgb,var(--surface) 88%,#eef4ff 12%)}
.promo-target-control.is-disabled{opacity:.56}
.promo-target-control.is-disabled .input-shell{background:color-mix(in srgb,var(--surface) 85%,#eef1f5 15%)}
.promo-days-block{margin-top:2px}
.promo-days-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px}
.promo-days-grid label{min-height:38px;border:1px solid var(--line);border-radius:10px;display:flex;align-items:center;gap:10px;padding:0 13px;background:var(--surface);cursor:pointer;transition:border-color .2s,background .2s,box-shadow .2s}
.promo-days-grid label:hover{border-color:#8ab4f8;background:#f7faff}
.promo-days-grid input{width:17px;height:17px;accent-color:#1769ff;margin:0}
.promo-days-grid label:has(input:checked){border-color:#6ba0ff;background:#eef5ff;box-shadow:0 0 0 2px rgba(47,111,237,.08)}
.promo-options-block{margin-top:12px}
.promo-switches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.promo-switch-card{min-height:68px;border:1px solid var(--line);border-radius:12px;display:flex;align-items:center;gap:14px;padding:12px 16px;background:var(--surface);cursor:pointer}
.promo-switch-card>input{position:absolute;opacity:0;pointer-events:none}
.promo-switch-ui{position:relative;flex:0 0 44px;width:44px;height:24px;border-radius:999px;background:#d6dee9;transition:.2s}
.promo-switch-ui::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:.2s}
.promo-switch-card>input:checked+.promo-switch-ui{background:#1769ff}
.promo-switch-card>input:checked+.promo-switch-ui::after{transform:translateX(20px)}
.promo-switch-card>input:focus-visible+.promo-switch-ui{outline:3px solid rgba(47,111,237,.22);outline-offset:2px}
.promo-switch-card>span:last-child{line-height:1.25}
.promo-info-note{margin-top:10px;border:1px solid #b9d4ff;background:#eef5ff;color:#2f6fed;border-radius:10px;padding:9px 13px;display:flex;align-items:center;gap:9px;font-size:13px}
.promo-form-modal footer{flex:0 0 auto;display:flex;justify-content:flex-end;gap:12px;padding:12px 28px;border-top:1px solid var(--line);background:var(--surface)}
.promo-form-modal footer .secondary-button,.promo-form-modal footer .primary-button{min-height:44px;padding-inline:22px}
.promo-cancel-button{border:1px solid #184d8b!important;background:var(--surface)!important;color:var(--text)!important;box-shadow:none!important}
.promo-cancel-button:hover{background:#f4f8ff!important;border-color:#0f3f79!important}
@media(max-width:900px){.promo-days-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.promo-switches{grid-template-columns:1fr}.promo-form-modal .promo-form-content{padding-inline:18px}}
@media(max-width:640px){.promo-days-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.promo-form-modal footer{padding-inline:16px}.promo-form-modal footer button{flex:1}}
[data-theme="dark"] .promo-days-grid label:hover,[data-theme="dark"] .promo-days-grid label:has(input:checked),[data-theme="dark"] .promo-info-note{background:#14233a}
[data-theme="dark"] .promo-cancel-button:hover{background:#14233a!important}

/* SISTEMA DE TEMA CENTRALIZADO V2 */
:root{
  --theme-page:#f4f7fb;--theme-sidebar:#fff;--theme-topbar:#fff;
  --theme-surface-1:#fff;--theme-surface-2:#f8fafc;--theme-surface-3:#eef3f8;
  --theme-overlay:#fff;--theme-input:#fff;--theme-hover:#edf3fa;
  --theme-border:#dce5ef;--theme-text:#15243a;--theme-text-muted:#65758b;
  --theme-text-subtle:#8492a6;--theme-accent:#1767e8;--theme-accent-hover:#1057c9;
  --theme-focus:rgba(23,103,232,.18);--theme-shadow:0 10px 28px rgba(24,55,91,.08)
}
html[data-theme="dark"]{
  --theme-page:#0b1220;--theme-sidebar:#0f1a2a;--theme-topbar:#101c2c;
  --theme-surface-1:#121e30;--theme-surface-2:#172438;--theme-surface-3:#1d2c42;
  --theme-overlay:#1b2a40;--theme-input:#0f1b2c;--theme-hover:#20334d;
  --theme-border:#2d415b;--theme-text:#eaf1fb;--theme-text-muted:#a5b4c7;
  --theme-text-subtle:#7f91a9;--theme-accent:#72a7ff;--theme-accent-hover:#8bb7ff;
  --theme-focus:rgba(114,167,255,.22);--theme-shadow:0 14px 34px rgba(0,0,0,.3);
  --bg:var(--theme-page);--surface:var(--theme-surface-1);--surface-soft:var(--theme-surface-2);
  --surface-raised:var(--theme-surface-2);--surface-hover:var(--theme-hover);
  --text:var(--theme-text);--muted:var(--theme-text-muted);--line:var(--theme-border);
  --text-strong:var(--theme-text);--text-soft:var(--theme-text-muted);
  --border-theme:var(--theme-border);--input-bg:var(--theme-input);--shadow-theme:var(--theme-shadow)
}
html[data-theme="dark"] .sidebar{background:var(--theme-sidebar)!important}
html[data-theme="dark"] .topbar{background:var(--theme-topbar)!important}
html[data-theme="dark"] :is(.page-content,.main-shell){background:var(--theme-page)!important}
html[data-theme="dark"] :is(.modal-window,.modal-card,.profile-dropdown,.notification-dropdown,.app-dropdown){background:var(--theme-overlay)!important}
html[data-theme="dark"] :is(input,select,textarea):focus-visible,
html[data-theme="dark"] :is(button,a):focus-visible{outline:2px solid var(--theme-accent);outline-offset:2px;box-shadow:0 0 0 4px var(--theme-focus)}
html[data-theme="dark"] :is(input,select,textarea):-webkit-autofill{-webkit-text-fill-color:var(--theme-text)!important;-webkit-box-shadow:0 0 0 1000px var(--theme-input) inset!important;caret-color:var(--theme-text)}
html[data-theme="dark"] :is(.print-sheet,.ticket-preview,.ticket-paper,.mail-sheet,[data-print-surface="true"]){color-scheme:light;background:#fff!important;color:#17304f!important}

/* AVANCE 25 - Correcciones visuales finales del modo oscuro y dashboard */
html[data-theme="dark"]{
  --chart-empty-ring:#2a3b52;
  --dashboard-muted:#b6c3d3;
}
html[data-theme="dark"] .brand-row{
  background:var(--theme-sidebar)!important;
  border-bottom:1px solid var(--theme-border)!important;
}
html[data-theme="dark"] .brand-row .sidebar-toggle{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-accent)!important;
}
html[data-theme="dark"] .brand-row .sidebar-toggle:hover{
  background:var(--theme-hover)!important;
  color:var(--theme-accent-hover)!important;
}
html[data-theme="dark"] .global-search-trigger kbd,
html[data-theme="dark"] .global-search-panel kbd{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
}
html[data-theme="dark"] .chart-empty-message,
html[data-theme="dark"] .dashboard-chart-empty{
  background:var(--theme-surface-2)!important;
  border:1px solid var(--theme-border)!important;
  color:var(--dashboard-muted)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.16)!important;
}
html[data-theme="dark"] :is(.real-chart-labels,.panel-head small,.dashboard-kpis-clean .kpi-card small,.dashboard-window-head small,.dashboard-chart-labels,.dashboard-inline-legend){
  color:var(--dashboard-muted)!important;
}
html[data-theme="dark"] .sidebar-section{
  color:#91a8c4!important;
  border-color:#2b405a!important;
}
html[data-theme="dark"] .sidebar-section::before,
html[data-theme="dark"] .sidebar-section::after{
  background:#2b405a!important;
}
html[data-theme="dark"] .chart-grid-lines line,
html[data-theme="dark"] .dashboard-grid-lines line{
  stroke:var(--theme-border)!important;
}
html[data-theme="dark"] .donut::after{
  background:var(--theme-surface-1)!important;
}
html[data-theme="dark"] .outline-button{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-accent)!important;
}
html[data-theme="dark"] .outline-button:hover{
  background:var(--theme-hover)!important;
  border-color:#466587!important;
}
.topbar.topbar-compact .profile.profile-trigger strong{
  max-width:128px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dashboard-kpis-clean .kpi-card{min-height:132px;padding-top:20px;padding-bottom:20px}
.dashboard-weekly-panel,.dashboard-status-clean{min-height:360px}
.dashboard-status-clean .outline-button{align-self:center;width:auto;min-height:44px;margin-inline:auto}
.chart-empty-message{font-weight:600;text-align:center}
.sidebar-nav,.page-content{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--theme-text-subtle) 55%,transparent) transparent}
.sidebar-nav::-webkit-scrollbar,.page-content::-webkit-scrollbar{width:7px;height:7px}
.sidebar-nav::-webkit-scrollbar-thumb,.page-content::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--theme-text-subtle) 55%,transparent);border-radius:999px}
@media(max-width:1366px){
  .topbar.topbar-compact .topbar-actions{gap:8px}
  .topbar.topbar-compact .global-search-trigger{max-width:330px}
  .topbar.topbar-compact .profile.profile-trigger strong{max-width:90px}
}

/* AVANCE 26 - Nueva orden integrada al sistema de tema profesional */
html[data-theme="dark"] .compact-order-card{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .compact-order-header{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .compact-order-header .eyebrow{color:var(--theme-accent)!important}
html[data-theme="dark"] .compact-order-header h2{color:var(--theme-text)!important}
html[data-theme="dark"] .compact-order-header p{color:var(--theme-text-muted)!important}
html[data-theme="dark"] .compact-section{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
html[data-theme="dark"] .compact-section-title{color:var(--theme-text)!important}
html[data-theme="dark"] .compact-section-title i{
  background:#1c3555!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .compact-order-page .field>span,
html[data-theme="dark"] .compact-order-page label.field>span{color:#cbd7e6!important}
html[data-theme="dark"] .customer-search-shell,
html[data-theme="dark"] .service-search-shell{
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .customer-search-shell:focus-within,
html[data-theme="dark"] .service-search-shell:focus-within{
  border-color:var(--theme-accent)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .customer-search-icon,
html[data-theme="dark"] .service-search-icon{
  background:#192c45!important;
  border-color:var(--theme-border)!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .customer-toggle,
html[data-theme="dark"] .service-toggle{color:var(--theme-text-muted)!important}
html[data-theme="dark"] .customer-toggle:hover,
html[data-theme="dark"] .service-toggle:hover{background:var(--theme-hover)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .compact-customer-preview{
  background:var(--theme-surface-3)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .compact-customer-preview>i{color:#82b3ff!important}
html[data-theme="dark"] .compact-customer-preview.empty>i{color:#71849d!important}
html[data-theme="dark"] .compact-customer-preview strong{color:var(--theme-text)!important}
html[data-theme="dark"] .compact-customer-preview span{color:var(--theme-text-muted)!important}

/* AVANCE 30: resumen horizontal del cliente y selector de fecha completo */
.compact-customer-preview:not(.empty){display:grid;grid-template-columns:minmax(230px,1.6fr) minmax(130px,.65fr) minmax(145px,.75fr) minmax(230px,1.25fr);gap:0;padding:0 14px;min-height:58px}
.compact-customer-preview:not(.empty) .customer-preview-data{min-width:0;display:flex;flex-direction:row;align-items:center;gap:9px;padding:11px 16px;border-left:1px solid #dce6f1}
.compact-customer-preview:not(.empty) .customer-preview-data:first-child{border-left:0;padding-left:2px}
.customer-preview-data i{flex:0 0 auto;color:#1d5d9f;font-size:1rem}
.customer-preview-data strong,.customer-preview-data span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-preview-data strong{color:#183d6c;font-size:.9rem}
.customer-preview-data span{font-size:.84rem;color:#566b84}
.promised-at-shell,.promised-at-shell input{cursor:pointer}
.promised-at-shell:focus-visible{outline:0;border-color:#3b82c4;box-shadow:0 0 0 3px rgba(52,131,193,.15)}
html[data-theme="dark"] .compact-customer-preview:not(.empty) .customer-preview-data{border-color:var(--theme-border)!important}
html[data-theme="dark"] .customer-preview-data i{color:#82b3ff!important}
html[data-theme="dark"] .customer-preview-data strong{color:var(--theme-text)!important}
@media (max-width:1100px){.compact-customer-preview:not(.empty){grid-template-columns:repeat(2,minmax(0,1fr))}.compact-customer-preview:not(.empty) .customer-preview-data:nth-child(3){border-left:0}.compact-customer-preview:not(.empty) .customer-preview-data:nth-child(n+3){border-top:1px solid #dce6f1}}
@media (max-width:650px){.compact-customer-preview:not(.empty){grid-template-columns:1fr}.compact-customer-preview:not(.empty) .customer-preview-data{border-left:0;border-top:1px solid #dce6f1}.compact-customer-preview:not(.empty) .customer-preview-data:first-child{border-top:0}}
html[data-theme="dark"] .mode-pill{
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .mode-pill:hover{background:var(--theme-hover)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .mode-pill.active{
  background:#245f9f!important;
  border-color:#4f8fd5!important;
  color:#fff!important;
  box-shadow:0 8px 20px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] .mode-pill:has(input:disabled){background:#111d2d!important;color:#687c95!important;border-color:#263950!important;opacity:.72}
html[data-theme="dark"] .compact-items-table-wrap{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .compact-items-table thead th{
  background:#182a41!important;
  color:#bdccde!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .compact-items-table tbody,
html[data-theme="dark"] .compact-items-table tbody tr,
html[data-theme="dark"] .compact-items-table tbody td{background:var(--theme-surface-1)!important}
html[data-theme="dark"] .compact-items-table tbody tr:hover td{background:var(--theme-hover)!important}
html[data-theme="dark"] .compact-empty-items{
  background:var(--theme-surface-1)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .compact-empty-items i{color:#6f89a8!important}
html[data-theme="dark"] .compact-empty-items strong{color:var(--theme-text)!important}
html[data-theme="dark"] .table-inline-input{background:var(--theme-input)!important;border-color:var(--theme-border)!important;color:var(--theme-text)!important}
html[data-theme="dark"] .quantity-stepper{background:var(--theme-input)!important;border-color:var(--theme-border)!important}
html[data-theme="dark"] .quantity-stepper-button{background:#192a40!important;color:#a9c8ee!important;border-color:var(--theme-border)!important}
html[data-theme="dark"] .quantity-stepper-button:hover{background:var(--theme-hover)!important;color:#fff!important}
html[data-theme="dark"] .final-summary-item{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .final-summary-item span{color:var(--theme-text-muted)!important}
html[data-theme="dark"] .final-summary-item strong{color:var(--theme-text)!important}
html[data-theme="dark"] .final-summary-item:has(#asideBalance){background:#241f2c!important;border-color:#59415f!important}
html[data-theme="dark"] .final-summary-item:has(#asideBalance) strong{color:#ffd0d9!important}
html[data-theme="dark"] .final-summary-total{
  background:linear-gradient(135deg,#1f5f9f,#184d84)!important;
  border-color:#4b88c8!important;
  box-shadow:0 10px 24px rgba(7,32,64,.28)!important;
}
html[data-theme="dark"] .final-summary-total span{color:#d8eaff!important}
html[data-theme="dark"] .final-summary-total strong{color:#fff!important}
html[data-theme="dark"] .compact-submit-row{border-color:var(--theme-border)!important}
html[data-theme="dark"] .compact-submit-row p{color:var(--theme-text-muted)!important}
html[data-theme="dark"] .compact-submit-row p i{color:#82b3ff!important}
html[data-theme="dark"] .order-promotion-notice{background:#183025!important;border-color:#356148!important;color:#d9f7e4!important}

/* Espaciado más compacto sin alterar la distribución funcional */
.compact-order-grid{padding:20px}
.compact-order-main{gap:14px}
.compact-section{padding:16px}
.compact-section-title{margin-bottom:12px}
.compact-order-header{padding:21px 24px}
@media(max-width:760px){
  .compact-order-grid{padding:12px}
  .compact-section{padding:14px}
  .compact-order-header{padding:18px}
}

/* AVANCE 27 - Capa global y heredable de modo oscuro */
:root{
  --radius-card:18px;
  --radius-section:14px;
  --radius-control:11px;
  --theme-danger-soft:#fff1f2;
  --theme-warning-soft:#fff8e7;
  --theme-success-soft:#ecfdf3;
  --theme-info-soft:#eef5ff;
}
html[data-theme="dark"]{
  --theme-danger-soft:#321d29;
  --theme-warning-soft:#30291d;
  --theme-success-soft:#183025;
  --theme-info-soft:#182b44;
}

/* El radio pertenece al contenedor; sus hijos no pueden tapar las esquinas. */
.compact-order-card{
  border-radius:var(--radius-card)!important;
  overflow:hidden!important;
  isolation:isolate;
}
.compact-order-header{
  border-radius:var(--radius-card) var(--radius-card) 0 0!important;
  overflow:hidden;
}

/* Superficies reutilizadas por los módulos actuales y los que se agreguen. */
html[data-theme="dark"] :is(
  .panel,.card,.module-card,.content-card,.data-panel,.form-section,
  .wizard-card,.live-order-summary,.production-card,.quality-card,
  .settings-card,.report-card,.customer-card,.cash-card,.delivery-card,
  .promo-kpis,.promo-list-card,.modal-window,.modal-card
){
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow);
}
html[data-theme="dark"] :is(
  .section,.inner-card,.subpanel,.summary-card,.filter-panel,.toolbar,
  .quick-customer,.customer-preview,.detail-section,.history-item
){
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}

/* Formularios globales. Las clases específicas siguen pudiendo definir tamaño. */
html[data-theme="dark"] :is(input,select,textarea){
  color-scheme:dark;
  background-color:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:var(--theme-text-subtle)!important;opacity:1}
html[data-theme="dark"] :is(input,select,textarea):disabled{
  background:var(--theme-surface-3)!important;
  color:var(--theme-text-subtle)!important;
  opacity:.72;
}
html[data-theme="dark"] :is(.input-shell,.money-input,.search-field,.search-box,.global-search-trigger){
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] :is(.input-shell,.money-input)>i,
html[data-theme="dark"] .money-input>b{
  background:var(--theme-surface-3)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
}

/* Tablas, filas, cabeceras y estados vacíos. */
html[data-theme="dark"] :is(.table-responsive,.table-scroll){border-color:var(--theme-border)!important}
html[data-theme="dark"] :is(.data-table,.table-panel table,.promo-table,.report-table) :is(tbody,tr,td){
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] :is(.data-table,.table-panel table,.promo-table,.report-table) th{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] :is(.data-table,.table-panel table,.promo-table,.report-table) tbody tr:hover td{
  background:var(--theme-hover)!important;
}
html[data-theme="dark"] :is(.empty-state,.no-results,.empty-message){
  background:var(--theme-surface-1)!important;
  color:var(--theme-text-muted)!important;
}

/* Textos y controles comunes. */
html[data-theme="dark"] :is(.field>span,label,.help-text,.muted,small){border-color:var(--theme-border)}
html[data-theme="dark"] :is(.field>span,.section-title h2,.panel h2,.pane-heading h2,.modal-window h2,.modal-card h2){color:var(--theme-text)!important}
html[data-theme="dark"] :is(.section-title p,.pane-heading p,.help-text,.muted){color:var(--theme-text-muted)!important}
html[data-theme="dark"] :is(.secondary-button,.action-button,.icon-button:not(.theme-toggle),.promo-actions a,.promo-actions button){
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-accent)!important;
}
html[data-theme="dark"] :is(.secondary-button,.action-button,.icon-button:not(.theme-toggle),.promo-actions a,.promo-actions button):hover{
  background:var(--theme-hover)!important;
  color:var(--theme-accent-hover)!important;
}
html[data-theme="dark"] :is(.modal-window>header,.modal-card>header,.modal-window>footer,.modal-card>footer){
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
}

/* Dropdowns y resultados de búsqueda. */
html[data-theme="dark"] :is(.customer-results,.service-results,.dropdown-menu,.select-menu,.global-search-panel){
  background:var(--theme-overlay)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] :is(.customer-result,.service-result,.dropdown-item){
  background:transparent!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] :is(.customer-result,.service-result,.dropdown-item):hover{
  background:var(--theme-hover)!important;
}

/* Alertas conservan significado sin regresar a superficies blancas. */
html[data-theme="dark"] :is(.alert.error,.alert.danger){background:var(--theme-danger-soft)!important;border-color:#684052!important;color:#ffd2dc!important}
html[data-theme="dark"] :is(.alert.warning,.warning-box){background:var(--theme-warning-soft)!important;border-color:#665638!important;color:#ffe0a3!important}
html[data-theme="dark"] :is(.alert.success,.success-box){background:var(--theme-success-soft)!important;border-color:#356148!important;color:#d9f7e4!important}
html[data-theme="dark"] :is(.alert.info,.info-box){background:var(--theme-info-soft)!important;border-color:#365c86!important;color:#d9eaff!important}

/* El papel real y la salida impresa permanecen deliberadamente claros. */
html[data-theme="dark"] :is(
  .print-sheet,.ticket-preview,.ticket-paper,.ticket-live-real,.mail-sheet,
  .email-preview,.receipt-paper,[data-print-surface="true"]
),
html[data-theme="dark"] :is(
  .print-sheet,.ticket-preview,.ticket-paper,.ticket-live-real,.mail-sheet,
  .email-preview,.receipt-paper,[data-print-surface="true"]
) *{
  color-scheme:light;
}
@media print{
  :root,html[data-theme="dark"]{color-scheme:light!important}
  body{background:#fff!important;color:#111!important}
  .sidebar,.topbar,.page-loader,.mobile-overlay{display:none!important}
}

/* AVANCE 28 - Prefijos visuales uniformes en Nueva orden.
   El selector de Cliente conserva deliberadamente su diseño propio. */
.compact-order-page .input-shell>i,
.compact-order-page .money-shell>b{
  width:48px;
  flex:0 0 48px;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  background:#f2f6fc;
  color:#8296ad;
  border-right:1px solid #d8e3f0;
}
.compact-order-page .input-shell>input,
.compact-order-page .input-shell>select,
.compact-order-page .input-shell>textarea{
  padding-left:14px!important;
  padding-right:12px!important;
}
html[data-theme="dark"] .compact-order-page .input-shell>i,
html[data-theme="dark"] .compact-order-page .money-shell>b{
  background:var(--theme-surface-2)!important;
  color:#70a7ff!important;
  border-right-color:var(--theme-border)!important;
}
/* Producción compacta AVANCE 32 */
.production-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:16px}.production-kpi-card{padding:17px;display:flex;align-items:center;gap:13px}.production-kpi-card>i{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#eaf2ff;color:#2563eb;font-size:18px}.production-kpi-card div{display:grid}.production-kpi-card strong{font-size:24px;line-height:1}.production-kpi-card span{font-size:12px;color:var(--text-muted,#64748b);margin-top:5px}.production-toolbar{display:grid;grid-template-columns:minmax(260px,1.8fr) repeat(3,minmax(150px,1fr)) auto;gap:10px;padding:14px;margin-bottom:17px}.production-toolbar select,.production-search{min-height:42px;border:1px solid var(--border-color,#dbe3ef);border-radius:10px;background:var(--surface,#fff);color:var(--text-color,#172033)}.production-search{display:flex;align-items:center;padding:0 12px;gap:9px}.production-search input{border:0!important;box-shadow:none!important;background:transparent!important;width:100%;padding:0!important}.production-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.production-compact-card{padding:18px;min-width:0}.production-compact-card[hidden]{display:none!important}.production-compact-card>header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.production-compact-card h2{font-size:17px;margin:0}.production-compact-card header p{font-size:13px;color:var(--text-muted,#64748b);margin:3px 0 0}.production-stage-pill{font-size:11px;font-weight:700;color:#1d4ed8;background:#eaf2ff;padding:6px 9px;border-radius:999px;white-space:nowrap}.production-badges{display:flex;gap:6px;margin:13px 0 11px}.production-badges span{font-size:10px;font-weight:800;padding:5px 8px;border-radius:7px;background:#f1f5f9}.production-badges .late{background:#fee2e2;color:#b91c1c}.production-badges .today{background:#fef3c7;color:#92400e}.production-badges .priority.alta,.production-badges .priority.express{color:#b91c1c}.production-meta-row{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--text-muted,#64748b)}.production-meta-row span{display:flex;gap:5px;align-items:center}.production-garments{border-top:1px solid var(--border-color,#e5e7eb);border-bottom:1px solid var(--border-color,#e5e7eb);padding:10px 0;margin:11px 0;display:flex;flex-wrap:wrap;gap:5px}.production-garments span,.production-garments small{font-size:11px;background:var(--surface-soft,#f8fafc);padding:4px 7px;border-radius:6px}.production-card-progress>div:first-child{display:flex;justify-content:space-between;font-size:11px;margin-bottom:6px}.production-progress-track{height:7px;background:#e5e7eb;border-radius:10px;overflow:hidden}.production-progress-track span{display:block;height:100%;background:#2563eb;border-radius:inherit}.production-compact-card>footer{display:flex;gap:8px;margin-top:14px}.production-compact-card>footer>.secondary-button{flex:0 0 auto}.production-split-action{display:flex;position:relative;flex:1}.production-split-action>form{display:flex;flex:1}.production-split-action>form .primary-button{border-radius:9px 0 0 9px;width:100%;font-size:11px;padding-inline:10px}.production-menu-toggle{border-radius:0 9px 9px 0!important;border-left:1px solid rgba(255,255,255,.28)!important;padding-inline:10px!important}.production-stage-menu{display:none;position:absolute;z-index:30;left:0;right:0;bottom:calc(100% + 7px);background:var(--surface,#fff);border:1px solid var(--border-color,#dbe3ef);border-radius:10px;box-shadow:0 14px 35px rgba(15,23,42,.18);padding:7px}.production-stage-menu.open{display:block}.production-stage-menu strong{display:block;padding:6px 8px;font-size:11px;color:var(--text-muted,#64748b)}.production-stage-menu button{width:100%;border:0;background:transparent;text-align:left;padding:8px;border-radius:7px;color:inherit;cursor:pointer}.production-stage-menu button:hover{background:#eaf2ff;color:#1d4ed8}.production-no-results{text-align:center;padding:30px;color:var(--text-muted,#64748b)}.order-production-tracking{padding:20px;margin-top:18px}.order-production-tracking>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.order-production-tracking h3,.order-production-tracking p{margin:0}.order-production-tracking p{font-size:12px;color:var(--text-muted,#64748b);margin-top:4px}.order-stage-overview{display:flex;align-items:center;gap:7px;overflow:auto;padding-bottom:12px}.order-stage-overview span{display:flex;align-items:center;gap:6px;white-space:nowrap;padding:8px 10px;border-radius:8px;background:var(--surface-soft,#f1f5f9);font-size:11px}.order-stage-overview span.done{color:#15803d;background:#dcfce7}.order-stage-overview span.active{color:#1d4ed8;background:#dbeafe;font-weight:700}.order-production-items{display:grid;gap:9px}.order-production-items article{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--border-color,#e5e7eb);border-radius:11px;padding:11px}.order-production-items article>div,.order-production-items form{display:flex;align-items:center;gap:9px}.order-production-items article>div>div{display:grid}.order-production-items small{color:var(--text-muted,#64748b)}.production-item-number{width:30px;height:30px;border-radius:8px;background:#eaf2ff;color:#2563eb;display:grid;place-items:center;font-weight:800}.order-production-items select{min-height:36px;border:1px solid var(--border-color,#dbe3ef);border-radius:8px;background:var(--surface,#fff);color:inherit;padding:0 8px}
@media(max-width:1150px){.production-kpis{grid-template-columns:repeat(3,1fr)}.production-toolbar{grid-template-columns:repeat(2,1fr)}.production-card-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.production-kpis,.production-toolbar,.production-card-grid{grid-template-columns:1fr}.production-compact-card>footer,.order-production-items article,.order-production-items form{align-items:stretch;flex-direction:column}.order-production-items form .secondary-button{width:100%}}

/* AVANCE 36: acciones y prioridad más claras en las tarjetas de Producción */
.production-badges .priority{
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.production-detail-button{
  min-height:48px;
  padding:0 14px;
  border:1.5px solid #9aabc1;
  border-radius:9px;
  background:var(--surface,#fff);
  color:var(--navy,#12396c);
  box-shadow:0 1px 2px rgba(15,23,42,.05);
  transition:border-color .2s ease,background-color .2s ease,box-shadow .2s ease,transform .2s ease;
  white-space:nowrap;
}
.production-detail-button:hover{
  border-color:#2563eb;
  background:#f3f7ff;
  color:#1d4ed8;
  box-shadow:0 4px 12px rgba(37,99,235,.12);
  transform:translateY(-1px);
}
.production-detail-button:focus-visible{
  outline:0;
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.18);
}
html[data-theme="dark"] .production-detail-button,
body.dark-mode .production-detail-button{
  border-color:#60728a;
  background:var(--surface,#172033);
  color:#dbeafe;
  box-shadow:none;
}
html[data-theme="dark"] .production-detail-button:hover,
body.dark-mode .production-detail-button:hover{
  border-color:#60a5fa;
  background:#1e3a5f;
  color:#fff;
}
@media(max-width:720px){
  .production-detail-button{width:100%;}
}
[data-theme="dark"] .production-kpi-card>i,[data-theme="dark"] .production-stage-pill,[data-theme="dark"] .production-item-number{background:#172554;color:#93c5fd}[data-theme="dark"] .production-badges span,[data-theme="dark"] .production-garments span,[data-theme="dark"] .production-garments small{background:#1e293b}[data-theme="dark"] .production-stage-menu button:hover{background:#172554;color:#bfdbfe}
/* AVANCE 33: seguimiento integrado en el detalle de orden */
.order-items-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.order-items-heading p{margin:4px 0 0;color:var(--text-muted,#64748b);font-size:12px}.order-items-heading>strong{font-size:12px;color:#2563eb}.order-stage-overview.integrated{padding:0 18px 14px}.order-detail-table .production-stage-pill{display:inline-block}.item-stage-control{position:relative}.item-stage-control>summary{list-style:none;cursor:pointer;white-space:nowrap}.item-stage-control>summary::-webkit-details-marker{display:none}.item-stage-control form{position:absolute;right:0;top:calc(100% + 6px);z-index:40;display:flex;gap:7px;min-width:285px;padding:9px;background:var(--surface,#fff);border:1px solid var(--border-color,#dbe3ef);border-radius:10px;box-shadow:0 14px 35px rgba(15,23,42,.18)}.item-stage-control select{flex:1;min-width:150px;border:1px solid var(--border-color,#dbe3ef);border-radius:8px;background:var(--surface,#fff);color:inherit;padding:0 8px}@media(max-width:900px){.order-items-heading{align-items:flex-start;flex-direction:column}.item-stage-control form{right:auto;left:0}}
.item-stage-trigger{min-height:36px;padding:0 12px;border:1px solid #b8c9df;border-radius:9px;background:#fff;color:#174f89;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;box-shadow:0 2px 5px rgba(23,79,137,.08);transition:border-color .18s ease,background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease}.item-stage-trigger:hover{border-color:#2f6fed;background:#eef4ff;color:#1d4ed8;box-shadow:0 4px 10px rgba(47,111,237,.14);transform:translateY(-1px)}.item-stage-trigger:focus-visible{outline:3px solid rgba(47,111,237,.2);outline-offset:2px}.item-stage-trigger-caret{font-size:9px;transition:transform .18s ease}.item-stage-control[open] .item-stage-trigger{border-color:#2f6fed;background:#eaf2ff;color:#1d4ed8}.item-stage-control[open] .item-stage-trigger-caret{transform:rotate(180deg)}[data-theme="dark"] .item-stage-trigger{background:#172335;border-color:#40516b;color:#bfdbfe;box-shadow:none}[data-theme="dark"] .item-stage-trigger:hover,[data-theme="dark"] .item-stage-control[open] .item-stage-trigger{background:#1e3150;border-color:#60a5fa;color:#dbeafe}

/* AVANCE 34: detalle de orden, seguimiento conectado e historial compacto */
.order-quick-actions{gap:10px;padding:12px;background:var(--surface,#fff);overflow:visible}
.order-quick-actions form{min-width:0}
.quick-action{min-height:54px;border:1px solid #d8e2ee!important;border-radius:9px;background:#fff;box-shadow:0 2px 7px rgba(15,42,75,.04);transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.quick-action:hover:not(:disabled){border-color:#9ab5d5!important;box-shadow:0 6px 15px rgba(15,42,75,.09);transform:translateY(-1px)}
.quick-action.featured{margin:0;min-height:54px;border-color:#123f78!important}
.order-stage-overview.integrated{position:relative;display:grid;grid-template-columns:repeat(7,minmax(96px,1fr));gap:0;overflow-x:auto;padding:10px 26px 24px}
.order-stage-overview.integrated::before{content:"";position:absolute;left:7%;right:7%;top:27px;height:3px;background:#dbe3ec;border-radius:999px}
.order-stage-overview.integrated span{position:relative;z-index:1;display:flex;flex-direction:column;justify-content:flex-start;gap:7px;padding:0 7px;background:transparent!important;text-align:center;color:#7a899d;font-weight:700;white-space:normal}
.order-stage-overview.integrated span i{width:34px;height:34px;margin:0 auto;border:4px solid #fff;border-radius:50%;display:grid;place-items:center;background:#dbe3ec;color:#7b8ca2;font-size:11px;box-shadow:0 0 0 1px #dbe3ec}
.order-stage-overview.integrated span.done{color:#168343}.order-stage-overview.integrated span.done i{background:#20a052;color:#fff;box-shadow:0 0 0 1px #20a052}
.order-stage-overview.integrated span.active{color:#1d5ea8}.order-stage-overview.integrated span.active i{background:#246bb5;color:#fff;box-shadow:0 0 0 3px #d8eaff}
.order-history summary{padding:17px 22px}.order-history-caption{margin-left:auto;color:#77879c;font-size:12px;font-weight:700}.order-history-count{min-width:30px;height:30px;padding:0 9px;border-radius:9px}
.order-history-list{padding:5px 22px 12px}.order-history-item{grid-template-columns:20px minmax(0,1fr);gap:14px;padding:13px 0}.order-history-marker{width:14px;height:14px;margin-top:23px;box-shadow:0 0 0 5px color-mix(in srgb,var(--history-state-color,#4caf50) 12%,transparent)}.order-history-item:not(:last-child) .order-history-marker::after{top:20px;height:calc(100% + 20px)}
.order-history-grid{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(230px,1.35fr) minmax(150px,1fr) minmax(230px,1.7fr);gap:16px;align-items:center;min-width:0}.order-history-grid small{display:block;margin-bottom:6px;color:#8a98aa;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.order-history-date time{display:flex;align-items:center;gap:8px;color:#2f435e;font-weight:800}.order-history-date time span{color:#718198;font-weight:700}.order-history-change>div{display:flex;align-items:center;gap:8px;min-width:0}.order-history-change>div>i{color:#94a3b8;font-size:10px}.history-state{display:inline-flex;align-items:center;max-width:145px;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-state.previous{background:#eef2f6;color:#5f7087}.history-state.current{background:color-mix(in srgb,var(--state,#64748b) 14%,white);color:var(--state,#64748b)}.order-history-user strong,.order-history-detail p{display:flex;align-items:center;gap:7px;margin:0;color:#314963;font-size:12px;line-height:1.35}.order-history-user i,.order-history-detail i{color:#54779f}.order-history-detail p{font-weight:600}
html[data-theme="dark"] .quick-action{background:var(--surface)!important;border-color:var(--border-theme)!important}.order-stage-overview.integrated span i{border-color:var(--surface,#fff)}html[data-theme="dark"] .history-state.previous{background:#27364a;color:#c8d5e5}html[data-theme="dark"] .history-state.current{background:color-mix(in srgb,var(--state,#64748b) 24%,#172033)}html[data-theme="dark"] .order-history-date time,html[data-theme="dark"] .order-history-user strong,html[data-theme="dark"] .order-history-detail p{color:#dce6f4}
@media(max-width:1050px){.order-quick-actions{grid-template-columns:repeat(3,1fr)}.order-history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.order-stage-overview.integrated{min-width:780px}}
@media(max-width:680px){.order-quick-actions{grid-template-columns:repeat(2,1fr);gap:8px}.order-history-caption{display:none}.order-history-grid{grid-template-columns:1fr;gap:10px}.order-history-change>div{flex-wrap:wrap}.order-history-marker{margin-top:20px}}
/* AVANCE 37: Control de calidad en modo rápido */
.quality-quick-card{min-height:255px}.quality-quick-info{display:flex;align-items:flex-start;gap:11px;padding:13px;border:1px solid #dce7f4;border-radius:12px;background:#f7faff}.quality-quick-info>i{color:var(--green);margin-top:2px}.quality-quick-info strong,.quality-quick-info span{display:block}.quality-quick-info strong{font-size:12px}.quality-quick-info span{color:var(--muted);font-size:10.5px;line-height:1.45;margin-top:3px}.quality-quick-actions{justify-content:space-between}.quality-quick-actions button{min-width:145px}.quality-success{background:#e8f8ef;color:var(--green)}.quality-warning{background:#fff4df;color:#d98900}.quality-confirm-copy{display:flex;gap:14px;align-items:flex-start;padding:4px}.quality-confirm-copy>i{width:46px;height:46px;border-radius:13px;background:#edf4ff;color:var(--blue);display:grid;place-items:center;flex:0 0 auto}.quality-confirm-copy strong{font-size:15px}.quality-confirm-copy p{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.quality-issue-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.quality-issue-fields .field:last-child{grid-column:1/-1}.quality-report-submit{background:#fff7f7}.quality-confirm-modal footer,.quality-issue-modal footer{display:flex;justify-content:flex-end;gap:10px}.quality-confirm-modal form,.quality-issue-modal form{margin:0}@media(max-width:700px){.quality-quick-actions{flex-direction:column}.quality-quick-actions button{width:100%}.quality-issue-fields{grid-template-columns:1fr}.quality-issue-fields .field:last-child{grid-column:auto}}
html[data-theme="dark"] .quality-quick-info{background:var(--surface-raised)!important;border-color:var(--border-theme)!important}html[data-theme="dark"] .quality-quick-info span,html[data-theme="dark"] .quality-confirm-copy p{color:var(--text-soft)!important}html[data-theme="dark"] .quality-report-submit{background:#321d23!important;border-color:#7d3d49!important;color:#ffadb9!important}html[data-theme="dark"] .quality-success{background:#17382a!important;color:#6ee7a5!important}html[data-theme="dark"] .quality-warning{background:#3b2d17!important;color:#ffc766!important}

/* Importación flexible de clientes */
.customer-head-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.customer-head-actions .secondary-button,.customer-head-actions .primary-button{min-height:48px;text-decoration:none}.import-upload-window{width:min(720px,calc(100vw - 32px))}.import-modal-heading{display:flex;align-items:center;gap:14px}.import-title-icon{width:48px;height:48px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:#eaf1ff;color:#2468df;font-size:21px;flex:0 0 auto}.import-upload-body{padding:8px 28px 24px}.import-guide-step{display:grid;grid-template-columns:30px 1fr;gap:14px;padding:22px 0;border-bottom:1px solid #e5edf8}.import-guide-step:last-child{border-bottom:0}.import-guide-step>span{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#2f70e8;color:#fff;font-weight:700}.import-guide-step h3{margin:0 0 5px;font-size:17px}.import-guide-step p{margin:0 0 14px;color:#71809b}.import-dropzone{min-height:190px;border:1.5px dashed #88adf7;border-radius:14px;background:#fbfdff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer;text-align:center;transition:.2s}.import-dropzone:hover{border-color:#2468df;background:#f5f9ff}.import-dropzone>i{font-size:35px;color:#3478ed}.import-dropzone small{color:#8491a8}.import-dropzone em{font-style:normal;border:1px solid #8db0f5;border-radius:9px;padding:9px 18px;color:#1759c6;font-weight:700;margin-top:5px}.import-dropzone input{position:absolute;opacity:0;pointer-events:none}.import-file-help{font-size:13px!important;margin-top:10px!important}.import-workspace{background:#fff;border:1px solid #dbe5f2;border-radius:20px;box-shadow:0 18px 45px rgba(31,58,96,.08);overflow:hidden}.import-page-head{padding:24px 28px;border-bottom:1px solid #e5edf7}.import-page-head>div{display:flex;align-items:center;gap:14px}.import-page-head a{width:38px;height:38px;border:1px solid #d8e2f0;border-radius:10px;display:grid;place-items:center;color:#173f73;text-decoration:none}.import-page-head h2{margin:0 0 3px;font-size:22px}.import-page-head p{margin:0;color:#71809b}.import-page-head small{display:block;margin-top:7px;color:#49617f}.import-summary-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#e5edf7;border-bottom:1px solid #e5edf7}.import-summary-strip span{padding:18px 22px;background:#f8fbff;color:#63738e}.import-summary-strip b{display:block;font-size:19px;color:#153e73}.import-mapping-form{padding:25px 28px}.import-section-title{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:16px}.import-section-title h3{margin:0 0 4px}.import-section-title p{margin:0;color:#7888a2}.import-section-title>span{padding:8px 12px;border-radius:20px;background:#edf4ff;color:#2868d5;font-size:13px}.import-map-table-wrap,.import-preview-table-wrap{border:1px solid #dfe7f2;border-radius:14px;overflow:auto}.import-map-table,.import-preview-table{width:100%;border-collapse:collapse}.import-map-table th,.import-preview-table th{background:#f6f9fd;padding:13px 16px;text-align:left;color:#526786;font-size:12px;text-transform:uppercase;letter-spacing:.03em}.import-map-table td,.import-preview-table td{padding:12px 16px;border-top:1px solid #e7edf5}.import-map-table select,.import-rule-grid select,.import-rule-grid input{width:100%;min-height:42px;border:1px solid #d3deec;border-radius:10px;background:#fff;padding:0 12px;color:#17385f;font-family:inherit}.import-rule-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:18px;margin-top:20px}.import-rule-grid label>span{display:block;font-weight:700;margin-bottom:7px}.import-rule-grid small{display:block;color:#8290a5;margin-top:6px}.import-page-footer{padding:20px 28px;border-top:1px solid #e5edf7;display:flex;justify-content:flex-end;gap:12px;margin:24px -28px -25px}.import-result-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;padding:22px 28px}.import-result-kpis article{display:flex;align-items:center;gap:10px;border:1px solid #dfe8f4;border-radius:13px;padding:14px;background:#f9fbfe}.import-result-kpis i{font-size:20px}.import-result-kpis strong{display:block;font-size:21px}.import-result-kpis span{font-size:12px;color:#728199}.import-result-kpis .blue{color:#3478ed;background:#f4f8ff}.import-result-kpis .teal,.import-result-kpis .green{color:#169b74;background:#f2fbf8}.import-result-kpis .purple{color:#8255db;background:#faf7ff}.import-result-kpis .orange{color:#d58a16;background:#fffaf0}.import-result-kpis .red{color:#d64b55;background:#fff6f7}.import-preview-table-wrap{margin:0 28px}.type-chip,.import-status{display:inline-flex;padding:5px 9px;border-radius:20px;font-size:12px;white-space:nowrap}.type-chip.individual{background:#ebfaf7;color:#087e67}.type-chip.company{background:#f3edff;color:#7341c9}.import-status.valid{background:#e8f8f1;color:#14815f}.import-status.warning{background:#fff4d9;color:#9b6508}.import-status.duplicate{background:#fff1dd;color:#a75c05}.import-status.error{background:#ffe9ec;color:#b82e3d}.import-table-note{padding:10px 15px;margin:0;color:#75849b}.import-result-note{margin:18px 28px 0;padding:13px 15px;border-radius:11px;background:#f2f7ff;color:#315983;display:flex;gap:10px}.import-workspace>.import-page-footer{margin:24px 0 0}.import-workspace form.import-page-footer{margin:24px 0 0}.import-workspace form.import-page-footer .secondary-button:first-child{margin-right:auto}@media(max-width:1100px){.import-result-kpis{grid-template-columns:repeat(3,1fr)}.import-summary-strip{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.customer-head-actions{width:100%}.customer-head-actions>*{flex:1}.import-rule-grid{grid-template-columns:1fr}.import-result-kpis{grid-template-columns:repeat(2,1fr)}.import-summary-strip{grid-template-columns:1fr}.import-page-footer{flex-wrap:wrap}.import-page-footer>*{flex:1}.import-section-title{align-items:flex-start;flex-direction:column}}
[data-theme="dark"] .import-workspace,[data-theme="dark"] .import-upload-window,[data-theme="dark"] .modal-window>header{background:var(--surface,#172033);border-color:var(--border-theme,#334155)}[data-theme="dark"] .import-summary-strip,[data-theme="dark"] .import-summary-strip span,[data-theme="dark"] .import-map-table th,[data-theme="dark"] .import-preview-table th,[data-theme="dark"] .import-dropzone,[data-theme="dark"] .import-result-kpis article,[data-theme="dark"] .modal-window>form>footer{background:var(--surface-raised,#1e293b);border-color:var(--border-theme,#334155)}[data-theme="dark"] .import-map-table td,[data-theme="dark"] .import-preview-table td,[data-theme="dark"] .import-page-head,[data-theme="dark"] .import-page-footer{border-color:var(--border-theme,#334155)}[data-theme="dark"] .import-map-table select,[data-theme="dark"] .import-rule-grid select,[data-theme="dark"] .import-rule-grid input{background:#172033;color:#e5edf8;border-color:#40516b}

/* Paginación y acciones contenidas del directorio de clientes */
.customer-head-actions{padding:7px;background:#f8fafc;border:1px solid #dce5f0;border-radius:14px;box-shadow:0 3px 10px rgba(18,57,108,.035)}.customer-head-actions .customer-toolbar-button{min-height:44px!important;border:1px solid #b9c9dd!important;background:#fff!important;color:var(--navy)!important;border-radius:10px!important;padding:0 16px!important;box-shadow:0 2px 5px rgba(18,57,108,.04)}.customer-head-actions .customer-toolbar-button:hover{border-color:#5682ba!important;background:#f3f7fd!important;box-shadow:0 4px 10px rgba(18,57,108,.08)}.customer-search-button{min-height:60px!important;border:1px solid #b9c9dd!important;background:#fff!important;color:var(--navy)!important;border-radius:11px!important;padding:0 20px!important;box-shadow:0 2px 5px rgba(18,57,108,.04)}.customer-search-button:hover{border-color:#5682ba!important;background:#f3f7fd!important}.customer-pagination{min-height:76px;padding:15px 18px;border-top:1px solid #e2e9f2;background:#fbfcfe;display:flex;align-items:center;justify-content:space-between;gap:18px}.customer-pagination p{margin:0;color:#6f7f95;font-size:13px}.customer-pagination p strong{color:#243d5d}.customer-pagination-controls{display:flex;align-items:center;gap:6px}.customer-page-nav,.customer-page-number{height:38px;border:1px solid #d3deeb;background:#fff;color:#274665;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:700;transition:.18s}.customer-page-nav{padding:0 13px}.customer-page-number{min-width:38px;padding:0 8px}.customer-page-number:hover,.customer-page-nav:hover:not(.disabled){border-color:#7194c1;background:#f2f7fd;color:#143e72}.customer-page-number.active{border-color:var(--navy);background:var(--navy);color:#fff;box-shadow:0 4px 10px rgba(18,57,108,.18)}.customer-page-nav.disabled{opacity:.45;pointer-events:none}.customer-page-dots{width:25px;text-align:center;color:#8a98aa}@media(max-width:820px){.customer-pagination{align-items:flex-start;flex-direction:column}.customer-pagination-controls{width:100%;overflow-x:auto;padding-bottom:3px}.customer-page-nav span{display:none}.customer-search-button{min-height:48px!important}}
[data-theme="dark"] .customer-head-actions,[data-theme="dark"] .customer-pagination{background:var(--surface-raised,#1e293b);border-color:var(--border-theme,#334155)}[data-theme="dark"] .customer-head-actions .customer-toolbar-button,[data-theme="dark"] .customer-search-button,[data-theme="dark"] .customer-page-nav,[data-theme="dark"] .customer-page-number{background:var(--surface,#172033)!important;border-color:#40516b!important;color:#dbeafe!important}[data-theme="dark"] .customer-page-number.active{background:#2563a8!important;border-color:#60a5fa!important;color:#fff!important}

/* AVANCE 35: controles contenidos en Formato de tickets */
.ticket-module-v2 .ticket-select-grid label{
  gap:9px!important;
}
.ticket-module-v2 .ticket-select-grid select{
  width:100%!important;
  min-height:48px!important;
  padding:0 42px 0 15px!important;
  border:1px solid #c8d5e5!important;
  border-radius:11px!important;
  background-color:#fff!important;
  color:#243d5d!important;
  box-shadow:0 2px 6px rgba(18,57,108,.045)!important;
  cursor:pointer!important;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease!important;
}
.ticket-module-v2 .ticket-select-grid select:hover{
  border-color:#7f9fc7!important;
  background-color:#fbfdff!important;
}
.ticket-module-v2 .ticket-select-grid select:focus{
  outline:0!important;
  border-color:#2f6fed!important;
  box-shadow:0 0 0 4px rgba(47,111,237,.11)!important;
}
.ticket-module-v2 .ticket-print-types{
  gap:14px!important;
}
.ticket-module-v2 .ticket-print-types label{
  min-height:76px!important;
  padding:15px 17px!important;
  border:1px solid #c8d5e5!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 2px 6px rgba(18,57,108,.045)!important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.ticket-module-v2 .ticket-print-types label:hover{
  border-color:#7f9fc7!important;
  background:#f8fbff!important;
  box-shadow:0 5px 12px rgba(18,57,108,.075)!important;
  transform:translateY(-1px);
}
.ticket-module-v2 .ticket-print-types label:has(input:checked){
  border-color:#2f6fed!important;
  background:#eef5ff!important;
  box-shadow:0 0 0 3px rgba(47,111,237,.09)!important;
}
.ticket-module-v2 .ticket-print-types input{
  width:17px!important;
  height:17px!important;
  accent-color:#2f6fed!important;
  flex:0 0 auto!important;
}
.ticket-module-v2 .ticket-print-types label:focus-within{
  outline:3px solid rgba(47,111,237,.16)!important;
  outline-offset:2px!important;
}
.ticket-module-v2 .ticket-reset-button{
  min-height:50px!important;
  padding:0 18px!important;
  border:1px solid #b9c9dd!important;
  border-radius:11px!important;
  background:#fff!important;
  color:var(--navy,#12396c)!important;
  box-shadow:0 2px 6px rgba(18,57,108,.05)!important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.ticket-module-v2 .ticket-reset-button:hover{
  border-color:#5682ba!important;
  background:#f3f7fd!important;
  box-shadow:0 5px 12px rgba(18,57,108,.09)!important;
  transform:translateY(-1px);
}
.ticket-module-v2 .ticket-reset-button:focus-visible{
  outline:3px solid rgba(47,111,237,.18)!important;
  outline-offset:2px!important;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-select-grid select,
html[data-theme="dark"] .ticket-module-v2 .ticket-print-types label,
html[data-theme="dark"] .ticket-module-v2 .ticket-reset-button{
  background:var(--surface,#172033)!important;
  color:#dbeafe!important;
  border-color:#40516b!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-select-grid select:hover,
html[data-theme="dark"] .ticket-module-v2 .ticket-print-types label:hover,
html[data-theme="dark"] .ticket-module-v2 .ticket-reset-button:hover{
  background:#1e3150!important;
  border-color:#5d7da5!important;
}
html[data-theme="dark"] .ticket-module-v2 .ticket-print-types label:has(input:checked){
  background:#17345c!important;
  border-color:#60a5fa!important;
  color:#dcebff!important;
}
@media(max-width:700px){
  .ticket-module-v2 .ticket-select-grid,
  .ticket-module-v2 .ticket-print-types{grid-template-columns:1fr!important}
  .ticket-module-v2 .ticket-config-card>footer{grid-template-columns:1fr!important}
  .ticket-module-v2 .ticket-reset-button{width:100%!important}
}

/* AVANCE 36: impresión y descarga PDF del ticket */
.ticket-module-v2 .ticket-preview-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  flex-wrap:wrap!important;
}
.ticket-module-v2 .ticket-print-test-button{
  min-height:48px!important;
  padding:0 18px!important;
  border:1px solid #b9c9dd!important;
  border-radius:11px!important;
  background:#fff!important;
  color:var(--navy,#12396c)!important;
  box-shadow:0 2px 6px rgba(18,57,108,.05)!important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.ticket-module-v2 .ticket-print-test-button:hover{
  border-color:#5682ba!important;
  background:#f3f7fd!important;
  box-shadow:0 5px 12px rgba(18,57,108,.09)!important;
  transform:translateY(-1px);
}
.ticket-module-v2 .ticket-print-test-button:focus-visible,
.ticket-module-v2 .ticket-pdf-button:focus-visible{
  outline:3px solid rgba(47,111,237,.18)!important;
  outline-offset:2px!important;
}
.ticket-module-v2 .ticket-pdf-button{min-height:48px!important;padding:0 19px!important}
.ticket-module-v2 .ticket-pdf-button.is-loading{cursor:wait!important;opacity:.78}
.ticket-module-v2 .ticket-export-help{min-height:20px;margin:9px 0 0;text-align:center;color:var(--muted,#6f7f95);font-size:12px}
.ticket-module-v2 .ticket-receipt-real.ticket-pdf-capture{box-shadow:none!important;transform:none!important;margin:0!important}
html[data-theme="dark"] .ticket-module-v2 .ticket-print-test-button{background:var(--surface,#172033)!important;border-color:#40516b!important;color:#dbeafe!important;box-shadow:none!important}
html[data-theme="dark"] .ticket-module-v2 .ticket-print-test-button:hover{background:#1e3150!important;border-color:#5d7da5!important}
@media(max-width:700px){
  .ticket-module-v2 .ticket-preview-actions{flex-direction:column!important;align-items:stretch!important}
  .ticket-module-v2 .ticket-preview-actions>button{width:100%!important}
}

/* AVANCE 37: acciones contenidas en Auditoría */
.audit-filter-actions .audit-clear-button{
  min-height:48px!important;
  padding:0 18px!important;
  border:1px solid #b9c9dd!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--navy,#12396c)!important;
  box-shadow:0 2px 6px rgba(18,57,108,.05)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  text-decoration:none!important;
  font-weight:700!important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.audit-filter-actions .audit-clear-button i{color:#55769e}
.audit-filter-actions .audit-clear-button:hover{
  border-color:#5682ba!important;
  background:#f3f7fd!important;
  box-shadow:0 5px 12px rgba(18,57,108,.09)!important;
  transform:translateY(-1px);
}
.audit-filter-actions .audit-clear-button:focus-visible{
  outline:3px solid rgba(47,111,237,.18)!important;
  outline-offset:2px!important;
}
.audit-toolbar-panel .audit-count-badge{
  justify-self:end!important;
  min-height:48px!important;
  padding:0 15px!important;
  border:1px solid #d3deeb!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  color:#60748c!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  font-size:13px!important;
  font-weight:700!important;
  white-space:nowrap!important;
  box-shadow:0 2px 6px rgba(18,57,108,.035)!important;
}
.audit-toolbar-panel .audit-count-badge i{color:#55769e}
.audit-toolbar-panel .audit-count-badge strong{color:#274665;font-size:14px}
html[data-theme="dark"] .audit-filter-actions .audit-clear-button,
html[data-theme="dark"] .audit-toolbar-panel .audit-count-badge{
  background:var(--surface,#172033)!important;
  border-color:#40516b!important;
  color:#dbeafe!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .audit-filter-actions .audit-clear-button i,
html[data-theme="dark"] .audit-toolbar-panel .audit-count-badge i{color:#93c5fd}
html[data-theme="dark"] .audit-toolbar-panel .audit-count-badge strong{color:#fff}
html[data-theme="dark"] .audit-filter-actions .audit-clear-button:hover{background:#1e3150!important;border-color:#5d7da5!important}
@media(max-width:1200px){
  .audit-toolbar-panel .audit-count-badge{justify-self:start!important}
}
@media(max-width:600px){
  .audit-filter-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  .audit-filter-actions>*{width:100%!important}
  .audit-toolbar-panel .audit-count-badge{width:100%!important;justify-self:stretch!important}
}

/* AVANCE 33: alturas consistentes y estado del archivo seleccionado */
.customer-filter-toolbar .customer-search-button{height:48px!important;min-height:48px!important;max-height:48px!important;align-self:center;padding:0 18px!important}.import-template-button,.import-cancel-button{min-height:44px!important;border:1px solid #b9c9dd!important;background:#fff!important;color:var(--navy)!important;border-radius:10px!important;padding:0 17px!important;box-shadow:0 2px 5px rgba(18,57,108,.045);text-decoration:none!important}.import-template-button:hover,.import-cancel-button:hover{border-color:#5682ba!important;background:#f3f7fd!important}.import-dropzone.is-dragging{border-color:#2f6fed;background:#eef5ff;box-shadow:0 0 0 4px rgba(47,111,237,.1)}.import-dropzone.has-file{border-style:solid;border-color:#63c6a4;background:#f3fbf8}.import-dropzone.has-file>i{color:#19956e}.import-dropzone.has-file>strong{color:#146b52}.import-dropzone.has-file em{border-color:#72bda4;color:#147759;background:#fff}.import-selected-file{display:inline-flex;max-width:90%;align-items:center;justify-content:center;padding:7px 12px;border-radius:9px;background:#e4f6ef;color:#16694f;font-size:13px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.import-selected-file[hidden]{display:none}.import-dropzone.has-error{border-style:solid;border-color:#eb7d88;background:#fff6f7}.import-dropzone.has-error>i,.import-dropzone.has-error>strong{color:#bd3442}.import-dropzone.has-error em{border-color:#e39ba2;color:#ae303c;background:#fff}.import-dropzone.has-error .import-selected-file{background:#ffe7ea;color:#a82d39}.import-upload-window button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}[data-theme="dark"] .import-template-button,[data-theme="dark"] .import-cancel-button{background:var(--surface,#172033)!important;border-color:#50627b!important;color:#dbeafe!important}[data-theme="dark"] .import-dropzone.has-file{background:#15362d;border-color:#3ca77e}[data-theme="dark"] .import-dropzone.has-file .import-selected-file{background:#1d493b;color:#a7f3d0}[data-theme="dark"] .import-dropzone.has-error{background:#3a2026;border-color:#b95965}[data-theme="dark"] .import-dropzone.has-error .import-selected-file{background:#552a33;color:#fecdd3}

/* AVANCE 34: botón Limpiar contenido y alineado */
.customer-filter-toolbar .customer-clear-button{height:48px!important;min-height:48px!important;max-height:48px!important;align-self:center;border:1px solid #b9c9dd!important;background:#fff!important;color:var(--navy)!important;border-radius:11px!important;padding:0 18px!important;box-shadow:0 2px 5px rgba(18,57,108,.04);white-space:nowrap}.customer-filter-toolbar .customer-clear-button:hover{border-color:#5682ba!important;background:#f3f7fd!important;box-shadow:0 4px 10px rgba(18,57,108,.08)}.customer-filter-toolbar .customer-clear-button i{color:#55769e}[data-theme="dark"] .customer-filter-toolbar .customer-clear-button{background:var(--surface,#172033)!important;border-color:#40516b!important;color:#dbeafe!important}[data-theme="dark"] .customer-filter-toolbar .customer-clear-button i{color:#93c5fd}

/* AVANCE 52: prioridad final para los controles del Dashboard */
.dashboard-tabs-panel .dashboard-tab:not(.active):not([aria-selected="true"]){
  border:1px solid #ccd9e9!important;
  background:#fff!important;
  color:#536985!important;
  box-shadow:0 2px 7px rgba(15,42,77,.035)!important;
}
.dashboard-tabs-panel .dashboard-tab:not(.active):not([aria-selected="true"]):hover{
  border-color:#8eb0df!important;
  background:#f3f7ff!important;
  color:#174f95!important;
  box-shadow:0 6px 14px rgba(15,42,77,.08)!important;
}
html[data-theme="dark"] .dashboard-tabs-panel .dashboard-tab:not(.active):not([aria-selected="true"]){
  background:#101b2c!important;
  border-color:#344a68!important;
  color:#c7d4e6!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .dashboard-tabs-panel .dashboard-tab:not(.active):not([aria-selected="true"]):hover{
  background:#172a43!important;
  border-color:#5579a8!important;
  color:#fff!important;
}

/* AVANCE 53: resumen analítico distribuido en cuadrícula 2 x 2 */
.dashboard-summary-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
}
.dashboard-summary-grid .dashboard-window{
  min-height:270px!important;
}
.dashboard-summary-grid .dashboard-donut-layout{
  grid-template-columns:minmax(145px,38%) minmax(0,62%)!important;
  gap:24px!important;
  min-height:190px!important;
}
.dashboard-summary-grid .dashboard-donut.small{
  width:min(138px,100%)!important;
}
.dashboard-summary-grid .dashboard-legend{
  max-width:310px;
}
@media(max-width:760px){
  .dashboard-summary-grid{
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
  .dashboard-summary-grid .dashboard-window{
    min-height:auto!important;
  }
  .dashboard-summary-grid .dashboard-donut-layout{
    grid-template-columns:1fr!important;
    gap:15px!important;
    min-height:auto!important;
  }
}

/* AVANCE 61: Reportes > Órdenes completamente adaptado al modo oscuro */
html[data-theme="dark"] .orders-report-module{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-report-module :is(
  .orders-report-hero,.orders-report-filters,.orders-kpi,
  .orders-status-card,.orders-chart-card,.orders-pagination-card
){
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .orders-report-hero .management-title>span,
html[data-theme="dark"] .orders-kpi>span{
  background:#182d49!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .orders-kpi.warning>span{
  background:#382c19!important;
  color:#ffc45c!important;
}
html[data-theme="dark"] .orders-kpi.success>span{
  background:#183528!important;
  color:#68dfa0!important;
}
html[data-theme="dark"] .orders-report-hero .management-title small{
  color:#82b3ff!important;
}
html[data-theme="dark"] .orders-report-hero .management-title h2,
html[data-theme="dark"] :is(.orders-status-card,.orders-chart-card) h3,
html[data-theme="dark"] .orders-kpi strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-report-hero .management-title p,
html[data-theme="dark"] .orders-kpi :is(small,em),
html[data-theme="dark"] .orders-pagination-card>span{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .orders-report-filters label span{
  color:#bdccde!important;
}
html[data-theme="dark"] .orders-report-filters :is(input,select),
html[data-theme="dark"] .orders-pagination-card select{
  color-scheme:dark!important;
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-report-filters :is(input,select):focus{
  border-color:var(--theme-accent)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .orders-report-filters>.secondary-button{
  background:var(--theme-surface-2)!important;
  border-color:#405873!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-report-filters>.secondary-button:hover{
  background:var(--theme-hover)!important;
  border-color:#5f82ad!important;
}
html[data-theme="dark"] .orders-status-table-wrap,
html[data-theme="dark"] .orders-modal-table-wrap{
  scrollbar-color:#506580 transparent;
}
html[data-theme="dark"] :is(.orders-status-table,.orders-modal-table) th{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:#bdccde!important;
}
html[data-theme="dark"] :is(.orders-status-table,.orders-modal-table) :is(tbody,tr,td){
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] :is(.orders-status-table,.orders-modal-table) tbody tr:hover td{
  background:var(--theme-hover)!important;
}
html[data-theme="dark"] .orders-status-table tfoot td{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-status-table .empty-state,
html[data-theme="dark"] .orders-modal-table .empty-state{
  background:var(--theme-surface-1)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .percent-cell>span{
  background:#2a3c55!important;
}
html[data-theme="dark"] .percent-cell strong,
html[data-theme="dark"] .orders-chart-legend strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-status-view-button{
  background:#17263a!important;
  border-color:#405873!important;
  color:#cfe3ff!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .orders-status-view-button:hover{
  background:#203651!important;
  border-color:#6a91c1!important;
  color:#fff!important;
  box-shadow:0 5px 14px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] .orders-donut{
  box-shadow:inset 0 0 0 1px var(--theme-border)!important;
}
html[data-theme="dark"] .orders-donut:after{
  background:var(--theme-surface-1)!important;
  box-shadow:0 10px 25px rgba(0,0,0,.25)!important;
}
html[data-theme="dark"] .orders-donut div{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-donut span,
html[data-theme="dark"] .orders-chart-legend small{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .orders-pagination-card .table-pagination button{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .orders-pagination-card .table-pagination button:disabled{
  opacity:.48!important;
}
html[data-theme="dark"] .orders-pagination-card .table-pagination span{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-status-modal,
html[data-theme="dark"] .orders-status-modal :is(header,.modal-content,footer){
  background:var(--theme-overlay)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .orders-status-modal header p{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .orders-status-modal .modal-icon{
  background:#1b3555!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .orders-status-modal .modal-close{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .orders-status-modal .modal-close:hover{
  background:var(--theme-hover)!important;
  color:#fff!important;
}

/* AVANCE 62: Clientes > Lista de clientes sin superficies claras en modo oscuro */
html[data-theme="dark"] .customer-kpis article{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .customer-kpis article small{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .customer-kpis article strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .customer-kpi-icon.blue{
  background:#192f4d!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .customer-kpi-icon.teal{
  background:#163733!important;
  color:#5eead4!important;
}
html[data-theme="dark"] .customer-kpi-icon.purple{
  background:#2e2347!important;
  color:#c4a7ff!important;
}
html[data-theme="dark"] .customer-kpi-icon.orange{
  background:#3b2c18!important;
  color:#ffc45c!important;
}
html[data-theme="dark"] .customer-panel{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .customer-panel-head,
html[data-theme="dark"] .customer-toolbar{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .customer-panel-head h2{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .customer-panel-head p{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .customer-head-actions{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .customer-search,
html[data-theme="dark"] .customer-filter-field{
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .customer-search:focus-within,
html[data-theme="dark"] .customer-filter-field:focus-within{
  border-color:var(--theme-accent)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .customer-search>i{
  background:#192c45!important;
  border-color:var(--theme-border)!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .customer-search input,
html[data-theme="dark"] .customer-filter-field select{
  color-scheme:dark!important;
  background:transparent!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .customer-search input::placeholder{
  color:var(--theme-text-subtle)!important;
}
html[data-theme="dark"] .customer-filter-field span{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .customer-table-wrap{
  background:var(--theme-surface-1)!important;
  scrollbar-color:#506580 transparent;
}
html[data-theme="dark"] .customer-directory-table{
  background:var(--theme-surface-1)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .customer-directory-table thead th{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:#bdccde!important;
}
html[data-theme="dark"] .customer-directory-table tbody tr,
html[data-theme="dark"] .customer-directory-table tbody td{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .customer-directory-table tbody tr:hover td{
  background:var(--theme-hover)!important;
}
html[data-theme="dark"] .customer-directory-table tr.inactive-row td{
  background:#101a29!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .customer-directory-table tr.inactive-row:hover td{
  background:#19283c!important;
}
html[data-theme="dark"] .customer-cell strong,
html[data-theme="dark"] .customer-directory-table td>strong{
  color:inherit!important;
}
html[data-theme="dark"] .customer-avatar{
  background:#1a3150!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .customer-avatar.company{
  background:#30254a!important;
  color:#c4a7ff!important;
}
html[data-theme="dark"] .balance-pill.clear{
  background:#17382c!important;
  color:#7be1aa!important;
}
html[data-theme="dark"] .balance-pill.pending{
  background:#3b2d1b!important;
  color:#ffd083!important;
}
html[data-theme="dark"] .customer-action-icon{
  background:var(--theme-surface-2)!important;
  border-color:#405873!important;
  color:#9fc4f7!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .customer-action-icon:hover{
  background:var(--theme-hover)!important;
  border-color:#6a91c1!important;
  color:#fff!important;
}
html[data-theme="dark"] .customer-status-switch{
  background:#42526a!important;
  border:1px solid #536883!important;
}
html[data-theme="dark"] .customer-status-switch.is-active{
  background:#1971e8!important;
  border-color:#63a2f4!important;
}
html[data-theme="dark"] .customer-status-switch span{
  background:#f4f8ff!important;
}
html[data-theme="dark"] .customer-pagination{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .customer-pagination p,
html[data-theme="dark"] .customer-page-dots{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .customer-pagination p strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .customer-page-nav,
html[data-theme="dark"] .customer-page-number{
  background:var(--theme-surface-1)!important;
  border-color:#405873!important;
  color:#cfe3ff!important;
}
html[data-theme="dark"] .customer-page-nav:hover:not(.disabled),
html[data-theme="dark"] .customer-page-number:hover{
  background:var(--theme-hover)!important;
  border-color:#6a91c1!important;
  color:#fff!important;
}
html[data-theme="dark"] .customer-page-number.active{
  background:#2563a8!important;
  border-color:#72a7ff!important;
  color:#fff!important;
}
html[data-theme="dark"] .customer-panel .empty-state{
  background:var(--theme-surface-1)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .customer-panel .empty-state strong{
  color:var(--theme-text)!important;
}

/* AVANCE 63: Caja > Apertura de caja completamente adaptada al modo oscuro */
html[data-theme="dark"] .cash-kpis article{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .cash-kpis article small{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .cash-kpis article strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .cash-kpi-icon.blue,
html[data-theme="dark"] .cash-title-icon{
  background:#192f4d!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .cash-kpi-icon.green{
  background:#18382b!important;
  color:#6ee7a5!important;
}
html[data-theme="dark"] .cash-kpi-icon.purple{
  background:#30254a!important;
  color:#c4a7ff!important;
}
html[data-theme="dark"] .cash-kpi-icon.orange{
  background:#3b2d1b!important;
  color:#ffc45c!important;
}
html[data-theme="dark"] .cash-panel{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .cash-panel-head{
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .cash-panel-head h2{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .cash-panel-head p{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .cash-title-icon.soft{
  background:#173633!important;
  color:#5eead4!important;
}
html[data-theme="dark"] .cash-form label>span{
  color:#c7d4e5!important;
}
html[data-theme="dark"] .cash-input{
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .cash-input:focus-within{
  border-color:var(--theme-accent)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .cash-input>i,
html[data-theme="dark"] .cash-input>b{
  background:#192c45!important;
  border-color:var(--theme-border)!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .cash-input :is(input,select,textarea){
  color-scheme:dark!important;
  background:transparent!important;
  color:var(--theme-text)!important;
  caret-color:var(--theme-text)!important;
}
html[data-theme="dark"] .cash-input :is(input,textarea)::placeholder{
  color:var(--theme-text-subtle)!important;
  opacity:1!important;
}
html[data-theme="dark"] .cash-form>.primary-button{
  background:#1d5fa8!important;
  border:1px solid #4c89cf!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(0,0,0,.22)!important;
}
html[data-theme="dark"] .cash-form>.primary-button:hover{
  background:#2872c4!important;
  border-color:#72a7e7!important;
  box-shadow:0 10px 22px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] .cash-steps li{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .cash-steps li>b{
  background:#1b3150!important;
  border:1px solid #355273!important;
  color:#91baff!important;
}
html[data-theme="dark"] .cash-steps strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .cash-steps small{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .cash-state.open{
  background:#18372b!important;
  border-color:#356148!important;
  color:#b9f4d0!important;
}
html[data-theme="dark"] .cash-state.open :is(strong,span,b){
  color:inherit!important;
}

/* AVANCE 64: Servicios > Categorías de prendas, contraste y buscador oscuro */
html[data-theme="dark"] .garment-categories-module{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .garment-categories-hero,
html[data-theme="dark"] .garment-categories-card{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .garment-categories-hero .management-title>span{
  background:#192f4d!important;
  border:1px solid #355273!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .garment-categories-hero .management-title small{
  color:#82b3ff!important;
}
html[data-theme="dark"] .garment-categories-hero .management-title h2{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .garment-categories-hero .management-title p{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .garment-categories-toolbar{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .garment-category-search{
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .garment-category-search>i{
  width:52px!important;
  min-width:52px!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  align-self:stretch!important;
  display:grid!important;
  place-items:center!important;
  position:static!important;
  transform:none!important;
  background:#192c45!important;
  border-right:1px solid var(--theme-border)!important;
  color:#91baff!important;
  line-height:1!important;
}
html[data-theme="dark"] .garment-category-search input{
  color-scheme:dark!important;
  background:transparent!important;
  color:var(--theme-text)!important;
  padding:0 16px!important;
  caret-color:var(--theme-text)!important;
}
html[data-theme="dark"] .garment-category-search input::placeholder{
  color:var(--theme-text-subtle)!important;
  opacity:1!important;
}
html[data-theme="dark"] .garment-category-search:focus-within{
  border-color:var(--theme-accent)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .garment-category-count{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .garment-categories-table-wrap{
  background:var(--theme-surface-1)!important;
  scrollbar-color:#506580 transparent;
}
html[data-theme="dark"] .garment-categories-table thead th{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:#bdccde!important;
}
html[data-theme="dark"] .garment-categories-table tbody tr,
html[data-theme="dark"] .garment-categories-table tbody td{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .garment-categories-table tbody tr:hover td{
  background:var(--theme-hover)!important;
}
html[data-theme="dark"] .garment-category-name strong{
  color:#eaf1fb!important;
}
html[data-theme="dark"] .garment-category-name span{
  background:#1b3150!important;
  border:1px solid #355273!important;
  color:#91baff!important;
}
html[data-theme="dark"] .garment-category-description{
  color:#c5d2e2!important;
}
html[data-theme="dark"] .garment-categories-table .mini-pill.green{
  background:#17382c!important;
  border:1px solid #356148!important;
  color:#7be1aa!important;
}
html[data-theme="dark"] .garment-categories-table .mini-pill.gray{
  background:#263347!important;
  border:1px solid #42536b!important;
  color:#bdc9d8!important;
}
html[data-theme="dark"] .garment-category-actions .action-button{
  background:var(--theme-surface-2)!important;
  border-color:#405873!important;
  color:#91baff!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .garment-category-actions .action-button:hover{
  background:var(--theme-hover)!important;
  border-color:#6a91c1!important;
  color:#fff!important;
}
html[data-theme="dark"] .garment-categories-footer{
  background:var(--theme-surface-2)!important;
  border-top:1px solid var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .garment-categories-footer strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .category-detail-grid article{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .category-detail-grid small{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .category-detail-grid strong{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .category-form-modal .category-form-grid .field>span{
  color:#c7d4e5!important;
}
html[data-theme="dark"] .category-form-modal .textarea-shell textarea{
  background:transparent!important;
  color:var(--theme-text)!important;
}

/* AVANCE 65: Servicios > Catálogo de prendas y artículos en modo oscuro */
html[data-theme="dark"] .services-catalog-module{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .services-catalog-hero,
html[data-theme="dark"] .services-catalog-card{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .services-catalog-hero .management-title>span{
  background:#192f4d!important;
  border:1px solid #355273!important;
  color:#82b3ff!important;
}
html[data-theme="dark"] .services-catalog-hero .management-title small{
  color:#82b3ff!important;
}
html[data-theme="dark"] .services-catalog-hero .management-title h2{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .services-catalog-hero .management-title p{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .services-catalog-toolbar{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .services-catalog-toolbar .catalog-search{
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .services-catalog-toolbar .catalog-search>i{
  width:52px!important;
  min-width:52px!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  align-self:stretch!important;
  display:grid!important;
  place-items:center!important;
  position:static!important;
  transform:none!important;
  background:#192c45!important;
  border-right:1px solid var(--theme-border)!important;
  color:#91baff!important;
  line-height:1!important;
}
html[data-theme="dark"] .services-catalog-toolbar .catalog-search input{
  color-scheme:dark!important;
  background:transparent!important;
  color:var(--theme-text)!important;
  padding:0 16px!important;
  caret-color:var(--theme-text)!important;
}
html[data-theme="dark"] .services-catalog-toolbar .catalog-search input::placeholder{
  color:var(--theme-text-subtle)!important;
  opacity:1!important;
}
html[data-theme="dark"] .services-catalog-toolbar .catalog-search:focus-within{
  border-color:var(--theme-accent)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .catalog-filters span{
  color:#bdccde!important;
}
html[data-theme="dark"] .catalog-filters select{
  color-scheme:dark!important;
  background:var(--theme-input)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .catalog-filters select:focus{
  border-color:var(--theme-accent)!important;
  box-shadow:0 0 0 3px var(--theme-focus)!important;
  outline:0!important;
}
html[data-theme="dark"] .catalog-count{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .services-catalog-table-wrap{
  background:var(--theme-surface-1)!important;
  scrollbar-color:#506580 transparent;
}
html[data-theme="dark"] .services-catalog-table thead th{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
  color:#bdccde!important;
}
html[data-theme="dark"] .services-catalog-table tbody tr,
html[data-theme="dark"] .services-catalog-table tbody td{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .services-catalog-table tbody tr:hover td{
  background:var(--theme-hover)!important;
}
html[data-theme="dark"] .service-name-cell strong{
  color:#eaf1fb!important;
}
html[data-theme="dark"] .service-name-cell small{
  color:#aebed2!important;
}
html[data-theme="dark"] .service-category-badge{
  background:#1b3150!important;
  border:1px solid #355273!important;
  color:#9fc4f7!important;
}
html[data-theme="dark"] .unit-badge{
  background:#24344a!important;
  border:1px solid #405873!important;
  color:#d5e2f2!important;
}
html[data-theme="dark"] .services-catalog-table .mini-pill.green{
  background:#17382c!important;
  border:1px solid #356148!important;
  color:#7be1aa!important;
}
html[data-theme="dark"] .services-catalog-table .mini-pill.gray{
  background:#263347!important;
  border:1px solid #42536b!important;
  color:#bdc9d8!important;
}
html[data-theme="dark"] .catalog-actions .action-button{
  background:var(--theme-surface-2)!important;
  border-color:#405873!important;
  color:#91baff!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .catalog-actions .action-button:hover{
  background:var(--theme-hover)!important;
  border-color:#6a91c1!important;
  color:#fff!important;
}
html[data-theme="dark"] .catalog-switch-button{
  background:#42526a!important;
  border:1px solid #536883!important;
}
html[data-theme="dark"] .catalog-switch-button.active{
  background:#1971e8!important;
  border-color:#63a2f4!important;
}
html[data-theme="dark"] .catalog-switch-button span{
  background:#f4f8ff!important;
}
html[data-theme="dark"] .services-catalog-footer{
  background:var(--theme-surface-2)!important;
  border-top:1px solid var(--theme-border)!important;
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .services-catalog-footer strong,
html[data-theme="dark"] .services-catalog-footer span:last-child,
html[data-theme="dark"] .catalog-pagination-footer .table-pagination span{
  color:var(--theme-text)!important;
}
html[data-theme="dark"] .catalog-pagination-footer .table-pagination button{
  background:var(--theme-surface-1)!important;
  border-color:#405873!important;
  color:#9fc4f7!important;
}
html[data-theme="dark"] .catalog-pagination-footer .table-pagination button:hover:not(:disabled){
  background:var(--theme-hover)!important;
  border-color:#6a91c1!important;
  color:#fff!important;
}
html[data-theme="dark"] .catalog-pagination-footer .table-pagination button:disabled{
  background:#202c3d!important;
  color:#718096!important;
  opacity:.62!important;
}
html[data-theme="dark"] .service-detail-grid article{
  background:var(--theme-surface-2)!important;
  border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .service-detail-grid small{
  color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .service-detail-grid strong{
  color:var(--theme-text)!important;
}

/* AVANCE 66: Servicios > Tarifas en modo oscuro */
html[data-theme="dark"] .tariffs-hero,
html[data-theme="dark"] .tariff-scope-tabs,
html[data-theme="dark"] .tariffs-card,
html[data-theme="dark"] .company-tariff-card{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  color:var(--theme-text)!important;
  box-shadow:var(--theme-shadow)!important;
}
html[data-theme="dark"] .tariffs-hero .management-title h2{color:var(--theme-text)!important}
html[data-theme="dark"] .tariffs-hero .management-title p{color:var(--theme-text-muted)!important}
html[data-theme="dark"] .tariffs-hero .management-title small{color:#82b3ff!important}
html[data-theme="dark"] .tariffs-hero .management-title>span{
  background:#192f4d!important;border:1px solid #355273!important;color:#82b3ff!important;
}
html[data-theme="dark"] .tariff-scope-tabs a{color:#aebed2!important}
html[data-theme="dark"] .tariff-scope-tabs a.active{color:#82b3ff!important;border-bottom-color:#5f9cff!important}
html[data-theme="dark"] .tariff-scope-tabs a:hover{color:#dce8f7!important}
html[data-theme="dark"] .tariff-scope-tabs .tariff-tab-icon{
  background:#1a2c45!important;border:1px solid #344e6c!important;color:#9abfff!important;
}
html[data-theme="dark"] .tariffs-toolbar,
html[data-theme="dark"] .company-matrix-toolbar{
  background:var(--theme-surface-1)!important;border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .tariffs-search{
  background:var(--theme-input)!important;border-color:var(--theme-border)!important;color:var(--theme-text)!important;
}
html[data-theme="dark"] .tariffs-search i{
  width:54px!important;min-width:54px!important;height:100%!important;margin:0!important;padding:0!important;
  position:static!important;transform:none!important;display:grid!important;place-items:center!important;
  background:#192c45!important;border-right:1px solid var(--theme-border)!important;color:#91baff!important;line-height:1!important;
}
html[data-theme="dark"] .tariffs-search input{
  color-scheme:dark!important;background:transparent!important;color:var(--theme-text)!important;
  padding:0 16px!important;caret-color:var(--theme-text)!important;
}
html[data-theme="dark"] .tariffs-search input::placeholder{color:var(--theme-text-subtle)!important;opacity:1!important}
html[data-theme="dark"] .tariffs-search:focus-within{border-color:var(--theme-accent)!important;box-shadow:0 0 0 3px var(--theme-focus)!important}
html[data-theme="dark"] .tariff-filter span{color:#bdccde!important}
html[data-theme="dark"] .tariff-filter select{
  color-scheme:dark!important;background:var(--theme-input)!important;border-color:var(--theme-border)!important;color:var(--theme-text)!important;
}
html[data-theme="dark"] .tariff-filter select:focus{outline:0!important;border-color:var(--theme-accent)!important;box-shadow:0 0 0 3px var(--theme-focus)!important}
html[data-theme="dark"] .tariffs-table-wrap{background:var(--theme-surface-1)!important;scrollbar-color:#506580 #101a29}
html[data-theme="dark"] .tariffs-table th{
  background:var(--theme-surface-2)!important;color:#c7d4e5!important;border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .tariffs-table td{
  background:var(--theme-surface-1)!important;color:#d7e3f1!important;border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .tariffs-table tbody tr:nth-child(even) td{background:#16263b!important}
html[data-theme="dark"] .tariffs-table tbody tr:hover td{background:var(--theme-hover)!important}
html[data-theme="dark"] .tariffs-table td>strong{color:#e8f0fa!important}
html[data-theme="dark"] .tariff-item-name{color:#dce8f7!important}
html[data-theme="dark"] .tariffs-table .drag-col{color:#8297b1!important}
html[data-theme="dark"] .price-input{
  background:var(--theme-input)!important;border-color:#526b88!important;box-shadow:none!important;
}
html[data-theme="dark"] .price-input span{
  background:#20344f!important;border-right-color:#526b88!important;color:#b8cae0!important;
}
html[data-theme="dark"] .price-input input{
  color-scheme:dark!important;background:transparent!important;color:#eaf2fc!important;caret-color:#fff!important;
}
html[data-theme="dark"] .price-input input::placeholder{color:#8fa6c1!important;opacity:1!important}
html[data-theme="dark"] .price-input:focus-within{border-color:#6ea8f5!important;box-shadow:0 0 0 3px rgba(94,156,255,.2)!important}
html[data-theme="dark"] .tariffs-footer{
  background:var(--theme-surface-2)!important;border-color:var(--theme-border)!important;color:var(--theme-text-muted)!important;
}
html[data-theme="dark"] .tariffs-footer>span,
html[data-theme="dark"] .tariffs-footer .table-pagination span{color:#bdccde!important}
html[data-theme="dark"] .tariffs-footer .table-pagination button{
  background:var(--theme-surface-1)!important;border-color:#405873!important;color:#9fc4f7!important;
}
html[data-theme="dark"] .tariffs-footer .table-pagination button:hover:not(:disabled){background:var(--theme-hover)!important;border-color:#6a91c1!important;color:#fff!important}
html[data-theme="dark"] .tariffs-footer .table-pagination button:disabled{background:#202c3d!important;color:#718096!important;opacity:.62!important}

/* AVANCE 68 - Operaciones > Lista de órdenes: buscador consistente */
.operations-list-toolbar{
 align-items:center;
 padding:24px 26px;
}
.operations-search-form{
 align-items:center;
 gap:14px;
 min-width:0;
 max-width:1010px;
 flex:1 1 1010px;
}
.operations-search-field{
 max-width:700px;
 height:48px;
 padding:0!important;
 gap:0!important;
 border-radius:12px;
 background:#fff;
 overflow:hidden;
}
.operations-search-icon{
 width:58px;
 min-width:58px;
 height:100%;
 display:grid;
 place-items:center;
 background:#edf4ff;
 border-right:1px solid #d5e2f5;
 color:#1760cf;
}
.operations-search-icon>i{
 flex:0 0 auto;
 font-size:16px;
}
.operations-search-field input{
 min-width:0;
 background:transparent;
 color:var(--text);
 font:inherit;
 padding:0 16px!important;
}
.operations-search-field input::placeholder{color:var(--muted);opacity:1}
.operations-search-field:focus-within{
 border-color:#7ca7eb;
 box-shadow:0 0 0 3px rgba(47,111,237,.1);
}
.operations-search-button{
 height:48px!important;
 min-width:126px;
 flex:0 0 auto;
 border:1px solid #8fb2ea!important;
 border-radius:12px!important;
 background:#fff!important;
 color:#123f78!important;
 box-shadow:0 2px 5px rgba(30,78,140,.06)!important;
 text-decoration:none!important;
}
.operations-search-button:hover{
 background:#f3f7ff!important;
 border-color:#3979da!important;
 color:#0d4ca8!important;
}
.operations-search-button:focus-visible{
 outline:0;
 border-color:#3979da!important;
 box-shadow:0 0 0 3px rgba(47,111,237,.16)!important;
}
.operations-list-toolbar>.primary-button{
 min-height:48px;
 flex:0 0 auto;
}
html[data-theme="dark"] .operations-search-field{
 background:var(--theme-surface-2)!important;
 border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .operations-search-icon{
 background:#192c45!important;
 border-right-color:var(--theme-border)!important;
 color:#91baff!important;
}
html[data-theme="dark"] .operations-search-field input{color:var(--theme-text)!important}
html[data-theme="dark"] .operations-search-field input::placeholder{color:var(--theme-text-subtle)!important}
html[data-theme="dark"] .operations-search-field:focus-within{
 border-color:var(--theme-accent)!important;
 box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .operations-search-button{
 background:var(--theme-surface-2)!important;
 border-color:#5277a5!important;
 color:var(--theme-text)!important;
 box-shadow:none!important;
}
html[data-theme="dark"] .operations-search-button:hover{
 background:var(--theme-hover)!important;
 border-color:#6a91c1!important;
 color:#fff!important;
}
@media(max-width:900px){
 .operations-list-toolbar{align-items:stretch;flex-wrap:wrap}
 .operations-search-form{flex:1 1 100%;max-width:none}
 .operations-search-field{max-width:none}
 .operations-list-toolbar>.primary-button{margin-left:auto}
}
@media(max-width:700px){
 .operations-list-toolbar{padding:18px}
 .operations-search-form{gap:10px}
 .operations-search-button{width:100%;min-width:0}
 .operations-list-toolbar>.primary-button{width:100%;margin-left:0}
}

/* AVANCE 70 - Producción: buscador y botón Limpiar filtros */
.production-toolbar .production-search{
 min-height:54px!important;
 height:54px!important;
 padding:0!important;
 gap:0!important;
 overflow:hidden;
 border:1px solid #d6e1ef!important;
 border-radius:12px!important;
 background:#fff!important;
}
.production-search-icon{
 width:56px;
 min-width:56px;
 height:100%;
 display:grid;
 place-items:center;
 background:#edf4ff;
 border-right:1px solid #d5e2f5;
 color:#1760cf;
}
.production-search-icon i{font-size:16px}
.production-toolbar .production-search input{
 height:100%!important;
 min-width:0;
 padding:0 14px!important;
 color:var(--text)!important;
 font:inherit;
}
.production-toolbar .production-search input::placeholder{color:var(--muted);opacity:1}
.production-toolbar .production-search:focus-within{
 border-color:#7ca7eb!important;
 box-shadow:0 0 0 3px rgba(47,111,237,.1)!important;
}
.production-toolbar>select{
 min-height:54px!important;
 height:54px!important;
 border-radius:12px!important;
}
.production-toolbar .production-clear-button{
 min-height:54px!important;
 height:54px!important;
 min-width:158px;
 padding:0 17px!important;
 border:1px solid #8fb2ea!important;
 border-radius:12px!important;
 background:#fff!important;
 color:#123f78!important;
 box-shadow:0 2px 5px rgba(30,78,140,.06)!important;
 white-space:nowrap;
}
.production-toolbar .production-clear-button:hover{
 background:#f3f7ff!important;
 border-color:#3979da!important;
 color:#0d4ca8!important;
}
.production-toolbar .production-clear-button:focus-visible{
 outline:0;
 border-color:#3979da!important;
 box-shadow:0 0 0 3px rgba(47,111,237,.16)!important;
}
html[data-theme="dark"] .production-toolbar .production-search{
 background:var(--theme-input)!important;
 border-color:var(--theme-border)!important;
}
html[data-theme="dark"] .production-search-icon{
 background:#192c45!important;
 border-right-color:var(--theme-border)!important;
 color:#91baff!important;
}
html[data-theme="dark"] .production-toolbar .production-search input{color:var(--theme-text)!important}
html[data-theme="dark"] .production-toolbar .production-search input::placeholder{color:var(--theme-text-subtle)!important}
html[data-theme="dark"] .production-toolbar .production-search:focus-within{
 border-color:var(--theme-accent)!important;
 box-shadow:0 0 0 3px var(--theme-focus)!important;
}
html[data-theme="dark"] .production-toolbar .production-clear-button{
 background:var(--theme-surface-2)!important;
 border-color:#5277a5!important;
 color:var(--theme-text)!important;
 box-shadow:none!important;
}
html[data-theme="dark"] .production-toolbar .production-clear-button:hover{
 background:var(--theme-hover)!important;
 border-color:#6a91c1!important;
 color:#fff!important;
}
@media(max-width:1150px){
 .production-toolbar .production-clear-button{width:100%}
}

/* AVANCE 71 - Login completamente adaptable a teléfonos */
@media(max-width:600px){
 html,body.auth-body{
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  overflow-x:hidden!important;
 }
 .auth-shell.auth-shell-image{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:100dvh;
 }
 .auth-shell-image .auth-form-panel{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:100dvh;
  padding:max(18px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))!important;
  place-items:center;
 }
 .auth-shell-image .login-card{
  width:100%!important;
  max-width:440px!important;
  min-width:0!important;
  margin:0 auto;
  padding:28px 22px!important;
  border-radius:21px!important;
  overflow:hidden;
 }
 .login-card h2{font-size:27px}
 .login-card>p{margin-bottom:23px}
 .login-card .auth-field,
 .login-card .auth-field>div,
 .login-card .auth-user-control{
  width:100%;
  max-width:100%;
  min-width:0;
 }
 .login-card .auth-field>div{display:flex}
 .login-card .auth-field div>i{
  width:48px;
  min-width:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
 }
 .login-card .auth-field input{
  width:0;
  min-width:0!important;
  flex:1 1 auto;
  padding:0 12px!important;
 }
 .login-card .auth-field button{
  width:46px;
  min-width:46px;
  flex:0 0 46px;
 }
 .login-card .auth-domain-suffix{
  max-width:46%;
  min-width:0;
  flex:0 1 auto;
  padding:0 10px;
  gap:6px;
  overflow:hidden;
 }
 .login-card .auth-domain-suffix b{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
 }
 .auth-field-help,.auth-help,.login-card>p{
  max-width:100%;
  overflow-wrap:anywhere;
 }
 .auth-forgot-row{
  width:100%;
  max-width:100%;
  margin:0 0 7px;
 }
 .auth-forgot-row a{
  display:inline-block;
  max-width:100%;
 }
 .auth-submit{
  width:100%!important;
  max-width:100%!important;
 }
}
@media(max-width:380px){
 .auth-shell-image .auth-form-panel{
  padding:max(12px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;
 }
 .auth-shell-image .login-card{padding:24px 17px!important}
 .login-icon{width:54px;height:54px;font-size:21px}
 .login-card h2{font-size:25px}
 .login-card .auth-domain-suffix{max-width:43%;padding:0 7px;font-size:11px}
 .login-card .auth-domain-suffix i{display:none}
 .auth-field-help{font-size:11px}
}

/* AVANCE 072: Nueva orden optimizada para teléfonos */
@media(max-width:700px){
 .compact-order-page{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden;
 }
 .compact-order-page .compact-order-card,
 .compact-order-page .compact-order-grid,
 .compact-order-page .compact-order-main,
 .compact-order-page .compact-section{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box;
 }
 .compact-order-page .compact-order-card{border-radius:16px}
 .compact-order-page .compact-order-header{padding:16px!important;gap:6px}
 .compact-order-page .compact-order-header h2{font-size:1.16rem;line-height:1.25}
 .compact-order-page .compact-order-header p{font-size:.82rem;line-height:1.4}
 .compact-order-page .compact-order-grid{padding:10px!important;gap:12px!important}
 .compact-order-page .compact-order-main{gap:12px!important}
 .compact-order-page .compact-section{padding:12px!important;border-radius:14px}
 .compact-order-page .compact-section-title{margin-bottom:11px}
 .compact-order-page .compact-fields-grid,
 .compact-order-page .compact-fields-3,
 .compact-order-page .delivery-compact-fields{
  grid-template-columns:minmax(0,1fr)!important;
 }
 .compact-order-page .compact-fields-grid>*,
 .compact-order-page .quick-item-row>*,
 .compact-order-page .field,
 .compact-order-page .input-shell,
 .compact-order-page input,
 .compact-order-page select,
 .compact-order-page textarea{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box;
 }
 .compact-order-page .compact-new-customer{
  width:100%!important;
  min-height:46px!important;
  justify-content:center!important;
 }
 .compact-order-page .compact-customer-preview{min-width:0;padding:10px 11px}
 .compact-order-page .compact-customer-preview div{min-width:0}
 .compact-order-page .compact-customer-preview strong,
 .compact-order-page .compact-customer-preview span{overflow-wrap:anywhere}
 .compact-order-page .compact-mode-selector{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%;
 }
 .compact-order-page .mode-pill{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box;
  justify-content:flex-start;
 }
 .compact-order-page .quick-item-row,
 .compact-order-page .quick-item-row.quick-item-row-single-service{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%!important;
  gap:10px!important;
 }
 .compact-order-page .quick-item-row.quick-item-row-single-service>*{grid-column:auto!important}
 .compact-order-page .quick-add{
  width:100%!important;
  min-height:46px!important;
  justify-content:center!important;
 }
 .compact-order-page .service-results,
 .compact-order-page .customer-results{max-width:100%;width:100%;left:0;right:0}
 .compact-order-page .compact-items-table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
 }
 .compact-order-page .compact-items-table{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
 }
 .compact-order-page .compact-items-table thead{display:none!important}
 .compact-order-page .compact-items-table tbody{display:grid!important;gap:10px;width:100%}
 .compact-order-page .compact-items-table tbody:empty{display:none!important}
 .compact-order-page .compact-items-table tbody tr{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px;
  width:100%;
  padding:11px;
  border:1px solid #dfe8f2;
  border-radius:12px;
  background:#fff;
  box-sizing:border-box;
 }
 .compact-order-page .compact-items-table tbody td{
  display:flex!important;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
  min-width:0!important;
  padding:0!important;
  border:0!important;
  white-space:normal!important;
 }
 .compact-order-page .compact-items-table tbody td:first-child{grid-column:1/-1}
 .compact-order-page .compact-items-table tbody td:nth-child(5){grid-column:1/-1}
 .compact-order-page .compact-items-table tbody td:nth-child(6),
 .compact-order-page .compact-items-table tbody td:nth-child(7){grid-column:auto;align-items:center}
 .compact-order-page .compact-items-table tbody td::before{
  color:#74869d;
  font-size:.68rem;
  font-weight:700;
  text-transform:uppercase;
 }
 .compact-order-page .compact-items-table tbody td:nth-child(1)::before{content:'Servicio'}
 .compact-order-page .compact-items-table tbody td:nth-child(2)::before{content:'Cantidad'}
 .compact-order-page .compact-items-table tbody td:nth-child(3)::before{content:'Precio'}
 .compact-order-page .compact-items-table tbody td:nth-child(4)::before{content:'Descuento'}
 .compact-order-page .compact-items-table tbody td:nth-child(5)::before{content:'Subtotal'}
 .compact-order-page .compact-items-table tbody td:nth-child(6)::before{content:'Detalles'}
 .compact-order-page .compact-items-table tbody td:nth-child(7)::before{content:'Eliminar'}
 .compact-order-page .table-inline-input{width:100%!important;text-align:left}
 .compact-order-page .compact-empty-items{
  width:100%;
  min-height:132px;
  padding:18px 12px;
  text-align:center;
  box-sizing:border-box;
  border:1px solid #dfe8f2;
  border-radius:12px;
 }
 .compact-order-page .compact-empty-items strong,
 .compact-order-page .compact-empty-items span{max-width:100%;overflow-wrap:anywhere}
 .compact-order-page .final-summary-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
 }
 .compact-order-page .final-summary-item,
 .compact-order-page .final-summary-total{min-width:0!important;padding:10px!important}
 .compact-order-page .final-summary-item strong,
 .compact-order-page .final-summary-total strong{overflow-wrap:anywhere}
 .compact-order-page .final-summary-item:first-child,
 .compact-order-page .final-summary-total{grid-column:1/-1}
 .compact-order-page .compact-submit-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:100%;
  gap:12px!important;
 }
 .compact-order-page .compact-submit-row p{
  width:100%;
  min-width:0;
  align-items:flex-start;
  line-height:1.4;
  overflow-wrap:anywhere;
 }
 .compact-order-page .compact-final-generate{width:100%!important;justify-content:center!important}
 html[data-theme="dark"] .compact-order-page .compact-items-table tbody tr{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
 }
 html[data-theme="dark"] .compact-order-page .compact-items-table tbody td::before{color:var(--theme-text-muted)!important}
html[data-theme="dark"] .compact-order-page .compact-empty-items{border-color:var(--theme-border)!important}
}

/* AVANCE 073: KPIs de Promociones adaptados para móvil */
@media(max-width:700px){
 .promo-kpis{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  margin-top:14px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
 }
 .promo-kpis article{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
  min-height:112px!important;
  padding:12px!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:var(--surface)!important;
  box-shadow:0 8px 22px rgba(15,50,90,.06)!important;
  box-sizing:border-box!important;
 }
 .promo-kpis article:last-child{border:1px solid var(--line)!important}
 .promo-kpis article>span{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  border-radius:11px!important;
  font-size:.9rem!important;
 }
 .promo-kpis article>div{
  min-width:0!important;
  width:100%!important;
 }
 .promo-kpis small,
 .promo-kpis strong,
 .promo-kpis p{
  display:block!important;
  max-width:100%!important;
  margin:0!important;
  line-height:1.25!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
 }
 .promo-kpis small{font-size:.72rem!important}
 .promo-kpis strong{font-size:1.25rem!important;margin:2px 0!important}
 .promo-kpis p{font-size:.75rem!important}
 html[data-theme="dark"] .promo-kpis article{
  background:var(--theme-surface-1)!important;
  border-color:var(--theme-border)!important;
  box-shadow:var(--theme-shadow)!important;
 }
}
@media(max-width:330px){
 .promo-kpis{grid-template-columns:minmax(0,1fr)!important}
 .promo-kpis article{min-height:92px!important}
}

/* AVANCE 075: Nuevo usuario móvil con cabecera y acciones siempre visibles */
@media(max-width:760px){
 #managementModal.app-modal.open{
  inset:78px 0 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
  overscroll-behavior:contain!important;
 }
 #managementModal>.modal-backdrop{
  position:absolute!important;
  inset:0!important;
 }
 #managementModal .user-management-modal{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  max-width:100%!important;
  height:calc(100dvh - 94px)!important;
  min-height:0!important;
  max-height:calc(100dvh - 94px)!important;
  margin:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
  box-sizing:border-box!important;
 }
 #managementModal .user-management-modal>header{
  position:relative!important;
  inset:auto!important;
  z-index:4!important;
  display:flex!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-height:76px!important;
  padding:14px 16px!important;
  border-radius:18px 18px 0 0!important;
  box-sizing:border-box!important;
 }
 #managementModal .user-management-modal>header>div{
  min-width:0!important;
  align-items:center!important;
 }
 #managementModal .user-management-modal>header .modal-icon{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
 }
 #managementModal .user-management-modal>header h2,
 #managementModal .user-management-modal>header p{
  max-width:100%!important;
  overflow-wrap:anywhere!important;
 }
 #managementModal .user-management-modal>header .modal-close{
  display:grid!important;
  place-items:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  margin-left:10px!important;
 }
 #managementModal .user-management-modal>form{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  width:100%!important;
  min-height:0!important;
  overflow:hidden!important;
 }
 #managementModal .user-management-modal .modal-content.user-management-form{
  display:block!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-height:0!important;
  max-height:none!important;
  padding:16px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:auto!important;
  box-sizing:border-box!important;
 }
 #managementModal .user-management-form .user-form-section{
  width:100%!important;
  min-width:0!important;
  margin-bottom:22px!important;
 }
 #managementModal .user-management-form .user-form-section-grid{
  grid-template-columns:minmax(0,1fr)!important;
  gap:14px!important;
  width:100%!important;
 }
 #managementModal .user-management-form .field,
 #managementModal .user-management-form .input-shell,
 #managementModal .user-management-form input,
 #managementModal .user-management-form select,
 #managementModal .user-management-form textarea{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
 }
 #managementModal .user-management-form .field-help,
 #managementModal .user-management-form .field-error{
  max-width:100%!important;
  line-height:1.4!important;
  overflow-wrap:anywhere!important;
 }
 #managementModal .user-management-modal footer{
  position:relative!important;
  inset:auto!important;
  z-index:4!important;
  display:grid!important;
  flex:0 0 auto!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)!important;
  gap:10px!important;
  width:100%!important;
  min-height:74px!important;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom))!important;
  border-radius:0 0 18px 18px!important;
  box-sizing:border-box!important;
 }
 #managementModal .user-management-modal footer .primary-button,
 #managementModal .user-management-modal footer .secondary-button,
 #managementModal .user-management-modal footer .user-cancel-button{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  margin:0!important;
  padding-inline:10px!important;
  justify-content:center!important;
  white-space:nowrap!important;
 }
}
@media(max-width:340px){
 #managementModal .user-management-modal>header{padding-inline:12px!important}
 #managementModal .user-management-modal .modal-content.user-management-form{padding-inline:12px!important}
 #managementModal .user-management-modal footer{padding-inline:12px!important;gap:7px!important}
 #managementModal .user-management-modal footer .primary-button,
 #managementModal .user-management-modal footer .user-cancel-button{font-size:.78rem!important;padding-inline:6px!important}
}

/* AVANCE 076: desplazamiento táctil de la Matriz de permisos en móvil */
.permissions-mobile-hint{display:none}
@media(max-width:760px){
 .roles-module,
 .roles-tabs-shell,
 .roles-panel[data-role-panel="matrix"],
 .permissions-matrix-form{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
 }
 .permissions-matrix-form{overflow:hidden!important}
 .permissions-mobile-hint{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
  padding:10px 14px!important;
  color:#315b91!important;
  background:#eef5ff!important;
  border-top:1px solid #dbe8fa!important;
  border-bottom:1px solid #dbe8fa!important;
  font-size:.75rem!important;
  font-weight:700!important;
  line-height:1.35!important;
 }
 .permissions-mobile-hint i{color:#1769e0!important;animation:permissionSwipeHint 1.5s ease-in-out infinite alternate}
 .permissions-matrix-wrap{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x pan-y!important;
  scrollbar-width:thin!important;
  scrollbar-color:#7894b8 #e8eef6!important;
  position:relative!important;
 }
 .permissions-matrix-wrap:focus-visible{outline:2px solid #2f6fed!important;outline-offset:-2px!important}
 .permissions-matrix-wrap::-webkit-scrollbar{height:9px!important}
 .permissions-matrix-wrap::-webkit-scrollbar-track{background:#e8eef6!important}
 .permissions-matrix-wrap::-webkit-scrollbar-thumb{background:#7894b8!important;border-radius:999px!important}
 .permissions-matrix{
  width:max-content!important;
  min-width:900px!important;
  table-layout:fixed!important;
 }
 .permissions-matrix .permission-name-col,
 .permissions-matrix .permission-name,
 .roles-module .permissions-matrix .permission-group-row .permission-group-name{
  width:220px!important;
  min-width:220px!important;
  max-width:220px!important;
  left:0!important;
 }
 .permissions-matrix th:not(.permission-name-col),
 .permissions-matrix td:not(.permission-name):not(.permission-group-name){
  width:124px!important;
  min-width:124px!important;
  max-width:124px!important;
 }
 .permissions-matrix .permission-name-col{z-index:8!important;background:#f8fafc!important;box-shadow:8px 0 14px -13px rgba(15,42,77,.75)!important}
 .permissions-matrix .permission-name{z-index:6!important;background:#fff!important;box-shadow:8px 0 14px -13px rgba(15,42,77,.75)!important}
 .roles-module .permissions-matrix .permission-group-row .permission-group-name{
  position:sticky!important;
  z-index:7!important;
  white-space:normal!important;
  box-shadow:8px 0 14px -13px rgba(15,42,77,.75)!important;
 }
 .roles-module .permissions-matrix .permission-group-row .permission-group-spacer{
  position:static!important;
  left:auto!important;
  z-index:auto!important;
 }
 .permissions-matrix th,
 .permissions-matrix td{padding:13px 12px!important}
 .permissions-matrix .permission-name strong,
 .permissions-matrix .permission-name small{overflow-wrap:anywhere!important}
 .permissions-actions{
  position:relative!important;
  z-index:2!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:9px!important;
  padding:14px!important;
 }
 .permissions-actions .secondary-button,
 .permissions-actions .primary-button{width:100%!important;justify-content:center!important}
 html[data-theme="dark"] .permissions-mobile-hint{
  color:#bcd5fa!important;
  background:#14243a!important;
  border-color:#2b4261!important;
 }
 html[data-theme="dark"] .permissions-matrix .permission-name-col{background:var(--theme-surface-2,#17263a)!important}
 html[data-theme="dark"] .permissions-matrix .permission-name{background:var(--theme-surface-1,#101d2f)!important}
}
@keyframes permissionSwipeHint{
 from{transform:translateX(-2px)}
 to{transform:translateX(4px)}
}

/* AVANCE 078 FINAL: prioridad de cascada para los modales del perfil móvil */
@media(max-width:760px){
 #userProfileModal.app-modal.open,
 #accountSettingsModal.app-modal.open,
 #supportModal.app-modal.open{
  inset:78px 0 0!important;
  align-items:center!important;
  overflow:hidden!important;
 }
 #userProfileModal .user-modal-window,
 #accountSettingsModal .user-modal-window,
 #supportModal .user-modal-window{
  height:calc(100dvh - 94px)!important;
  max-height:calc(100dvh - 94px)!important;
  overflow:hidden!important;
 }
 #userProfileModal .user-modal-header,
 #accountSettingsModal .user-modal-header,
 #supportModal .user-modal-header{
  position:relative!important;
  display:flex!important;
  flex:0 0 auto!important;
  min-height:76px!important;
  padding:14px 16px!important;
 }
 #userProfileModal .user-modal-header .modal-close,
 #accountSettingsModal .user-modal-header .modal-close,
 #supportModal .user-modal-header .modal-close{
  display:grid!important;
 }
 #userProfileModal .user-modal-window .modal-content,
 #accountSettingsModal .user-modal-window .modal-content,
 #supportModal .user-modal-window .modal-content{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
 }
 #userProfileModal .user-modal-window>form>footer,
 #accountSettingsModal .user-modal-window>form>footer,
 #supportModal .user-modal-window>form>footer{
  position:relative!important;
  display:grid!important;
  flex:0 0 auto!important;
  flex-direction:initial!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)!important;
  align-items:center!important;
  gap:10px!important;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom))!important;
 }
 #userProfileModal .user-modal-window>form>footer .secondary-button,
 #userProfileModal .user-modal-window>form>footer .primary-button,
 #accountSettingsModal .user-modal-window>form>footer .secondary-button,
 #accountSettingsModal .user-modal-window>form>footer .primary-button,
 #supportModal .user-modal-window>form>footer .secondary-button,
 #supportModal .user-modal-window>form>footer .primary-button{
  width:100%!important;
  min-height:46px!important;
  height:46px!important;
  padding:0 10px!important;
 }
}
/* =========================================================
   ACTUALIZACIONES DEL SISTEMA
   ========================================================= */
.updates-hero,.updates-form-heading,.update-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:22px}.updates-hero small,.updates-form-heading nav,.update-detail-head nav{color:#64748b;font-size:12px;font-weight:700}.updates-hero h1,.updates-form-heading h1,.update-detail-title h1{margin:5px 0 3px;color:#0f172a;font-size:30px}.updates-hero p,.updates-form-heading p{margin:0;color:#64748b}.updates-hero .primary-button,.updates-form-heading .secondary-button,.update-detail-head .secondary-button{display:inline-flex;align-items:center;gap:9px;white-space:nowrap;text-decoration:none}
.updates-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:20px}.updates-kpis article{display:flex;align-items:center;gap:18px;min-height:112px;padding:18px;border:1px solid #dbe3ef;border-radius:12px;background:var(--surface,#fff)}.updates-kpis article>span,.update-form-section>header>span{display:grid;place-items:center;width:58px;height:58px;border-radius:12px;background:#eaf2ff;color:#1261d6;font-size:23px;flex:0 0 auto}.updates-kpis small{display:block;color:#64748b}.updates-kpis strong{display:block;margin-top:4px;color:#0757ca;font-size:29px}
.updates-filters{display:grid;grid-template-columns:minmax(280px,1.7fr) minmax(155px,.7fr) minmax(155px,.7fr) auto auto;gap:12px;padding:16px;margin-bottom:22px}.updates-filters select,.updates-search{height:48px;border:1px solid #cbd5e1;border-radius:9px;background:#fff}.updates-search{display:flex;overflow:hidden}.updates-search span{display:grid;place-items:center;width:50px;background:#eaf2ff;color:#1261d6;border-right:1px solid #cbd5e1}.updates-search input{min-width:0;flex:1;border:0;padding:0 14px;outline:0}.updates-filters select{padding:0 38px 0 13px}.updates-filters .primary-button,.updates-filters .secondary-button{height:48px;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;text-decoration:none}
.updates-timeline{position:relative;padding-left:34px}.updates-timeline:before{content:"";position:absolute;left:9px;top:8px;bottom:8px;width:2px;background:#d6deea}.update-card{position:relative;margin-bottom:16px;padding:20px 22px}.timeline-dot{position:absolute;left:-34px;top:24px;width:20px;height:20px;border:3px solid #fff;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #9aa9be}.update-card header{display:flex;justify-content:space-between;gap:18px}.update-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.update-heading h2{margin:0;color:#0f172a;font-size:19px}.update-card header p{margin:6px 0 0;color:#64748b;font-size:13px}.update-card header p i{margin-right:7px}.update-new{display:inline-flex;padding:4px 9px;border:1px solid #4fba67;border-radius:6px;background:#edfbee;color:#178039;font-size:11px;font-weight:800}.update-status{display:inline-flex;align-items:center;align-self:flex-start;padding:7px 11px;border:1px solid #cbd5e1;border-radius:8px;color:#475569;font-size:12px;font-weight:700}.update-status.published{border-color:#b7e4c3;background:#effaf2;color:#14803a}.update-status.scheduled{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}.update-status.draft{background:#f8fafc}.update-status.archived{background:#f1f5f9}.update-summary{margin:15px 0;color:#475569}.update-tags{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.update-tags>span{padding:5px 9px;border-radius:6px;font-size:12px;font-weight:700}.update-tags .feature{background:#eaf2ff;color:#1259c3}.update-tags .improvement{background:#edf9ef;color:#227c3a}.update-tags .fix{background:#fff4e8;color:#b45309}.update-tags .secondary-button{margin-left:auto;text-decoration:none}.updates-empty{text-align:center;padding:50px 20px}.updates-empty>span{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 12px;border-radius:50%;background:#eaf2ff;color:#1261d6;font-size:25px}.updates-empty h2{margin:0}.updates-empty p{color:#64748b}.updates-empty .primary-button{display:inline-flex;text-decoration:none}
.updates-form-heading nav,.update-detail-head nav{display:flex;align-items:center;gap:9px;margin-bottom:10px}.updates-form-heading nav a,.update-detail-head nav a{color:#1261d6;text-decoration:none}.system-update-form{display:grid;gap:18px}.update-form-section{padding:22px}.update-form-section>header{display:flex;align-items:center;gap:14px;margin-bottom:20px}.update-form-section>header>span{width:48px;height:48px;font-size:19px}.update-form-section h2{margin:0;color:#0f172a;font-size:18px}.update-form-section header p{margin:3px 0 0;color:#64748b;font-size:13px}.update-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.update-form-grid label,.publish-options legend{display:grid;gap:7px;color:#24324a;font-size:13px;font-weight:700}.update-form-grid .wide{grid-column:1/-1}.update-form-grid input,.update-form-grid textarea,.update-item-row input{width:100%;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#172033;padding:12px 13px;outline:0}.update-form-grid input{height:46px}.update-form-grid input:focus,.update-form-grid textarea:focus,.update-item-row input:focus{border-color:#2877e5;box-shadow:0 0 0 3px rgba(40,119,229,.12)}.update-items-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.update-item-editor{padding:15px;border:1px solid #dbe3ef;border-radius:10px}.update-item-editor h3{display:flex;align-items:center;gap:9px;margin:0 0 13px;font-size:15px}.update-item-editor h3 span,.update-detail-card header span{display:grid;place-items:center;width:36px;height:36px;border-radius:9px}.update-item-editor.feature h3 span,.update-detail-card.feature header span{background:#eaf2ff;color:#1261d6}.update-item-editor.improvement h3 span,.update-detail-card.improvement header span{background:#eaf8ed;color:#299145}.update-item-editor.fix h3 span,.update-detail-card.fix header span{background:#fff1df;color:#dd6b0a}.update-item-row{display:flex;gap:7px;margin-bottom:9px}.update-item-row button{width:42px;border:1px solid #ef9b9b;border-radius:8px;background:#fff;color:#dc2626}.add-update-item{width:100%;justify-content:center}.publish-options{display:grid;grid-template-columns:minmax(260px,.7fr) 1.3fr;gap:25px}.publish-options fieldset{border:0;padding:0;margin:0}.publish-options fieldset label{display:inline-flex;margin:9px 7px 0 0}.publish-options fieldset label span,.role-chips span{display:inline-flex;padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#475569;font-size:13px}.publish-options input{position:absolute;opacity:0;pointer-events:none}.publish-options fieldset input:checked+span,.role-chips input:checked+span{border-color:#2672df;background:#eaf2ff;color:#0757ca;box-shadow:0 0 0 2px rgba(38,114,223,.08)}.publish-options>div>strong{color:#24324a;font-size:13px}.publish-options>div>p{margin:4px 0 10px;color:#64748b;font-size:12px}.role-chips{display:flex;gap:7px;flex-wrap:wrap}.update-info{display:flex;align-items:center;gap:10px;margin-top:18px;padding:12px 14px;border:1px solid #8db9f2;border-radius:8px;background:#f4f8ff;color:#1758b2;font-size:13px}.update-form-actions{display:flex;justify-content:flex-end;gap:11px;padding:16px 0 4px}.update-form-actions button{min-height:46px}
.update-detail-head>div:first-child{display:grid;gap:8px}.update-detail-actions{display:flex;gap:9px}.update-detail-actions form{margin:0}.danger-outline{height:42px;padding:0 15px;border:1px solid #e26060;border-radius:8px;background:#fff;color:#c92d2d;font-weight:700}.update-detail-title{margin:12px 0 23px}.update-detail-title h1{margin:0}.update-detail-title>p{display:flex;align-items:center;gap:8px;color:#64748b}.update-detail-title>p span{width:1px;height:15px;margin:0 7px;background:#cbd5e1}.update-summary-card{display:flex;align-items:flex-start;gap:18px;padding:24px;margin-bottom:18px}.update-summary-card>span{display:grid;place-items:center;width:54px;height:54px;border-radius:11px;background:#eaf2ff;color:#1261d6;font-size:22px}.update-summary-card h2{margin:3px 0 7px;font-size:18px}.update-summary-card p{margin:0;color:#475569}.update-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.update-detail-card{padding:20px}.update-detail-card header{display:flex;align-items:center;gap:10px}.update-detail-card h2{margin:0;font-size:17px}.update-detail-card ul{margin:17px 0 0;padding-left:20px;color:#334155}.update-detail-card li{margin:0 0 10px}.update-detail-card>p{color:#64748b}.update-audit-line{margin:18px 0;color:#64748b;font-size:12px}.notification-item.system-update-unread{position:relative;background:#eef6ff}.notification-item.system-update-unread:after{content:"";position:absolute;right:11px;top:50%;width:8px;height:8px;border-radius:50%;background:#1261d6}.notification-item-icon.blue{background:#eaf2ff;color:#1261d6}
body.dark-mode .updates-kpis article,body.dark-mode .updates-search,body.dark-mode .updates-filters select,body.dark-mode .update-form-grid input,body.dark-mode .update-form-grid textarea,body.dark-mode .update-item-row input,body.dark-mode .publish-options fieldset label span,body.dark-mode .role-chips span,body.dark-mode .update-item-row button,body.dark-mode .danger-outline{background:#111c2f;border-color:#334155;color:#e5edf8}body.dark-mode .updates-hero h1,body.dark-mode .updates-form-heading h1,body.dark-mode .update-detail-title h1,body.dark-mode .update-heading h2,body.dark-mode .update-form-section h2,body.dark-mode .update-form-grid label,body.dark-mode .update-detail-card h2{color:#f3f7fd}body.dark-mode .update-summary,body.dark-mode .update-summary-card p,body.dark-mode .update-detail-card ul{color:#cbd5e1}body.dark-mode .notification-item.system-update-unread{background:#122642}
@media(max-width:1100px){.updates-kpis{grid-template-columns:repeat(2,1fr)}.updates-filters{grid-template-columns:1fr 1fr}.updates-search{grid-column:1/-1}.update-items-grid,.update-detail-grid{grid-template-columns:1fr}.publish-options{grid-template-columns:1fr}}
@media(max-width:700px){.updates-hero,.updates-form-heading,.update-detail-head{flex-direction:column}.updates-hero .primary-button,.updates-form-heading .secondary-button{width:100%;justify-content:center}.updates-hero h1,.updates-form-heading h1,.update-detail-title h1{font-size:23px}.updates-kpis{grid-template-columns:1fr 1fr;gap:10px}.updates-kpis article{min-height:100px;padding:13px;gap:11px}.updates-kpis article>span{width:43px;height:43px;font-size:18px}.updates-kpis strong{font-size:22px}.updates-filters{grid-template-columns:1fr}.updates-search{grid-column:auto}.updates-filters .primary-button,.updates-filters .secondary-button{width:100%}.updates-timeline{padding-left:21px}.updates-timeline:before{left:5px}.timeline-dot{left:-22px;width:15px;height:15px}.update-card{padding:16px}.update-card header{flex-direction:column}.update-tags .secondary-button{width:100%;margin-left:0;justify-content:center}.update-form-grid{grid-template-columns:1fr}.update-form-grid .wide{grid-column:auto}.update-form-section{padding:15px}.update-form-actions{flex-direction:column}.update-form-actions button{width:100%;justify-content:center}.update-detail-actions{width:100%}.update-detail-actions>a,.update-detail-actions form,.update-detail-actions button{flex:1}.update-detail-actions button{width:100%}.update-detail-title>p{align-items:flex-start;flex-wrap:wrap}.update-summary-card{padding:17px}.update-summary-card>span{width:44px;height:44px}.role-chips span{padding:7px 9px}}

/* Datos de la empresa: botón Restablecer contenido y visible */
.company-actions .company-reset-button{
  min-height:48px!important;
  border:1px solid #2563b8!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#174b8d!important;
  box-shadow:0 2px 7px rgba(23,75,141,.08)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  font-weight:700!important;
  cursor:pointer!important;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.company-actions .company-reset-button i{color:#245f9f!important}
.company-actions .company-reset-button:hover{
  border-color:#174b8d!important;
  background:#edf5ff!important;
  box-shadow:0 5px 13px rgba(23,75,141,.13)!important;
  transform:translateY(-1px);
}
.company-actions .company-reset-button:focus-visible{
  outline:3px solid rgba(37,99,184,.2)!important;
  outline-offset:2px!important;
  border-color:#174b8d!important;
}
.company-actions .company-reset-button:active{transform:translateY(0)}
html[data-theme="dark"] .company-actions .company-reset-button{
  background:#17253a!important;
  color:#dbeafe!important;
  border-color:#5f83b2!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .company-actions .company-reset-button i{color:#93c5fd!important}
html[data-theme="dark"] .company-actions .company-reset-button:hover{
  background:#203653!important;
  border-color:#84a9d8!important;
}

/* Nueva orden: acciones finales contenidas */
.compact-order-final-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex:0 0 auto;
}
.compact-order-page .compact-order-cancel{
  min-width:150px!important;
  min-height:48px!important;
  padding:0 20px!important;
  border:1px solid #2563b8!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#174b8d!important;
  box-shadow:0 2px 7px rgba(23,75,141,.08)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-decoration:none!important;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.compact-order-page .compact-order-cancel i{color:#245f9f!important}
.compact-order-page .compact-order-cancel:hover{
  border-color:#174b8d!important;
  background:#edf5ff!important;
  box-shadow:0 5px 13px rgba(23,75,141,.13)!important;
  transform:translateY(-1px);
}
.compact-order-page .compact-order-cancel:focus-visible{
  outline:3px solid rgba(37,99,184,.2)!important;
  outline-offset:2px!important;
  border-color:#174b8d!important;
}
.compact-order-page .compact-order-cancel:active{transform:translateY(0)}
.compact-order-page .compact-order-final-actions .compact-final-generate{
  min-width:190px!important;
  min-height:48px!important;
  width:auto!important;
}
html[data-theme="dark"] .compact-order-page .compact-order-cancel{
  background:#17253a!important;
  color:#dbeafe!important;
  border-color:#5f83b2!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .compact-order-page .compact-order-cancel i{color:#93c5fd!important}
html[data-theme="dark"] .compact-order-page .compact-order-cancel:hover{
  background:#203653!important;
  border-color:#84a9d8!important;
}
@media(max-width:700px){
  .compact-order-final-actions{display:grid;grid-template-columns:1fr;width:100%;gap:10px}
  .compact-order-page .compact-order-cancel,
  .compact-order-page .compact-order-final-actions .compact-final-generate{width:100%!important;min-width:0!important}
}

/* AVANCE 080: encabezado y botón de filtros reforzados */
.management-hero.panel.updates-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:22px;padding:24px 26px;background:var(--surface,#fff);border:1px solid var(--border-color,#dbe3ef);border-radius:16px;box-shadow:0 5px 16px rgba(29,56,91,.035)}
.management-hero.panel.updates-hero .management-title{display:flex;align-items:center;gap:17px;min-width:0}
.management-hero.panel.updates-hero .management-title>span{display:grid;place-items:center;width:62px;height:62px;flex:0 0 auto;border-radius:15px;background:#eaf2ff;color:#1261d6;font-size:23px}
.management-hero.panel.updates-hero .management-title small{display:block;color:#1765d8;font-size:12px;font-weight:700;letter-spacing:.025em}
.management-hero.panel.updates-hero .management-title h2{margin:4px 0 2px;color:#0f172a;font-size:25px;line-height:1.2}
.management-hero.panel.updates-hero .management-title p{margin:0;color:#71809a}
.management-hero.panel.updates-hero>.primary-button{min-height:50px;padding:0 19px;border:1px solid #153f76;border-radius:12px;background:#153f76;color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;text-decoration:none}
.updates-filters>.updates-clear-button{height:48px!important;min-height:48px!important;padding:0 16px!important;border:1px solid #2468d9!important;border-radius:9px!important;background:#fff!important;color:#1559bd!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;white-space:nowrap!important;text-decoration:none!important;box-shadow:none!important}
.updates-filters>.updates-clear-button:hover{border-color:#174da3!important;background:#edf4ff!important;color:#123f87!important}
.updates-filters>.updates-clear-button:focus-visible{outline:3px solid rgba(36,104,217,.2)!important;outline-offset:2px}
html[data-theme="dark"] .management-hero.panel.updates-hero,body.dark-mode .management-hero.panel.updates-hero{background:#111c2f;border-color:#334155;box-shadow:none}
html[data-theme="dark"] .management-hero.panel.updates-hero .management-title h2,body.dark-mode .management-hero.panel.updates-hero .management-title h2{color:#f3f7fd}
html[data-theme="dark"] .updates-filters>.updates-clear-button,body.dark-mode .updates-filters>.updates-clear-button{border-color:#6298e9!important;background:#111c2f!important;color:#a9cbff!important}
html[data-theme="dark"] .updates-filters>.updates-clear-button:hover,body.dark-mode .updates-filters>.updates-clear-button:hover{background:#172a47!important;color:#fff!important}
@media(max-width:700px){.management-hero.panel.updates-hero{align-items:stretch;padding:18px}.management-hero.panel.updates-hero .management-title{align-items:flex-start}.management-hero.panel.updates-hero .management-title>span{width:50px;height:50px;font-size:19px}.management-hero.panel.updates-hero .management-title h2{font-size:21px}.management-hero.panel.updates-hero>.primary-button{width:100%}.updates-filters>.updates-clear-button{width:100%!important}}

/* AVANCE 081: formulario de actualización con acciones contenidas */
.management-hero.panel.update-form-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:22px;padding:24px 26px;background:var(--surface,#fff);border:1px solid var(--border-color,#dbe3ef);border-radius:16px;box-shadow:0 5px 16px rgba(29,56,91,.035)}
.management-hero.panel.update-form-hero .management-title{display:flex;align-items:center;gap:17px;min-width:0}
.management-hero.panel.update-form-hero .management-title>span{display:grid;place-items:center;width:62px;height:62px;flex:0 0 auto;border-radius:15px;background:#eaf2ff;color:#1261d6;font-size:23px}
.management-hero.panel.update-form-hero .management-title small{display:block;color:#1765d8;font-size:12px;font-weight:700;letter-spacing:.025em}
.management-hero.panel.update-form-hero .management-title h2{margin:4px 0 2px;color:#0f172a;font-size:25px;line-height:1.2}
.management-hero.panel.update-form-hero .management-title p{margin:0;color:#71809a}
.update-item-editor>.add-update-item{width:100%!important;min-height:44px!important;margin-top:4px!important;padding:0 14px!important;border:1px solid #2468d9!important;border-radius:9px!important;background:#fff!important;color:#1559bd!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;box-shadow:none!important}
.update-item-editor>.add-update-item:hover{border-color:#174da3!important;background:#edf4ff!important;color:#123f87!important}
.update-item-editor>.add-update-item:focus-visible{outline:3px solid rgba(36,104,217,.2)!important;outline-offset:2px}
.update-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:11px;padding:18px 0 4px}
.update-form-actions>.update-cancel-button,.update-form-actions>.update-draft-button{min-height:48px!important;padding:0 17px!important;border:1px solid #2468d9!important;border-radius:10px!important;background:#fff!important;color:#1559bd!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;text-decoration:none!important;box-shadow:none!important}
.update-form-actions>.update-cancel-button{border-color:#94a8c2!important;color:#405570!important}
.update-form-actions>.update-cancel-button:hover{border-color:#617894!important;background:#f3f6fa!important;color:#263c58!important}
.update-form-actions>.update-draft-button:hover{border-color:#174da3!important;background:#edf4ff!important;color:#123f87!important}
.update-form-actions>.primary-button{min-height:48px!important;padding:0 19px!important;border:1px solid #153f76!important;border-radius:10px!important;background:#153f76!important;color:#fff!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important}
html[data-theme="dark"] .management-hero.panel.update-form-hero,body.dark-mode .management-hero.panel.update-form-hero{background:#111c2f;border-color:#334155;box-shadow:none}
html[data-theme="dark"] .management-hero.panel.update-form-hero .management-title h2,body.dark-mode .management-hero.panel.update-form-hero .management-title h2{color:#f3f7fd}
html[data-theme="dark"] .update-item-editor>.add-update-item,body.dark-mode .update-item-editor>.add-update-item,html[data-theme="dark"] .update-form-actions>.update-cancel-button,body.dark-mode .update-form-actions>.update-cancel-button,html[data-theme="dark"] .update-form-actions>.update-draft-button,body.dark-mode .update-form-actions>.update-draft-button{background:#111c2f!important;border-color:#6298e9!important;color:#a9cbff!important}
html[data-theme="dark"] .update-item-editor>.add-update-item:hover,body.dark-mode .update-item-editor>.add-update-item:hover,html[data-theme="dark"] .update-form-actions>.update-cancel-button:hover,body.dark-mode .update-form-actions>.update-cancel-button:hover,html[data-theme="dark"] .update-form-actions>.update-draft-button:hover,body.dark-mode .update-form-actions>.update-draft-button:hover{background:#172a47!important;color:#fff!important}
@media(max-width:700px){.management-hero.panel.update-form-hero{padding:18px}.management-hero.panel.update-form-hero .management-title{align-items:flex-start}.management-hero.panel.update-form-hero .management-title>span{width:50px;height:50px;font-size:19px}.management-hero.panel.update-form-hero .management-title h2{font-size:21px}.update-form-actions{flex-direction:column}.update-form-actions>.update-cancel-button,.update-form-actions>.update-draft-button,.update-form-actions>.primary-button{width:100%!important}}

/* AVANCE 082: detalle de actualización y acciones reforzadas */
.update-tags>.update-view-button,.update-detail-actions>.update-edit-button,.update-detail-head .update-back-button{min-height:44px!important;padding:0 15px!important;border:1px solid #2468d9!important;border-radius:9px!important;background:#fff!important;color:#1559bd!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;white-space:nowrap!important;text-decoration:none!important;box-shadow:none!important}
.update-tags>.update-view-button{margin-left:auto!important}
.update-tags>.update-view-button:hover,.update-detail-actions>.update-edit-button:hover,.update-detail-head .update-back-button:hover{border-color:#174da3!important;background:#edf4ff!important;color:#123f87!important}
.update-detail-hero{padding:22px 24px;margin-bottom:20px;border:1px solid var(--border-color,#dbe3ef);border-radius:16px;background:var(--surface,#fff);box-shadow:0 5px 16px rgba(29,56,91,.035)}
.update-detail-hero .update-detail-head{margin:0 0 22px;padding:0 0 18px;border-bottom:1px solid #e2e8f0}
.update-detail-hero .update-detail-title{margin:0}
.update-detail-hero .update-detail-title h1{font-size:29px}
.update-detail-actions{display:flex;align-items:center;gap:13px}
.update-detail-actions form{display:flex;margin:0}
.update-detail-actions>.update-edit-button{min-width:104px}
.update-detail-actions .update-archive-button{height:44px!important;min-width:118px;padding:0 15px!important;border:1px solid #e05252!important;border-radius:9px!important;background:#fff!important;color:#c92d2d!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;font-weight:700!important;white-space:nowrap!important}
.update-detail-actions .update-archive-button:hover{background:#fff1f1!important;border-color:#c92d2d!important}
.update-detail-hero .update-new,.update-detail-hero .update-status{height:36px!important;min-height:36px!important;padding:0 12px!important;border-radius:8px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;align-self:center!important}
html[data-theme="dark"] .update-detail-hero,body.dark-mode .update-detail-hero{background:#111c2f;border-color:#334155;box-shadow:none}
html[data-theme="dark"] .update-detail-hero .update-detail-head,body.dark-mode .update-detail-hero .update-detail-head{border-bottom-color:#334155}
html[data-theme="dark"] .update-tags>.update-view-button,body.dark-mode .update-tags>.update-view-button,html[data-theme="dark"] .update-detail-actions>.update-edit-button,body.dark-mode .update-detail-actions>.update-edit-button,html[data-theme="dark"] .update-detail-head .update-back-button,body.dark-mode .update-detail-head .update-back-button{background:#111c2f!important;border-color:#6298e9!important;color:#a9cbff!important}
html[data-theme="dark"] .update-detail-actions .update-archive-button,body.dark-mode .update-detail-actions .update-archive-button{background:#111c2f!important;border-color:#e06a6a!important;color:#ff9b9b!important}
@media(max-width:700px){.update-detail-hero{padding:16px}.update-detail-hero .update-detail-head{gap:16px}.update-detail-actions{width:100%;gap:9px}.update-detail-actions>.update-edit-button,.update-detail-actions form{flex:1}.update-detail-actions .update-archive-button{width:100%}.update-detail-hero .update-heading{align-items:flex-start}.update-detail-hero .update-detail-title h1{width:100%;font-size:23px}.update-tags>.update-view-button{width:100%!important;margin-left:0!important}}
