*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:#f3f6fa;color:#101827}.hidden{display:none!important}
.login-wrap{min-height:100vh;display:grid;place-items:center}.login-card{width:min(520px,92%);background:white;padding:48px 38px;border:1px solid #dde3eb;border-radius:22px;box-shadow:0 12px 35px #00000012}.login-card h1{font-size:46px;margin:0 0 22px}.login-card p{color:#64748b;font-size:18px}.login-card form{display:grid;gap:20px;margin-top:30px}
label{display:grid;gap:8px;font-weight:bold}input,select,textarea{font:inherit;padding:12px;border:1px solid #ccd4df;border-radius:11px;background:white}button{font:inherit;font-weight:bold;border:0;border-radius:10px;background:#111a2d;color:white;padding:12px 16px;cursor:pointer}.error{color:#b91c1c;margin-top:10px}
.app{display:grid;grid-template-columns:235px 1fr;min-height:100vh}aside{background:#111a2d;color:white;padding:25px 16px;display:flex;flex-direction:column}.brand{padding:0 4px 28px}.brand strong{font-size:18px}.brand small{display:block;color:#8ea0ba;margin-top:5px}nav{display:grid;gap:8px}nav button{text-align:left;background:transparent}nav button.active{background:#202c42}.logout{margin-top:auto;background:#eef2f7;color:#111827}main{padding:24px}header{display:flex;justify-content:space-between;align-items:start;gap:20px;margin-bottom:24px}header h2{margin:0;font-size:28px}header p{color:#64748b;margin:6px 0}.actions{display:flex;gap:10px}.actions select{min-width:245px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.stats article,.box{background:white;border:1px solid #dde3eb;border-radius:16px;padding:20px}.stats article{display:grid;gap:12px}.stats span{color:#64748b}.stats b{font-size:30px}.box{margin-top:18px}.box h3{margin-top:0}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid #e8edf3}th{font-size:12px;color:#64748b;text-transform:uppercase}
dialog{width:min(860px,calc(100vw - 30px));border:0;border-radius:18px;padding:0;box-shadow:0 25px 80px #0006}dialog::backdrop{background:#11182799}dialog form{padding:26px}.dialog-head{display:flex;justify-content:space-between;align-items:start}.dialog-head h2{margin:0}.dialog-head p{color:#64748b}.dialog-head button{background:#eef2f7;color:#111827;font-size:20px;padding:8px 12px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.wide{grid-column:1/-1}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.secondary{background:#eef2f7;color:#111827}
@media(max-width:800px){.app{grid-template-columns:1fr}aside{min-height:auto}.stats{grid-template-columns:1fr}.grid{grid-template-columns:1fr}.wide{grid-column:auto}header{flex-direction:column}.actions{width:100%;flex-wrap:wrap}}
.hint{color:#64748b;font-size:14px;margin-top:-5px;margin-bottom:18px}

.field-help{margin:5px 0 10px;color:#64748b;font-size:13px}
.service-options{display:flex;flex-wrap:wrap;gap:8px;padding:12px;border:1px solid #dce3ec;border-radius:12px;background:#f8fafc;min-height:52px}
.service-chip{display:block;font-weight:normal;cursor:pointer}
.service-chip input{position:absolute;opacity:0;pointer-events:none}
.service-chip span{display:inline-block;padding:9px 12px;background:white;border:1px solid #cbd5e1;border-radius:999px;font-size:14px}
.service-chip input:checked+span{background:#111a2d;color:white;border-color:#111a2d}
.empty-services{color:#64748b;font-size:14px;align-self:center}
.other-service{margin-top:12px}
.logo-preview-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0 22px}
.logo-preview{background:#0a0a0a;border-radius:14px;padding:14px;display:grid;gap:10px}
.logo-preview span{color:white;font-weight:bold}
.logo-preview img{width:100%;height:110px;object-fit:contain}
@media(max-width:700px){.logo-preview-row{grid-template-columns:1fr}}

.status-stats{grid-template-columns:repeat(3,1fr)}
.summary-line{display:flex;gap:28px;margin:14px 2px 4px;color:#64748b;font-size:14px}
.summary-line b{color:#111827}
.status-select{min-width:185px;padding:8px 10px;border-radius:9px;font-size:13px}
.status-recibido{background:#f8fafc}
.status-en_diagnostico{background:#fefce8}
.status-esperando_aprobacion{background:#fff7ed}
.status-aprobado{background:#eff6ff}
.status-en_reparacion{background:#eef2ff}
.status-listo_para_entregar{background:#ecfdf5}
.status-entregado_reparado{background:#f0fdf4}
.status-entregado_sin_reparacion{background:#f1f5f9}
.status-cancelado{background:#fef2f2}
@media(max-width:1000px){.status-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.status-stats{grid-template-columns:1fr}.summary-line{flex-direction:column;gap:6px}}

.print-btn{padding:8px 10px;font-size:12px;white-space:nowrap}

.page-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:14px}
.page-toolbar h3{margin:0 0 5px}
.users-box{margin-top:0}
.user-status{display:inline-block;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:bold}
.is-active{background:#dcfce7;color:#166534}
.is-inactive{background:#fee2e2;color:#991b1b}
.small-btn{padding:7px 10px;font-size:12px}
.danger-btn{background:#991b1b}
.me-tag{font-size:10px;background:#e2e8f0;color:#334155;padding:3px 6px;border-radius:999px;margin-left:5px}
.muted{color:#94a3b8;font-size:12px}
@media(max-width:700px){.page-toolbar{align-items:stretch;flex-direction:column}}
.filter-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:10px;margin:14px 0 18px}.search-full{width:100%;margin-bottom:16px}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.page-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px}@media(max-width:800px){.filter-grid{grid-template-columns:1fr}.page-toolbar{flex-direction:column;align-items:stretch}}
.store-form{margin:16px 0;padding:16px;border:1px solid #ddd;border-radius:12px;background:#fafafa}.store-form.hidden{display:none}

#editOrderDialog,#historyDialog{width:min(760px,94vw)}.timeline{display:grid;gap:10px}.timeline-item{padding:12px 14px;border:1px solid #ddd;border-radius:10px}.timeline-item div{margin-top:4px;font-size:13px;opacity:.75}

/* V13 · costos internos de repuestos */
.admin-costs{margin-top:8px;padding:14px;border:1px solid #d9dee7;border-radius:12px;background:#f8fafc}
.admin-costs h3{margin:0 0 4px;font-size:15px}
.admin-costs>p{margin:0 0 12px;color:#667085;font-size:12px}
.internal-margin{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #e5e7eb}
.internal-margin span{font-weight:600}
.internal-margin strong{font-size:18px}
.internal-margin small{width:100%;color:#667085}

/* V14 · reportes y edición de tiendas */
.report-filters{display:grid;grid-template-columns:220px minmax(260px,420px);gap:12px;margin:14px 0 18px}.report-stats{grid-template-columns:repeat(4,1fr);margin:12px 0}.report-stats article{background:#f8fafc}.report-stats b{font-size:24px}.report-heading{margin-top:28px!important}.report-stats+ .report-heading{margin-top:26px!important}#reportDetails,#reportTechs,#reportSuppliers{overflow-x:auto}@media(max-width:1000px){.report-stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.report-filters,.report-stats{grid-template-columns:1fr}}
.report-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:700px){.report-actions{width:100%;justify-content:flex-start}.report-actions button{flex:1 1 auto}}


/* V16.3 · experiencia móvil */
.orders-cards{display:none}
@media(max-width:700px){
  aside{padding:16px 14px}.brand{padding-bottom:12px}nav{grid-template-columns:repeat(3,1fr);gap:6px}nav button{text-align:center;padding:9px 6px;font-size:13px}.logout{margin-top:10px;padding:9px}
  main{padding:14px}header{margin-bottom:14px}header h2{font-size:24px}.actions select{min-width:0;flex:1 1 190px}.actions button{flex:0 0 auto}
  .box{padding:14px;margin-top:14px}.orders-table{display:none}.orders-cards{display:grid;gap:12px}
  .order-card{border:1px solid #dde3eb;border-radius:14px;padding:14px;background:#fff;display:grid;gap:11px}
  .order-card-head{display:flex;justify-content:space-between;gap:12px;font-size:16px}.order-card-equipment{font-size:16px;font-weight:bold}
  .order-card-meta{display:grid;gap:5px;color:#475569;font-size:13px}.order-card-status{font-size:13px;gap:5px}.order-card-status .status-select{width:100%;min-width:0}
  .order-card .row-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.order-card .row-actions button{width:100%;min-height:40px}.order-card .row-actions button:last-child:nth-child(odd){grid-column:1/-1}
}

.closed-badge{display:inline-flex;align-items:center;padding:7px 10px;border-radius:8px;background:#f3f4f6;color:#b42318;font-weight:700;font-size:12px;border:1px solid #fecaca}.status-select:disabled{opacity:.72;cursor:not-allowed}

.warranty-tag{display:block;margin-top:4px;font-size:11px;font-weight:700;color:#92400e;background:#fef3c7;border:1px solid #f59e0b;border-radius:5px;padding:2px 5px;width:max-content;max-width:100%}
#orderClientSearch{margin-bottom:6px}.warranty-report-stats{grid-template-columns:repeat(3,1fr)!important}#warrantyReportDetails{overflow-x:auto}@media(max-width:700px){.warranty-report-stats{grid-template-columns:1fr!important}}

.whatsapp-general{white-space:nowrap}

.finance-report-stats{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}

.finance-note{margin:12px 0 22px;font-size:14px}

.link-button{border:0;background:transparent;color:#475569;padding:8px 0;text-decoration:underline;cursor:pointer;font:inherit;text-align:left}
.link-button:hover{color:#0f172a}
.toolbar-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.finance-distribution{margin:18px 0}.finance-bars{display:grid;gap:10px}.finance-bars>div{display:grid;grid-template-columns:minmax(180px,1fr) 80px 2fr;gap:10px;align-items:center}.finance-bars progress{width:100%;height:18px}.supplier-detail-row>td{background:#f8fafc;padding:14px}.payment-box{border-top:1px solid #e2e8f0;padding-top:12px;margin-top:8px}

/* V16.26.1 - tarjetas interactivas del reporte técnico */
.ops-filter-card{cursor:pointer;transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease}.ops-filter-card:hover{transform:translateY(-1px);border-color:#94a3b8}.ops-filter-card:focus{outline:3px solid rgba(37,99,235,.18);outline-offset:2px}.ops-filter-card.active{border-color:#2563eb!important;box-shadow:0 0 0 2px rgba(37,99,235,.10);background:#eff6ff!important}

/* =========================================================
   V17.0 · REDISEÑO VISUAL
   Capa visual únicamente: conserva IDs, estructura y lógica.
   ========================================================= */
:root{
  --v17-bg:#f6f8fc;--v17-surface:#fff;--v17-text:#172033;--v17-muted:#748198;
  --v17-line:#e7ebf2;--v17-primary:#2563eb;--v17-primary-soft:#eef4ff;
  --v17-nav:#0f172a;--v17-nav-soft:#17233a;--v17-radius:18px;
  --v17-shadow:0 8px 28px rgba(15,23,42,.055);
}
body{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:var(--v17-bg);color:var(--v17-text);letter-spacing:-.01em}
.app{grid-template-columns:252px 1fr;background:var(--v17-bg)}
aside{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,#0d1628 0%,#111c31 100%);padding:24px 14px 18px;border-right:1px solid rgba(255,255,255,.04);box-shadow:8px 0 30px rgba(15,23,42,.05)}
.brand{padding:4px 12px 26px;border-bottom:1px solid rgba(255,255,255,.07);margin-bottom:16px}.brand strong{font-size:19px;letter-spacing:-.02em}.brand small{color:#9eabc0;margin-top:7px;font-size:12px}
nav{gap:5px}nav button{position:relative;border-radius:11px;padding:11px 12px 11px 43px;color:#c8d1df;font-weight:650;transition:.16s ease;background:transparent}nav button:hover{background:rgba(255,255,255,.055);color:#fff;transform:translateX(2px)}nav button.active{background:linear-gradient(135deg,#223252,#1c2a46);color:#fff;box-shadow:inset 3px 0 0 #5b8cff,0 6px 18px rgba(0,0,0,.08)}
nav button::before{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;text-align:center;font-size:15px;opacity:.9}
nav button[data-page="panel"]::before{content:"◫"}nav button[data-page="orders"]::before{content:"▤"}nav button[data-page="clients"]::before{content:"♙"}nav button[data-page="reports"]::before,nav button[data-page="opsreports"]::before{content:"▥"}nav button[data-page="providers"]::before{content:"◇"}nav button[data-page="stores"]::before{content:"⌂"}nav button[data-page="users"]::before{content:"♧"}nav button[data-page="serviceconfig"]::before{content:"⚙"}
.logout{margin:18px 6px 0;background:rgba(255,255,255,.08);color:#e7edf6;border:1px solid rgba(255,255,255,.08);border-radius:12px}.logout:hover{background:rgba(255,255,255,.13)}
main{padding:26px 32px 40px;min-width:0}header{align-items:center;margin-bottom:26px;padding-bottom:18px;border-bottom:1px solid var(--v17-line)}header h2{font-size:30px;letter-spacing:-.035em;font-weight:760}header p{margin:5px 0 0;color:var(--v17-muted);font-size:14px}.actions{align-items:center}.actions select{min-width:250px}
input,select,textarea{border:1px solid #dce2ec;border-radius:12px;background:#fff;color:var(--v17-text);padding:11px 13px;outline:none;transition:border-color .15s,box-shadow .15s,background .15s}input:hover,select:hover,textarea:hover{border-color:#c9d2e1}input:focus,select:focus,textarea:focus{border-color:#7aa2f7;box-shadow:0 0 0 4px rgba(37,99,235,.09)}
button{border-radius:11px;background:#17233a;padding:11px 16px;box-shadow:none;transition:transform .12s ease,box-shadow .15s ease,background .15s ease}button:hover{background:#213250;box-shadow:0 5px 15px rgba(15,23,42,.12)}button:active{transform:translateY(1px)}#newOrder{background:var(--v17-primary);box-shadow:0 6px 16px rgba(37,99,235,.18)}#newOrder:hover{background:#1d4ed8}.secondary{background:#f4f6f9;color:#344054;border:1px solid #e3e8ef}.secondary:hover{background:#eef2f7;box-shadow:none}
.box,.stats article{border:1px solid var(--v17-line);border-radius:var(--v17-radius);background:var(--v17-surface);box-shadow:var(--v17-shadow)}.box{padding:22px 24px;margin-top:18px}.box h3,.page-toolbar h3{letter-spacing:-.02em}.hint{color:var(--v17-muted)}
.welcome-box{position:relative;overflow:hidden;padding:25px 26px;background:linear-gradient(135deg,#fff 0%,#f7faff 100%)}.welcome-box::after{content:"";position:absolute;width:150px;height:150px;border-radius:50%;right:-55px;top:-70px;background:rgba(37,99,235,.07)}.welcome-box h3{font-size:22px;margin-bottom:8px}
.stats{gap:14px}.stats article{position:relative;padding:18px 19px;gap:9px;overflow:hidden}.stats article::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#d7e3ff}.stats span{color:#77849a;font-size:13px;font-weight:600}.stats b{font-size:28px;letter-spacing:-.04em;color:#172033}.status-stats article:nth-child(2)::before{background:#a78bfa}.status-stats article:nth-child(3)::before{background:#34d399}.status-stats article:nth-child(4)::before{background:#60a5fa}.status-stats article:nth-child(5)::before{background:#94a3b8}.status-stats article:nth-child(6)::before{background:#f59e0b}
.summary-line{padding:0 5px;color:var(--v17-muted)}
table{border-collapse:separate;border-spacing:0}th{background:#f8fafc;color:#7a879b;font-size:11px;letter-spacing:.045em;border-bottom:1px solid var(--v17-line);padding:12px 13px}td{padding:13px;border-bottom:1px solid #edf0f5;color:#344054}tbody tr{transition:background .12s}tbody tr:hover{background:#fafcff}
.user-status,.closed-badge,.warranty-tag{border-radius:999px}.is-active{background:#ecfdf3;color:#027a48}.is-inactive{background:#fff1f3;color:#c01048}
.status-select{border-radius:999px;font-weight:650;padding:7px 11px}
.page-toolbar{margin-bottom:18px}.filter-grid,.report-filters{padding:14px;border-radius:15px;background:#f8fafc;border:1px solid #edf0f5}
.report-stats article{background:#fff}.ops-filter-card:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(15,23,42,.08)}.ops-filter-card.active{background:#f5f8ff!important;border-color:#8bb0ff!important;box-shadow:0 0 0 3px rgba(37,99,235,.07)}
dialog{border-radius:22px;border:1px solid rgba(255,255,255,.7);box-shadow:0 30px 90px rgba(15,23,42,.25)}dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}dialog form{padding:28px}.dialog-head{padding-bottom:16px;border-bottom:1px solid var(--v17-line);margin-bottom:18px}.dialog-head h2{font-size:24px;letter-spacing:-.03em}
.login-wrap{background:radial-gradient(circle at 20% 10%,#e8f0ff 0,transparent 35%),linear-gradient(145deg,#f8faff,#eef3f9)}.login-card{border:1px solid rgba(255,255,255,.9);border-radius:26px;box-shadow:0 24px 70px rgba(15,23,42,.12);padding:46px}.login-card h1{font-size:36px;letter-spacing:-.045em}.login-card button:not(.link-button){background:var(--v17-primary)}
/* Diseño de orden: apariencia de módulo de configuración */
#serviceconfigPage .box{padding:26px}#serviceconfigPage h3{font-size:20px;margin-bottom:5px}#serviceconfigPage label{color:#344054}#serviceconfigPage textarea{min-height:92px;background:#fbfcfe}
@media(max-width:1000px){.app{grid-template-columns:218px 1fr}main{padding:22px}.stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){.app{display:block}aside{position:relative;height:auto;padding:14px}.brand{padding:4px 6px 13px;margin-bottom:10px}nav{display:flex;overflow-x:auto;gap:6px;padding-bottom:4px}nav button{flex:0 0 auto;padding:10px 12px 10px 34px;white-space:nowrap}nav button::before{left:11px}.logout{width:100%;margin:10px 0 0}main{padding:16px}header{align-items:stretch}.actions{display:grid;grid-template-columns:1fr auto;width:100%}.actions select{min-width:0}.actions #company:not(.hidden){grid-column:1/-1}.box{padding:17px}.stats{grid-template-columns:1fr 1fr}}
@media(max-width:560px){header h2{font-size:26px}.stats{grid-template-columns:1fr}.actions{grid-template-columns:1fr}.actions button,.actions select{width:100%}.box{border-radius:15px}.login-card{padding:32px 24px}.login-card h1{font-size:30px}}

/* =========================================================
   V17.1 · DASHBOARD PROFESIONAL
   ========================================================= */
.dashboard-grid{display:grid;grid-template-columns:minmax(340px,.82fr) minmax(520px,1.6fr);gap:18px;align-items:start}.dashboard-card{margin-top:18px!important}.section-title{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.section-title h3{margin:0 0 4px;font-size:18px}.section-title p{margin:0}.panel-visual{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:center;min-height:220px}.status-donut{width:164px;height:164px;border-radius:50%;display:grid;place-items:center;position:relative;box-shadow:inset 0 0 0 1px rgba(15,23,42,.04)}.status-donut::after{content:"";width:106px;height:106px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #eef2f7;position:absolute}.donut-center{position:relative;z-index:1;text-align:center}.donut-center b{display:block;font-size:30px;letter-spacing:-.05em}.donut-center span{font-size:11px;color:#7a879b;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.status-legend{display:grid;gap:12px}.legend-row{display:grid;grid-template-columns:10px 1fr auto;gap:9px;align-items:center;font-size:13px}.legend-dot{width:9px;height:9px;border-radius:50%}.legend-row span{color:#667085}.legend-row b{font-size:14px}.finance-distribution{border:1px solid var(--v17-line);background:linear-gradient(145deg,#fff,#fbfcff);border-radius:18px;padding:22px;margin:20px 0}.finance-visual{display:grid;grid-template-columns:220px 1fr;gap:30px;align-items:center}.finance-donut{width:190px;height:190px;border-radius:50%;position:relative;display:grid;place-items:center}.finance-donut::after{content:"";position:absolute;width:122px;height:122px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #eef2f7}.finance-donut-center{position:relative;z-index:1;text-align:center}.finance-donut-center small{display:block;color:#7a879b;font-weight:650}.finance-donut-center b{display:block;font-size:23px;margin-top:3px}.finance-legend{display:grid;gap:13px}.finance-legend-row{display:grid;grid-template-columns:12px minmax(160px,1fr) auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #f0f2f6}.finance-legend-row:last-child{border-bottom:0}.finance-legend-row i{width:10px;height:10px;border-radius:50%}.finance-legend-row span{color:#667085}.finance-legend-row strong{font-size:14px}.finance-report-stats article{min-height:112px}.finance-report-stats article b{font-size:27px}.report-heading{font-size:18px;letter-spacing:-.02em}.report-actions button{min-height:43px}.report-filters{grid-template-columns:repeat(3,minmax(180px,1fr));gap:14px;padding:18px}.report-filters label{font-size:12px;color:#667085;font-weight:700}.report-filters input,.report-filters select{margin-top:7px}.report-quick{margin-top:10px}.report-quick button{border-radius:999px;padding:9px 16px}.finance-note{background:#f8fafc;border:1px solid #edf0f5;border-radius:12px;padding:12px 14px}.finance-report-stats article:nth-child(1)::before{background:#8b5cf6}.finance-report-stats article:nth-child(2)::before{background:#2563eb}.finance-report-stats article:nth-child(3)::before{background:#0ea5e9}.finance-report-stats article:nth-child(4)::before{background:#f59e0b}.finance-report-stats article:nth-child(5)::before{background:#ef4444}.finance-report-stats article:nth-child(6)::before{background:#64748b}.finance-report-stats article:nth-child(7)::before{background:#10b981}
@media(max-width:1150px){.dashboard-grid{grid-template-columns:1fr}.finance-visual{grid-template-columns:190px 1fr}}@media(max-width:700px){.panel-visual,.finance-visual{grid-template-columns:1fr}.status-donut,.finance-donut{margin:auto}.report-filters{grid-template-columns:1fr}}

/* =========================================================
   V17.2 · SISTEMA VISUAL COMPLETO
   ========================================================= */
:root{--ui-navy:#0b162a;--ui-navy2:#12223c;--ui-blue:#2563eb;--ui-bg:#f4f7fb;--ui-card:#fff;--ui-line:#e4eaf2;--ui-text:#122033;--ui-muted:#66758d;--ui-soft:#f8fafc}
body{font-size:15px;background:linear-gradient(180deg,#f7f9fc 0,#f3f6fa 100%)}
.app{grid-template-columns:252px 1fr}aside{background:linear-gradient(180deg,#0b162a 0%,#101d33 100%);padding:28px 18px}.brand{padding:4px 8px 24px;margin-bottom:12px;border-bottom:1px solid rgba(255,255,255,.09)}.brand strong{display:block;font-size:22px;line-height:1.15;letter-spacing:-.03em}.brand small{font-size:13px;margin-top:8px;color:#9fb0c8}.logout{font-size:14px;min-height:46px}
nav button{font-size:15px;min-height:46px;border-radius:12px;padding-left:45px!important}nav button.active{background:linear-gradient(135deg,#21385f,#1c3154);box-shadow:inset 3px 0 #4f8cff,0 8px 22px rgba(0,0,0,.13)}
main{padding:30px 36px 46px}header{min-height:76px;margin-bottom:26px}header h2{font-size:34px;line-height:1.05;font-weight:800}header p{font-size:15px}.actions select,.actions button{min-height:46px}
.page>.box,.page>.page-toolbar+.box,.users-box{border-radius:22px;padding:26px 28px;box-shadow:0 10px 34px rgba(15,23,42,.055)}.page-toolbar{margin-bottom:18px}.page-toolbar h3,.box>h3{font-size:22px;margin-bottom:6px}.page-toolbar .hint,.box>.hint{font-size:14px;line-height:1.5}.page-toolbar button{min-height:44px}
/* tablas de módulos */
#ordersPage .box,#providersPage .box,#storesPage .box{padding:26px 28px}table{font-size:14px}th{font-size:11px;padding:14px 13px;background:#f5f8fc;color:#6f7e95}td{padding:16px 13px;vertical-align:middle}tbody tr:hover{background:#f7faff}.row-actions{gap:7px}.row-actions button,.small-btn,.print-btn{min-height:34px;padding:8px 11px;font-size:12px;border-radius:9px}.status-select{min-height:38px;font-size:12px}
#ordersPage #orders table td:first-child b,#ordersPage #orders table td:first-child{font-weight:800;color:#10213a}.filter-grid{padding:16px;border-radius:17px;gap:12px}.filter-grid input,.filter-grid select{min-height:46px}
/* clientes / proveedores / tiendas / usuarios con encabezado visual */
#clientsPage .page-toolbar,#usersPage>.page-toolbar{background:#fff;border:1px solid var(--ui-line);border-radius:22px;padding:22px 26px;box-shadow:0 10px 34px rgba(15,23,42,.05)}
#clientsPage .users-box,#usersPage .users-box{margin-top:16px}.search-full{min-height:48px;background:#f8fafc}
#providersPage .box::before,#storesPage .box::before{content:"";display:block;width:44px;height:4px;border-radius:99px;background:#2563eb;margin-bottom:18px}
#providersPage tbody td:first-child,#storesPage tbody td:first-child,#clientsPage tbody td:first-child,#usersPage tbody td:first-child{font-weight:700;color:#13243d}
/* diseño de orden como módulo premium */
#serviceconfigPage .box{padding:30px;border-radius:24px;background:linear-gradient(145deg,#fff,#fbfdff)}#serviceconfigPage .page-toolbar{padding-bottom:20px;border-bottom:1px solid #e9edf4}#serviceconfigPage h3{font-size:24px}#serviceconfigPage form{margin-top:22px;padding:22px;border:1px solid #e8edf4;border-radius:18px;background:#f8fafc}#serviceconfigPage label{font-size:14px}#serviceconfigPage input[type=number],#serviceconfigPage textarea{background:#fff;min-height:48px}#serviceconfigPage .wide:first-child{display:flex;grid-template-columns:auto 1fr;align-items:center;gap:12px;background:#fff;padding:16px;border:1px solid #e4eaf2;border-radius:14px;font-size:15px}#serviceconfigPage input[type=checkbox]{width:20px;height:20px}
/* KPIs más grandes y legibles */
.stats article{min-height:124px;padding:20px 21px}.stats span{font-size:14px;line-height:1.3}.stats b{font-size:36px;line-height:1.05}.finance-report-stats article{min-height:132px}.finance-report-stats article b{font-size:34px}.finance-report-stats article span{font-size:13px}.report-heading{font-size:21px!important;margin-top:32px!important}.finance-donut-center b{font-size:28px}.finance-legend-row strong{font-size:15px}
/* panel */
#welcomeMessage{font-size:26px}.welcome-box{padding:28px 30px}.dashboard-card{padding:26px}.section-title h3{font-size:21px}.donut-center b{font-size:36px}.legend-row b{font-size:16px}
/* login V17 */
.login-wrap{position:relative;overflow:hidden;background:linear-gradient(135deg,#071326 0%,#12284a 48%,#eef4ff 48%,#f8fbff 100%)}.login-wrap::before{content:"Gestión de Servicio Técnico";position:absolute;left:7vw;top:15vh;color:#fff;font-size:clamp(34px,4vw,64px);font-weight:800;letter-spacing:-.05em;max-width:520px;line-height:1.02}.login-wrap::after{content:"Órdenes, clientes, técnicos, garantías y reportes en un solo lugar.";position:absolute;left:7vw;top:calc(15vh + 150px);color:#aebed6;font-size:18px;max-width:470px;line-height:1.55}.login-card{position:relative;margin-left:46vw;width:min(470px,44vw);padding:46px;border-radius:28px;box-shadow:0 28px 90px rgba(5,18,40,.24);border:1px solid rgba(255,255,255,.9)}.login-card h1{font-size:42px;line-height:1;letter-spacing:-.05em;color:#0e1c31;margin-bottom:14px}.login-card p{font-size:16px;margin-bottom:26px}.login-card label{font-size:14px;color:#344054}.login-card input{min-height:50px;font-size:16px}.login-card button:not(.link-button){min-height:50px;font-size:16px;background:#2563eb;box-shadow:0 10px 24px rgba(37,99,235,.22)}
@media(max-width:1000px){.app{grid-template-columns:225px 1fr}main{padding:24px}.brand strong{font-size:20px}.finance-report-stats article b{font-size:30px}}
@media(max-width:800px){.login-wrap{background:linear-gradient(180deg,#0b1b33 0 28%,#f4f7fb 28%)}.login-wrap::before{position:absolute;left:24px;top:6vh;font-size:34px}.login-wrap::after{display:none}.login-card{margin:22vh auto 30px;width:min(92%,500px);padding:34px 26px}.login-card h1{font-size:34px}.brand strong{font-size:20px}header h2{font-size:30px}.page>.box,.page>.page-toolbar+.box,.users-box{padding:18px}.stats b{font-size:32px}}


/* =========================================================
   V17.3 · PULIDO 100% ZOOM / RESPONSIVE
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}.app,main,.page,.box,.stats,.dashboard-grid,.finance-visual{min-width:0}main{width:100%;min-width:0}
/* jerarquía: títulos y KPI grandes; controles compactos */
.brand strong{font-size:21px}header h2{font-size:32px}.page-toolbar h3,.box>h3{font-size:20px}
.actions select,.actions button{min-height:44px}.page-toolbar button{min-height:42px}.report-actions button{min-height:42px;padding:10px 14px}
/* panel: mantiene números protagonistas sin desbordar a 100% */
.status-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.stats article{min-width:0;min-height:112px;padding:18px 20px}.stats b{font-size:34px}.stats span{font-size:13px}
#welcomeMessage{font-size:25px}.welcome-box{padding:24px 28px}
/* reportes: 7 KPIs en una fila en escritorio ancho */
.finance-report-stats{grid-template-columns:repeat(7,minmax(0,1fr));gap:12px}.finance-report-stats article{min-width:0;min-height:118px;padding:17px 16px}.finance-report-stats article b{font-size:clamp(24px,1.75vw,32px);white-space:nowrap;letter-spacing:-.045em}.finance-report-stats article span{font-size:12px}.report-filters{padding:15px}.report-quick button{padding:8px 14px}
/* estados consistentes */
#providersPage .user-status{font-size:12px;padding:6px 11px}.is-active::before,.is-inactive::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:1px;background:currentColor}
/* tablas más cómodas sin inflar la pantalla */
th{padding:12px 12px}td{padding:14px 12px}.row-actions button,.small-btn,.print-btn{min-height:32px;padding:7px 10px}
@media(max-width:1500px){.finance-report-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.finance-report-stats article b{font-size:30px}}
@media(max-width:1180px){.app{grid-template-columns:220px minmax(0,1fr)}aside{padding-left:14px;padding-right:14px}main{padding:24px 22px}.status-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-report-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.finance-report-stats,.status-stats{grid-template-columns:1fr}.finance-report-stats article b{font-size:32px}}

/* =========================================================
   V17.4 · REPORTES CÓMODOS / DETALLE BAJO DEMANDA
   ========================================================= */
/* escala operativa compacta, jerarquía intacta */
#reportsPage .box{padding:22px 24px}
#reportsPage .page-toolbar{margin-bottom:14px}
#reportsPage .report-filters{padding:13px 14px}
#reportsPage .report-quick{margin:8px 0 12px}
#reportsPage .finance-report-stats{margin-top:10px}
#reportsPage .finance-distribution{margin:14px 0 10px}
#reportsPage .finance-note{margin:10px 0 14px}
.report-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}
.report-summary-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-height:128px;padding:17px 18px;border:1px solid #e4eaf2;border-radius:16px;background:#fff;color:#122033;box-shadow:0 7px 22px rgba(15,23,42,.045);overflow:hidden}
.report-summary-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#2563eb}
.report-summary-card:hover{background:#fbfdff;border-color:#cfdcf2;transform:translateY(-1px);box-shadow:0 10px 26px rgba(15,23,42,.075)}
.report-summary-card span{font-size:12px;font-weight:750;color:#748198;text-transform:uppercase;letter-spacing:.035em}
.report-summary-card b{font-size:24px;line-height:1.1;margin-top:11px;letter-spacing:-.035em}
.report-summary-card small{font-size:13px;color:#748198;margin-top:5px}
.report-summary-card em{font-style:normal;font-size:12px;font-weight:750;color:#2563eb;margin-top:auto;padding-top:12px}
.report-summary-card:nth-child(2)::before{background:#8b5cf6}.report-summary-card:nth-child(3)::before{background:#10b981}.report-summary-card:nth-child(4)::before{background:#ef4444}.report-summary-card:nth-child(5)::before{background:#0ea5e9}
.report-summary-card-wide{grid-column:span 4;min-height:105px}
.report-detail-vault{display:none!important}
.report-detail-dialog{width:min(1320px,94vw);max-width:1320px;max-height:88vh;padding:0;border:0;border-radius:20px;background:#fff;overflow:hidden}
.report-detail-dialog::backdrop{background:rgba(15,23,42,.58);backdrop-filter:blur(3px)}
.report-detail-shell{display:flex;flex-direction:column;max-height:88vh}
.report-detail-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid #e8edf4;background:#fff}
.report-detail-kicker{font-size:10px;font-weight:800;letter-spacing:.12em;color:#2563eb}.report-detail-head h2{margin:3px 0 0;font-size:25px;letter-spacing:-.035em}.report-detail-body{padding:20px 24px 26px;overflow:auto;background:#fbfcfe}
.report-detail-body>div{display:block!important}.report-detail-body table{background:#fff;border:1px solid #e5eaf1;border-radius:12px;overflow:hidden}.report-detail-body th{position:sticky;top:0;z-index:1;background:#f3f6fa}.report-detail-body td,.report-detail-body th{white-space:nowrap}.report-detail-body .warranty-report-stats{margin-bottom:18px}
@media(max-width:1200px){.report-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-summary-card-wide{grid-column:span 2}}
@media(max-width:700px){.report-summary-grid{grid-template-columns:1fr}.report-summary-card-wide{grid-column:auto}.report-detail-dialog{width:96vw}.report-detail-head,.report-detail-body{padding:16px}}

/* V17.5 · Panel cómodo a 100%: actividad reciente resumida */
#recent{min-width:0;overflow:hidden}
.recent-compact{width:100%;min-width:0}
.recent-compact-head,.recent-order-row{display:grid;grid-template-columns:110px minmax(120px,1fr) minmax(150px,1.25fr) minmax(150px,.95fr);gap:14px;align-items:center}
.recent-compact-head{padding:10px 14px;background:#f7f9fc;border:1px solid #edf1f6;border-radius:12px 12px 0 0;color:#718096;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.recent-order-row{width:100%;padding:13px 14px;border:0;border-bottom:1px solid #edf1f6;background:#fff;text-align:left;color:#172033;font:inherit;cursor:pointer;transition:background .15s ease,transform .15s ease}
.recent-order-row:hover{background:#f8fbff}
.recent-code{font-weight:800;color:#10213d}.recent-client,.recent-equipment{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-state{justify-self:start;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-pill{display:inline-flex;align-items:center;min-height:32px;padding:6px 11px;border:1px solid #dce5ef;border-radius:999px;background:#f8fafc;font-size:12px;font-weight:750}
.status-pill.status-entregado_reparado,.status-pill.status-listo_para_entregar,.status-pill.status-listo_para_entregar_garantia{background:#ecfdf5;border-color:#ccefe0;color:#087a55}
.status-pill.status-esperando_aprobacion{background:#fff8eb;border-color:#f5dfb6;color:#925d08}
.status-pill.status-en_reparacion,.status-pill.status-en_diagnostico{background:#f3f0ff;border-color:#ddd5ff;color:#6941c6}
.status-pill.status-recibido{background:#eff6ff;border-color:#d5e6ff;color:#175cd3}
.recent-all{display:block;margin:14px 0 0 auto;border:0;background:transparent;color:#2563eb;font-weight:800;cursor:pointer;padding:6px 2px}
.recent-empty{padding:24px;color:#718096;text-align:center}
@media(max-width:1250px){.recent-compact-head,.recent-order-row{grid-template-columns:100px minmax(110px,1fr) minmax(130px,1fr) minmax(135px,.9fr);gap:10px}.recent-state{font-size:11px;padding:6px 9px}}
@media(max-width:820px){.recent-compact-head{display:none}.recent-order-row{grid-template-columns:90px 1fr;gap:7px 12px;padding:14px}.recent-equipment{grid-column:2}.recent-state{grid-column:2}.recent-client,.recent-equipment{white-space:normal}.dashboard-grid{grid-template-columns:1fr}}

/* =========================================================
   V17.6 · PANEL COMPLETO A 100% ZOOM
   Objetivo: ver el dashboard completo sin bajar el zoom del navegador.
   ========================================================= */
@media (min-width:1200px) and (min-height:700px){
  #panelPage{padding-bottom:0}
  #panelPage .welcome-box{padding:16px 24px;min-height:92px;border-radius:18px}
  #panelPage #welcomeMessage{font-size:24px;margin:0 0 3px}
  #panelPage .welcome-box .hint{font-size:14px;margin:0}
  #panelPage .welcome-box::after{width:110px;height:110px;right:-36px;top:-52px}

  #panelPage .status-stats{gap:10px;margin-top:10px}
  #panelPage .status-stats article{min-height:84px;padding:12px 16px;border-radius:16px}
  #panelPage .status-stats span{font-size:12px}
  #panelPage .status-stats b{font-size:27px;margin-top:2px}
  #panelPage .summary-line{margin:8px 8px 0;font-size:13px}

  #panelPage .dashboard-grid{grid-template-columns:minmax(310px,.72fr) minmax(0,1.55fr);gap:12px;margin-top:10px}
  #panelPage .dashboard-card{margin-top:0!important;padding:17px 20px;border-radius:18px;min-height:0}
  #panelPage .section-title{margin-bottom:10px}
  #panelPage .section-title h3{font-size:18px;margin-bottom:2px}
  #panelPage .section-title .hint{font-size:12px}

  #panelPage .panel-visual{grid-template-columns:132px 1fr;gap:15px;min-height:0}
  #panelPage .status-donut{width:126px;height:126px}
  #panelPage .status-donut::after{width:82px;height:82px}
  #panelPage .donut-center b{font-size:27px}
  #panelPage .donut-center span{font-size:9px}
  #panelPage .status-legend{gap:7px}
  #panelPage .legend-row{font-size:11px;gap:7px}
  #panelPage .legend-row b{font-size:12px}

  #panelPage .recent-compact-head{padding:7px 10px;font-size:9px}
  #panelPage .recent-order-row{padding:8px 10px;font-size:12px;min-height:39px}
  #panelPage .status-pill{min-height:26px;padding:4px 8px;font-size:10px}
  #panelPage .recent-all{margin-top:7px;font-size:12px;padding:3px 1px}
}

/* En pantallas de portátil, todavía más compacto para mantener todo visible. */
@media (min-width:1200px) and (max-height:850px){
  main{padding-top:16px;padding-bottom:16px}
  header{min-height:58px;margin-bottom:12px}
  header h2{font-size:29px}
  header p{font-size:13px;margin-top:2px}
  .actions select,.actions button{min-height:40px}
  #panelPage .welcome-box{min-height:78px;padding:12px 22px}
  #panelPage #welcomeMessage{font-size:22px}
  #panelPage .status-stats article{min-height:72px;padding:9px 15px}
  #panelPage .status-stats b{font-size:24px}
  #panelPage .dashboard-card{padding:14px 18px}
  #panelPage .status-donut{width:112px;height:112px}
  #panelPage .status-donut::after{width:72px;height:72px}
  #panelPage .panel-visual{grid-template-columns:118px 1fr}
  #panelPage .recent-order-row{padding-top:6px;padding-bottom:6px;min-height:34px}
}


/* V17.7 · Panel un poco más compacto a 100% sin perder legibilidad */
@media (min-width:1200px){
 #panelPage .welcome-box{min-height:72px!important;padding:11px 20px!important}
 #panelPage #welcomeMessage{font-size:21px!important}
 #panelPage .status-stats{gap:9px!important;margin-top:8px!important}
 #panelPage .status-stats article{min-height:66px!important;padding:8px 14px!important}
 #panelPage .status-stats span{font-size:11px!important}
 #panelPage .status-stats b{font-size:23px!important}
 #panelPage .summary-line{margin-top:6px!important;font-size:12px!important}
 #panelPage .dashboard-grid{margin-top:8px!important;gap:10px!important}
 #panelPage .dashboard-card{padding:12px 16px!important}
 #panelPage .section-title{margin-bottom:7px!important}
 #panelPage .section-title h3{font-size:17px!important}
 #panelPage .status-donut{width:102px!important;height:102px!important}
 #panelPage .status-donut::after{width:66px!important;height:66px!important}
 #panelPage .panel-visual{grid-template-columns:108px 1fr!important;gap:12px!important}
 #panelPage .donut-center b{font-size:23px!important}
 #panelPage .recent-order-row{min-height:31px!important;padding:5px 9px!important;font-size:11px!important}
 #panelPage .recent-compact-head{padding:6px 9px!important}
 #panelPage .recent-all{margin-top:5px!important}
}
#closeReportDetail{min-width:105px;font-weight:800;cursor:pointer}

/* V17.9 · Seguridad de sesión */
.inactivity-modal{max-width:520px;width:min(520px,calc(100vw - 32px));padding:24px;border:0;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.25)}
.inactivity-modal::backdrop{background:rgba(15,23,42,.45);backdrop-filter:blur(2px)}
.inactivity-modal .modal-head h3{margin:0 0 8px;font-size:1.25rem}
.inactivity-modal .modal-head p{margin:0;line-height:1.5}
.inactivity-modal .modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;flex-wrap:wrap}

/* =========================================================
   V17.10 · PANEL COMPLETO + SIDEBAR FIJO
   Escritorio: navegación ocupa siempre todo el alto visible.
   Panel: densidad cómoda para 100% de zoom sin achicar de más.
   ========================================================= */
@media (min-width:801px){
  .app{display:block;min-height:100vh}
  aside{
    position:fixed!important;
    inset:0 auto 0 0;
    width:252px;
    height:100dvh!important;
    min-height:100vh;
    box-sizing:border-box;
    z-index:50;
    overflow:hidden;
  }
  aside nav{min-height:0;overflow-y:auto;overflow-x:hidden}
  aside .logout{margin-top:auto;flex:0 0 auto}
  main{margin-left:252px;width:calc(100% - 252px);box-sizing:border-box}
}

@media (min-width:1200px){
  #panelPage .welcome-box{min-height:62px!important;padding:9px 18px!important;margin-top:0!important}
  #panelPage #welcomeMessage{font-size:20px!important;margin-bottom:1px!important}
  #panelPage .welcome-box .hint{font-size:12px!important}
  #panelPage .welcome-box::after{width:90px!important;height:90px!important}

  #panelPage .status-stats{gap:8px!important;margin-top:7px!important}
  #panelPage .status-stats article{min-height:58px!important;padding:7px 13px!important;gap:3px!important}
  #panelPage .status-stats span{font-size:11px!important}
  #panelPage .status-stats b{font-size:22px!important;line-height:1!important}
  #panelPage .summary-line{margin:5px 7px 0!important;font-size:12px!important}

  #panelPage .dashboard-grid{margin-top:7px!important;gap:9px!important;grid-template-columns:minmax(300px,.68fr) minmax(0,1.6fr)!important}
  #panelPage .dashboard-card{padding:10px 14px!important;border-radius:16px!important}
  #panelPage .section-title{margin-bottom:5px!important}
  #panelPage .section-title h3{font-size:16px!important;margin-bottom:1px!important}
  #panelPage .section-title .hint{font-size:11px!important}
  #panelPage .panel-visual{grid-template-columns:96px 1fr!important;gap:10px!important}
  #panelPage .status-donut{width:92px!important;height:92px!important}
  #panelPage .status-donut::after{width:60px!important;height:60px!important}
  #panelPage .donut-center b{font-size:21px!important}
  #panelPage .donut-center span{font-size:8px!important}
  #panelPage .status-legend{gap:5px!important}
  #panelPage .legend-row{font-size:10px!important;gap:6px!important}
  #panelPage .legend-row b{font-size:11px!important}
  #panelPage .recent-compact-head{padding:5px 8px!important;font-size:8px!important}
  #panelPage .recent-order-row{min-height:28px!important;padding:4px 8px!important;font-size:10.5px!important}
  #panelPage .status-pill{min-height:23px!important;padding:3px 7px!important;font-size:9.5px!important}
  #panelPage .recent-all{margin-top:3px!important;padding:2px 1px!important;font-size:11px!important}
}

@media (min-width:1200px) and (max-height:900px){
  main{padding-top:12px!important;padding-bottom:12px!important}
  header{min-height:52px!important;margin-bottom:9px!important;padding-bottom:9px!important}
  header h2{font-size:28px!important}
  header p{font-size:12px!important;margin-top:1px!important}
  .actions select,.actions button{min-height:38px!important}
}

@media (max-width:800px){
  main{margin-left:0!important;width:100%!important}
}


/* =========================================================
   V17.11 · AJUSTE ADAPTATIVO PARA NOTEBOOK A 100%
   Reduce solo espacios/alturas; conserva tipografía legible.
   El menú lateral no usa scroll interno en escritorio normal.
   ========================================================= */
@media (min-width:1200px) and (max-height:900px){
  aside{padding:14px 14px 12px!important;}
  aside .brand{padding:2px 8px 12px!important;margin-bottom:7px!important;}
  aside .brand strong{font-size:20px!important;}
  aside .brand small{font-size:12px!important;margin-top:5px!important;}
  aside nav{overflow:hidden!important;gap:3px!important;display:grid!important;}
  aside nav button{min-height:42px!important;padding-top:8px!important;padding-bottom:8px!important;font-size:14px!important;}
  aside .logout{min-height:42px!important;margin:8px 6px 0!important;padding:8px 10px!important;}

  main{padding:8px 26px 8px!important;}
  header{min-height:46px!important;margin-bottom:6px!important;padding-bottom:6px!important;}
  header h2{font-size:27px!important;line-height:1!important;}
  header p{font-size:12px!important;margin-top:2px!important;}
  .actions select,.actions button{min-height:36px!important;padding-top:7px!important;padding-bottom:7px!important;}

  #panelPage .welcome-box{min-height:52px!important;padding:7px 16px!important;border-radius:15px!important;}
  #panelPage #welcomeMessage{font-size:19px!important;line-height:1.08!important;}
  #panelPage .welcome-box .hint{font-size:11px!important;line-height:1.2!important;}
  #panelPage .welcome-box::after{width:72px!important;height:72px!important;top:-34px!important;}

  #panelPage .status-stats{gap:6px!important;margin-top:5px!important;}
  #panelPage .status-stats article{min-height:50px!important;padding:6px 12px!important;border-radius:14px!important;gap:1px!important;}
  #panelPage .status-stats span{font-size:10.5px!important;line-height:1.15!important;}
  #panelPage .status-stats b{font-size:20px!important;line-height:1!important;}
  #panelPage .summary-line{margin:4px 7px 0!important;font-size:11px!important;line-height:1.1!important;}

  #panelPage .dashboard-grid{margin-top:5px!important;gap:8px!important;grid-template-columns:minmax(285px,.66fr) minmax(0,1.65fr)!important;}
  #panelPage .dashboard-card{padding:9px 13px!important;border-radius:15px!important;}
  #panelPage .section-title{margin-bottom:3px!important;}
  #panelPage .section-title h3{font-size:15.5px!important;line-height:1.1!important;}
  #panelPage .section-title .hint{font-size:10.5px!important;line-height:1.15!important;}
  #panelPage .panel-visual{grid-template-columns:88px 1fr!important;gap:8px!important;align-items:center!important;}
  #panelPage .status-donut{width:84px!important;height:84px!important;}
  #panelPage .status-donut::after{width:54px!important;height:54px!important;}
  #panelPage .donut-center b{font-size:19px!important;}
  #panelPage .donut-center span{font-size:7.5px!important;}
  #panelPage .status-legend{gap:3px!important;}
  #panelPage .legend-row{font-size:9.5px!important;line-height:1.15!important;gap:5px!important;}
  #panelPage .legend-row b{font-size:10.5px!important;}

  #panelPage .recent-compact-head{padding:4px 8px!important;font-size:7.8px!important;}
  #panelPage .recent-order-row{min-height:25px!important;padding:3px 8px!important;font-size:10px!important;line-height:1.15!important;}
  #panelPage .status-pill{min-height:21px!important;padding:2px 7px!important;font-size:9px!important;}
  #panelPage .recent-all{margin-top:2px!important;padding:1px!important;font-size:10.5px!important;}
}

/* Alturas especialmente reducidas (notebooks de 768–820 px útiles). */
@media (min-width:1200px) and (max-height:820px){
  main{padding-top:6px!important;padding-bottom:6px!important;}
  header{min-height:42px!important;margin-bottom:4px!important;padding-bottom:4px!important;}
  #panelPage .welcome-box{min-height:46px!important;padding:6px 15px!important;}
  #panelPage .status-stats article{min-height:46px!important;padding:5px 11px!important;}
  #panelPage .dashboard-card{padding-top:7px!important;padding-bottom:7px!important;}
  #panelPage .status-donut{width:78px!important;height:78px!important;}
  #panelPage .status-donut::after{width:50px!important;height:50px!important;}
  #panelPage .panel-visual{grid-template-columns:82px 1fr!important;}
  aside nav button{min-height:39px!important;}
  aside .logout{min-height:39px!important;}
}

/* =========================================================
   V17.12 · ÓRDENES COMPACTAS + DISTRIBUCIÓN FINANCIERA 3D
   ========================================================= */
/* Órdenes: densidad cómoda en escritorio */
#ordersPage .box{padding:20px 22px!important}
#ordersPage .filter-grid{padding:12px 14px!important;gap:10px!important;margin-bottom:16px!important}
#ordersPage .filter-grid input,#ordersPage .filter-grid select{min-height:40px!important;height:40px!important;font-size:14px!important}
#ordersPage .orders-table table{table-layout:fixed;width:100%}
#ordersPage .orders-table th{padding:10px 9px!important;font-size:10px!important}
#ordersPage .orders-table td{padding:10px 9px!important;font-size:13px!important;line-height:1.25!important}
#ordersPage .orders-table th:nth-child(1){width:8%}#ordersPage .orders-table th:nth-child(2){width:10%}#ordersPage .orders-table th:nth-child(3){width:10%}#ordersPage .orders-table th:nth-child(4){width:11%}#ordersPage .orders-table th:nth-child(5){width:14%}#ordersPage .orders-table th:nth-child(6){width:18%}#ordersPage .orders-table th:nth-child(7){width:8%}#ordersPage .orders-table th:nth-child(8){width:21%}
#ordersPage .orders-table td:nth-child(2){font-size:12px;color:#526176}
#ordersPage .orders-table td:nth-child(5){white-space:normal}
#ordersPage .row-actions{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:5px!important}
#ordersPage .row-actions button{min-height:28px!important;padding:5px 8px!important;font-size:10.5px!important;border-radius:8px!important;line-height:1.15!important}
/* El selector conserva la función de cambio, pero visualmente se comporta como las píldoras del Panel */
#ordersPage .status-select{width:auto!important;max-width:100%;min-height:31px!important;height:31px!important;padding:4px 28px 4px 11px!important;border-radius:999px!important;font-size:11px!important;font-weight:800!important;box-shadow:none!important;background-position:right 9px center!important;cursor:pointer}
#ordersPage .status-select.status-entregado_reparado,#ordersPage .status-select.status-entregado_garantia{background-color:#ecfdf5!important;color:#047857!important;border-color:#bfead8!important}
#ordersPage .status-select.status-esperando_aprobacion{background-color:#fff7e8!important;color:#a15c00!important;border-color:#f6d49b!important}
#ordersPage .status-select.status-entregado_sin_reparacion,#ordersPage .status-select.status-cancelado,#ordersPage .status-select.status-garantia_rechazada{background-color:#f8fafc!important;color:#334155!important;border-color:#dbe3ee!important}
#ordersPage .status-select.status-recibido{background-color:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
#ordersPage .status-select.status-en_diagnostico,#ordersPage .status-select.status-en_reparacion,#ordersPage .status-select.status-en_revision_garantia,#ordersPage .status-select.status-en_reparacion_garantia{background-color:#f5f3ff!important;color:#6d28d9!important;border-color:#ddd6fe!important}
#ordersPage .status-select.status-aprobado,#ordersPage .status-select.status-garantia_aprobada{background-color:#eefbf5!important;color:#087f5b!important;border-color:#c9efdd!important}
#ordersPage .status-select.status-listo_para_entregar,#ordersPage .status-select.status-listo_para_entregar_garantia{background-color:#ecfeff!important;color:#0e7490!important;border-color:#bae6fd!important}
@media(max-width:1250px){#ordersPage .orders-table{overflow-x:auto}#ordersPage .orders-table table{min-width:1080px}}

/* Reportes: torta con profundidad, inclinación y leyenda explícita */
#reportsPage .finance-visual{grid-template-columns:330px minmax(0,1fr)!important;gap:34px!important;align-items:center!important}
#reportsPage .finance-pie-stage{min-height:270px;display:flex;align-items:center;justify-content:center;perspective:900px;position:relative}
#reportsPage .finance-pie-3d{width:238px;height:238px;border-radius:50%;position:relative;transform:rotateX(58deg) rotateZ(-18deg);transform-style:preserve-3d;box-shadow:0 24px 24px rgba(15,23,42,.18),0 38px 40px rgba(15,23,42,.08)}
#reportsPage .finance-pie-3d::before{content:"";position:absolute;inset:0;border-radius:50%;background:inherit;transform:translateZ(-16px);filter:brightness(.72);box-shadow:0 15px 0 rgba(15,23,42,.08);z-index:-1}
#reportsPage .finance-pie-3d::after{content:"";position:absolute;inset:6px;border-radius:50%;background:linear-gradient(145deg,rgba(255,255,255,.30),rgba(255,255,255,0) 42%);pointer-events:none}
#reportsPage .finance-pie-caption{position:absolute;left:50%;bottom:2px;transform:translateX(-50%);text-align:center;white-space:nowrap}
#reportsPage .finance-pie-caption small{display:block;color:#748198;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
#reportsPage .finance-pie-caption b{display:block;color:#122033;font-size:25px;margin-top:2px}
#reportsPage .finance-legend{gap:6px!important}
#reportsPage .finance-legend-row{grid-template-columns:16px minmax(190px,1fr) auto!important;padding:12px 2px!important}
#reportsPage .finance-legend-row i{width:12px!important;height:12px!important;box-shadow:0 0 0 4px rgba(15,23,42,.025)}
#reportsPage .finance-legend-row span{font-size:14px!important}
#reportsPage .finance-legend-row strong{font-size:14px!important}
#reportsPage .finance-margin-indicator{margin-top:12px;padding:13px 15px;border-radius:13px;background:#f4f7ff;border:1px solid #dce6fb;display:flex;align-items:center;justify-content:space-between;gap:16px}
#reportsPage .finance-margin-indicator span{color:#526176;font-size:13px}.finance-margin-indicator strong{font-size:18px;color:#1d4ed8}
@media(max-width:900px){#reportsPage .finance-visual{grid-template-columns:1fr!important}.finance-pie-stage{min-height:250px}}

/* V17.13 · ajustes visuales finos */
#panelPage .welcome-box{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:5px!important}
#panelPage #welcomeMessage{margin:0!important;line-height:1.12!important}
#panelPage #welcomeStore{margin:0!important;line-height:1.3!important}

#ordersPage .orders-table th:nth-child(6){width:17%!important}
#ordersPage .orders-table th:nth-child(7){width:9%!important}
#ordersPage .status-select{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;padding-left:10px!important;padding-right:24px!important;font-size:10.5px!important}
#ordersPage .orders-table td:nth-child(6){overflow:hidden}
#ordersPage .orders-table td:nth-child(7){white-space:nowrap;padding-left:12px!important}

#reportsPage .report-summary-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important}
#reportsPage .report-summary-card,#reportsPage .report-summary-card-wide{grid-column:auto!important;min-height:112px!important;padding:14px 15px!important}
#reportsPage .report-summary-card span{font-size:11px!important}
#reportsPage .report-summary-card b{font-size:20px!important;margin-top:8px!important;line-height:1.08!important}
#reportsPage .report-summary-card small{font-size:11.5px!important;line-height:1.25!important}
#reportsPage .report-summary-card em{font-size:11px!important;padding-top:8px!important}
@media(max-width:1250px){#reportsPage .report-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:850px){#reportsPage .report-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){#reportsPage .report-summary-grid{grid-template-columns:1fr!important}}

/* V17.16 - Editor de diseño de orden */
.guide-editor-head{margin-bottom:14px}.guide-editor-actions{display:flex;gap:8px}.guide-tabs{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid #e5e7eb;padding-top:12px}.guide-tabs button{background:#f4f7fb;color:#24364b;border:1px solid #dce5ef}.guide-tabs button.active{background:#0a58ca;color:#fff;border-color:#0a58ca}.guide-editor-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(560px,1fr);gap:14px;align-items:start}.guide-controls{display:grid;gap:12px}.guide-controls label{display:grid;gap:6px}.guide-controls hr,.guide-policies hr{border:0;border-top:1px solid #e5e7eb;width:100%}.guide-block-list{display:grid;gap:7px}.guide-block-list label{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px;background:#fff}.guide-block-list label span{margin-left:auto}.guide-block-list .locked{background:#f8fafc}.guide-preview-box{overflow:auto}.guide-preview-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.guide-paper{--guide-color:#0a58ca;--guide-font:Arial;--guide-size:10px;background:#fff;color:var(--guide-text-color,#111827);font-family:var(--guide-font);font-size:var(--guide-size);margin:0 auto;box-shadow:0 6px 22px #0f172a18;border:1px solid #e5e7eb}.guide-paper.a4{width:min(100%,760px);min-height:960px;padding:28px}.guide-paper.ticket{width:302px;min-height:780px;padding:20px 16px}.gp-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.gp-logo{font-size:26px;font-weight:800;color:var(--guide-color);letter-spacing:-1px}.gp-company{text-align:right;line-height:1.45}.gp-title{display:flex;justify-content:space-between;align-items:center;background:var(--guide-color);color:#fff;padding:11px 14px;margin:18px 0 10px;border-radius:5px;font-size:17px;font-weight:800}.gp-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.gp-card{border:1px solid #dbe4ee;border-radius:5px;overflow:hidden}.gp-card h5{margin:0;padding:6px 8px;background:#eef4ff;color:var(--guide-color);font-size:1em}.gp-card div{padding:8px;line-height:1.5}.gp-wide{grid-column:1/-1}.gp-total{margin:10px 0 10px auto;width:42%;padding:10px;background:#eaf2ff;border-radius:5px;font-weight:800;display:flex;justify-content:space-between}.gp-bottom{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.gp-qr{width:78px;height:78px;background:repeating-linear-gradient(45deg,#111 0 4px,#fff 4px 8px);border:5px solid #fff;outline:1px solid #111}.gp-sign{display:flex;gap:12px;justify-content:flex-end;align-items:flex-end}.gp-sign span{display:block;border-top:1px solid #111;padding-top:5px;min-width:110px;text-align:center}.guide-paper.ticket .gp-head{display:block;text-align:center}.guide-paper.ticket .gp-company{text-align:center;margin-top:8px}.guide-paper.ticket .gp-title{display:block;text-align:center;background:none;color:#111;border-top:1px dashed #94a3b8;border-bottom:1px dashed #94a3b8;border-radius:0}.guide-paper.ticket .gp-grid,.guide-paper.ticket .gp-bottom{display:block}.guide-paper.ticket .gp-card{border:0;border-bottom:1px dashed #cbd5e1;border-radius:0;margin:8px 0}.guide-paper.ticket .gp-card h5{background:none;padding:4px 0}.guide-paper.ticket .gp-card div{padding:4px 0}.guide-paper.ticket .gp-total{width:auto;font-size:16px;background:none;border-top:2px solid #111;border-bottom:1px solid #111}.guide-paper.ticket .gp-qr{margin:18px auto}.guide-paper.ticket .gp-sign{display:none}.guide-paper.ticket .gp-policies{font-size:.9em}.guide-paper.ticket .gp-logo{font-size:23px}.guide-paper.ticket .gp-hide-ticket{display:none!important}@media(max-width:1000px){.guide-editor-layout{grid-template-columns:1fr}.guide-controls{order:1}.guide-preview-box{order:2}}@media(max-width:650px){.guide-paper.a4{width:760px}.guide-preview-box{overflow:auto}.guide-editor-actions{width:100%;flex-wrap:wrap}}
/* V17.16 Etapa 2 · editor visual */
.guide-color-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.guide-color-grid input[type=color]{width:100%;height:38px;padding:2px}.guide-block-heading h4{margin-bottom:3px}.guide-block-row{display:flex;align-items:center;gap:8px;padding:8px 9px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;cursor:default}.guide-block-row.dragging{opacity:.45}.guide-block-row.drag-over{border-color:#0a58ca;box-shadow:0 0 0 2px #0a58ca22}.guide-drag{cursor:grab;font-size:17px;color:#64748b;user-select:none}.guide-block-name{flex:1}.guide-lock{font-size:13px}.guide-block-config{padding:4px 7px;min-width:auto}.guide-block-options{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px;margin:-3px 5px 3px;border:1px solid #dbe4ee;border-top:0;border-radius:0 0 8px 8px;background:#f8fafc}.guide-block-options label{font-size:12px}.guide-block-options input,.guide-block-options select{min-width:0}.guide-paper{background:var(--guide-background,#fff)}.gp-flow{display:grid;grid-template-columns:1fr 1fr;gap:10px}.gp-flow>.gp-head,.gp-flow>[data-preview-block="order"],.gp-flow>.gp-wide,.gp-flow>.gp-total,.gp-flow>.gp-policies-wrap,.gp-flow>.gp-qr-wrap,.gp-flow>.gp-sign{grid-column:1/-1}.gp-card h5{background:var(--block-bg,var(--guide-section-bg,#eef4ff));color:var(--block-accent,var(--guide-color))}.gp-title{background:var(--block-accent,var(--guide-color))}.gp-policies-wrap{display:grid;grid-template-columns:1fr 1fr;gap:10px}.gp-qr-wrap{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px}.theme-clean .gp-card{border-radius:0;border-left:3px solid var(--block-accent,var(--guide-color))}.theme-clean .gp-card h5{background:transparent}.theme-clean .gp-title{background:transparent;color:var(--guide-color);border-top:2px solid var(--guide-color);border-bottom:1px solid var(--guide-color);border-radius:0}.theme-dark .gp-title{background:#111827}.theme-dark .gp-card h5{background:#1f2937;color:#fff}.theme-dark .gp-card{border-color:#9ca3af}.guide-paper.ticket .gp-flow{display:block}.guide-paper.ticket .gp-flow>*{margin-bottom:8px}.guide-paper.ticket .gp-policies-wrap{display:block}.guide-paper.ticket .gp-order-meta{text-align:center}.guide-paper.ticket .gp-qr-wrap{display:block;text-align:center}.guide-paper.ticket .gp-qr-wrap .gp-qr{margin:8px auto}.guide-paper.ticket .gp-head{display:block}.guide-paper.ticket .gp-title{display:block}.guide-paper.ticket .gp-sign{display:none}@media(max-width:650px){.guide-color-grid{grid-template-columns:1fr}.guide-block-options{grid-template-columns:1fr}}

/* V17.16 Etapa 3 - estilos profesionales del Editor de Guia */
.guide-color-grid{grid-template-columns:repeat(2,1fr)}
.theme-executive{border-top:8px solid var(--guide-color);box-shadow:0 10px 30px #0f172a20}.theme-executive .gp-head{padding-bottom:14px;border-bottom:1px solid #cbd5e1}.theme-executive .gp-title{border-radius:0;letter-spacing:.04em}.theme-executive .gp-card{border:0;border-bottom:1px solid #cbd5e1;border-radius:0}.theme-executive .gp-card h5{border-left:4px solid var(--block-accent,var(--guide-color));letter-spacing:.05em}.theme-executive .gp-total{border-radius:0;border-left:5px solid var(--guide-color)}
.theme-technical .gp-head{border:1px solid #94a3b8;padding:12px}.theme-technical .gp-title{border-radius:0;background:var(--guide-color);font-family:Consolas,monospace}.theme-technical .gp-card{border:1px solid #94a3b8;border-radius:0}.theme-technical .gp-card h5{border-bottom:1px solid #94a3b8;font-family:Consolas,monospace;letter-spacing:.04em}.theme-technical .gp-total{border:2px solid var(--guide-color);border-radius:0;background:transparent}
.theme-premium{border:1px solid #b8a06a;padding-top:34px}.theme-premium .gp-head{padding-bottom:18px;border-bottom:2px solid var(--guide-color)}.theme-premium .gp-title{background:transparent;color:var(--guide-color);border:1px solid var(--guide-color);border-radius:0;text-transform:uppercase;letter-spacing:.12em}.theme-premium .gp-card{border-color:#d8d0bd;border-radius:0}.theme-premium .gp-card h5{background:transparent;border-bottom:1px solid #d8d0bd;letter-spacing:.08em}.theme-premium .gp-total{background:transparent;border-top:2px solid var(--guide-color);border-bottom:2px solid var(--guide-color);border-radius:0}
.theme-compact{padding:18px}.theme-compact .gp-flow{gap:5px}.theme-compact .gp-head{padding-bottom:5px}.theme-compact .gp-title{margin:6px 0 3px;padding:6px 8px;font-size:1.25em}.theme-compact .gp-card h5{padding:3px 5px}.theme-compact .gp-card div{padding:5px;line-height:1.3}.theme-compact .gp-total{margin:4px 0 4px auto;padding:6px}.theme-compact .gp-policies{font-size:.86em}.theme-compact .gp-qr{width:60px;height:60px}
.guide-paper.ticket.theme-executive,.guide-paper.ticket.theme-technical,.guide-paper.ticket.theme-premium,.guide-paper.ticket.theme-compact{padding:14px 12px}.guide-paper.ticket.theme-premium .gp-title,.guide-paper.ticket.theme-executive .gp-title,.guide-paper.ticket.theme-technical .gp-title{color:var(--guide-text-color,#111827);background:transparent}
@media(max-width:650px){.guide-color-grid{grid-template-columns:1fr}}
/* V17.16 Etapa 4 · Catálogo de plantillas profesionales */
.guide-theme-fallback{display:none!important}.guide-template-section{display:grid;gap:9px}.guide-template-heading{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.guide-template-heading h4{margin:0 0 2px}.guide-template-selected{font-size:11px;font-weight:800;background:#e8f0ff;color:#0a58ca;border-radius:999px;padding:5px 8px;white-space:nowrap}.guide-template-gallery{display:grid;grid-template-columns:1fr 1fr;gap:9px}.guide-template-card{appearance:none;text-align:left;background:#fff!important;color:#172033!important;border:1px solid #dce5ef!important;border-radius:10px!important;padding:7px!important;overflow:hidden;transition:.15s transform,.15s box-shadow,.15s border-color}.guide-template-card:hover{transform:translateY(-1px);box-shadow:0 5px 15px #0f172a14}.guide-template-card.active{border:2px solid #0a58ca!important;padding:6px!important;box-shadow:0 0 0 2px #0a58ca18}.gt-thumb{height:92px;border:1px solid #e2e8f0;border-radius:6px;background:#fff;padding:8px;display:grid;gap:5px;overflow:hidden}.gt-top{height:12px;border-bottom:2px solid var(--tc);display:flex;justify-content:space-between}.gt-logo{width:28px;height:6px;background:var(--tc);border-radius:2px}.gt-no{width:20px;height:5px;background:#cbd5e1}.gt-title{height:12px;background:var(--tc);border-radius:2px}.gt-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px}.gt-box{height:20px;border:1px solid #cbd5e1;background:var(--tb)}.gt-lines{height:16px;background:repeating-linear-gradient(to bottom,#dbe3ec 0 1px,transparent 1px 5px)}.gt-total{height:9px;width:45%;margin-left:auto;background:var(--ts)}.gt-name{display:block;font-size:11px;font-weight:800;margin:6px 2px 1px}.gt-desc{display:block;font-size:9px;line-height:1.2;color:#64748b;margin:0 2px 2px}.guide-template-card[data-template=clean] .gt-title{height:3px;background:var(--tc)}.guide-template-card[data-template=clean] .gt-box{border-width:0 0 0 2px}.guide-template-card[data-template=technical] .gt-thumb{background:#f8fafc}.guide-template-card[data-template=technical] .gt-box{border-color:#64748b}.guide-template-card[data-template=premium] .gt-title{background:transparent;border:1px solid var(--tc)}.guide-template-card[data-template=compact] .gt-thumb{gap:2px}.guide-template-card[data-template=compact] .gt-box{height:15px}.guide-template-card[data-template=workshop] .gt-top{background:var(--tc);height:18px;padding:5px;border:0}.guide-template-card[data-template=workshop] .gt-logo{background:#fff}.guide-template-card[data-template=workshop] .gt-title{border-left:5px solid #111;background:#f1f5f9}.guide-template-card[data-template=field] .gt-thumb{border-left:6px solid var(--tc)}.guide-template-card[data-template=field] .gt-title{background:#e2e8f0;border-left:4px solid var(--tc)}
.theme-workshop .gp-head{background:var(--guide-color);color:#fff;margin:-28px -28px 0;padding:20px 28px}.theme-workshop .gp-logo{color:#fff}.theme-workshop .gp-title{background:#111827;border-radius:0;margin-top:12px}.theme-workshop .gp-card{border-radius:2px;border-color:#cbd5e1}.theme-workshop .gp-card h5{border-left:5px solid var(--block-accent,var(--guide-color));background:#f1f5f9}.theme-workshop .gp-total{background:#111827;color:#fff;border-radius:0}.theme-field{border-left:8px solid var(--guide-color)}.theme-field .gp-head{padding-bottom:12px}.theme-field .gp-title{background:#f1f5f9;color:var(--guide-text-color);border-left:6px solid var(--guide-color);border-radius:0}.theme-field .gp-card{border-radius:8px;box-shadow:0 2px 5px #0f172a0d}.theme-field .gp-card h5{border-radius:7px 7px 0 0}.theme-field .gp-total{border:1px solid var(--guide-color);background:transparent}.guide-paper.ticket.theme-workshop .gp-head{margin:-14px -12px 0;padding:14px 12px}.guide-paper.ticket.theme-field{border-left:4px solid var(--guide-color)}
@media(max-width:650px){.guide-template-gallery{grid-template-columns:1fr 1fr}.guide-template-heading{display:block}.guide-template-selected{display:inline-block;margin-top:5px}}
/* V17.16 Etapa 5 · Plantillas de guías de servicio técnico */
.guide-template-card[data-template=original] .gt-thumb{padding:7px}.guide-template-card[data-template=original] .gt-title{height:8px;background:#111827}.guide-template-card[data-template=original] .gt-box{background:#fff;border-radius:0}.guide-template-card[data-template=diagnostic] .gt-lines{height:23px;border-left:4px solid var(--tc);background:var(--tb)}.guide-template-card[data-template=corporate] .gt-top{height:17px}.guide-template-card[data-template=corporate] .gt-title{height:7px}.guide-template-card[data-template=workshop] .gt-box:first-child{border:2px solid var(--tc)}.guide-template-card[data-template=technical] .gt-grid{grid-template-columns:1fr}.guide-template-card[data-template=technical] .gt-box{height:12px}.guide-template-card[data-template=premium] .gt-thumb{padding:12px}.guide-template-card[data-template=premium] .gt-title{height:4px;background:var(--tc)}
.theme-original .gp-title{border-radius:0;background:#111827}.theme-original .gp-card{border-radius:0;border-color:#cbd5e1}.theme-original .gp-card h5{background:#f3f4f6;color:#111827;border-bottom:1px solid #cbd5e1}.theme-original .gp-total{border-radius:0;background:#f3f4f6;border:1px solid #cbd5e1}.theme-original .gp-head{border-bottom:1px solid #111827;padding-bottom:8px}.theme-diagnostic [data-preview-block=diagnosis],.theme-diagnostic [data-preview-block=work]{border-left:4px solid var(--guide-color)}.theme-workshop [data-preview-block=device],.theme-workshop [data-preview-block=fault]{border-width:2px}.theme-corporate .gp-title{border-radius:0}.theme-premium .gp-flow{gap:14px}.theme-premium .gp-card{border-radius:9px}.theme-field .gp-head{border-left:6px solid var(--guide-color);padding-left:12px}.theme-compact .gp-flow{gap:5px}.theme-compact .gp-card div{padding:5px 7px;line-height:1.35}.theme-technical .gp-card{border-radius:0}.theme-technical .gp-card h5{letter-spacing:.04em}

/* V17.16 Etapa 6: condición de revisión/diagnóstico dentro de la guía */
.gp-review-notice{grid-column:1/-1;border:1px solid var(--guide-color,#0a58ca);border-radius:6px;padding:6px 8px;margin-bottom:7px;background:var(--guide-background,#fff);color:var(--guide-text-color,#111827);font-size:.95em}
/* V17.16 Etapa 9 - Constructor visual */
.gp-flow{grid-template-columns:repeat(12,minmax(0,1fr));align-items:start}.gp-flow>*{min-width:0}.gp-flow>.gp-head,.gp-flow>[data-preview-block="order"],.gp-flow>.gp-wide,.gp-flow>.gp-total,.gp-flow>.gp-policies-wrap,.gp-flow>.gp-qr-wrap,.gp-flow>.gp-sign{grid-column:auto}.guide-sort-block{transition:outline .12s ease,box-shadow .12s ease}.guide-sort-block.gc-none{border:0!important;background:transparent!important;box-shadow:none!important}.guide-sort-block.gc-line{border:0!important;border-bottom:var(--block-border-width,1px) solid var(--block-border,#64748b)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}.guide-sort-block.gc-box{border-color:var(--block-border,#dbe4ee);border-width:var(--block-border-width,1px)}.gp-card.gt-plain h5{background:transparent!important;border:0!important;padding-left:0}.gp-card.gt-line h5{background:transparent!important;border:0!important;border-bottom:2px solid var(--block-accent,var(--guide-color))!important;padding-left:0}.gp-card.gt-fill h5{background:var(--block-bg,var(--guide-section-bg,#eef4ff))}.gp-title{color:var(--title-text,#fff)}.guide-paper .logo-center{display:grid;justify-items:center;text-align:center}.guide-paper .logo-center .gp-company{text-align:center}.guide-paper .logo-right{flex-direction:row-reverse}.guide-paper .logo-right .gp-company{text-align:left}.guide-paper .logo-left{flex-direction:row}.guide-paper.ticket .gp-flow{display:block}.guide-paper.ticket .gp-flow>*{width:auto!important}.guide-block-options{grid-template-columns:1fr 1fr}.guide-block-options select{width:100%}
/* V17.16 Etapa 10 · editor visual simplificado */
.guide-controls{max-height:none}.guide-simple-global{display:grid;grid-template-columns:1fr 1fr;gap:8px}.guide-logo-simple{display:grid;gap:7px;padding:10px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}.guide-block-row.simple{padding:9px;align-items:center}.guide-block-row.simple .guide-quick{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.guide-block-row.simple .guide-quick button{font-size:11px;padding:5px 7px}.guide-block-row.simple .guide-quick button.active{border-color:#0a58ca;background:#eef5ff;color:#0a58ca}.guide-block-row.simple .guide-quick select{width:auto;min-width:112px;font-size:11px;padding:5px}.guide-template-gallery{grid-template-columns:repeat(2,1fr)}
/* Documento de servicio: blanco, bordes y líneas; sin cajas sólidas tipo factura */
.guide-paper .gp-card,.guide-paper .gp-total,.guide-paper .gp-policies-wrap{background:transparent}.guide-paper .gp-card h5{background:transparent!important;color:var(--block-accent,var(--guide-color))!important}.guide-paper .gp-title{background:transparent!important;color:var(--guide-text-color)!important;border-bottom:2px solid var(--guide-color);border-radius:0}.guide-paper .gc-box{background:transparent!important;border:1px solid var(--block-border,var(--guide-color))!important}.guide-paper .gc-line{background:transparent!important}.guide-paper .gp-total{background:transparent!important}.guide-paper .gp-review-notice{background:transparent!important;border:1px solid var(--guide-color)}
@media(max-width:650px){.guide-simple-global{grid-template-columns:1fr}.guide-block-row.simple{align-items:flex-start}.guide-block-row.simple .guide-quick{width:100%}}

/* V17.16 Etapa 11 · La hoja es el editor */
#serviceconfigPage{overflow:hidden}.guide-editor-head{position:sticky;top:0;z-index:30;padding:12px 14px;margin-bottom:10px}.guide-editor-head .page-toolbar{margin-bottom:8px}.guide-editor-head .page-toolbar p{display:none}.guide-editor-layout{height:calc(100vh - 235px);min-height:620px;grid-template-columns:260px minmax(0,1fr);gap:10px;align-items:stretch}.guide-controls{height:100%;overflow:auto;align-content:start;padding:14px;gap:10px}.guide-controls>h3{margin:0}.guide-controls hr,.guide-block-heading,.guide-block-list{display:none!important}.guide-template-section{order:-1}.guide-template-heading small,.gt-desc{display:none!important}.guide-template-gallery{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:6px!important}.guide-template-card{min-height:62px!important;padding:6px!important}.guide-template-card .gt-thumb{height:34px!important}.guide-simple-global,.guide-color-grid{gap:6px!important}.guide-logo-simple{padding:9px!important}.guide-preview-box{height:100%;min-width:0;overflow:hidden;padding:0!important;background:#e8edf3;border:1px solid #d8e0e9;position:relative}.guide-preview-title{height:48px;margin:0;padding:8px 12px;background:#fff;border-bottom:1px solid #d8e0e9;position:relative;z-index:10}.guide-preview-title h3{margin:0;font-size:14px}.guide-preview-title p{display:none}.guide-workspace{position:absolute;inset:48px 0 0;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:24px}.guide-stage{transform-origin:top center;transition:transform .12s ease;position:relative}.guide-paper.a4{width:760px;min-height:960px;padding:28px}.guide-zoom{display:flex;align-items:center;gap:5px;margin-left:auto}.guide-zoom button{min-width:34px;padding:6px 8px}.guide-zoom span{font-size:12px;min-width:42px;text-align:center}.guide-paper [data-preview-block]{position:relative;cursor:pointer;transition:outline .1s,box-shadow .1s}.guide-paper [data-preview-block]:hover{outline:1px dashed #4f8edc;outline-offset:3px}.guide-paper [data-preview-block].guide-selected{outline:2px solid #0a58ca;outline-offset:3px;z-index:4}.guide-paper [data-preview-block].guide-dragging{opacity:.42}.guide-paper [data-preview-block].guide-drop-before{box-shadow:0 -5px 0 -2px #0a58ca}.guide-context{position:fixed;z-index:1000;display:flex;gap:4px;align-items:center;background:#172033;color:#fff;border-radius:8px;padding:5px;box-shadow:0 8px 24px #0f172a35}.guide-context button,.guide-context select{height:30px;min-width:0;padding:4px 7px;border:0;border-radius:5px;font-size:12px}.guide-context button{background:#fff;color:#172033}.guide-context .danger{color:#a21b1b}.guide-handle{cursor:grab!important;font-weight:800}.guide-watermark{position:absolute;z-index:0;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;max-width:55%;max-height:45%;object-fit:contain;filter:grayscale(1)}.gp-flow{position:relative;z-index:1}.guide-watermark-controls{border-top:1px solid #e5e7eb;padding-top:9px;display:grid;gap:7px}.guide-watermark-controls label{font-size:12px}.guide-logo-simple strong,.guide-watermark-controls strong{font-size:13px}.guide-history-actions{display:flex;gap:5px}.guide-history-actions button{padding:7px 9px}.guide-paper.ticket [data-preview-block]{cursor:pointer}
@media(max-width:1100px){.guide-editor-layout{grid-template-columns:220px minmax(0,1fr)}.guide-controls{font-size:12px}}@media(max-width:760px){#serviceconfigPage{overflow:auto}.guide-editor-layout{height:auto;grid-template-columns:1fr}.guide-controls{height:auto;max-height:300px}.guide-preview-box{height:70vh}.guide-workspace{justify-content:flex-start}}
/* ===== V17.16 · Etapa 12 · Lienzo real sin panel lateral ===== */
#serviceconfigPage:not(.hidden){height:calc(100vh - 18px);min-height:620px;overflow:hidden;display:flex;flex-direction:column;gap:8px}
#serviceconfigPage .guide-editor-head{position:relative;top:auto;flex:0 0 auto;margin:0;padding:8px 12px}
#serviceconfigPage .guide-editor-head .page-toolbar{margin:0}
#serviceconfigPage .guide-editor-head .guide-tabs{padding-top:7px;margin-top:6px}
.guide-canvas-editor{position:relative;min-height:0;flex:1;display:flex;flex-direction:column;background:#eef2f6;border:1px solid #d8e0e9;border-radius:12px;overflow:hidden}
.guide-canvas-toolbar{height:52px;flex:0 0 52px;display:flex;align-items:center;gap:7px;padding:7px 10px;background:#fff;border-bottom:1px solid #d8e0e9;z-index:40}
.guide-canvas-toolbar button,.guide-format-select{height:36px;padding:6px 10px;white-space:nowrap}
.guide-canvas-spacer{flex:1}.guide-tool-pop{position:relative}.guide-tool-pop>button span{font-weight:800;margin-left:4px}
.guide-popover{display:none;position:absolute;top:43px;left:0;z-index:200;width:260px;max-height:min(520px,70vh);overflow:auto;background:#fff;border:1px solid #d6dee8;border-radius:10px;box-shadow:0 14px 38px #0f172a2e;padding:12px;gap:10px}
.guide-popover.open{display:grid}.guide-popover label{display:grid;gap:5px;font-size:13px;font-weight:700}.guide-popover input[type=color]{width:100%;height:40px}.guide-pop-models{width:430px}.guide-pop-models .guide-template-gallery{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important}.guide-pop-models .guide-template-card{min-height:72px!important;padding:6px!important}.guide-pop-models .gt-desc{display:none!important}.guide-theme-fallback{display:none!important}
.guide-canvas-editor>.guide-preview-box{position:relative;flex:1;min-height:0;height:auto;overflow:hidden;border:0;border-radius:0;background:#e9eef4;padding:0!important}
.guide-canvas-editor .guide-workspace{position:absolute;inset:0;overflow:hidden;display:flex;align-items:center;justify-content:center;padding:14px}
.guide-canvas-editor .guide-stage{transform-origin:center center;position:relative;flex:0 0 auto;transition:transform .08s ease}
.guide-canvas-editor .guide-paper{margin:0}.guide-canvas-editor .guide-paper.a4{width:760px;min-height:960px;padding:28px}.guide-canvas-editor .guide-paper.ticket{width:302px;min-height:780px}
.guide-canvas-toolbar .guide-zoom{margin-left:0}.guide-canvas-toolbar .guide-zoom button{min-width:34px;padding:5px 8px}.guide-canvas-toolbar .guide-zoom span{font-size:12px;min-width:40px;text-align:center}
.guide-paper [data-preview-block]{cursor:grab;touch-action:none}.guide-paper [data-preview-block]:active{cursor:grabbing}.guide-paper [data-preview-block].guide-pointer-drag{opacity:.5;outline:2px solid #0a58ca!important}.guide-paper [data-preview-block].guide-drop-target{box-shadow:0 -6px 0 -3px #0a58ca}
.guide-context .guide-handle{display:none}
@media(max-width:900px){.guide-canvas-toolbar{overflow-x:auto;overflow-y:hidden}.guide-popover{position:fixed;top:120px;left:12px;right:12px;width:auto}.guide-pop-models{width:auto}.guide-canvas-editor .guide-workspace{justify-content:center}.guide-canvas-editor{min-height:600px}}
.guide-mainbar{display:flex;align-items:center;gap:12px;min-height:42px}.guide-mainbar h3{margin:0;white-space:nowrap}.guide-mainbar .guide-tabs{margin:0;padding:0;border:0;flex-wrap:nowrap}.guide-mainbar .guide-editor-actions{margin-left:auto;display:flex;align-items:center;gap:6px}.guide-mainbar button{padding:7px 10px}
@media(max-width:820px){.guide-mainbar{overflow-x:auto}.guide-mainbar .guide-editor-actions{margin-left:0}}

/* ===== V17.16 · Etapa 13 · motor de lienzo ===== */
.guide-canvas-editor .guide-workspace{overflow:auto!important;display:block!important;padding:28px!important;scrollbar-gutter:stable both-edges;background:#e9eef4}
.guide-canvas-editor .guide-stage{transform:none!important;transform-origin:top left!important;position:relative!important;margin:0 auto;transition:none!important}
.guide-canvas-editor .guide-paper{position:absolute!important;left:0;top:0;transform-origin:top left!important;margin:0!important}
.guide-logo-object{position:relative;display:inline-block;cursor:move!important;touch-action:none;z-index:6;outline-offset:4px}
.guide-logo-object:hover{outline:1px dashed #0a58ca}
.guide-logo-object.guide-object-selected{outline:2px solid #0a58ca}
.guide-logo-resize{position:absolute;width:13px;height:13px;right:-7px;bottom:-7px;border:2px solid #fff;background:#0a58ca;border-radius:3px;cursor:nwse-resize;z-index:8}
.guide-watermark{pointer-events:auto!important;cursor:move!important;touch-action:none;transform:none!important;max-width:none!important;max-height:none!important}
.guide-watermark.guide-object-selected{outline:2px dashed #0a58ca;outline-offset:5px}
.guide-watermark-resize{position:absolute;width:14px;height:14px;border:2px solid #fff;background:#0a58ca;border-radius:3px;cursor:nwse-resize;z-index:9}
.guide-canvas-hint{position:sticky;left:12px;bottom:12px;width:max-content;max-width:calc(100% - 24px);padding:6px 9px;border-radius:7px;background:#172033e8;color:#fff;font-size:11px;z-index:20;pointer-events:none}

/* V17.16 Etapa 14 · edición directa */
.guide-paper [data-preview-block]{touch-action:none;box-sizing:border-box}.guide-paper [data-guide-text]:hover{outline:1px dashed #7c3aed;outline-offset:2px}.guide-resize14{position:absolute;right:-6px;bottom:-6px;width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid #0a58ca;display:none;cursor:nwse-resize;z-index:20}.guide-selected>.guide-resize14,.guide-paper [data-preview-block]:hover>.guide-resize14{display:block}.guide-context14{gap:6px;white-space:nowrap}.guide-context14 .ctx-label{font-size:11px;font-weight:700;padding:0 5px;color:#dbeafe}.guide-context14 label{display:flex;align-items:center;gap:4px;font-size:11px}.guide-context14 input[type=color]{width:30px;height:26px;padding:1px;border:0}.guide-context14 select{max-width:105px}.guide-logo-object{cursor:move}.guide-watermark{pointer-events:auto!important;cursor:move}.guide-canvas-toolbar{position:relative;z-index:40}

/* V17.16 Etapa 14.1 · logo de tienda adjuntable */
.store-logo-picker{display:flex;gap:16px;align-items:center;margin-top:8px;padding:12px;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc}
.store-logo-preview{width:150px;height:86px;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #dbe3ee;border-radius:12px;background:#fff;color:#7b8798;font-size:13px;flex:0 0 auto}
.store-logo-preview img{max-width:100%;max-height:100%;object-fit:contain;padding:8px;box-sizing:border-box}
.store-logo-actions{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}.store-logo-actions .hint{flex-basis:100%;margin:0}
@media(max-width:700px){.store-logo-picker{align-items:stretch;flex-direction:column}.store-logo-preview{width:100%;height:110px}}

/* V17.16 Etapa 14.2 · identidad visual por tienda */
.store-identity{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.store-identity-logo{display:block;max-width:178px;max-height:58px;width:auto;height:auto;object-fit:contain;object-position:left center}
.store-identity-name{overflow-wrap:anywhere}
@media(max-width:800px){.store-identity{flex-direction:row;align-items:center}.store-identity-logo{max-width:110px;max-height:38px}.store-identity strong{font-size:16px!important}}

/* V17.16 Etapa 14.3 · identidad visual por tienda */
.app-brand-title{display:block;color:#fff;font-size:21px;line-height:1.15;margin-bottom:12px}
.store-identity{padding-top:10px;border-top:1px solid rgba(255,255,255,.12)}
.store-identity-logo{max-width:150px;max-height:52px;background:#fff;border-radius:8px;padding:5px;filter:none!important;opacity:1!important;mix-blend-mode:normal!important}
.store-identity strong{font-size:15px!important;line-height:1.2;color:#dce6f4}
.guide-logo-object img{filter:none!important;opacity:1!important;mix-blend-mode:normal!important}
.guide-context14{max-width:calc(100vw - 16px);overflow-x:auto}
@media(max-width:800px){.app-brand-title{margin:0 10px 0 0}.store-identity{padding-top:0;border-top:0}.store-identity-logo{max-width:100px;max-height:36px}}
\n/* V17.16 Etapa 14.4 · cabecera común sin alterar permisos */\n.side-brand{height:34px;display:flex;align-items:center;padding:0 10px 18px;margin-bottom:4px;border-bottom:1px solid rgba(255,255,255,.08)}\n.side-brand span{display:inline-grid;place-items:center;width:30px;height:30px;border:1px solid rgba(255,255,255,.16);border-radius:9px;color:#dce6f4;font-weight:800;font-size:12px;letter-spacing:.04em}\n.app-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:64px;margin:-10px 0 18px;padding:8px 0 14px;border-bottom:1px solid var(--v17-line,#dde3eb)}\n.topbar-identity{display:flex;align-items:center;gap:14px;min-width:0}\n.topbar-store-logo{display:block;max-width:112px;max-height:42px;width:auto;height:auto;object-fit:contain;filter:none!important;opacity:1!important;mix-blend-mode:normal!important}\n.topbar-system-name{font-size:18px;color:#162033;white-space:nowrap}\n.topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}\n.topbar-actions select{min-width:220px;max-width:300px;min-height:42px}\n.topbar-actions button{min-height:42px}\n.topbar-user{display:flex;align-items:center;gap:8px;min-height:42px;padding:0 12px;border-left:1px solid var(--v17-line,#dde3eb);color:#334155;white-space:nowrap}\n.topbar-user-icon{font-size:11px;color:#64748b}\n#profile{font-size:14px;font-weight:650;color:#334155}\nmain>header{min-height:auto!important;margin-bottom:18px!important;padding-bottom:0!important;border-bottom:0!important}\nmain>header .actions{display:none!important}\n@media(max-width:1050px){.app-topbar{align-items:flex-start;flex-direction:column}.topbar-actions{width:100%;flex-wrap:wrap;justify-content:flex-start}.topbar-user{margin-left:auto}.topbar-actions select{flex:1 1 210px;max-width:none}}\n@media(max-width:800px){.side-brand{display:none}.app-topbar{margin:0 0 14px;padding:0 0 12px}.topbar-identity{width:100%}.topbar-store-logo{max-width:92px;max-height:36px}.topbar-system-name{font-size:17px}.topbar-actions{display:grid;grid-template-columns:1fr auto;width:100%}.topbar-actions #company:not(.hidden){grid-column:1/-1}.topbar-user{grid-column:1/-1;margin-left:0;border-left:0;padding-left:0}.topbar-actions select{min-width:0;width:100%}}\n
/* V17.16 Etapa 14.5 · corrección cabecera compacta */
.side-brand{display:none!important}
.app{grid-template-columns:235px minmax(0,1fr)!important}
aside{padding-top:22px!important}
.app-topbar{height:72px!important;min-height:72px!important;max-height:72px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;margin:-10px 0 18px!important;padding:8px 0!important;overflow:hidden!important}
.topbar-identity{height:56px!important;min-width:0!important;display:flex!important;align-items:center!important;gap:14px!important;flex:0 1 auto!important;overflow:hidden!important}
.topbar-store-logo{display:block!important;width:140px!important;height:48px!important;max-width:140px!important;max-height:48px!important;min-width:0!important;object-fit:contain!important;object-position:left center!important;filter:none!important;opacity:1!important;mix-blend-mode:normal!important;flex:0 0 140px!important}
.topbar-store-logo.hidden{display:none!important}
.topbar-system-name{font-size:18px!important;line-height:1!important;white-space:nowrap!important;flex:0 0 auto!important}
.topbar-actions{height:56px!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex:1 1 auto!important;min-width:0!important;overflow:hidden!important}
.topbar-actions select{height:42px!important;min-height:42px!important;max-height:42px!important}
.topbar-actions button{height:42px!important;min-height:42px!important;max-height:42px!important}
.topbar-user{height:42px!important;min-height:42px!important;max-height:42px!important}
@media(max-width:1050px){.app-topbar{height:auto!important;max-height:none!important;min-height:72px!important;overflow:visible!important;flex-wrap:wrap!important}.topbar-actions{height:auto!important;overflow:visible!important;flex-wrap:wrap!important}.topbar-store-logo{width:112px!important;height:42px!important;max-width:112px!important;max-height:42px!important;flex-basis:112px!important}}
@media(max-width:800px){.app{display:block!important}.app-topbar{margin:0 0 14px!important}.topbar-store-logo{width:92px!important;height:36px!important;max-width:92px!important;max-height:36px!important;flex-basis:92px!important}}

/* V17.16 Etapa 14.6 · menú de usuario y nombre editable */
aside>.logout{display:none!important}
.topbar-user-wrap{position:relative;flex:0 0 auto}
.topbar-user{border:0!important;border-left:1px solid var(--v17-line,#dde3eb)!important;background:transparent!important;box-shadow:none!important;color:#172033!important;font:inherit!important;font-weight:650!important;cursor:pointer!important;padding:0 8px 0 14px!important;display:flex!important;align-items:center!important;gap:7px!important}
.topbar-user:hover{background:#f4f7fb!important}
.user-menu-chevron{font-size:16px;color:#64748b;line-height:1}
.user-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:1200;min-width:220px;background:#fff;border:1px solid #dce3ed;border-radius:14px;padding:12px;box-shadow:0 16px 40px rgba(15,23,42,.16);display:grid;gap:5px}
.user-menu.hidden{display:none!important}.user-menu strong{font-size:14px}.user-menu>span{font-size:12px;color:#64748b;margin-bottom:7px}.user-menu button{width:100%;text-align:left;background:#f5f7fb;color:#172033;box-shadow:none;padding:10px 12px}
@media(max-width:800px){.topbar-user-wrap{grid-column:1/-1}.topbar-user{border-left:0!important;padding-left:0!important}.user-menu{left:0;right:auto}}

/* V17.16 Etapa 14.7 · desplegable visible + contenido más compacto */
.app-topbar{overflow:visible!important;margin-bottom:4px!important;position:relative!important;z-index:50!important}
.topbar-actions{overflow:visible!important}
.topbar-user-wrap{position:relative!important;z-index:60!important}
.user-menu{z-index:5000!important}
main>header{margin-top:0!important;margin-bottom:10px!important}
@media(min-width:1051px){main{padding-top:18px!important}.app-topbar{margin-top:-6px!important}}

/* V17.16 Etapa 14.9 · asignación múltiple de sucursales */
.store-check-list{display:grid;gap:8px;margin-top:8px;padding:10px;border:1px solid var(--line,#dbe3ec);border-radius:10px;max-height:220px;overflow:auto;background:#fff}
.store-check{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;cursor:pointer}
.store-check:hover{background:#f6f8fb}.store-check input{width:auto;margin:0}.store-check small{opacity:.65}

/* Etapa 14.14 */
.users-store-filter{min-width:220px;max-width:300px;padding:10px 36px 10px 12px;border:1px solid #d8e0ec;border-radius:12px;background:#fff;color:#172033;font-weight:700}

/* V17.16 Etapa 14.15: la barra contextual manda sobre los estilos del modelo */
.guide-paper .guide-sort-block{border-width:var(--block-border-width,1px)!important;border-color:var(--block-border,var(--guide-color))!important}
.guide-paper .guide-sort-block[style*="border-width: 0px"],.guide-paper .guide-sort-block[style*="border-width:0px"]{border:none!important}
.guide-context14 button.active{background:#dbeafe!important;color:#0a58ca!important;box-shadow:inset 0 0 0 2px #60a5fa}
\n/* V17.16 ETAPA 14.16 — motor de formato persistente + toolbar responsive */\n.guide-canvas-toolbar{min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;flex-wrap:nowrap}\n.guide-canvas-toolbar>*{flex:0 0 auto}\n.guide-canvas-toolbar .guide-canvas-spacer{flex:1 1 16px;min-width:0}\n.guide-canvas-toolbar .guide-zoom{flex:0 0 auto;margin-left:0;padding-right:4px}\n#guideZoomFit{margin-right:2px}\n@media(max-width:1450px){\n  .guide-canvas-toolbar{gap:5px;padding-left:7px;padding-right:7px}\n  .guide-canvas-toolbar button,.guide-format-select{padding-left:8px;padding-right:8px}\n}\n/* borderWidth=0 is authoritative, regardless of the selected template */\n.guide-paper [data-preview-block][style*="--block-border-width: 0px"],\n.guide-paper [data-preview-block][style*="--block-border-width:0px"]{border:none!important;border-width:0!important;box-shadow:none!important}\n

/* V17.16 ETAPA 14.18 — pulido visual y contexto por sucursal */
/* La barra debe ser utilizable al 100% del zoom del navegador, sin cortar Ajustar. */
.guide-canvas-toolbar{height:auto!important;min-height:52px;flex-wrap:wrap!important;overflow:visible!important;align-content:center;padding:7px 10px!important}
.guide-canvas-toolbar .guide-canvas-spacer{flex:1 1 24px!important}
.guide-canvas-toolbar .guide-zoom{margin-left:auto!important;padding-right:0!important}
#guideZoomFit{margin-right:0!important}
@media(max-width:1450px){.guide-canvas-toolbar .guide-canvas-spacer{display:none}.guide-canvas-toolbar .guide-zoom{margin-left:0!important}}

/* Totales: separar visualmente precio, descuento y total. */
.guide-paper .gp-total{width:min(48%,390px);min-height:54px;padding:10px 12px!important;gap:16px;align-items:center;line-height:1.25}
.guide-paper .gp-total-main{display:flex;flex-wrap:wrap;gap:3px 10px;align-items:baseline;min-width:0}
.guide-paper .gp-total-main strong{flex-basis:100%;letter-spacing:.01em}
.guide-paper .gp-total-final{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;min-width:78px;padding-left:12px;border-left:1px solid #cbd5e1}
.guide-paper .gp-total-final small{font-size:.82em;font-weight:700}
.guide-paper .gp-total-final strong{font-size:1.08em;white-space:nowrap}
.guide-paper.ticket .gp-total{width:auto;max-width:none;display:flex!important;padding:9px 4px!important}

/* Marca de agua: fondo real, centrado y sin competir con el contenido. */
.guide-paper{position:relative;isolation:isolate}
.guide-paper .guide-watermark{z-index:0!important;opacity:var(--watermark-opacity,.08);filter:grayscale(1);mix-blend-mode:multiply}
.guide-paper .gp-flow{position:relative;z-index:1}

/* ===== V17.16 · Etapa 14.19 · pulido consolidado ===== */
/* Toolbar: compacta y adaptable; Ajustar nunca queda cortado. */
.guide-canvas-toolbar{display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:7px 8px!important;overflow:visible!important}
.guide-canvas-toolbar .guide-tool-pop>button,.guide-canvas-toolbar>.guide-format-select{min-height:38px!important;padding:7px 10px!important}
.guide-canvas-toolbar .guide-zoom{display:flex!important;align-items:center!important;gap:5px!important;margin-left:auto!important;flex:0 0 auto!important}
#guideZoomFit{white-space:nowrap!important;min-width:max-content!important}
@media(max-width:1250px){.guide-canvas-toolbar .guide-zoom{margin-left:0!important}.guide-canvas-toolbar{justify-content:flex-start!important}}

/* Barra contextual pequeña tipo Canva. */
.guide-context-compact{padding:6px!important;gap:5px!important;border-radius:14px!important;max-width:min(520px,calc(100vw - 20px))!important;overflow:visible!important}
.guide-context-compact .ctx-label{padding:0 6px!important}
.guide-context-compact select{height:34px!important;max-width:110px!important;padding:4px 24px 4px 8px!important}
.guide-context-compact button{height:34px!important;min-width:34px!important;padding:5px 9px!important}
.guide-context-compact .ctx-swatch{width:34px;height:34px;padding:0!important;border-radius:9px;overflow:hidden;background:#fff}
.guide-context-compact .ctx-swatch input[type=color]{width:38px!important;height:38px!important;margin:-2px!important;padding:0!important;border:0!important}

/* La marca de agua sigue siendo fondo visual, pero puede seleccionarse y moverse en el editor. */
.guide-canvas-editor .guide-paper .guide-watermark{z-index:2!important;pointer-events:auto!important;cursor:move!important}
.guide-canvas-editor .guide-paper .guide-watermark:hover{outline:1px dashed #0a58ca;outline-offset:5px}

/* Totales con aire adicional. */
.guide-paper .gp-total{padding:12px 14px!important;column-gap:20px!important}
.guide-paper .gp-total-main{gap:5px 12px!important}

/* ===== V17.16 · Etapa 14.20 · Ticket cómodo al 100% ===== */
/* El escenario crece con el zoom, pero la medida real de impresión no cambia. */
.guide-paper{transform-origin:top center!important}
.guide-paper.ticket{width:302px!important}

/* Barra de texto compacta cuando se edita Ticket 80 mm. */
.guide-context-ticket{gap:4px!important;padding:5px!important;border-radius:11px!important;max-width:calc(100vw - 16px)!important}
.guide-context-ticket .ctx-label{font-size:11px!important;padding:0 4px!important}
.guide-context-ticket select{height:32px!important;font-size:12px!important;padding:4px 22px 4px 7px!important}
.guide-context-ticket [data-font]{width:92px!important}
.guide-context-ticket [data-size]{width:58px!important}
.guide-context-ticket [data-align]{width:76px!important}
.guide-context-ticket button{width:32px!important;min-width:32px!important;height:32px!important;padding:4px!important}
.guide-context-ticket label{font-size:0!important;display:flex!important;align-items:center!important;margin:0!important}
.guide-context-ticket label::before{content:"Color";font-size:11px!important;margin-right:3px}
.guide-context-ticket input[type=color]{width:32px!important;height:32px!important;padding:1px!important}

/* Marca de agua: seleccionable pero visualmente de fondo. */
.guide-canvas-editor .guide-paper .guide-watermark{mix-blend-mode:multiply!important;filter:grayscale(1)!important}

/* ===== V17.16 · Etapa 14.21 · controles directos ===== */
.guide-context .guide-context-grip{display:flex!important;align-items:center;justify-content:center;width:24px!important;min-width:24px!important;height:32px!important;padding:0!important;background:transparent!important;color:#dbeafe!important;cursor:grab!important;user-select:none;font-size:17px!important;letter-spacing:-3px}
.guide-context .guide-context-grip:active{cursor:grabbing!important}
.guide-watermark-wrap{position:absolute;left:50%;top:50%;z-index:2;pointer-events:auto;transform:translate(-50%,-50%);touch-action:none}
.guide-watermark-wrap .guide-watermark{position:relative!important;left:auto!important;top:auto!important;width:100%!important;height:auto!important;display:block;transform:none!important;max-width:none!important;max-height:none!important;pointer-events:none!important}
.guide-watermark-wrap.guide-object-selected{outline:2px dashed #0a58ca;outline-offset:6px}
.guide-watermark-wrap .guide-watermark-resize{right:-12px;bottom:-12px;display:none}
.guide-watermark-wrap.guide-object-selected .guide-watermark-resize{display:block}
.guide-paper.ticket .guide-watermark-wrap{max-width:70%}

/* ===== V17.16 · Etapa 14.22 · capas visuales y aire interior ===== */
/* El contenido nunca queda pegado al borde de sus cajas. */
.guide-paper .gp-card{padding:7px 9px!important}
.guide-paper .gp-card h5{margin:-7px -9px 6px!important;padding:6px 9px!important}
.guide-paper .gp-card>div{padding:2px 0!important}
.guide-paper .gp-wide{padding-left:9px!important;padding-right:9px!important}
.guide-paper .gp-policies{padding:8px 10px!important}
.guide-paper.ticket .gp-card{padding:6px 4px!important}
.guide-paper.ticket .gp-card h5{margin:-6px -4px 4px!important;padding:4px!important}

/* Fondo personalizado: capa fija de página, no intercepta edición. */
.guide-paper{background-color:var(--guide-background,#fff);background-repeat:no-repeat!important;background-position:center center!important}
.guide-bg-upload input{padding:7px;font-size:12px}

/* Marca de agua 14.22: coordenadas absolutas libres dentro de la hoja. */
.guide-watermark-wrap{position:absolute!important;left:0;top:0;transform:none!important;z-index:2!important;pointer-events:auto!important;touch-action:none!important;max-width:none!important}
.guide-watermark-wrap .guide-watermark{pointer-events:none!important;user-select:none!important;-webkit-user-drag:none!important}
.guide-watermark-wrap.guide-object-selected{outline:2px dashed #0a58ca!important;outline-offset:5px!important}
.guide-watermark-wrap .guide-watermark-resize{position:absolute!important;right:-10px!important;bottom:-10px!important;width:15px!important;height:15px!important;display:none;background:#0a58ca!important;border:2px solid #fff!important;border-radius:3px!important;cursor:nwse-resize!important}
.guide-watermark-wrap.guide-object-selected .guide-watermark-resize{display:block!important}
.guide-paper.ticket .guide-watermark-wrap{max-width:none!important}

/* ===== V17.16 · Etapa 14.23 · fondos adaptativos ===== */
.guide-bg-popover{width:min(390px,calc(100vw - 24px))!important}
.guide-bg-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:9px 0}
.guide-bg-presets button{display:grid!important;grid-template-columns:58px 1fr!important;align-items:center!important;gap:8px!important;text-align:left!important;padding:6px!important;height:auto!important;min-height:48px!important;background:#fff!important;color:#172033!important;border:1px solid #d8e0e9!important;border-radius:9px!important}
.guide-bg-presets button.active{border-color:#0a58ca!important;box-shadow:0 0 0 2px #bfdbfe!important;background:#eff6ff!important}
.bg-thumb{width:58px;height:36px;border:1px solid #d8e0e9;border-radius:4px;background:#fff;display:block;position:relative;overflow:hidden}
.bg-corners{background:linear-gradient(135deg,var(--bg-preview,#2563eb) 0 18%,transparent 18%) top left/50% 50% no-repeat,linear-gradient(315deg,var(--bg-preview,#2563eb) 0 18%,transparent 18%) bottom right/50% 50% no-repeat,#fff}
.bg-side{background:linear-gradient(90deg,var(--bg-preview,#2563eb) 0 17%,color-mix(in srgb,var(--bg-preview,#2563eb) 25%,transparent) 17% 25%,transparent 25%),#fff}
.bg-header{background:linear-gradient(180deg,var(--bg-preview,#2563eb) 0 20%,color-mix(in srgb,var(--bg-preview,#2563eb) 18%,transparent) 20% 30%,transparent 30%),#fff}
.bg-frame{box-shadow:inset 0 0 0 3px var(--bg-preview,#2563eb),inset 0 0 0 6px #fff,inset 0 0 0 7px color-mix(in srgb,var(--bg-preview,#2563eb) 35%,transparent)}
.bg-geometric{background:linear-gradient(135deg,var(--bg-preview,#2563eb) 0 16%,transparent 16%),linear-gradient(45deg,color-mix(in srgb,var(--bg-preview,#2563eb) 65%,white) 0 20%,transparent 20%) left bottom/65% 65% no-repeat,#fff}
.bg-custom{display:grid!important;place-items:center!important;font-size:22px;font-weight:800;color:#64748b;background:repeating-linear-gradient(45deg,#f8fafc 0 6px,#eef2f7 6px 12px)}
.guide-bg-custom-controls{display:none;gap:7px}.guide-bg-custom-controls.active{display:grid}
/* Decoración generada: siempre detrás del contenido y sin capturar clics. */
.guide-paper::before,.guide-paper::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;border-radius:inherit}
.guide-paper[data-bg-style="corners"]::before{background:linear-gradient(135deg,var(--guide-color) 0 8%,transparent 8%) top left/42% 42% no-repeat,linear-gradient(315deg,var(--guide-color) 0 8%,transparent 8%) bottom right/42% 42% no-repeat;opacity:.9}
.guide-paper[data-bg-style="corners"]::after{inset:10px;border:1px solid color-mix(in srgb,var(--guide-color) 35%,transparent)}
.guide-paper[data-bg-style="side"]::before{background:linear-gradient(90deg,var(--guide-color) 0 3.5%,color-mix(in srgb,var(--guide-color) 30%,transparent) 3.5% 5.5%,transparent 5.5%)}
.guide-paper[data-bg-style="header"]::before{background:linear-gradient(180deg,var(--guide-color) 0 3%,color-mix(in srgb,var(--guide-color) 28%,transparent) 3% 5%,transparent 5%)}
.guide-paper[data-bg-style="frame"]::before{inset:10px;border:3px solid var(--guide-color);opacity:.8}
.guide-paper[data-bg-style="frame"]::after{inset:16px;border:1px solid color-mix(in srgb,var(--guide-color) 35%,transparent)}
.guide-paper[data-bg-style="geometric"]::before{background:linear-gradient(135deg,var(--guide-color) 0 7%,transparent 7%) top left/58% 48% no-repeat,linear-gradient(145deg,color-mix(in srgb,var(--guide-color) 70%,white) 0 11%,transparent 11%) top left/48% 55% no-repeat,linear-gradient(315deg,color-mix(in srgb,var(--guide-color) 55%,white) 0 5%,transparent 5%) bottom right/35% 28% no-repeat;opacity:.82}
.guide-paper.ticket[data-bg-style="corners"]::before{background-size:70% 20%,70% 20%}.guide-paper.ticket[data-bg-style="geometric"]::before{background-size:100% 18%,85% 22%,65% 12%}.guide-paper.ticket[data-bg-style="frame"]::before{inset:5px;border-width:2px}.guide-paper.ticket[data-bg-style="frame"]::after{inset:9px}
.guide-paper>.gp-flow,.guide-paper>.guide-watermark-wrap{position:relative;z-index:1}.guide-paper>.guide-watermark-wrap{position:absolute!important;z-index:2!important}

/* ===== V17.16 · Etapa 14.24 · galería visible de fondos ===== */
.guide-bg-popover{width:470px!important;max-width:min(470px,calc(100vw - 28px))!important;overflow-x:hidden!important;padding:14px!important}
.guide-bg-popover .guide-bg-presets{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%!important}
.guide-bg-popover .guide-bg-presets button{width:100%!important;min-width:0!important;overflow:hidden!important}
.guide-bg-popover .guide-bg-custom-controls{width:100%;min-width:0}
.guide-bg-popover .guide-bg-custom-controls input,.guide-bg-popover .guide-bg-custom-controls select{max-width:100%;width:100%;box-sizing:border-box}
.guide-bg-gallery-title{font-size:16px;font-weight:800;color:#172033}.guide-bg-gallery-help{font-size:12px;color:#64748b;line-height:1.35}
@media(max-width:600px){.guide-bg-popover{left:8px!important;right:8px!important;width:auto!important;max-width:none!important}.guide-bg-popover .guide-bg-presets{grid-template-columns:1fr!important}}

/* ===== V17.16 · Etapa 14.25 · temas de fondo multicolor ===== */
.guide-bg-popover{width:540px!important;max-width:min(540px,calc(100vw - 28px))!important}
.guide-bg-popover .guide-bg-presets{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.guide-bg-popover .guide-bg-presets button{grid-template-columns:78px 1fr!important;min-height:62px!important}
.guide-bg-popover .bg-thumb{width:78px;height:48px}
.guide-bg-palette{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0;padding-top:10px;border-top:1px solid #e5e7eb}
.guide-bg-palette>span{font-size:12px;font-weight:800;color:#475569;margin-right:2px}
.guide-bg-palette button{display:flex!important;align-items:center!important;gap:5px!important;padding:5px 7px!important;min-height:30px!important;height:auto!important;border:1px solid #d8e0e9!important;border-radius:8px!important;background:#fff!important;color:#334155!important;font-size:11px!important}
.guide-bg-palette button.active{border-color:#2563eb!important;box-shadow:0 0 0 2px #dbeafe!important}
.guide-bg-palette i{width:22px;height:14px;border-radius:4px;display:inline-block;border:1px solid #d1d5db}.pal-brand{background:linear-gradient(135deg,var(--bg-preview,#2563eb),#38bdf8,#dbeafe)}.pal-ocean{background:linear-gradient(135deg,#075985,#06b6d4,#bae6fd)}.pal-violet{background:linear-gradient(135deg,#5b21b6,#2563eb,#ddd6fe)}.pal-sunset{background:linear-gradient(135deg,#c2410c,#db2777,#fed7aa)}.pal-graphite{background:linear-gradient(135deg,#1f2937,#64748b,#e2e8f0)}
/* miniaturas realmente distintas */
.bg-tech{background:linear-gradient(135deg,#0f172a 0 16%,transparent 16%),linear-gradient(315deg,#06b6d4 0 13%,transparent 13%),linear-gradient(145deg,#2563eb 0 12%,transparent 12%) left bottom/65% 50% no-repeat,#fff}
.bg-waves{background:radial-gradient(85% 70% at 5% 0,#2563eb 0 28%,transparent 29%),radial-gradient(90% 75% at 95% 100%,#06b6d4 0 24%,transparent 25%),radial-gradient(75% 60% at 100% 100%,#bae6fd 0 38%,transparent 39%),#fff}
.bg-premium{background:linear-gradient(150deg,#111827 0 11%,#64748b 11% 14%,transparent 14%),linear-gradient(330deg,#334155 0 9%,#cbd5e1 9% 12%,transparent 12%),#fff}
.bg-circuit{background:linear-gradient(90deg,transparent 0 8%,#06b6d4 8% 10%,transparent 10% 100%),linear-gradient(0deg,transparent 0 76%,#2563eb 76% 79%,transparent 79%),radial-gradient(circle at 9% 78%,#2563eb 0 3px,transparent 4px),#fff}
.bg-soft{background:radial-gradient(circle at 0 0,#dbeafe 0 25%,transparent 26%),radial-gradient(circle at 100% 100%,#e9d5ff 0 23%,transparent 24%),#fff}
.bg-dynamic{background:linear-gradient(155deg,#2563eb 0 10%,transparent 10%),linear-gradient(335deg,#db2777 0 10%,transparent 10%),linear-gradient(155deg,transparent 0 83%,#f59e0b 83% 88%,transparent 88%),#fff}
/* página: decoración rica, zona central blanca y libre */
.guide-paper[data-bg-style="tech"]::before{background:linear-gradient(135deg,var(--guide-bg1) 0 5.5%,transparent 5.6%) top left/55% 35% no-repeat,linear-gradient(145deg,var(--guide-bg2) 0 4%,transparent 4.1%) top left/42% 42% no-repeat,linear-gradient(315deg,var(--guide-bg2) 0 4.5%,transparent 4.6%) bottom right/48% 30% no-repeat,linear-gradient(325deg,var(--guide-bg3) 0 7%,transparent 7.1%) bottom right/62% 34% no-repeat}
.guide-paper[data-bg-style="waves"]::before{background:radial-gradient(75% 26% at 0 0,var(--guide-bg1) 0 42%,transparent 43%),radial-gradient(72% 24% at 0 0,var(--guide-bg2) 0 54%,transparent 55%),radial-gradient(78% 28% at 100% 100%,var(--guide-bg2) 0 38%,transparent 39%),radial-gradient(72% 24% at 100% 100%,var(--guide-bg3) 0 54%,transparent 55%)}
.guide-paper[data-bg-style="premium"]::before{background:linear-gradient(150deg,var(--guide-bg1) 0 4%,var(--guide-bg2) 4% 5%,transparent 5.1%) top left/100% 100% no-repeat,linear-gradient(330deg,var(--guide-bg1) 0 3.5%,var(--guide-bg3) 3.5% 4.5%,transparent 4.6%) bottom right/100% 100% no-repeat}
.guide-paper[data-bg-style="premium"]::after{inset:12px;border:1px solid color-mix(in srgb,var(--guide-bg2) 38%,transparent)}
.guide-paper[data-bg-style="circuit"]::before{inset:10px;background:linear-gradient(90deg,var(--guide-bg2),var(--guide-bg2)) 0 8%/8% 1px no-repeat,linear-gradient(0deg,var(--guide-bg1),var(--guide-bg1)) 8% 0/1px 8% no-repeat,linear-gradient(270deg,var(--guide-bg2),var(--guide-bg2)) 100% 92%/8% 1px no-repeat,linear-gradient(180deg,var(--guide-bg1),var(--guide-bg1)) 92% 100%/1px 8% no-repeat;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--guide-bg3) 45%,transparent)}
.guide-paper[data-bg-style="soft"]::before{background:radial-gradient(50% 18% at 0 0,var(--guide-bg3) 0 55%,transparent 56%),radial-gradient(45% 16% at 100% 100%,color-mix(in srgb,var(--guide-bg2) 30%,white) 0 55%,transparent 56%)}
.guide-paper[data-bg-style="dynamic"]::before{background:linear-gradient(155deg,var(--guide-bg1) 0 4.5%,transparent 4.6%) top left/100% 100% no-repeat,linear-gradient(335deg,var(--guide-bg2) 0 4%,transparent 4.1%) bottom right/100% 100% no-repeat,linear-gradient(155deg,transparent 0 93%,var(--guide-bg3) 93% 95%,transparent 95.1%)}
.guide-paper.ticket[data-bg-style="tech"]::before,.guide-paper.ticket[data-bg-style="dynamic"]::before{background-size:100% 100%}.guide-paper.ticket[data-bg-style="premium"]::after{inset:6px}
@media(max-width:600px){.guide-bg-popover .guide-bg-presets{grid-template-columns:1fr!important}}

/* ===== V17.16 · Etapa 14.26 · fondos para guía técnica ===== */
.guide-bg-docs{width:560px!important}.guide-bg-docs .guide-bg-presets button{grid-template-columns:86px 1fr!important;text-align:left!important}.guide-bg-docs .guide-bg-presets button>span:last-child{display:grid;gap:2px}.guide-bg-docs .guide-bg-presets b{font-size:12px}.guide-bg-docs .guide-bg-presets small{font-size:10px;color:#64748b}.guide-bg-colors{display:flex;gap:8px;align-items:end;flex-wrap:wrap;margin:10px 0;padding:10px 0;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}.guide-bg-colors label{display:grid;gap:4px;font-size:11px;font-weight:800;color:#475569}.guide-bg-colors input[type=color]{width:72px;height:34px;padding:2px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}.guide-bg-colors button{height:34px!important;padding:5px 9px!important}
.bg-cornerline{background:linear-gradient(90deg,#1d4ed8 0 3px,transparent 3px) 8px 8px/45% 1px no-repeat,linear-gradient(#1d4ed8 0 3px,transparent 3px) 8px 8px/1px 45% no-repeat,linear-gradient(270deg,#38bdf8 0 3px,transparent 3px) calc(100% - 8px) calc(100% - 8px)/45% 1px no-repeat,linear-gradient(0deg,#38bdf8 0 3px,transparent 3px) calc(100% - 8px) calc(100% - 8px)/1px 45% no-repeat,#fff}.bg-softframe{background:linear-gradient(#1d4ed8,#1d4ed8) 5px 5px/calc(100% - 10px) 1px no-repeat,linear-gradient(#38bdf8,#38bdf8) 9px 9px/calc(100% - 18px) 1px no-repeat,#fff}.bg-headerline{background:linear-gradient(90deg,#1d4ed8 0 64%,#38bdf8 64% 82%,transparent 82%) top/100% 5px no-repeat,#fff}.bg-diagonal{background:linear-gradient(145deg,#1d4ed8 0 9%,transparent 9.2%) top left/50% 45% no-repeat,linear-gradient(325deg,#38bdf8 0 7%,transparent 7.2%) bottom right/45% 38% no-repeat,#fff}.bg-circuitlite{background:linear-gradient(90deg,#1d4ed8,#1d4ed8) 7px 8px/35% 1px no-repeat,linear-gradient(#1d4ed8,#1d4ed8) 7px 8px/1px 22% no-repeat,radial-gradient(circle,#38bdf8 0 3px,transparent 3.5px) 6px 7px/8px 8px no-repeat,#fff}.bg-curve{background:radial-gradient(70% 45% at -10% -10%,#dbeafe 0 55%,transparent 56%),radial-gradient(55% 35% at 105% 105%,#bae6fd 0 55%,transparent 56%),#fff}
/* Los nuevos temas dejan el centro completamente libre. */
.guide-paper[data-bg-style="cornerline"]::before{inset:9px;background:linear-gradient(90deg,var(--guide-bg1),var(--guide-bg1)) 0 0/24% 1.5px no-repeat,linear-gradient(var(--guide-bg1),var(--guide-bg1)) 0 0/1.5px 10% no-repeat,linear-gradient(270deg,var(--guide-bg2),var(--guide-bg2)) 100% 100%/24% 1.5px no-repeat,linear-gradient(0deg,var(--guide-bg2),var(--guide-bg2)) 100% 100%/1.5px 10% no-repeat}
.guide-paper[data-bg-style="softframe"]::before{inset:9px;border:1px solid color-mix(in srgb,var(--guide-bg1) 42%,transparent)}.guide-paper[data-bg-style="softframe"]::after{inset:14px;border:1px solid color-mix(in srgb,var(--guide-bg2) 28%,transparent)}
.guide-paper[data-bg-style="headerline"]::before{background:linear-gradient(90deg,var(--guide-bg1) 0 64%,var(--guide-bg2) 64% 82%,transparent 82%) top/100% 5px no-repeat}.guide-paper[data-bg-style="headerline"]::after{inset:10px;border-bottom:1px solid color-mix(in srgb,var(--guide-bg2) 22%,transparent)}
.guide-paper[data-bg-style="diagonal"]::before{background:linear-gradient(145deg,var(--guide-bg1) 0 3.1%,transparent 3.2%) top left/100% 100% no-repeat,linear-gradient(325deg,var(--guide-bg2) 0 2.7%,transparent 2.8%) bottom right/100% 100% no-repeat}.guide-paper[data-bg-style="diagonal"]::after{inset:12px;border:1px solid color-mix(in srgb,var(--guide-bg1) 16%,transparent)}
.guide-paper[data-bg-style="circuitlite"]::before{inset:10px;background:linear-gradient(90deg,var(--guide-bg1),var(--guide-bg1)) 0 0/13% 1px no-repeat,linear-gradient(var(--guide-bg1),var(--guide-bg1)) 0 0/1px 5% no-repeat,radial-gradient(circle,var(--guide-bg2) 0 2.5px,transparent 3px) 13% 0/7px 7px no-repeat,linear-gradient(270deg,var(--guide-bg2),var(--guide-bg2)) 100% 100%/13% 1px no-repeat,linear-gradient(0deg,var(--guide-bg2),var(--guide-bg2)) 100% 100%/1px 5% no-repeat}
.guide-paper[data-bg-style="curve"]::before{background:radial-gradient(45% 13% at 0 0,color-mix(in srgb,var(--guide-bg1) 16%,white) 0 60%,transparent 61%),radial-gradient(40% 12% at 100% 100%,color-mix(in srgb,var(--guide-bg2) 18%,white) 0 60%,transparent 61%)}
.guide-paper.ticket[data-bg-style="softframe"]::before{inset:5px}.guide-paper.ticket[data-bg-style="softframe"]::after{inset:8px}.guide-paper.ticket[data-bg-style="cornerline"]::before,.guide-paper.ticket[data-bg-style="circuitlite"]::before{inset:5px}

/* V17.16 · Etapa 14.27 · marca de agua como objeto independiente */
.guide-canvas-editor .guide-paper .guide-watermark-wrap.guide-watermark-1427{
  position:absolute!important;transform:none!important;z-index:6!important;pointer-events:auto!important;
  touch-action:none!important;cursor:move!important;box-sizing:border-box!important;max-width:none!important;
}
.guide-canvas-editor .guide-watermark-wrap.guide-watermark-1427 .guide-watermark{
  position:relative!important;inset:auto!important;width:100%!important;height:auto!important;max-width:none!important;max-height:none!important;
  display:block!important;transform:none!important;pointer-events:none!important;user-select:none!important;-webkit-user-drag:none!important;
}
.guide-canvas-editor .guide-watermark-wrap.guide-watermark-1427.guide-object-selected{
  outline:2px dashed #0a58ca!important;outline-offset:5px!important;
}
.guide-canvas-editor .guide-watermark-wrap.guide-watermark-1427 .guide-watermark-resize{
  position:absolute!important;right:-11px!important;bottom:-11px!important;width:16px!important;height:16px!important;
  display:none!important;background:#fff!important;border:3px solid #0a58ca!important;border-radius:3px!important;
  cursor:nwse-resize!important;z-index:20!important;box-sizing:border-box!important;pointer-events:auto!important;
}
.guide-canvas-editor .guide-watermark-wrap.guide-watermark-1427.guide-object-selected .guide-watermark-resize{display:block!important}
@media print{.guide-watermark-wrap.guide-watermark-1427{outline:none!important}.guide-watermark-wrap.guide-watermark-1427 .guide-watermark-resize{display:none!important}}

/* V17.16 Etapa 14.30 · Firmas: una sola línea por firma.
   El contenedor de la sección no dibuja borde propio; cada firma conserva únicamente su línea superior. */
.guide-paper .gp-sign.guide-sort-block,
.guide-paper .gp-sign.guide-sort-block.gc-none,
.guide-paper .gp-sign.guide-sort-block.gc-line,
.guide-paper .gp-sign.guide-sort-block.gc-box{
  border:none!important;
  background:transparent!important;
  box-shadow:none!important;
}
.guide-paper .gp-sign>span{
  border:0!important;
  border-top:1px solid #111827!important;
  padding-top:5px;
}

/* Etapa 14.32: detalle financiero compacto */
#reportDetails .report-repairs-compact{width:100%;font-size:12px;table-layout:auto}
#reportDetails .report-repairs-compact th,#reportDetails .report-repairs-compact td{padding:11px 9px}
#reportDetails .report-repair-part{max-width:170px;overflow:hidden;text-overflow:ellipsis}
#reportDetails .report-commission-edit{padding:7px 10px;font-size:12px}
.report-detail-dialog:has(#reportDetails){width:min(1500px,98vw);max-width:1500px}
.report-detail-dialog:has(#reportDetails) .report-detail-body{padding-left:12px;padding-right:12px}

/* V17.16 · Etapa 14.34 · Cotizador y lista de precios */
.quote-hero{display:grid;gap:16px}.quote-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(330px,.8fr);gap:18px;align-items:start}.quote-cart{position:sticky;top:16px}.price-results{display:grid;gap:9px}.price-result{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;padding:13px 14px;border:1px solid #e2e8f0;border-radius:13px;background:#fff}.price-result:hover{border-color:#93c5fd;background:#f8fbff}.price-result h4{margin:0 0 4px;font-size:14px}.price-result p{margin:0;color:#64748b;font-size:12px}.price-result-price{text-align:right}.price-result-price b{display:block;font-size:17px}.price-result-price small{display:block;color:#64748b;margin:2px 0 7px}.quote-line{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #edf2f7}.quote-line small{display:block;color:#64748b}.quote-line button{padding:6px 9px}.quote-total{display:flex;justify-content:space-between;align-items:center;padding:18px 0 8px}.quote-total b{font-size:26px}.quote-primary{width:100%;margin-top:14px}.quote-new-client{margin-top:12px;padding:12px;border:1px solid #bfdbfe;border-radius:12px;background:#eff6ff}.price-admin-actions{display:flex;gap:8px;flex-wrap:wrap}.price-import-scope{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin-top:12px}.price-import-scope label{max-width:240px}.price-admin-table{font-size:12px}.price-admin-table td,.price-admin-table th{padding:9px 8px}.price-admin-table .price-actions{white-space:nowrap}.price-admin-table button{padding:6px 8px;font-size:11px}@media(max-width:900px){.quote-layout{grid-template-columns:1fr}.quote-cart{position:static}.price-result{grid-template-columns:1fr}.price-result-price{text-align:left}}

/* V17.16 Etapa 14.36 - descuento en cotizacion */
.quote-pricing{padding-top:14px}.quote-subtotal{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.quote-subtotal b{font-size:16px}.quote-discount-row{display:grid;grid-template-columns:110px 1fr;gap:10px;align-items:end}.quote-discount-row label{margin:0}.quote-discount-row select{margin-top:5px}.quote-discount-row input{margin:0}.quote-discount-applied{text-align:right;color:#64748b;font-size:12px;margin-top:7px}.quote-total{border-top:1px solid #e2e8f0;margin-top:12px;padding-top:14px}.quote-total span{font-weight:700}.quote-total b{font-size:28px}

.quote-client-head,.quote-new-client-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}.quote-client-head button,.quote-new-client-title button{padding:8px 11px}.quote-new-client-title p{margin:0}
/* V17.16 ETAPA 14.38 · multi-equipo desde cotización */
.quote-equipment{border:1px solid #e2e8f0;border-radius:12px;padding:8px 12px;margin:9px 0;background:#fff}.quote-equipment-head{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:4px 0 5px}.quote-equipment-head small{color:#64748b}.order-quote-equipments{border:1px solid #bfdbfe;background:#f8fbff;border-radius:14px;padding:14px}.order-quote-title,.order-quote-equipment-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.order-quote-title span,.order-quote-equipment-head span{color:#64748b;font-size:12px}.order-quote-equipment{background:#fff;border:1px solid #dbeafe;border-radius:12px;padding:12px;margin-top:10px}.order-quote-services{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 10px}.order-quote-services span{font-size:12px;background:#eff6ff;border:1px solid #dbeafe;border-radius:999px;padding:5px 8px}.quote-primary-hidden{display:none!important}

/* V17.16 Etapa 14.41 · densidad visual consistente a 100% del navegador.
   No usa zoom/scale: compacta únicamente vistas administrativas extensas. */
#quotesPage .box,#reportsPage .box,#pricesPage .box,#serviceconfigPage>.box{padding:17px 19px;margin-top:13px}
#quotesPage .quote-hero{gap:9px}
#quotesPage .quote-hero h3,#reportsPage .page-toolbar h3,#pricesPage .page-toolbar h3{font-size:18px;margin-bottom:4px}
#quotesPage .quote-hero .hint,#reportsPage .hint,#pricesPage .hint{font-size:13px;line-height:1.4}
#quotesPage .search-full{margin:7px 0 0;min-height:42px;padding:9px 12px}
#quotesPage .quote-layout{gap:14px}
#quotesPage .section-title{margin-bottom:11px}
#quotesPage .section-title h3{font-size:17px}
#quotesPage .quote-cart{top:10px}
#quotesPage .quote-total{padding:11px 0 6px}
#quotesPage .quote-total b{font-size:22px}
#quotesPage .quote-primary{margin-top:10px;min-height:42px;padding:9px 12px}
#quotesPage .quote-client-head,#quotesPage .quote-new-client-title{margin:7px 0}
#quotesPage .quote-new-client{padding:11px;margin-top:9px;overflow:hidden}
#quotesPage .quote-new-client .grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 12px}
#quotesPage .quote-new-client label{min-width:0}
#quotesPage .quote-new-client input{width:100%;min-width:0;box-sizing:border-box}
#quotesPage .quote-new-client-title{align-items:flex-start}
#quotesPage .quote-new-client-title .hint{min-width:0;flex:1}
#quotesPage .quote-new-client-title button{flex:0 0 auto}

#reportsPage .page-toolbar{gap:12px;margin-bottom:12px}
#reportsPage .report-actions{gap:7px}
#reportsPage .report-actions button{min-height:38px;padding:8px 12px}
#reportsPage .report-filters{gap:10px;padding:12px;margin:10px 0 12px}
#reportsPage .report-filters input,#reportsPage .report-filters select{min-height:40px;padding:8px 10px;margin-top:5px}
#reportsPage .report-quick{margin-top:6px}
#reportsPage .report-quick button{padding:7px 13px;min-height:36px}
#reportsPage .report-stats{gap:10px;margin:9px 0}
#reportsPage .report-stats article{min-height:88px;padding:13px 15px;gap:6px}
#reportsPage .report-stats span{font-size:12px}
#reportsPage .report-stats b,#reportsPage .finance-report-stats article b{font-size:23px}
#reportsPage .report-heading{margin-top:18px!important}

@media(max-width:1200px){
  #quotesPage .quote-layout{grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr)}
  #quotesPage .quote-new-client .grid{grid-template-columns:1fr}
  #reportsPage .report-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px){
  #quotesPage .quote-layout{grid-template-columns:1fr}
  #quotesPage .quote-new-client .grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:600px){
  #quotesPage .quote-new-client .grid,#reportsPage .report-filters{grid-template-columns:1fr}
}

/* V17.16 · Etapa 14.42 · Firmas consistentes A4 / Ticket
   Una única línea visual por firma y firmas visibles también en ticket. */
.guide-paper .gp-sign,
.guide-paper .gp-sign.guide-sort-block,
.guide-paper .gp-sign.guide-sort-block.gc-none,
.guide-paper .gp-sign.guide-sort-block.gc-line,
.guide-paper .gp-sign.guide-sort-block.gc-box{
  border:0!important;
  border-top:0!important;
  border-bottom:0!important;
  outline:0;
  background:transparent!important;
  box-shadow:none!important;
}
.guide-paper .gp-sign>span{
  position:relative;
  display:block;
  border:0!important;
  padding-top:9px!important;
  min-width:110px;
  text-align:center;
}
.guide-paper .gp-sign>span::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:1px;
  background:#111827;
}
.guide-paper.ticket .gp-sign,
.guide-paper.ticket .gp-flow .gp-sign{
  display:flex!important;
  justify-content:space-between!important;
  align-items:flex-end!important;
  gap:14px!important;
  margin-top:22px!important;
  margin-bottom:8px!important;
  width:100%!important;
}
.guide-paper.ticket .gp-sign>span{
  flex:1 1 0;
  min-width:0!important;
  font-size:.9em;
  padding-top:7px!important;
}
@media print{
  .guide-paper .gp-sign{outline:none!important}
}

/* =========================================================
   V17.16 · ETAPA 15.2 · NUEVA NAVEGACION SOBRE BASE ESTABLE
   Login/autenticacion intactos. Solo shell posterior al acceso.
   ========================================================= */
@media (min-width:801px){
  .etapa15-shell{display:block!important;min-height:100vh!important;background:#f5f7fb!important}
  .etapa15-shell>main{margin-left:0!important;width:100%!important;max-width:none!important;padding:0 28px 28px!important;box-sizing:border-box!important}
}
.etapa15-shell aside{display:none!important}
.etapa15-topbar{position:sticky!important;top:0!important;z-index:100!important;margin:0 -28px 18px!important;padding:8px 28px!important;height:66px!important;min-height:66px!important;max-height:66px!important;background:rgba(255,255,255,.98)!important;border-bottom:1px solid #dce3ec!important;box-shadow:0 3px 14px rgba(15,23,42,.045)!important}
.etapa15-topbar .topbar-identity{height:50px!important;overflow:visible!important}
.etapa15-topbar .topbar-store-logo{width:110px!important;height:38px!important;max-width:110px!important;max-height:38px!important;flex-basis:110px!important}
.etapa15-topbar .topbar-system-name{font-size:18px!important;font-weight:800!important;color:#14213a!important;letter-spacing:-.02em!important}
.main-menu-toggle{height:38px!important;min-height:38px!important;padding:0 13px!important;border:1px solid #d7dfeb!important;border-radius:10px!important;background:#fff!important;color:#172033!important;font-weight:750!important;box-shadow:none!important}
.main-menu-toggle:hover,.main-menu-toggle[aria-expanded="true"]{background:#eef4ff!important;border-color:#b9cdf7!important;color:#1d4ed8!important}
.main-mega-menu{position:relative;z-index:80;margin:-18px -28px 18px;padding:18px 28px 20px;background:#fff;border-bottom:1px solid #dce3ec;box-shadow:0 14px 30px rgba(15,23,42,.08)}
.main-mega-menu.hidden{display:none!important}
.mega-menu-inner{display:grid;grid-template-columns:1.15fr 1.15fr 1fr 1.15fr;gap:34px;max-width:1500px;margin:0 auto}
.mega-menu-group{min-width:0}
.mega-kicker{display:block;margin:0 0 9px;font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:#64748b}
.mega-menu-group nav{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.mega-menu-group nav button{min-height:34px!important;padding:7px 9px!important;border-radius:8px!important;background:transparent!important;color:#27364f!important;text-align:left!important;font-size:13px!important;font-weight:650!important;box-shadow:none!important;transform:none!important}
.mega-menu-group nav button::before{display:none!important}
.mega-menu-group nav button:hover{background:#f1f5f9!important;color:#0f172a!important}
.mega-menu-group nav button.active{background:#eaf2ff!important;color:#1d4ed8!important;box-shadow:none!important}
.mega-future{padding:13px 15px;border:1px dashed #d6dfec;border-radius:12px;background:#f8fafc}
.mega-future p{margin:0;color:#718096;font-size:12px;line-height:1.45}
.etapa15-shell main>header{margin:0 0 14px!important;padding:0!important;min-height:auto!important}
.etapa15-shell main>header h2{font-size:24px!important;letter-spacing:-.025em!important}
.etapa15-shell main>header p{font-size:12px!important;margin-top:3px!important}
.etapa15-shell #panelPage .welcome-box{margin-top:0!important}
@media(max-width:1050px){.mega-menu-inner{grid-template-columns:1fr 1fr}.etapa15-topbar{height:auto!important;max-height:none!important}}
@media(max-width:800px){
  .etapa15-shell>main{margin:0!important;width:100%!important;padding:0 14px 20px!important}
  .etapa15-topbar{position:relative!important;margin:0 -14px 14px!important;padding:10px 14px!important;height:auto!important;max-height:none!important}
  .main-mega-menu{margin:-14px -14px 14px;padding:14px}
  .mega-menu-inner{grid-template-columns:1fr;gap:18px}
  .mega-menu-group nav{grid-template-columns:1fr 1fr}
  .main-menu-toggle span{display:none}
}

/* =========================================================
   V17.16 · ETAPA 15.3 · PANEL OPERATIVO + LOGIN AISLADO
   ========================================================= */
/* La app debe permanecer totalmente oculta hasta que init() valide la sesión. */
.etapa15-shell.hidden{display:none!important}

@media (min-width:1051px){
  .etapa15-topbar{display:grid!important;grid-template-columns:auto minmax(300px,1fr) auto!important;gap:24px!important}
  .topbar-global-search{display:flex;align-items:center;gap:8px;max-width:560px;width:100%;justify-self:center;padding:0 13px;border:1px solid #d8e0eb;border-radius:12px;background:#f8fafc;height:42px;box-sizing:border-box}
  .topbar-global-search span{font-size:20px;color:#64748b;line-height:1}
  .topbar-global-search input{width:100%;height:38px!important;min-height:38px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:14px!important}
}
@media(max-width:1050px){.topbar-global-search{order:3;width:100%;display:flex;align-items:center;gap:8px}.topbar-global-search input{width:100%}}

#panelPage .welcome-box{padding:14px 18px!important;border-radius:16px!important}
#panelPage .welcome-box h3{font-size:20px!important;margin:0 0 2px!important}
.etapa15-operational-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin-top:10px!important}
.etapa15-operational-stats article{min-height:86px!important;padding:14px 16px!important;border-radius:15px!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important}
.etapa15-operational-stats article span{font-size:12px!important;color:#64748b!important}
.etapa15-operational-stats article b{font-size:25px!important;line-height:1.05!important;margin:3px 0!important}
.etapa15-operational-stats article small{font-size:10px;color:#94a3b8}
.etapa15-summary{margin:8px 4px 12px!important}
.etapa15-panel-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:12px;align-items:stretch}
.etapa15-recent,.etapa15-quick{padding:14px 16px!important;border-radius:16px!important}
.etapa15-recent .section-title,.etapa15-quick .section-title{margin-bottom:10px!important}
.etapa15-quick{display:flex;flex-direction:column;gap:8px}
.etapa15-quick .section-title{display:block!important}
.etapa15-quick button{width:100%;min-height:40px!important;text-align:left!important;padding:0 13px!important;border-radius:10px!important}
@media(max-width:900px){.etapa15-operational-stats{grid-template-columns:1fr 1fr!important}.etapa15-panel-grid{grid-template-columns:1fr}.etapa15-quick{display:grid;grid-template-columns:1fr 1fr}.etapa15-quick .section-title{grid-column:1/-1}}
@media(max-width:560px){.etapa15-operational-stats{grid-template-columns:1fr!important}.etapa15-quick{grid-template-columns:1fr}}

/* ETAPA 15.8: cliente rápido en nueva orden */
.order-client-picker{padding:12px 14px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc}.order-client-picker .quote-client-head{margin-top:0}.order-client-picker .quote-new-client{background:#fff}.order-client-picker #orderSaveNewClient{margin-top:10px}

/* V17.16 · ETAPA 15.9: panel operativo interactivo */
#panelPage .panel-kpi{cursor:pointer;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease}
#panelPage .panel-kpi:hover,#panelPage .panel-kpi:focus-visible{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.09);border-color:#bfdbfe;outline:none}
.etapa15-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.etapa15-active{padding:14px 16px!important;border-radius:16px!important}
.etapa15-active .panel-visual{display:flex!important;align-items:center;justify-content:center;gap:18px;min-height:145px;padding:4px 0}
.etapa15-active .status-legend{min-width:112px}
.etapa15-active .legend-row{gap:7px;font-size:11px}
.etapa15-active .legend-row b{margin-left:auto}
@media(max-width:900px){.etapa15-side{display:grid;grid-template-columns:1fr 1fr}.etapa15-active,.etapa15-quick{min-width:0}}
@media(max-width:650px){.etapa15-side{grid-template-columns:1fr}}

/* V17.16 · ETAPA 15.10: permisos granulares */
.permission-editor{margin-top:8px}.permission-check-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}.permission-check{display:flex;align-items:center;gap:9px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;font-size:13px}.permission-check input{width:16px;height:16px;margin:0}.permission-count{font-size:12px;color:#475569;font-weight:700}@media(max-width:650px){.permission-check-list{grid-template-columns:1fr}}


/* V17.16 · Etapa 15.11 · filtros de órdenes visibles y cabecera estable */
#newOrder{white-space:nowrap!important;min-width:150px!important;padding-left:18px!important;padding-right:18px!important}
.order-active-filter{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:10px 12px;border:1px solid #bfdbfe;border-radius:12px;background:#eff6ff;color:#1e3a5f;font-size:13px}
.order-active-filter.hidden{display:none!important}
.order-active-filter button{min-height:34px!important;padding:6px 11px!important;white-space:nowrap}
@media(max-width:650px){.order-active-filter{align-items:flex-start;flex-direction:column}}


/* V17.16 · Etapa 15.16 · catálogos de proveedores */
.provider-catalog-box{margin-top:12px}.provider-catalog-tools{display:flex;align-items:center;gap:12px;margin:12px 0}.provider-catalog-tools input{flex:1}.provider-catalog-preview{width:min(1180px,96vw);max-width:1180px}.provider-catalog-preview .dialog-head{position:sticky;top:0;background:#fff;z-index:3}.catalog-preview-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0}.catalog-preview-scroll{max-height:65vh;overflow:auto;border:1px solid #e2e8f0;border-radius:12px}.catalog-preview-scroll table{margin:0;min-width:980px}.catalog-preview-scroll th{position:sticky;top:0;background:#f8fafc;z-index:2}.catalog-preview-scroll input,.catalog-preview-scroll select{min-height:34px!important;height:34px!important;padding:5px 7px!important;font-size:12px!important}.catalog-preview-scroll td:nth-child(1){width:48px;text-align:center}.catalog-preview-scroll td:nth-child(2){width:140px}.catalog-preview-scroll td:nth-child(3){min-width:320px}.catalog-preview-scroll td:nth-child(4){width:140px}.catalog-preview-scroll td:nth-child(5){width:140px}.catalog-preview-scroll td:nth-child(6){width:140px}.provider-price-refs{margin-top:8px;max-width:620px}.provider-price-refs summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;padding:7px 10px;border-radius:9px;background:#f1f5f9;color:#475569;font-size:12px}.provider-price-refs summary::-webkit-details-marker{display:none}.provider-price-refs summary b{color:#0f172a}.provider-toggle-label{white-space:nowrap;color:#1d4ed8;font-weight:700}.provider-price-refs[open] .provider-toggle-label{font-size:0}.provider-price-refs[open] .provider-toggle-label:after{content:"Ocultar";font-size:12px}.provider-price-list{margin-top:6px;border:1px solid #e2e8f0;border-radius:9px;overflow:hidden;background:#fff}.provider-price-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:7px 10px;font-size:12px;color:#475569}.provider-price-row+.provider-price-row{border-top:1px solid #eef2f7}.provider-price-row b,.provider-price-row strong{color:#0f172a}.provider-price-row strong{white-space:nowrap}@media(max-width:700px){.provider-catalog-tools{align-items:stretch;flex-direction:column}.catalog-preview-actions{align-items:stretch;flex-direction:column}}

/* V17.16 · ETAPA 15.17.1 · CENTRO SUPER ADMIN */
.superadmin-page{--sa-navy:#111827;--sa-blue:#3b82f6;--sa-muted:#6b7280}.sa-hero{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:24px 26px;margin-bottom:14px;border-radius:20px;background:linear-gradient(135deg,#111827,#1f2937);color:#fff;box-shadow:0 14px 34px rgba(15,23,42,.13)}.sa-eyebrow{display:block;margin-bottom:7px;font-size:10px;font-weight:800;letter-spacing:.16em;color:#93c5fd}.sa-hero h3{margin:0 0 5px;font-size:27px}.sa-hero p{margin:0;color:#cbd5e1}.sa-hero-badge{min-width:155px;padding:13px 15px;border:1px solid rgba(255,255,255,.15);border-radius:14px;background:rgba(255,255,255,.07);display:flex;flex-direction:column}.sa-hero-badge span,.sa-hero-badge small{font-size:10px;color:#cbd5e1}.sa-hero-badge strong{margin:2px 0;font-size:15px}.sa-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.sa-kpis article{padding:16px 17px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;box-shadow:0 4px 14px rgba(15,23,42,.035)}.sa-kpis span{display:block;font-size:12px;color:#6b7280}.sa-kpis b{display:block;margin:4px 0;font-size:27px;color:#111827}.sa-kpis small{font-size:10px;color:#9ca3af}.sa-grid{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:12px;align-items:start}.sa-companies-box,.sa-health,.sa-shortcuts{border-radius:16px!important}.sa-company-name{display:flex;flex-direction:column;gap:2px}.sa-company-name small{color:#94a3b8}.sa-company-current{display:inline-flex;padding:3px 7px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:10px;font-weight:800}.sa-side{display:flex;flex-direction:column;gap:12px}.sa-health-row{display:flex;align-items:center;gap:10px;padding:10px 0}.sa-health-row+.sa-health-row{border-top:1px solid #eef2f7}.sa-health-row div{display:flex;flex-direction:column}.sa-health-row b{font-size:12px}.sa-health-row small{font-size:10px;color:#94a3b8}.sa-dot{width:9px;height:9px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px #dcfce7}.sa-shortcuts{display:flex;flex-direction:column;gap:8px}.sa-shortcuts .section-title{margin-bottom:2px!important}.sa-shortcuts button{width:100%;text-align:left}.sa-company-action{white-space:nowrap}.superadmin-only.hidden{display:none!important}@media(max-width:900px){.sa-kpis{grid-template-columns:1fr 1fr}.sa-grid{grid-template-columns:1fr}.sa-side{display:grid;grid-template-columns:1fr 1fr}}@media(max-width:600px){.sa-hero{align-items:flex-start;flex-direction:column}.sa-hero-badge{width:100%;box-sizing:border-box}.sa-kpis,.sa-side{grid-template-columns:1fr}}

/* V17.16 · ETAPA 15.17.2 · SUPER ADMIN GLOBAL + IDENTIDAD GESTIÓN ST */
.gst-brand{display:inline-flex;align-items:center;gap:9px;white-space:nowrap}.gst-brand img{width:32px;height:32px}.gst-brand strong{font-size:18px;color:#111827}.gst-login-brand{display:flex;align-items:center;gap:12px;margin-bottom:18px}.gst-login-brand img{width:46px;height:46px}.gst-login-brand h1{margin:0;font-size:27px;color:#111827}.gst-login-brand p{margin:2px 0 0;color:#6b7280;font-size:12px}
.superadmin-page{max-width:1500px;margin:0 auto}.sa-global-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:8px 0 20px}.sa-global-head h3{font-size:30px;margin:4px 0}.sa-global-head p{margin:0;color:#6b7280}.sa-global-actions{display:flex;align-items:center;gap:10px}.sa-mode-pill{padding:8px 11px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:11px;font-weight:800}.sa-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:14px;align-items:start}.sa-subscriptions{padding:20px!important}.sa-subscriptions h3{margin:10px 0 5px}.sa-card-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#eff6ff;color:#2563eb;font-size:22px}.sa-plan-preview{display:flex;flex-direction:column;gap:8px;padding:18px;border:1px solid #dbeafe;border-radius:14px;background:#f8fbff;margin:14px 0}.sa-plan-preview span{font-weight:700}.sa-plan-preview small{color:#64748b}
body.sa-global-context #storeIdentityLogo,body.sa-global-context #company,body.sa-global-context #store,body.sa-global-context #newOrder,body.sa-global-context .topbar-global-search,body.sa-global-context #mainMenuToggle{display:none!important}body:not(.sa-company-context) #saExitCompany{display:none!important}body.sa-company-context #saExitCompany{display:inline-flex!important}.sa-company-context .gst-brand{padding-right:8px;border-right:1px solid #d6dee9}.sa-company-context #storeIdentityLogo{margin-left:3px}
body.sa-global-context .etapa15-topbar{justify-content:space-between}body.sa-global-context .topbar-actions{margin-left:auto}body.sa-global-context .topbar-identity{min-width:auto}
@media(max-width:900px){.sa-global-head{align-items:flex-start;flex-direction:column}.sa-main-grid{grid-template-columns:1fr}}


/* =========================================================
   V17.16 · ETAPA 15.17.5 · VISUAL EMPRESA SEGURO
   Base 15.17.2. Sin cambios de datos/Supabase.
   ========================================================= */
body:not(.sa-global-context){background:#e9eef5!important}
body:not(.sa-global-context) .etapa15-shell{background:#e9eef5!important}
body:not(.sa-global-context) .etapa15-topbar{
  background:#f9fbfd!important;border-bottom:1px solid #c9d3df!important;
  box-shadow:0 5px 18px rgba(15,23,42,.09)!important
}
body:not(.sa-global-context) .gst-brand strong{color:#16233a!important}
body:not(.sa-global-context) .main-menu-toggle{background:#eef3f8!important;border-color:#c6d1df!important}
body:not(.sa-global-context) .main-menu-toggle:hover,body:not(.sa-global-context) .main-menu-toggle[aria-expanded="true"]{background:#dce9fb!important;border-color:#9db9e8!important;color:#174ea6!important}
body:not(.sa-global-context) .topbar-global-search{background:#edf2f7!important;border-color:#cbd5e1!important}
body:not(.sa-global-context) .topbar-actions select{background:#f8fafc!important;border-color:#c6d1df!important}
body:not(.sa-global-context) #panelPage .welcome-box{background:linear-gradient(110deg,#edf4fc,#f8fafc)!important;border:1px solid #c8d7e8!important;box-shadow:0 5px 16px rgba(15,23,42,.055)!important}
body:not(.sa-global-context) #panelPage .panel-kpi{position:relative;overflow:hidden;background:#f9fbfd!important;border-color:#cbd5e1!important;box-shadow:0 5px 16px rgba(15,23,42,.055)!important;padding-left:58px!important}
body:not(.sa-global-context) #panelPage .panel-kpi::before{position:absolute;left:17px;top:17px;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e3edf9;color:#244a76;font-size:16px;font-weight:800}
body:not(.sa-global-context) #panelPage .panel-kpi[data-panel-filter="recibido"]::before{content:"↧"}
body:not(.sa-global-context) #panelPage .panel-kpi[data-panel-filter="en_reparacion"]::before{content:"⚙"}
body:not(.sa-global-context) #panelPage .panel-kpi[data-panel-filter="listo_para_entregar"]::before{content:"✓";background:#e5f3ea;color:#28704a}
body:not(.sa-global-context) #panelPage .panel-kpi[data-panel-filter="activas"]::before{content:"▤";background:#f1eaf9;color:#67458a}
body:not(.sa-global-context) #panelPage .panel-kpi span{color:#43536a!important;font-weight:750!important}
body:not(.sa-global-context) #panelPage .panel-kpi b{color:#101b2d!important}
body:not(.sa-global-context) #panelPage .panel-kpi small{color:#65758b!important}
body:not(.sa-global-context) #panelPage .box:not(.welcome-box){background:#f9fbfd!important;border-color:#cbd5e1!important;box-shadow:0 5px 16px rgba(15,23,42,.05)!important}
body:not(.sa-global-context) #panelPage .etapa15-summary{color:#334155!important}
body:not(.sa-global-context) #panelPage #recent table{background:#f9fbfd!important}
body:not(.sa-global-context) #panelPage #recent tr:hover td{background:#edf3f9!important}
body:not(.sa-global-context) .main-mega-menu{background:#f7f9fc!important;border-color:#c8d2df!important;box-shadow:0 18px 34px rgba(15,23,42,.13)!important}
body:not(.sa-global-context) .mega-menu-group nav button:hover{background:#e7edf5!important}
body:not(.sa-global-context) .mega-menu-group nav button.active{background:#dbe8fa!important;color:#174ea6!important}
body:not(.sa-global-context) .mega-future{background:#edf2f7!important;border-color:#c5d0dd!important}
@media(max-width:560px){body:not(.sa-global-context) #panelPage .panel-kpi{padding-left:58px!important}}

/* V17.16 · Etapa 15.17.6 · editor de permisos por áreas */
.permission-group{border:1px solid #dbe3ee;border-radius:12px;padding:12px;background:#f8fafc;margin:8px 0}.permission-group>strong{display:block;margin-bottom:8px;color:#1f2937}.permission-group-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:7px}.permission-check{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:8px;background:#fff;border:1px solid #e5e7eb}.permission-check input{width:auto;margin:0}

/* ETAPA 15.17.7: Estado de la operación junto a Órdenes recientes */
#panelPage .etapa15-side{min-width:0;height:100%}
#panelPage .etapa15-active{height:100%;min-height:100%;box-sizing:border-box;padding:14px 16px!important;border-radius:16px!important}
#panelPage .etapa15-active .section-title{margin-bottom:12px!important}
#panelPage .etapa15-active .panel-visual{min-height:150px;display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap}
#panelPage .etapa15-active .status-legend{min-width:150px;flex:1}
@media(max-width:1100px){.etapa15-panel-grid{grid-template-columns:minmax(0,1fr) 320px}}
@media(max-width:900px){.etapa15-panel-grid{grid-template-columns:1fr}.etapa15-active{height:auto!important}.etapa15-active .panel-visual{justify-content:flex-start}}

/* ETAPA 15.17.8: corrección de visibilidad del Estado de la operación.
   No usar <aside>: el shell moderno oculta los aside de navegación heredados. */
#panelPage .etapa15-operation-column{display:flex!important;flex-direction:column;min-width:0;height:100%;position:static!important;background:transparent!important;color:inherit!important;padding:0!important;border:0!important;box-shadow:none!important}
#panelPage .etapa15-operation-column .etapa15-active{margin-top:0!important;flex:1}
@media(max-width:900px){#panelPage .etapa15-operation-column{display:block!important;height:auto}}
