/* ViralPromo · Esmeralda & Menta — capa de tema sobre SmartPanel (Tabler/Bootstrap 4) */
:root{--bg:#131b1e;--surface:#263238;--raised:#304047;--text:#fff;--muted:#b4c5c2;--line:#405358;--accent:#66f7a1;--solid:#004d40;--tint:#173e35;--radius:18px}
body.esm,body.esm-auth{background:var(--bg)!important;color:var(--text)!important;font:14px/1.5 Arial,Helvetica,sans-serif;min-height:100vh}
body.esm{padding-bottom:calc(120px + env(safe-area-inset-bottom))}
body.esm.esm-lock{overflow:hidden}
.esm-top svg,.esm-dock svg,.esm-drawer svg,.esm-balance svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.esm a,.esm-auth a{color:var(--accent)}
.esm h1,.esm h2,.esm h3,.esm h4,.esm h5,.esm h6,.esm-auth h1,.esm-auth h2,.esm-auth h3,.esm-auth h4,.esm-auth h5{color:var(--text)!important;letter-spacing:-.4px}
.esm .text-muted,.esm .text-default,.esm small.text-muted,.esm-auth .text-muted{color:var(--muted)!important}
.esm .page,.esm .page-main{background:transparent!important}

/* ---------- Header ---------- */
.esm-top{height:68px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 max(18px,calc((100vw - 1060px)/2));background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50}
.esm-top-left{display:flex;align-items:center;gap:12px;min-width:0}
.esm-menu-btn{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;background:transparent;color:var(--text);border:1px solid var(--line);border-radius:9px;cursor:pointer;padding:0}
.esm-menu-btn svg{width:21px;height:21px}
.esm-brand{display:flex;align-items:center;gap:9px;color:var(--text)!important;text-decoration:none!important;font-size:22px;font-weight:800;letter-spacing:-1px;white-space:nowrap}
.esm-brand-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:11px;background:var(--solid);color:var(--accent);border:1px solid #347b68}
.esm-brand-icon svg{width:22px;height:22px}
.esm-brand small{font-size:12px;color:var(--accent);margin-left:1px}
.esm-balance{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--tint);border-radius:10px;color:var(--text)!important;text-decoration:none!important;font-size:12px}
.esm-balance small{display:block;font-size:9px;color:var(--muted);line-height:1.25;text-transform:uppercase}
.esm-balance b{font-size:15px}
.esm-balance svg{width:17px;height:17px;color:var(--accent)}
@media(max-width:700px){.esm-top{height:62px;padding:0 14px}.esm-brand{font-size:19px}.esm-brand-icon{display:none}}

/* ---------- Contenido ---------- */
.esm-content{padding:26px 0 10px}
.esm .container{max-width:1060px}

/* ---------- Dock ---------- */
.esm-dock{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(12px + env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:640px;height:80px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:8px;border-radius:23px;background:#172327;border:1px solid var(--line);box-shadow:0 9px 30px #0006;z-index:60}
.esm-dock a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;border:1px solid transparent;border-radius:16px;color:#b4c5c2!important;text-decoration:none!important;font-size:10px;line-height:1.2}
.esm-dock a svg{width:23px;height:23px}
.esm-dock a span:last-of-type{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.esm-dock a.active{background:var(--accent);color:var(--solid)!important;border-color:#9dffc1}
.esm-dock a.new .orb{display:grid;place-items:center;width:23px;height:23px}
.esm-dot{position:absolute;top:9px;right:calc(50% - 20px);width:8px;height:8px;border-radius:50%;background:#ff6b8a}
@media(max-width:420px){.esm-dock{gap:2px;padding:6px}.esm-dock a{font-size:9px}}

/* ---------- Drawer ---------- */
.esm-backdrop{position:fixed;inset:0;background:#06100dcc;backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:opacity .2s;z-index:80}
.esm-backdrop.open{opacity:1;pointer-events:auto}
.esm-drawer{position:fixed;top:0;bottom:0;left:0;width:min(345px,88vw);display:flex;flex-direction:column;background:#202d32;border-right:1px solid var(--line);transform:translateX(-102%);transition:transform .22s ease;z-index:90;box-shadow:20px 0 65px #0004}
.esm-drawer.open{transform:none}
.esm-drawer-top{display:flex;align-items:center;justify-content:space-between;padding:24px 22px 20px;border-bottom:1px solid var(--line);flex-shrink:0}
.esm-drawer-top small{font-size:9px;letter-spacing:1.8px;color:var(--accent)}
.esm-drawer-top h2{margin:5px 0 0;font-size:22px}
.esm-drawer-close{width:33px;height:33px;border:0;border-radius:9px;background:var(--raised);color:var(--muted);font-size:26px;line-height:1;cursor:pointer}
.esm-drawer-nav{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 13px 20px}
.esm-group{display:block;color:#a7bbb4;font-size:9px;letter-spacing:1.5px;text-transform:uppercase;padding:15px 12px 8px}
.esm-link{display:flex;align-items:center;gap:12px;min-height:45px;margin:2px 0;padding:12px;border-radius:9px;color:#d2ded9!important;text-decoration:none!important;font-size:13px}
.esm-link svg{width:20px;height:20px;color:#94aca2}
.esm-link:hover{background:#2a3b41}
.esm-link.active{background:var(--accent);color:var(--solid)!important;font-weight:600}
.esm-link.active svg{color:var(--solid)}
.esm-count{margin-left:auto;font-style:normal;font-size:10px;background:#193e34;color:#a6f7cc;border-radius:5px;padding:1px 6px}
.esm-drawer-bottom{display:flex;align-items:center;justify-content:space-between;padding:16px 22px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.esm-drawer-bottom a{display:flex;align-items:center;gap:6px;color:var(--accent)!important;text-decoration:none!important}
.esm-drawer-bottom svg{width:16px;height:16px}

/* ---------- Re-skin de componentes Tabler / Bootstrap ---------- */
.esm .card,.esm-auth .card{background:var(--surface)!important;border:1px solid var(--line)!important;border-radius:var(--radius)!important;box-shadow:none!important;color:var(--text)}
.esm .card-header,.esm .card-footer,.esm-auth .card-header,.esm-auth .card-footer{background:transparent!important;border-color:var(--line)!important}
.esm .card-title,.esm-auth .card-title{color:var(--text)!important;font-weight:600}
.esm .card-body,.esm-auth .card-body{color:var(--text)}
.esm .page-header{margin:0 0 20px}.esm .page-title{color:var(--text)!important;font-size:26px;font-weight:700;letter-spacing:-1px}
.esm label,.esm .form-label,.esm-auth label,.esm-auth .form-label{color:var(--text)!important;font-size:12px;font-weight:600}
.esm .form-control,.esm .custom-select,.esm .selectize-input,.esm select,.esm textarea,.esm input[type=text],.esm input[type=number],.esm input[type=url],.esm input[type=email],.esm input[type=password],
.esm-auth .form-control,.esm-auth input[type=text],.esm-auth input[type=email],.esm-auth input[type=password]{background:var(--bg)!important;border:1px solid var(--line)!important;color:var(--text)!important;border-radius:10px!important;padding:12px 14px;box-shadow:none!important}
.esm .form-control:focus,.esm-auth .form-control:focus,.esm .selectize-input.focus{border-color:var(--accent)!important;outline:2px solid var(--accent);outline-offset:1px}
.esm .form-control::placeholder,.esm-auth .form-control::placeholder{color:#7f9490}
.esm .form-control:disabled,.esm .form-control[readonly]{background:var(--raised)!important;color:var(--muted)!important}
.esm .selectize-input>input,.esm .selectize-input .item{color:var(--text)!important}
.esm .selectize-dropdown,.esm .dropdown-menu{background:var(--surface)!important;border:1px solid var(--line)!important;color:var(--text);border-radius:12px}
.esm .selectize-dropdown .option,.esm .dropdown-item{color:var(--text)!important}
.esm .selectize-dropdown .active,.esm .dropdown-item:hover{background:var(--tint)!important;color:var(--accent)!important}
.esm .input-group-text{background:var(--raised)!important;border:1px solid var(--line)!important;color:var(--muted)!important}
.esm .btn,.esm-auth .btn{border-radius:10px;font-weight:600;border-width:1px;padding:11px 18px}
.esm .btn-primary,.esm .btn-success,.esm-auth .btn-primary,.esm-auth .btn-success{background:var(--accent)!important;border-color:var(--accent)!important;color:var(--solid)!important}
.esm .btn-primary:hover,.esm-auth .btn-primary:hover{filter:brightness(1.08)}
.esm .btn-secondary,.esm .btn-default,.esm .btn-outline-primary,.esm .btn-outline-secondary{background:var(--raised)!important;border-color:var(--line)!important;color:var(--text)!important}
.esm .btn-info{background:var(--tint)!important;border-color:var(--tint)!important;color:var(--accent)!important}
.esm .btn-danger,.esm .btn-outline-danger{background:#4a2530!important;border-color:#7a3445!important;color:#ffb6c4!important}
.esm .btn-warning{background:#4a4020!important;border-color:#7a6a30!important;color:#ffe9a0!important}
.esm .table,.esm .card-table{color:var(--text)!important;background:transparent!important}
.esm .table thead th{border-color:var(--line)!important;color:var(--muted)!important;font-size:11px;text-transform:uppercase;letter-spacing:.5px;background:transparent!important}
.esm .table td,.esm .table th{border-color:var(--line)!important;vertical-align:middle}
.esm .table-striped tbody tr:nth-of-type(odd),.esm .table-hover tbody tr:hover{background:#2b3a40!important}
.esm .table-responsive{border-radius:var(--radius)}
.esm .nav-tabs{border-color:var(--line)!important}
.esm .nav-tabs .nav-link{color:var(--muted)!important;border:0;border-bottom:2px solid transparent;background:transparent!important}
.esm .nav-tabs .nav-link.active{color:var(--accent)!important;border-bottom-color:var(--accent)}
.esm .badge{border-radius:6px;font-weight:600}
.esm .badge-info,.esm .badge-primary,.esm .badge-success,.esm .bg-green,.esm .badge-default{background:var(--tint)!important;color:var(--accent)!important}
.esm .badge-warning{background:#4a4020!important;color:#ffe9a0!important}
.esm .badge-danger{background:#4a2530!important;color:#ffb6c4!important}
.esm .alert{border-radius:12px;border:1px solid var(--line);background:var(--raised);color:var(--text)}
.esm .alert-info,.esm .alert-success{background:var(--tint);border-color:#2b5c4d;color:#c8f7dc}
.esm .alert-danger{background:#3f2029;border-color:#7a3445;color:#ffc9d4}
.esm .alert-warning{background:#3f3820;border-color:#7a6a30;color:#ffe9a0}
.esm .pagination .page-link{background:var(--surface);border-color:var(--line);color:var(--text)}
.esm .pagination .active .page-link{background:var(--accent);border-color:var(--accent);color:var(--solid)}
.esm .modal-content{background:var(--surface)!important;border:1px solid var(--line);border-radius:17px;color:var(--text)}
.esm .modal-header,.esm .modal-footer{border-color:var(--line)!important}
.esm .close{color:var(--text);text-shadow:none}
.esm .list-group-item{background:var(--surface);border-color:var(--line);color:var(--text)}
.esm hr{border-color:var(--line)}
.esm .custom-control-label::before{background:var(--bg);border-color:var(--line)}
.esm .custom-control-input:checked~.custom-control-label::before{background:var(--accent);border-color:var(--accent)}
.esm .dimmer .loader{border-color:var(--accent) transparent transparent}
.esm .text-white,.esm .text-dark{color:var(--text)!important}
.esm .bg-white,.esm .bg-light{background:var(--surface)!important}
.esm .border,.esm .border-top,.esm .border-bottom{border-color:var(--line)!important}
.esm .jq-toast-single{border-radius:10px}
.esm .datepicker,.esm .bootstrap-datetimepicker-widget{background:var(--surface);color:var(--text);border:1px solid var(--line)}
.esm .stamp,.esm .icon-circle{background:var(--tint)!important;color:var(--accent)!important}
@media(max-width:700px){.esm .card-body{padding:16px}.esm .page-title{font-size:23px}.esm-content{padding-top:18px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- Login / registro ---------- */
body.esm-auth{display:block}
.esm-auth .login-bg-image{display:none!important}
.esm-auth .page.auth-login-form{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:40px 20px;background:radial-gradient(ellipse at 50% 0,#00735e38,transparent 65%)!important}
.esm-auth .page.auth-login-form>.container{max-width:420px;height:auto!important;padding:0}
.esm-auth .esm-auth-brand{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:28px;color:var(--text);font-size:27px;font-weight:800;letter-spacing:-1px;text-decoration:none!important}
.esm-auth .esm-auth-brand .esm-brand-icon{width:36px;height:36px}
.esm-auth .esm-auth-brand small{font-size:12px;color:var(--accent)}
.esm-auth .card{padding:8px;border-radius:22px!important}
.esm-auth .card-body{padding:24px}
.esm-auth .btn-primary,.esm-auth .btn-block{width:100%;padding:14px 18px}
.esm-auth .esm-auth-foot{text-align:center;font-size:11px;color:var(--muted);margin-top:22px}
.esm-auth .custom-control-label{font-weight:400!important}
.esm-auth img[src*="logo"]{max-height:44px;width:auto}

/* ---------- Ajustes específicos (vistas de módulos) ---------- */
/* Descripción del servicio en Nuevo pedido (tiene fondo claro en línea) */
.esm [style*="background: #f8f9fa"],.esm [style*="background:#f8f9fa"]{background:var(--raised)!important;color:var(--text)!important;border-radius:10px}
.esm .card.border{border:1px solid var(--line)!important}
/* Buscador de servicios (selectize dentro de .form-control) */
.esm .form-control.ajaxSearchService{padding:0!important;border:0!important;background:transparent!important}
.esm .form-control.ajaxSearchService .selectize-input{border:1px solid var(--line)!important;border-radius:10px!important;margin-bottom:0!important;min-height:46px;padding:12px 14px}
.esm .selectize-control.single .selectize-input:after{border-color:var(--muted) transparent transparent}
.esm .selectize-input.input-active,.esm .selectize-input.dropdown-active{background:var(--bg)!important}
/* Título interno del formulario y pestañas */
.esm .content-header-title h4{font-size:16px;font-weight:600;margin:0 0 16px;color:var(--text)}
.esm .tabs-list .nav-tabs{border:0!important}
.esm .tabs-list .nav-tabs a{display:inline-block;padding:8px 14px;border-radius:9px;color:var(--muted)!important;border:1px solid transparent}
.esm .tabs-list .nav-tabs a.active{background:var(--tint);color:var(--accent)!important;border-color:var(--accent)}
/* Botones de categorías */
.esm .btn-filter,.esm [class*="filter-categor"] .btn{background:var(--raised)!important;border:1px solid var(--line)!important;color:var(--text)!important;border-radius:10px}
/* Colores de texto fijos del tema anterior */
.esm .text-primary,.esm .text-success,.esm .text-info{color:var(--accent)!important}
.esm .text-danger{color:#ff9db0!important}
.esm .header,.esm .footer{background:transparent!important}
.esm table.table-bordered,.esm table.table-bordered td,.esm table.table-bordered th{border-color:var(--line)!important}
.esm .dataTables_wrapper,.esm .page-link{color:var(--text)}

/* =====================================================================
   BASE ESTRUCTURAL (v2) — reglas mínimas de Bootstrap 4 acotadas a .esm,
   para que las páginas del panel funcionen aunque core.css no aplique.
   ===================================================================== */
.esm a{text-decoration:none}.esm a:hover{text-decoration:underline}.esm .btn:hover,.esm .nav-link:hover,.esm .dropdown-item:hover{text-decoration:none}
.esm ul.nav,.esm .nav,.esm .nav-tabs,.esm .nav-pills,.esm .pagination,.esm .list-unstyled{list-style:none;padding-left:0;margin-top:0}
.esm .nav,.esm .pagination{display:flex;flex-wrap:wrap;margin-bottom:0}.esm .nav-link{display:block;padding:8px 14px}.esm .nav-item{list-style:none}
.esm .d-none{display:none!important}.esm .d-block{display:block!important}.esm .d-inline-block{display:inline-block!important}.esm .d-flex{display:flex!important}.esm .d-inline{display:inline!important}
@media(min-width:576px){.esm .d-sm-none{display:none!important}.esm .d-sm-block{display:block!important}.esm .d-sm-flex{display:flex!important}.esm .d-sm-inline-block{display:inline-block!important}}
@media(min-width:768px){.esm .d-md-none{display:none!important}.esm .d-md-block{display:block!important}.esm .d-md-flex{display:flex!important}.esm .d-md-inline-block{display:inline-block!important}}
@media(min-width:992px){.esm .d-lg-none{display:none!important}.esm .d-lg-block{display:block!important}.esm .d-lg-flex{display:flex!important}.esm .d-lg-inline-block{display:inline-block!important}}
@media(min-width:1200px){.esm .d-xl-none{display:none!important}.esm .d-xl-block{display:block!important}.esm .d-xl-flex{display:flex!important}.esm .d-xl-inline-block{display:inline-block!important}}
.esm .flex-column{flex-direction:column!important}.esm .flex-row{flex-direction:row!important}.esm .flex-wrap{flex-wrap:wrap!important}.esm .flex-fill{flex:1 1 auto!important}
.esm .align-items-center{align-items:center!important}.esm .align-items-start{align-items:flex-start!important}.esm .align-items-end{align-items:flex-end!important}.esm .justify-content-between{justify-content:space-between!important}.esm .justify-content-center{justify-content:center!important}.esm .justify-content-end{justify-content:flex-end!important}
.esm .text-center{text-align:center!important}.esm .text-right{text-align:right!important}.esm .text-left{text-align:left!important}.esm .w-100{width:100%!important}.esm .ml-auto{margin-left:auto!important}.esm .mr-auto{margin-right:auto!important}.esm .mx-auto{margin-left:auto!important;margin-right:auto!important}
.esm .m-0{margin:0px!important}.esm .mt-0{margin-top:0px!important}.esm .mb-0{margin-bottom:0px!important}.esm .ml-0{margin-left:0px!important}.esm .mr-0{margin-right:0px!important}.esm .p-0{padding:0px!important}.esm .pt-0{padding-top:0px!important}.esm .pb-0{padding-bottom:0px!important}
.esm .m-1{margin:4px!important}.esm .mt-1{margin-top:4px!important}.esm .mb-1{margin-bottom:4px!important}.esm .ml-1{margin-left:4px!important}.esm .mr-1{margin-right:4px!important}.esm .p-1{padding:4px!important}.esm .pt-1{padding-top:4px!important}.esm .pb-1{padding-bottom:4px!important}
.esm .m-2{margin:8px!important}.esm .mt-2{margin-top:8px!important}.esm .mb-2{margin-bottom:8px!important}.esm .ml-2{margin-left:8px!important}.esm .mr-2{margin-right:8px!important}.esm .p-2{padding:8px!important}.esm .pt-2{padding-top:8px!important}.esm .pb-2{padding-bottom:8px!important}
.esm .m-3{margin:16px!important}.esm .mt-3{margin-top:16px!important}.esm .mb-3{margin-bottom:16px!important}.esm .ml-3{margin-left:16px!important}.esm .mr-3{margin-right:16px!important}.esm .p-3{padding:16px!important}.esm .pt-3{padding-top:16px!important}.esm .pb-3{padding-bottom:16px!important}
.esm .m-4{margin:24px!important}.esm .mt-4{margin-top:24px!important}.esm .mb-4{margin-bottom:24px!important}.esm .ml-4{margin-left:24px!important}.esm .mr-4{margin-right:24px!important}.esm .p-4{padding:24px!important}.esm .pt-4{padding-top:24px!important}.esm .pb-4{padding-bottom:24px!important}
.esm .m-5{margin:48px!important}.esm .mt-5{margin-top:48px!important}.esm .mb-5{margin-bottom:48px!important}.esm .ml-5{margin-left:48px!important}.esm .mr-5{margin-right:48px!important}.esm .p-5{padding:48px!important}.esm .pt-5{padding-top:48px!important}.esm .pb-5{padding-bottom:48px!important}
.esm .container{width:100%;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px}
.esm .row{display:flex;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}.esm .no-gutters{margin-left:0;margin-right:0}.esm .no-gutters>[class*=col-]{padding-left:0;padding-right:0}
.esm [class*="col-"]{position:relative;width:100%;min-height:1px;padding-left:12px;padding-right:12px;flex:0 0 100%;max-width:100%}
.esm .col{flex:1 0 0%;max-width:100%}.esm .col-auto{flex:0 0 auto;width:auto;max-width:100%}
.esm .col-1{flex:0 0 8.333333%;max-width:8.333333%}
.esm .col-2{flex:0 0 16.666667%;max-width:16.666667%}
.esm .col-3{flex:0 0 25.000000%;max-width:25.000000%}
.esm .col-4{flex:0 0 33.333333%;max-width:33.333333%}
.esm .col-5{flex:0 0 41.666667%;max-width:41.666667%}
.esm .col-6{flex:0 0 50.000000%;max-width:50.000000%}
.esm .col-7{flex:0 0 58.333333%;max-width:58.333333%}
.esm .col-8{flex:0 0 66.666667%;max-width:66.666667%}
.esm .col-9{flex:0 0 75.000000%;max-width:75.000000%}
.esm .col-10{flex:0 0 83.333333%;max-width:83.333333%}
.esm .col-11{flex:0 0 91.666667%;max-width:91.666667%}
.esm .col-12{flex:0 0 100.000000%;max-width:100.000000%}
@media(min-width:576px){.esm .col-sm{flex:1 0 0%;max-width:100%}.esm .col-sm-1{flex:0 0 8.333333%;max-width:8.333333%}.esm .col-sm-2{flex:0 0 16.666667%;max-width:16.666667%}.esm .col-sm-3{flex:0 0 25.000000%;max-width:25.000000%}.esm .col-sm-4{flex:0 0 33.333333%;max-width:33.333333%}.esm .col-sm-5{flex:0 0 41.666667%;max-width:41.666667%}.esm .col-sm-6{flex:0 0 50.000000%;max-width:50.000000%}.esm .col-sm-7{flex:0 0 58.333333%;max-width:58.333333%}.esm .col-sm-8{flex:0 0 66.666667%;max-width:66.666667%}.esm .col-sm-9{flex:0 0 75.000000%;max-width:75.000000%}.esm .col-sm-10{flex:0 0 83.333333%;max-width:83.333333%}.esm .col-sm-11{flex:0 0 91.666667%;max-width:91.666667%}.esm .col-sm-12{flex:0 0 100.000000%;max-width:100.000000%}}
@media(min-width:768px){.esm .col-md{flex:1 0 0%;max-width:100%}.esm .col-md-1{flex:0 0 8.333333%;max-width:8.333333%}.esm .col-md-2{flex:0 0 16.666667%;max-width:16.666667%}.esm .col-md-3{flex:0 0 25.000000%;max-width:25.000000%}.esm .col-md-4{flex:0 0 33.333333%;max-width:33.333333%}.esm .col-md-5{flex:0 0 41.666667%;max-width:41.666667%}.esm .col-md-6{flex:0 0 50.000000%;max-width:50.000000%}.esm .col-md-7{flex:0 0 58.333333%;max-width:58.333333%}.esm .col-md-8{flex:0 0 66.666667%;max-width:66.666667%}.esm .col-md-9{flex:0 0 75.000000%;max-width:75.000000%}.esm .col-md-10{flex:0 0 83.333333%;max-width:83.333333%}.esm .col-md-11{flex:0 0 91.666667%;max-width:91.666667%}.esm .col-md-12{flex:0 0 100.000000%;max-width:100.000000%}}
@media(min-width:992px){.esm .col-lg{flex:1 0 0%;max-width:100%}.esm .col-lg-1{flex:0 0 8.333333%;max-width:8.333333%}.esm .col-lg-2{flex:0 0 16.666667%;max-width:16.666667%}.esm .col-lg-3{flex:0 0 25.000000%;max-width:25.000000%}.esm .col-lg-4{flex:0 0 33.333333%;max-width:33.333333%}.esm .col-lg-5{flex:0 0 41.666667%;max-width:41.666667%}.esm .col-lg-6{flex:0 0 50.000000%;max-width:50.000000%}.esm .col-lg-7{flex:0 0 58.333333%;max-width:58.333333%}.esm .col-lg-8{flex:0 0 66.666667%;max-width:66.666667%}.esm .col-lg-9{flex:0 0 75.000000%;max-width:75.000000%}.esm .col-lg-10{flex:0 0 83.333333%;max-width:83.333333%}.esm .col-lg-11{flex:0 0 91.666667%;max-width:91.666667%}.esm .col-lg-12{flex:0 0 100.000000%;max-width:100.000000%}}
@media(min-width:1200px){.esm .col-xl{flex:1 0 0%;max-width:100%}.esm .col-xl-1{flex:0 0 8.333333%;max-width:8.333333%}.esm .col-xl-2{flex:0 0 16.666667%;max-width:16.666667%}.esm .col-xl-3{flex:0 0 25.000000%;max-width:25.000000%}.esm .col-xl-4{flex:0 0 33.333333%;max-width:33.333333%}.esm .col-xl-5{flex:0 0 41.666667%;max-width:41.666667%}.esm .col-xl-6{flex:0 0 50.000000%;max-width:50.000000%}.esm .col-xl-7{flex:0 0 58.333333%;max-width:58.333333%}.esm .col-xl-8{flex:0 0 66.666667%;max-width:66.666667%}.esm .col-xl-9{flex:0 0 75.000000%;max-width:75.000000%}.esm .col-xl-10{flex:0 0 83.333333%;max-width:83.333333%}.esm .col-xl-11{flex:0 0 91.666667%;max-width:91.666667%}.esm .col-xl-12{flex:0 0 100.000000%;max-width:100.000000%}}
.esm .form-group{display:block;margin-bottom:16px}.esm .form-group>label,.esm .form-label{display:block;margin-bottom:8px}
.esm .form-control,.esm select.form-control,.esm textarea.form-control{display:block;width:100%;max-width:100%;font-size:14px;line-height:1.5}.esm textarea.form-control{min-height:90px;resize:vertical}
.esm .input-group{display:flex;width:100%}.esm .input-group>.form-control{flex:1 1 auto;width:1%}.esm .input-group-append,.esm .input-group-prepend{display:flex}
.esm .custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.esm .custom-control-input{position:absolute;opacity:0;z-index:-1}.esm .custom-control-label{margin-bottom:0;cursor:pointer}
.esm .card{position:relative;display:flex;flex-direction:column;min-width:0;margin-bottom:20px;word-wrap:break-word}.esm .card-body{flex:1 1 auto;padding:22px}.esm .card-header{padding:16px 22px;display:flex;align-items:center}.esm .card-footer{padding:14px 22px}.esm .card-title{margin:0}
.esm .table{width:100%;max-width:100%;border-collapse:collapse;margin-bottom:0}.esm .table td,.esm .table th{padding:12px;text-align:left}.esm .table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.esm .btn{display:inline-block;font-weight:600;text-align:center;vertical-align:middle;cursor:pointer;user-select:none;border:1px solid transparent;line-height:1.5}.esm .btn-block{display:block;width:100%}.esm .btn-sm{padding:6px 12px;font-size:12px}
.esm .badge{display:inline-block;padding:4px 8px;font-size:11px;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline}
.esm .tab-content>.tab-pane{display:none}.esm .tab-content>.tab-pane.active{display:block}.esm .fade:not(.show){opacity:0}.esm .fade{transition:opacity .15s linear}
.esm .dropdown{position:relative}.esm .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:10rem;padding:6px 0;margin:2px 0 0;list-style:none}.esm .dropdown-menu.show{display:block}.esm .dropdown-menu-right{right:0;left:auto}.esm .dropdown-item{display:block;width:100%;padding:8px 16px;clear:both;background:transparent;border:0;white-space:nowrap}
.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.6}
.esm .modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow-x:hidden;overflow-y:auto;outline:0}.esm .modal.show{display:block}.esm .modal-open{overflow:hidden}.esm .modal-dialog{position:relative;width:auto;max-width:500px;margin:30px auto;pointer-events:none}.esm .modal-lg{max-width:800px}.esm .modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;outline:0}.esm .modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px}.esm .modal-body{position:relative;flex:1 1 auto;padding:20px}.esm .modal-footer{display:flex;align-items:center;justify-content:flex-end;padding:14px 20px;gap:8px}
.esm .alert{position:relative;padding:12px 16px;margin-bottom:16px}.esm .close{float:right;font-size:22px;line-height:1;background:transparent;border:0;cursor:pointer}
.esm .selectize-control{position:relative}.esm .selectize-dropdown{position:absolute;z-index:10;width:100%}.esm .selectize-input{display:block;width:100%}.esm .selectize-dropdown .option{padding:8px 12px;cursor:pointer}
.esm img{max-width:100%;height:auto}.esm .page-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}
/* encabezado y menú inferior: máxima prioridad */
body.esm .esm-top{display:flex!important;align-items:center;justify-content:space-between;flex-wrap:nowrap;height:68px;background:var(--surface)!important;border-bottom:1px solid var(--line)!important;padding:0 max(18px,calc((100vw - 1060px)/2))!important;position:sticky;top:0;z-index:50}
body.esm .esm-top-left{display:flex!important;align-items:center;min-width:0}
body.esm .esm-balance{display:flex!important;flex:0 0 auto;width:auto!important;margin:0}
@media(max-width:700px){body.esm .esm-top{height:62px;padding:0 14px!important}}
body.esm{color-scheme:dark;padding-bottom:calc(130px + env(safe-area-inset-bottom))}
/* deja libre la esquina derecha para el botón flotante de WhatsApp */
@media(max-width:700px){body.esm .esm-dock{left:12px;transform:none;width:calc(100% - 96px);max-width:none;gap:0;padding:6px 4px}body.esm .esm-dock a{font-size:9px}}

/* ---------- v3.2: ajustes tras pruebas en celular ---------- */
.esm *,.esm *::before,.esm *::after{box-sizing:border-box}
/* Buscador de servicios: una sola caja */
body.esm .selectize-control.ajaxSearchService,
body.esm .ajaxSearchService.form-control{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;height:auto!important;min-height:0!important;width:100%!important}
body.esm .ajaxSearchService .selectize-input{display:block!important;width:100%!important;min-height:46px;margin:0!important;padding:12px 14px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--bg)!important;box-shadow:none!important}
body.esm .ajaxSearchService .selectize-input>input{width:100%!important;color:var(--text)!important}
body.esm .ajaxSearchService .selectize-dropdown{width:100%!important;left:0}
/* Selects normales de Nuevo pedido: nunca más anchos que la tarjeta */
body.esm select.form-control,body.esm .selectize-control{max-width:100%!important}
body.esm .card-body{overflow:visible}

/* ---------- v4: corregido viendo las páginas reales ---------- */
/* Listas desplegables: altura automática para que el texto no se corte */
body.esm select.form-control,body.esm .custom-select{height:auto!important;min-height:46px;line-height:1.4!important;padding:11px 36px 11px 14px!important;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4c5c2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 12px center!important;background-size:16px!important;text-overflow:ellipsis}
body.esm select.form-control option{background:var(--surface);color:var(--text)}
body.esm input.form-control{height:auto!important;min-height:46px}
/* Buscador: el input interno no lleva caja propia */
body.esm .selectize-input input,body.esm .selectize-input input[type=text]{border:0!important;background:transparent!important;padding:0!important;min-height:0!important;height:auto!important;box-shadow:none!important;outline:none!important;border-radius:0!important;color:var(--text)!important}
body.esm .ajaxSearchService .selectize-input:after{display:none!important}
/* Resumen del servicio (columna derecha de Nuevo pedido) */
body.esm .order_resume{background:var(--raised)!important;border:1px solid var(--line)!important;border-radius:14px!important;color:var(--text)!important;padding:22px!important}
body.esm .order_resume .service-name,body.esm .order_resume h5,body.esm .order_resume p{color:var(--text)!important}
body.esm .order_resume h5.text-muted{color:var(--muted)!important;font-size:12px;font-weight:600}
body.esm .order_resume .text-info,body.esm .order_resume .service-price,body.esm .order_resume .service-avg-time{color:var(--accent)!important}
body.esm .order_resume .service-details{background:var(--bg)!important;border:1px solid var(--line)!important;color:var(--muted)!important;min-height:120px!important}
body.esm .order_resume img.rounded-circle{background:var(--tint);padding:6px;filter:grayscale(1) brightness(1.6)}
body.esm .badge.bg-indigo,body.esm .service-id-title{background:var(--tint)!important;color:var(--accent)!important}
body.esm .order_resume .service-title{margin-left:0!important}
@media(max-width:767px){body.esm .order_resume{margin-top:22px;max-width:none!important}}
/* Total del pedido y confirmación */
body.esm .order-total,body.esm [class*=total-charge]{color:var(--accent)!important}
/* =====================================================================
   NUEVO PEDIDO (vista reconstruida con el diseño Esmeralda)
   ===================================================================== */
body.esm .np-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 22px}
body.esm .np-head h1{font-size:28px;letter-spacing:-1px;line-height:1.2;margin:0;font-weight:700}
body.esm .np-mode{display:flex;gap:4px;padding:4px;background:var(--surface);border:1px solid var(--line);border-radius:12px;list-style:none;margin:0}
body.esm .np-mode li{list-style:none}
body.esm .np-mode a{display:block;padding:8px 14px;border-radius:9px;color:var(--muted)!important;font-size:12px;font-weight:600;text-decoration:none!important}
body.esm .np-mode a.active{background:var(--tint);color:var(--accent)!important}
body.esm .np-columns{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:25px;align-items:start}
body.esm .np-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:25px;min-width:0}
body.esm .np-label{display:block;font-size:11px;font-weight:600;margin-bottom:9px;color:var(--text)}
body.esm .np-platforms{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:24px}
body.esm .np-platform{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;border:1px solid var(--line);background:var(--surface);padding:12px 6px;border-radius:10px;font-size:11px;font-weight:600;color:var(--muted);cursor:pointer;line-height:1.2;height:auto!important;margin:0!important}
body.esm .np-platform:hover{border-color:#527a68;color:var(--text)}
body.esm .np-platform.active{background:var(--tint);color:var(--accent);border-color:var(--accent)}
body.esm .np-platform-icon{display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;font-size:16px;flex:0 0 19px}
body.esm .np-platform-icon i{font-size:16px;margin:0!important}
body.esm .np-platform-icon svg{width:16px!important;height:16px!important;fill:currentColor;stroke:none}
body.esm .np-platform-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
body.esm .np-card .form-group{margin-bottom:19px}
body.esm .np-card .form-group>label{font-size:11px;font-weight:600;margin-bottom:9px}
body.esm .np-hint{display:block;font-size:10px;color:var(--muted);margin-top:7px}
body.esm .np-service-info{display:flex;gap:9px;align-items:center;padding:12px;margin-top:10px;background:var(--raised);border-radius:8px;font-size:11px;color:var(--muted)}
body.esm .np-service-info svg{width:16px;height:16px;color:var(--accent);fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
body.esm .np-service-info b{color:var(--text);font-weight:600}
body.esm .np-amount{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
body.esm .np-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.esm .np-presets button{min-height:38px;padding:9px 12px;font-size:12px;border:1px solid var(--line);background:var(--raised);color:var(--muted);border-radius:8px;cursor:pointer}
body.esm .np-presets button:hover,body.esm .np-presets button:active{background:var(--tint);border-color:var(--accent);color:var(--accent)}
body.esm .np-agree{display:flex;gap:10px;align-items:flex-start;font-size:12px;color:var(--text)!important;cursor:pointer;margin:6px 0 0;font-weight:500!important}
body.esm .np-agree input{width:18px;height:18px;accent-color:#36d58e;margin-top:1px;flex:0 0 18px}
/* Tarjeta "Tu pedido" */
body.esm .np-aside{position:sticky;top:84px;min-width:0}
body.esm .np-receipt-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:16px;border-bottom:1px dashed var(--line)}
body.esm .np-receipt-head h2{font-size:16px;margin:0}
body.esm .np-receipt-head img{width:34px;height:34px;border-radius:9px;background:var(--raised);padding:4px}
body.esm .np-receipt-name{font-size:13px;font-weight:600;line-height:1.5;margin:16px 0 4px;color:var(--text);word-break:break-word}
body.esm .np-details{margin:0}
body.esm .np-details>div{display:flex;justify-content:space-between;gap:20px;margin:13px 0;font-size:12px}
body.esm .np-details dt{color:var(--muted);font-weight:400}
body.esm .np-details dd{margin:0;text-align:right;color:var(--text)}
body.esm .np-desc{margin:14px 0 0;border-top:1px dashed var(--line);padding-top:12px}
body.esm .np-desc summary{cursor:pointer;font-size:12px;color:var(--accent);list-style:none}
body.esm .np-desc summary::-webkit-details-marker{display:none}
body.esm .np-desc summary:after{content:" +"}
body.esm .np-desc[open] summary:after{content:" −"}
body.esm .np-desc .service-details{white-space:pre-line;word-break:break-word;margin-top:10px;padding:12px;background:var(--bg);border:1px solid var(--line);border-radius:10px;font-size:12px;line-height:1.6;color:var(--muted);max-height:260px;overflow:auto}
body.esm .np-total-box{border-top:1px dashed var(--line);padding-top:18px;margin:18px 0 0!important}
body.esm .np-total-label{color:var(--muted);font-size:11px}
body.esm .np-total{display:flex;align-items:baseline;gap:4px;font-size:36px;font-weight:700;letter-spacing:-1.5px;margin:5px 0 18px;color:var(--text);background:none!important;border:0!important;padding:0!important}
body.esm .np-total small{font-size:11px;letter-spacing:0;color:var(--muted);font-weight:400;margin-left:4px}
body.esm .np-submit{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:15px 18px;border:1px solid #66f7a1;border-radius:10px;background:#66f7a1;color:#004d40;font-weight:700;font-size:13px;cursor:pointer}
body.esm .np-submit svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body.esm .np-submit:hover{filter:brightness(1.07)}
body.esm .np-after{display:flex;gap:9px;align-items:center;font-size:11px;color:var(--muted);padding:14px 5px}
body.esm .np-after svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
body.esm #order-message-area .alert{margin-bottom:20px}
/* Celular: receipt compacto como en el diseño */
@media(max-width:860px){
  body.esm .np-columns{grid-template-columns:1fr;gap:15px}
  body.esm .np-aside{position:static}
}
@media(max-width:700px){
  body.esm .np-head h1{font-size:24px}
  body.esm .np-card{padding:18px;border-radius:14px}
  body.esm .np-platforms{gap:6px;margin-bottom:19px}
  body.esm .np-platform{flex-direction:column;gap:5px;padding:10px 4px;font-size:10px;border-radius:9px}
  body.esm .np-total{font-size:28px;margin-bottom:14px}
  body.esm .np-after{display:none}
}
/* WhatsApp: fuera de la esquina (va en el menú lateral) */
/* WhatsApp flotante: visible, por encima de la barra inferior en celular */
body.esm>a[href*="wa.me"]{display:flex!important;z-index:70!important}
@media(max-width:700px){body.esm>a[href*="wa.me"]{bottom:calc(104px + env(safe-area-inset-bottom))!important;right:14px!important;width:54px!important;height:54px!important}body.esm>a[href*="wa.me"] svg{width:32px!important;height:32px!important}}
/* La barra inferior vuelve al centro */
@media(max-width:700px){body.esm .esm-dock{left:50%!important;transform:translateX(-50%)!important;width:calc(100% - 24px)!important;max-width:640px!important;gap:2px!important;padding:6px!important}body.esm .esm-dock a{font-size:10px}}

/* v6: Nuevo pedido en una sola columna */
body.esm .np-single{max-width:760px;margin:0 auto}
body.esm .np-head{max-width:760px;margin-left:auto;margin-right:auto}
body.esm .np-desc-box{margin:4px 0 0}
body.esm .np-desc-box .service-details{white-space:pre-line;word-break:break-word;padding:14px;background:var(--bg);border:1px solid var(--line);border-radius:10px;font-size:13px;line-height:1.6;color:var(--muted);max-height:300px;overflow:auto}
body.esm .np-single .np-total-box{margin:20px 0 16px!important}
body.esm .np-single .np-submit{margin-top:18px}

/* =====================================================================
   HISTORIAL DE PEDIDOS (tarjetas compactas)
   ===================================================================== */
body.esm .op-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px}
body.esm .op-head h1{font-size:28px;letter-spacing:-1px;margin:0;font-weight:700;line-height:1.2}
body.esm .op-new{display:inline-flex;align-items:center;gap:7px;padding:10px 14px;border-radius:10px;background:var(--tint);color:var(--accent)!important;font-size:12px;font-weight:600;text-decoration:none!important;white-space:nowrap}
body.esm .op-new svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
body.esm .op-tools{display:grid;gap:12px;margin-bottom:16px}
body.esm .op-filters ul{display:flex!important;gap:6px;margin:0!important;padding:0 0 2px!important;list-style:none!important;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
body.esm .op-filters ul::-webkit-scrollbar{display:none}
body.esm .op-filters li{list-style:none!important;margin:0!important;flex:0 0 auto}
body.esm .op-filters a{display:block;padding:8px 13px!important;border-radius:999px!important;border:1px solid var(--line)!important;background:var(--surface)!important;color:var(--muted)!important;font-size:12px!important;font-weight:600;white-space:nowrap;text-decoration:none!important;line-height:1.2!important;min-height:0!important}
body.esm .op-filters a.btn-primary{background:var(--tint)!important;border-color:var(--accent)!important;color:var(--accent)!important}
body.esm .op-search{position:relative;display:flex;align-items:center}
body.esm .op-search input{padding-right:84px!important;margin:0!important}
body.esm .op-search button{position:absolute;top:50%;transform:translateY(-50%);width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer;padding:0}
body.esm .op-search .btn-search{right:6px;color:var(--accent)}
body.esm .op-search .btn-clear{right:44px}
body.esm .op-search .btn-clear.d-none{display:none!important}
body.esm .op-search svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
body.esm .op-list{display:grid;gap:11px}
body.esm .op-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start;padding:16px 18px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0}
body.esm .op-main{min-width:0}
body.esm .op-title{display:flex;align-items:flex-start;gap:11px;margin-bottom:9px;min-width:0}
body.esm .op-title img{width:34px;height:34px;border-radius:9px;background:var(--raised);padding:4px;flex:0 0 34px;object-fit:contain}
body.esm .op-title-text{min-width:0}
body.esm .op-title small{display:block;color:var(--muted);font-size:11px;margin-bottom:2px}
body.esm .op-title h3{font-size:13px;font-weight:600;line-height:1.4;margin:0;color:var(--text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
body.esm .op-link{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0 8px;max-width:100%}
body.esm .op-link a{color:var(--accent)!important}
body.esm .op-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:11px;color:var(--muted)}
body.esm .op-meta b{color:var(--text);font-weight:600}
body.esm .op-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px;text-align:right}
body.esm .op-price{font-size:16px;font-weight:700;color:var(--text);white-space:nowrap}
body.esm .op-status{display:inline-block;font-size:11px;font-weight:600;padding:5px 9px;border-radius:7px;white-space:nowrap;background:var(--tint);color:var(--accent)}
body.esm .op-status.is-done{background:#153d2f;color:#9fddbd}
body.esm .op-status.is-partial{background:#3f3820;color:#ffe9a0}
body.esm .op-status.is-bad{background:#3f2029;color:#ffb6c4}
body.esm .op-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
body.esm .op-actions:empty{display:none}
body.esm .op-btn{display:inline-block;padding:6px 11px;border-radius:8px;font-size:11px;font-weight:600;border:1px solid var(--line);background:var(--raised);color:var(--text)!important;text-decoration:none!important;cursor:pointer;white-space:nowrap}
body.esm .op-cancel{border-color:#7a3445;color:#ffb6c4!important;background:transparent}
body.esm .op-refill{border-color:var(--accent);color:var(--accent)!important;background:transparent}
body.esm .op-btn.is-off{opacity:.5;cursor:default}
body.esm .op-btn.is-busy{opacity:.6;pointer-events:none}
body.esm .op-note{font-size:11px;color:var(--muted)}
body.esm .op-empty{padding:40px 20px;text-align:center;color:var(--muted);font-size:13px;border:1px dashed var(--line);border-radius:14px}
body.esm .op-pagination{margin-top:16px;display:flex;justify-content:center}
body.esm .op-pagination .pagination{gap:4px;flex-wrap:wrap;justify-content:center}
body.esm .op-pagination .page-link{border-radius:8px!important;min-width:36px;text-align:center}
@media(max-width:520px){
  body.esm .op-head h1{font-size:24px}
  body.esm .op-card{padding:14px;gap:10px}
  body.esm .op-price{font-size:15px}
}
body.esm .op-tools{grid-template-columns:minmax(0,1fr)}
body.esm .op-filters{min-width:0;max-width:100%;overflow:hidden}
body.esm .lists-index-ajax{min-width:0;max-width:100%}
/* v8: enlace completo, en varias líneas si no cabe */
body.esm .op-link{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;word-break:break-all;line-height:1.5}
/* v9: ID del pedido como etiqueta verde */
body.esm .op-idline{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;margin-bottom:5px}
body.esm .op-id{display:inline-block;background:var(--tint);color:var(--accent);font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;line-height:1.4}
body.esm .op-idline small{display:inline!important;margin:0!important}
body.esm .op-meta a{color:var(--accent)!important;font-weight:700}

/* =====================================================================
   SERVICIOS (plataformas + tarjetas compactas)
   ===================================================================== */
body.esm .sv-head h1{font-size:28px;letter-spacing:-1px;margin:0 0 18px;font-weight:700}
body.esm .sv-platforms{margin-bottom:14px}
body.esm .sv-search{margin-bottom:18px}
body.esm .sv-groups{display:grid;gap:22px}
body.esm .sv-group[hidden],body.esm .sv-item[hidden]{display:none!important}
body.esm .sv-cat{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;margin:0 0 10px;color:var(--text);line-height:1.4}
body.esm .sv-count{font-size:11px;font-weight:600;color:var(--muted);background:var(--raised);border-radius:999px;padding:2px 8px}
body.esm .sv-list{display:grid;gap:9px}
body.esm .sv-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0}
body.esm .sv-main{min-width:0}
body.esm .sv-item h3{font-size:13px;font-weight:600;line-height:1.45;margin:0 0 7px;color:var(--text);word-break:break-word}
body.esm .sv-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:11px;color:var(--muted)}
body.esm .sv-meta b{color:var(--text);font-weight:700}
body.esm .sv-meta span:first-child b{color:var(--accent)}
body.esm .sv-desc{margin-top:8px}
body.esm .sv-desc summary{cursor:pointer;font-size:11px;color:var(--accent);list-style:none}
body.esm .sv-desc summary::-webkit-details-marker{display:none}
body.esm .sv-desc summary:after{content:" +"}
body.esm .sv-desc[open] summary:after{content:" −"}
body.esm .sv-desc div{margin-top:8px;padding:10px 12px;background:var(--bg);border:1px solid var(--line);border-radius:10px;font-size:12px;line-height:1.6;color:var(--muted);word-break:break-word}
body.esm .sv-order{display:inline-flex;align-items:center;padding:9px 16px;border-radius:10px;background:var(--accent);color:var(--solid)!important;font-size:12px;font-weight:700;text-decoration:none!important;white-space:nowrap;align-self:start}
@media(max-width:520px){body.esm .sv-head h1{font-size:24px}body.esm .sv-item{padding:13px 14px}}
body.esm .sv-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-bottom:18px}
body.esm .sv-filters>*{margin:0!important}
@media(max-width:700px){body.esm .sv-filters{grid-template-columns:minmax(0,1fr)}}

/* =====================================================================
   TICKETS y TRANSACCIONES
   ===================================================================== */
body.esm .tk-layout{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:20px;align-items:start}
body.esm .tk-new{padding:0!important;overflow:hidden}
body.esm .tk-new summary{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;cursor:pointer;font-weight:700;font-size:15px;list-style:none}
body.esm .tk-new summary::-webkit-details-marker{display:none}
body.esm .tk-new summary svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;transition:transform .2s}
body.esm .tk-new[open] summary svg{transform:rotate(180deg)}
body.esm .tk-new form{padding:0 22px 22px}
body.esm .tk-new .np-submit{margin-top:6px}
body.esm .tk-side .op-search{margin-bottom:14px}
body.esm .tk-list{display:grid;gap:10px}
body.esm .tk-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text)!important;text-decoration:none!important;min-width:0}
body.esm .tk-item:hover{border-color:#527a68}
body.esm .tk-item.is-closed{opacity:.7}
body.esm .tk-main{min-width:0}
body.esm .tk-item h3{font-size:13px;font-weight:600;margin:0;line-height:1.4;word-break:break-word}
body.esm .tk-unread{font-size:10px;font-weight:700;background:#3f3820;color:#ffe9a0;padding:2px 7px;border-radius:6px}
body.esm .tx-card{align-items:center}
body.esm .tx-method img.payment{max-height:26px;width:auto;background:#fff;border-radius:6px;padding:3px 6px}
body.esm .tx-method .badge{font-size:12px}
body.esm .tx-amount{color:var(--accent)!important}
body.esm .tx-fee{color:var(--muted);font-size:11px}
@media(max-width:860px){body.esm .tk-layout{grid-template-columns:minmax(0,1fr)}}

/* AÑADIR FONDOS */
body.esm .af-head{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:640px;margin:0 auto 18px}
body.esm .af-head h1{font-size:28px;letter-spacing:-1px;margin:0;font-weight:700}
body.esm .af-balance{text-align:right;background:var(--tint);border-radius:12px;padding:8px 14px}
body.esm .af-balance small{display:block;font-size:10px;color:var(--muted);text-transform:uppercase}
body.esm .af-balance b{font-size:18px;color:var(--accent)}
body.esm .af-online{max-width:640px;margin:0 auto 18px}
body.esm .af-online .np-mode{margin-bottom:16px;flex-wrap:wrap}
body.esm .af-manual{max-width:640px;margin:0 auto}
@media(max-width:520px){body.esm .af-head h1{font-size:24px}}

/* PAGO MANUAL (contenido del admin, opción A) */

body.esm .vp-pay{--bg:#131b1e;--sf:#263238;--rs:#304047;--tx:#fff;--mt:#b4c5c2;--ln:#405358;--ac:#66f7a1;--sd:#004d40;--tn:#173e35;max-width:640px;margin:0 auto;font-family:Arial,Helvetica,sans-serif;color:var(--tx);text-align:left}
body.esm .vp-pay *{box-sizing:border-box}
body.esm .vp-pay h2{font-size:22px;margin:0 0 6px;letter-spacing:-.5px;color:var(--tx)}
body.esm .vp-pay .vp-sub{color:var(--mt);font-size:13px;margin:0 0 18px}
body.esm .vp-p{color:var(--mt);font-size:14px;line-height:1.6;margin:0 0 14px}
body.esm .vp-p b{color:var(--tx)}
body.esm .vp-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:var(--bg);border:1px solid var(--ln);border-radius:12px;margin:0 0 8px}
body.esm .vp-row small{display:block;color:var(--mt);font-size:11px;margin-bottom:2px}
body.esm .vp-row b{display:block;font-size:18px;letter-spacing:.5px;color:var(--tx);word-break:break-all}
body.esm .vp-row em{display:block;font-style:normal;color:var(--mt);font-size:11px;margin-top:2px}
body.esm .vp-copy{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;padding:8px 12px;border:1px solid var(--ln);background:var(--rs);color:var(--tx);border-radius:9px;font-size:12px;font-weight:700;cursor:pointer}
body.esm .vp-copy.ok{background:var(--tn);border-color:var(--ac);color:var(--ac)}
body.esm .vp-note{background:var(--tn);color:#c8f7dc;border-radius:10px;padding:10px 12px;font-size:13px;margin:0 0 12px}
body.esm .vp-note.vp-warn{background:#3f3820;color:#ffe9a0}
body.esm .vp-rates{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:6px;margin:12px 0 14px}
body.esm .vp-rates div{background:var(--rs);border-radius:9px;padding:9px 10px;font-size:12px;display:flex;justify-content:space-between;gap:6px}
body.esm .vp-rates b{color:var(--tx)} .vp-rates span{color:var(--ac);font-weight:700}
body.esm .vp-wa{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px;border-radius:11px;background:#25d366;color:#06301a!important;font-weight:700;font-size:14px;text-decoration:none!important;margin-top:6px}

body.esm .vpA .vp-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px}
body.esm .vpA .vp-tab{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 6px;border:1px solid var(--ln);background:var(--sf);color:var(--mt);border-radius:12px;font-weight:700;font-size:13px;cursor:pointer}
body.esm .vpA .vp-tab small{font-weight:400;font-size:10px;color:var(--mt);text-align:center}
body.esm .vpA .vp-tab.on{border-color:var(--ac);background:var(--tn);color:var(--ac)}
body.esm .vpA .vp-panel{display:none;background:var(--sf);border:1px solid var(--ln);border-radius:16px;padding:18px}
body.esm .vpA .vp-panel.on{display:block}

body.esm .vp-pay button{font-family:inherit}

/* Ventana "Pedido realizado" */
body.esm #order-message-area .order-success{display:none!important}
body.esm .np-modal{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;background:#06100dcc;backdrop-filter:blur(3px)}
body.esm .np-modal[hidden]{display:none!important}
body.esm .np-modal-box{width:100%;max-width:420px;max-height:calc(100vh - 40px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:26px 22px 22px;text-align:center;box-shadow:0 20px 60px #0007}
body.esm .np-modal-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 14px;border-radius:50%;background:var(--tint);color:var(--accent)}
body.esm .np-modal-icon svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
body.esm .np-modal-box h2{font-size:21px;margin:0 0 6px}
body.esm .np-modal-sub{color:var(--muted);font-size:13px;margin:0 0 18px}
body.esm .np-modal-list{margin:0 0 20px;text-align:left;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:6px 14px}
body.esm .np-modal-list>div{display:flex;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px dashed var(--line);font-size:13px}
body.esm .np-modal-list>div:last-child{border:0}
body.esm .np-modal-list>div[hidden]{display:none}
body.esm .np-modal-list dt{color:var(--muted);font-weight:400;flex:0 0 auto}
body.esm .np-modal-list dd{margin:0;text-align:right;color:var(--text);font-weight:600;overflow-wrap:anywhere;min-width:0}
body.esm .np-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
body.esm .np-modal-actions button{padding:14px 10px;border-radius:11px;font-weight:700;font-size:13px;cursor:pointer;border:1px solid var(--line)}
body.esm .np-modal-repeat{background:var(--accent);border-color:var(--accent)!important;color:var(--solid)}
body.esm .np-modal-close{background:var(--raised);color:var(--text)}
/* Espacio al final para que la barra inferior nunca tape el contenido */
html body.esm{padding-bottom:0!important}
body.esm .esm-content{padding-bottom:calc(120px + env(safe-area-inset-bottom))!important}

/* Buscador: lista de resultados sólida (opción 1) */
body.esm .selectize-dropdown.ajaxSearchService,body.esm .ajaxSearchService .selectize-dropdown,body.esm .selectize-control.ajaxSearchService .selectize-dropdown{background:var(--surface)!important;border:1px solid var(--line)!important;border-radius:12px!important;box-shadow:0 14px 34px #0009!important;margin-top:6px!important;padding:0!important;height:auto!important;z-index:60!important;overflow:hidden}
body.esm .selectize-dropdown.ajaxSearchService .selectize-dropdown-content,body.esm .ajaxSearchService .selectize-dropdown-content{max-height:330px!important;overflow-y:auto!important;background:var(--surface)!important}
body.esm .np-opt{padding:11px 14px!important;border-bottom:1px solid var(--raised);cursor:pointer;background:var(--surface)!important;color:var(--text)!important;white-space:normal!important}
body.esm .np-opt.active,body.esm .np-opt:hover{background:var(--tint)!important}
body.esm .np-opt-id{display:inline-block;background:var(--tint);color:var(--accent);font-size:10px;font-weight:700;padding:2px 7px;border-radius:5px}
body.esm .np-opt.active .np-opt-id{background:#0f2a24}
body.esm .np-opt b{display:block;color:var(--text);font-size:13px;margin:4px 0;line-height:1.4}
body.esm .np-opt small{color:var(--muted);font-size:11px}
body.esm .np-opt small em{color:var(--accent);font-style:normal;font-weight:700}
/* Datos del servicio (cuatro cuadros) */
body.esm .np-info{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
body.esm .np-info[hidden]{display:none}
body.esm .np-info>div{background:var(--raised);border-radius:12px;padding:11px 12px}
body.esm .np-info small{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px}
body.esm .np-info small svg{width:14px;height:14px;fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body.esm .np-info b{display:block;color:var(--text);font-size:17px;margin-top:5px}
body.esm .np-info>div:first-child b{color:var(--accent)}
body.esm .np-opt .highlight{background:transparent!important;color:var(--accent)!important;border-radius:0}
body.esm .np-info{margin:-6px 0 19px}
/* v20: total debajo de Cantidad */
body.esm .np-single .np-total-box{border-top:0!important;padding-top:0!important;margin:-4px 0 14px!important}
body.esm .np-single .np-total{margin:2px 0 4px!important}
body.esm .np-info{margin:0 0 19px}
body.esm .np-desc-box{margin:0 0 16px}
/* Drip-feed y otros bloques plegables: cerrados hasta marcar la casilla */
body.esm .collapse:not(.show){display:none!important}
body.esm .collapsing{position:relative;height:0;overflow:hidden;transition:height .25s ease}
body.esm .drip-feed-option .form-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:700}
body.esm .drip-feed-option .custom-switch{display:inline-flex;align-items:center;gap:8px;margin:0;cursor:pointer}
body.esm .custom-switch-input:checked~.custom-switch-indicator{background:#66f7a1!important;border-color:#66f7a1!important}
/* ===== Plataformas a color (A + C) ===== */
body.esm .np-platform[data-id=everything]{--b:#66f7a1}
body.esm .np-platform[data-id=youtube]{--b:#ff4d4d}
body.esm .np-platform[data-id=facebook]{--b:#4b93ff}
body.esm .np-platform[data-id=tiktok]{--b:#25f4ee}
body.esm .np-platform[data-id=instagram]{--b:#f2557a}
body.esm .np-platform[data-id=twitter]{--b:#3fb3f5}
body.esm .np-platform[data-id=spotify]{--b:#1ed760}
body.esm .np-platform[data-id=telegram]{--b:#3ab4ef}
body.esm .np-platform[data-id=twitch]{--b:#a970ff}
body.esm .np-platform[data-id=other]{--b:#b4c5c2}
body.esm .np-platform[data-id]{background:color-mix(in srgb,var(--b) 10%,var(--surface));border-color:color-mix(in srgb,var(--b) 35%,transparent);color:#e7efed}
body.esm .np-platform[data-id] .np-platform-icon{color:var(--b)}
body.esm .np-platform[data-id=tiktok] .np-platform-icon svg{filter:drop-shadow(1px 1px 0 #fe2c55)}
body.esm .np-platform[data-id]:hover{border-color:var(--b)}
body.esm .np-platform[data-id].active{background:color-mix(in srgb,var(--b) 26%,var(--surface));border-color:var(--b);color:#fff;box-shadow:0 0 0 1px var(--b) inset}
