:root{--ink:#26304a;--muted:#6c768c;--line:#d9dfeb;--bg:#f4f7fb;--card:#fff;--brand:#303897;--brand2:#252c78;--accent:#79c9e8;--soft:#edf2fb;--danger:#8f2f2f;--ok:#24633a}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,Segoe UI,Arial,sans-serif;line-height:1.5}.topbar{background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:12px max(24px,calc((100% - 1240px)/2));position:sticky;top:0;z-index:5;box-shadow:0 3px 16px rgba(43,50,112,.04)}.brand-link{text-decoration:none}.brand-logo{width:185px;height:48px;object-fit:contain;object-position:left center}.topbar nav{display:flex;gap:6px;flex-wrap:wrap}.topbar nav a{color:var(--ink);text-decoration:none;padding:8px 10px;border-radius:8px;font-size:14px;font-weight:600}.topbar nav a:hover{background:var(--soft);color:var(--brand)}.container{max-width:1240px;margin:28px auto;padding:0 22px;min-height:75vh}.pagehead{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 18px}.pagehead h1{margin:0;font-size:30px;color:#242c67}.pagehead p{margin:4px 0 0;color:var(--muted)}.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;margin-bottom:18px;box-shadow:0 7px 24px rgba(39,48,96,.045)}.card h2{margin-top:0;font-size:19px;color:#293174}.card h3{color:#303897}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px;position:relative;overflow:hidden}.stat:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(var(--brand),var(--accent))}.stat span{display:block;color:var(--muted);font-size:13px}.stat strong{font-size:32px;color:var(--brand)}.actions{display:flex;flex-wrap:wrap;gap:10px}.button,button{display:inline-block;border:1px solid #bac3d8;background:#fff;color:var(--ink);padding:10px 14px;border-radius:9px;text-decoration:none;font-weight:700;cursor:pointer;font-size:14px}.button:hover,button:hover{border-color:#8d99bb;background:#f8faff}.primary{background:var(--brand)!important;color:#fff!important;border-color:var(--brand)!important}.primary:hover{background:var(--brand2)!important}.small{padding:5px 8px;font-size:12px}.full{width:100%}label{display:block;font-size:13px;font-weight:700;margin-bottom:14px;color:#3b4662}input,select,textarea{display:block;width:100%;margin-top:6px;padding:10px 11px;border:1px solid #bdc6d8;border-radius:8px;background:#fff;color:var(--ink);font:inherit;outline:none}input:focus,select:focus,textarea:focus{border-color:#6671bb;box-shadow:0 0 0 3px rgba(48,56,151,.08)}textarea{resize:vertical}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.formgrid.compact{margin-top:16px}.wide{grid-column:1/-1}.search{display:flex;gap:10px;margin-bottom:16px}.search input{margin:0}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line);vertical-align:middle}th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#65708a;background:#fafbfe}td a{color:var(--brand);font-weight:700;text-decoration:none}.resulttable input,.structured-table input{min-width:125px;margin:0;padding:8px}.badge{display:inline-block;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800}.badge.ok{background:#e3f4ea;color:#24633a}.badge.done{background:#e8eefc;color:#34449a}.badge.warn{background:#fff1d5;color:#76540d}.flash{background:#e8f1ff;border:1px solid #bfd2f4;border-radius:10px;padding:11px 14px;margin-bottom:16px;color:#31436d}.notice{background:#fff7df;border:1px solid #ead49b;border-radius:10px;padding:12px;margin-top:16px;color:#624c18}.danger{border-color:#e3bdbd;background:#fffafa}.danger h2{color:var(--danger)}.muted{color:var(--muted)}.spacer{margin-top:18px}.testgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.check{border:1px solid var(--line);border-radius:10px;padding:11px;display:flex;gap:9px;align-items:flex-start;margin:0;background:#fbfcff;transition:.15s}.check:hover{border-color:#abb5d0;background:#f7f9ff}.check input{width:auto;margin:4px 0 0}.check small{display:block;color:var(--muted);font-weight:500;margin-top:2px}.login-wrap{min-height:82vh;display:grid;place-items:center}.login-card{width:min(450px,95vw);background:#fff;border:1px solid var(--line);border-radius:20px;padding:32px;box-shadow:0 24px 60px rgba(35,45,95,.09)}.login-logo{display:block;width:270px;max-width:90%;height:auto;margin:0 auto 18px}.login-card h1{text-align:center;margin-bottom:4px;color:var(--brand)}.login-card>p{text-align:center;color:var(--muted)}footer{max-width:1240px;margin:15px auto 30px;padding:0 22px;color:var(--muted);font-size:12px;text-align:center}code{background:#eef1f7;padding:2px 5px;border-radius:5px}hr{border:0;border-top:1px solid var(--line);margin:18px 0}.premium-note{background:linear-gradient(135deg,#fbfcff,#eef7fc);border-color:#cfd9ed}.structured-card{border-top:4px solid var(--brand)}.structured-title{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.structured-title h2{margin-bottom:2px}.structured-title p{margin:0;color:var(--muted)}.format-pill{display:inline-block;background:#e7ecfb;color:#303897;border:1px solid #cbd4f1;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.04em;white-space:nowrap}.format-pill.mini{padding:3px 7px}.result-section{border:1px solid #d8deeb;border-radius:12px;margin:14px 0;overflow:hidden;background:#fff}.result-section summary{cursor:pointer;list-style:none;padding:12px 14px;background:linear-gradient(90deg,#eef1fb,#f7fbfd);color:#303897;font-weight:800;font-size:13px}.result-section summary::-webkit-details-marker{display:none}.result-section summary:after{content:"▾";float:right;color:#7580a2}.result-section:not([open]) summary:after{content:"▸"}.result-section .tablewrap{padding:0 10px 8px}.structured-table th{background:white}.action-card{display:flex;align-items:center;justify-content:space-between;gap:20px;border-left:4px solid var(--accent)}
@media(max-width:900px){.topbar{align-items:flex-start;flex-direction:column;gap:10px}.grid2,.stats,.formgrid,.testgrid{grid-template-columns:1fr}.wide{grid-column:auto}.pagehead{align-items:flex-start;flex-direction:column}.topbar nav{width:100%;overflow:auto;flex-wrap:nowrap}.container{padding:0 12px}.card{padding:15px}.action-card{align-items:flex-start;flex-direction:column}.brand-logo{width:165px}.structured-title{flex-direction:column}}
/* v3: formularios extensos */
.structured-table textarea,.structured-table select{min-width:145px;margin:0;padding:8px}.structured-table textarea{min-height:54px}.structured-table td:nth-child(1){min-width:210px}.structured-table td:nth-child(4){min-width:180px}.result-section summary{position:sticky;left:0}.clinical-warning{border-left:4px solid #d3a22a;background:#fffaf0}

/* EDILAB v4.1 · búsqueda rápida local por DNI */
.dni-lookup{margin-bottom:18px;padding:14px;border:1px solid #dbe1ee;border-radius:12px;background:#f8faff}
.lookup-row{display:flex;gap:8px;align-items:center;margin-top:6px}.lookup-row input{flex:1}
.patient-lookup-card{display:none;margin-top:10px;padding:11px 13px;border-radius:10px;border:1px solid #d8deea;background:white;line-height:1.5}
.patient-lookup-card.show{display:block}.patient-lookup-card.found{border-color:#9bcbb7;background:#f4fbf8}.patient-lookup-card.not-found{border-color:#e6c8a0;background:#fffaf2}
.small-note{font-size:12px;margin-top:7px}
@media(max-width:650px){.lookup-row{align-items:stretch;flex-direction:column}}

/* EDILAB v5.0 Mejorado */
.stats-v5{grid-template-columns:repeat(6,1fr)}
.test-selector-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:18px 0 10px}
.test-selector-head h3{margin:0}.test-filter{max-width:360px;margin:0}.test-empty{display:none;padding:14px 0}
@media(max-width:1100px){.stats-v5{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.stats-v5{grid-template-columns:repeat(2,1fr)}.test-selector-head{align-items:stretch;flex-direction:column}.test-filter{max-width:none}}

/* EDILAB v5.2 · boleta separada + conector RENIEC */
.receipt-table input{margin:0;min-width:90px}.receipt-table td:first-child input{min-width:260px}.receipt-table td:nth-child(2){width:90px}.receipt-table td:nth-child(3){width:150px}.receipt-table td:nth-child(4){width:130px;text-align:right;font-weight:800;color:var(--brand)}
.receipt-total-box{margin:18px 0 8px;text-align:right;font-size:22px;color:var(--brand)}

/* EDILAB v5.4 · caja, pagos, alertas y rangos automáticos */
.result-flag{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:800;vertical-align:middle}
.result-flag.flag-low,.result-flag.flag-high{background:#fff0c9;color:#7b5600;border:1px solid #efd58c}
.result-flag.flag-critical{background:#fde7e7;color:#8d2525;border:1px solid #efb5b5}
.structured-table tr.flag-low td,.structured-table tr.flag-high td,.resulttable tr.flag-low td,.resulttable tr.flag-high td{background:#fffaf0}
.structured-table tr.flag-critical td,.resulttable tr.flag-critical td{background:#fff2f2}
.clinical-alerts{border-left:4px solid #d4a329;background:#fffdf7}.clinical-alerts h2{color:#72520b}
.payment-status-box{margin-top:6px;padding:10px;border:1px solid var(--line);border-radius:9px;background:#fafbfe;min-height:44px}
.payment-panel{margin:18px 0;padding:16px;border:1px solid #d8deea;border-radius:12px;background:#f8faff}.payment-panel h3{margin-top:0}
.cash-date{display:flex;gap:8px;align-items:center}.cash-date input{margin:0;min-width:165px}
.cash-stats{grid-template-columns:repeat(3,1fr)}
.method-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.mini-stat{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fbfcff}.mini-stat span{display:block;color:var(--muted);font-size:12px}.mini-stat strong{display:block;color:var(--brand);font-size:20px;margin-top:4px}
#standard_comment{min-height:105px}
@media(max-width:900px){.cash-stats{grid-template-columns:1fr}.method-grid{grid-template-columns:repeat(2,1fr)}.cash-date{width:100%;align-items:stretch;flex-direction:column}.cash-date input{width:100%}}


/* EDILAB v5.5 · acciones rápidas de informe */
.report-actions-panel{background:linear-gradient(135deg,#f8fbff,#eef8fb);border:1px solid #d4e1ee;border-left:4px solid var(--brand);border-radius:14px;padding:16px 18px;margin:0 0 18px}
.report-actions-title{font-weight:800;color:var(--brand);margin-bottom:10px;font-size:15px}.share-note{font-size:12px;color:var(--muted);margin-top:10px}
.action-whatsapp{background:#1f9d58!important;border-color:#1f9d58!important;color:white!important}.action-whatsapp:hover{background:#178047!important;border-color:#178047!important}
.action-email{background:#eef5ff!important;border-color:#bfd3f2!important;color:#244d89!important}.action-email:hover{background:#e1edff!important}
.action-print{background:#303897!important;border-color:#303897!important;color:white!important}.action-pdf{background:#fff!important}.action-disabled{opacity:.48;cursor:not-allowed!important;background:#f2f4f7!important;color:#7e8798!important}
.wa-mark,.mail-mark,.print-mark{font-size:16px;line-height:1;vertical-align:-1px;margin-right:4px}

/* EDILAB v5.6 · mayor legibilidad, archivo permanente y retiro rápido de pruebas */
body{font-size:16px}.topbar nav a{font-size:15px}.pagehead p{font-size:15px}.card h2{font-size:21px}.card h3{font-size:18px}.stat span{font-size:14px}.button,button{font-size:15px;padding:11px 15px}label{font-size:14.5px}input,select,textarea{font-size:15px;padding:11px 12px}th{font-size:12px}td{font-size:14.5px}.small{font-size:13px}.small-note,.share-note{font-size:13px}.result-section summary{font-size:15px;padding:13px 15px}.resulttable input,.structured-table input,.structured-table textarea,.structured-table select{font-size:14px}.badge{font-size:12px}.report-actions-title{font-size:17px}
.structured-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.tiny{padding:5px 8px!important;font-size:13px!important;line-height:1}.delete-test-btn{border-color:#e2bcbc!important;color:#8f2f2f!important;background:#fffafa!important}.delete-test-btn:hover{background:#fff0f0!important;border-color:#d99f9f!important}.result-action-cell{width:48px;text-align:center}.inline-action-form{display:inline;margin:0}.inline-action-form button{margin:0}
.emitted-lock{border:0;padding:0;margin:0;min-width:0}.emitted-lock>legend{width:100%;padding:10px 14px;margin:0 0 14px;border:1px solid #c7d4eb;border-left:4px solid var(--brand);border-radius:10px;background:#f5f8ff;color:#303897;font-weight:800}.emitted-lock:disabled{opacity:1}.emitted-lock:disabled input,.emitted-lock:disabled select,.emitted-lock:disabled textarea{background:#f5f6f8;color:#586178;border-color:#d9deea}.emitted-action{border-left-color:#5f78b9}.archive-card{border-left:4px solid #5f78b9}.archive-card code{font-size:12px}
@media(max-width:700px){body{font-size:15px}.button,button{font-size:14px}.structured-tools{align-items:flex-start}.result-action-cell{width:auto}}

/* EDILAB v5.7 · sobre A4 y anexos PDF de laboratorio aliado */
.action-cover{background:#eef8ff!important;border-color:#b8d8ea!important;color:#255a78!important}.action-cover:hover{background:#e0f2fb!important}
.annex-card{border-left:4px solid #79c9e8;background:linear-gradient(135deg,#fff,#f8fcff)}.annex-upload{margin:14px 0;padding:14px;border:1px dashed #b8cbe1;border-radius:12px;background:#fbfdff}.annex-note{margin:12px 0;padding:10px 12px;background:#f5f8ff;border:1px solid #dbe4f4;border-radius:9px;color:#5f6980;font-size:13px}.annex-card table td:last-child{min-width:330px}.annex-card input[type=file]{background:#fff}
@media(max-width:800px){.annex-card table td:last-child{min-width:240px}}


/* EDILAB v5.9 · perfiles editables y modo móvil */
.profile-preset{border-left:4px solid #79c9e8;background:linear-gradient(135deg,#fff,#f7fcff)}.preset-master{display:flex;align-items:center;gap:8px;margin:0;font-size:15px;color:#303897}.preset-master input{width:auto;margin:0}.profile-member-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-top:14px}.profile-member{display:flex;align-items:flex-start;gap:9px;margin:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff}.profile-member input{width:auto;margin:4px 0 0}.profile-member small{display:block;color:var(--muted);font-weight:500}.profile-customizer{border-left:4px solid #5f78b9}.profile-customizer form{border:1px solid #dbe1ee;border-radius:12px;padding:14px;background:#fafcff}.profile-customizer h3{margin-top:0}.omitted-fields{margin:10px 0;padding:10px 12px;border:1px dashed #d0d8e7;border-radius:10px;background:#fafbfe}.omitted-fields summary{cursor:pointer;color:#6a7389;font-weight:700}.dni-peru-btn{white-space:nowrap}.mobile-url-box{margin-top:12px;padding:12px;border:1px solid #d6e2f1;border-radius:10px;background:#f8fbff;font-size:14px}.mobile-url-box code{font-size:14px}.structured-table td:last-child{width:48px}.structured-table th:last-child{width:48px}
@media(max-width:800px){.profile-member-grid{grid-template-columns:1fr}.profile-customizer .grid2{grid-template-columns:1fr}.lookup-row .dni-peru-btn{width:100%}}


/* EDILAB v5.10 · edición total de perfiles y fecha manual/calendario */
.profile-edit-panel{margin:14px 0;border:1px solid #ccd7ea;border-radius:12px;background:#f9fbff;overflow:hidden}.profile-edit-panel>summary{cursor:pointer;padding:12px 14px;font-weight:800;color:#303897;background:#eef4ff}.profile-edit-body{padding:14px}.inline-add-field{display:grid;grid-template-columns:1.4fr .7fr 1.1fr 1fr auto;gap:10px;align-items:end}.inline-add-field label{margin:0}.field-label-edit,.exam-name-edit{font-weight:800;color:#303897;background:#fbfcff!important}.catalog-edit{margin-top:7px}.catalog-edit summary{cursor:pointer;color:#303897;font-size:12px;font-weight:800}.catalog-edit form{margin-top:8px;padding:10px;border:1px solid #dbe2ef;border-radius:10px;background:#fafcff;min-width:260px}.catalog-edit label{font-size:12px;margin-bottom:8px}.birthdate-tools{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.birthdate-tools input{flex:1;min-width:170px}.birth-manual-box{display:none;grid-template-columns:1fr auto;gap:8px;align-items:center;margin-top:8px}.birth-manual-box.show{display:grid}.birth-manual-box input{margin:0}.profile-customizer>.structured-title{margin-bottom:12px}
@media(max-width:900px){.inline-add-field{grid-template-columns:1fr 1fr}.inline-add-field button{grid-column:1/-1}.birthdate-tools{align-items:stretch;flex-direction:column}.birthdate-tools input,.birthdate-tools button{width:100%}}

/* EDILAB v7.1 · Beneficio gratuito / Evaluación básica */
.wellness-card{border-top:4px solid #79c9e8}.wellness-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.wellness-check{display:flex;align-items:center;gap:8px;font-weight:700;color:#4a5570}.wellness-check input{width:auto}.wellness-analysis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.wellness-kpi{border:1px solid #d7ddea;background:#fafbfe;border-radius:12px;padding:13px}.wellness-kpi span{display:block;text-transform:uppercase;font-size:11px;letter-spacing:.04em;color:#7a8294;font-weight:700}.wellness-kpi strong{display:block;color:#303897;font-size:17px;margin:5px 0}.wellness-kpi small{color:#6d768b}.bmi-gauge{width:100%;height:auto;display:block}.wellness-empty-chart{padding:18px;border:1px dashed #cbd3e3;border-radius:10px;background:#fbfcff;color:#5f6980;text-align:center}.wellness-comments{display:grid;grid-template-columns:1fr;gap:10px;margin:14px 0}.wellness-comments>div{border-left:4px solid #79c9e8;background:#fbfcff;border-radius:8px;padding:10px 12px}.wellness-comments b{color:#303897}.wellness-comments p{margin:4px 0 0;color:#566078;line-height:1.45}
@media(max-width:900px){.wellness-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wellness-analysis{grid-template-columns:1fr}}
@media(max-width:560px){.wellness-grid{grid-template-columns:1fr}}

/* EDILAB v7.2 · Beneficio Vital Pro */
.wellness-card-pro{border-top:0;position:relative;overflow:hidden;background:linear-gradient(150deg,#fff 0%,#fbfdff 58%,#f4f9ff 100%)}
.wellness-card-pro:before{content:"";position:absolute;left:0;right:0;top:0;height:5px;background:linear-gradient(90deg,#303897,#4e93c8,#79c9e8,#49b79c)}
.wellness-head{padding-bottom:14px;border-bottom:1px solid #e4e9f2}.wellness-head h2{font-size:23px!important;margin-bottom:4px!important}.wellness-pill{background:linear-gradient(135deg,#303897,#4e93c8)!important;color:#fff!important;border:0!important;box-shadow:0 5px 16px rgba(48,56,151,.18)}
.wellness-input-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-top:18px}.wellness-field{margin:0;border:1px solid #dce3ef;border-radius:14px;padding:12px;background:#fff;box-shadow:0 5px 16px rgba(40,51,95,.035);transition:.18s}.wellness-field:hover{border-color:#b9cae1;box-shadow:0 8px 24px rgba(40,51,95,.07);transform:translateY(-1px)}.wellness-field input{margin-top:10px;background:#fbfcff}.wellness-field-title{display:flex;align-items:center;gap:10px;min-height:42px}.wellness-field-title>span:last-child{display:flex;flex-direction:column;font-size:15px;color:#2f3956}.wellness-field-title small{font-size:11px;font-weight:600;color:#8490a7;margin-top:2px}.wellness-icon{display:grid;place-items:center;width:38px;height:38px;min-width:38px;border-radius:12px;background:linear-gradient(135deg,#eef3ff,#effbff);font-size:20px;border:1px solid #dde7f4}
.wellness-actions{align-items:center;padding:14px;border-radius:13px;background:#f7f9fd;border:1px solid #dfe5f0}.wellness-calc-btn{box-shadow:0 7px 18px rgba(48,56,151,.16)}
.wellness-analysis{gap:14px}.wellness-kpi{display:flex;align-items:flex-start;gap:12px;padding:15px;border-radius:15px;background:#fff;box-shadow:0 6px 18px rgba(40,51,95,.045)}.wellness-kpi-icon{display:grid;place-items:center;width:44px;height:44px;min-width:44px;border-radius:13px;background:#eef3ff;font-size:23px}.wellness-kpi>div:last-child{min-width:0}.wellness-kpi span{font-size:11.5px}.wellness-kpi strong{font-size:18px;line-height:1.2}.wellness-kpi-imc{border-top:3px solid #303897}.wellness-kpi-pa{border-top:3px solid #c66a7b}.wellness-kpi-spo{border-top:3px solid #5b9eb4}
.bmi-chart-card{margin-top:8px;padding:14px 16px 10px;border:1px solid #d9e2ef;border-radius:17px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 8px 26px rgba(40,51,95,.045)}.bmi-chart-title{display:flex;align-items:center;gap:10px}.bmi-chart-title>span{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#eef2ff;font-size:21px}.bmi-chart-title b{display:block;color:#303897;font-size:17px}.bmi-chart-title small{display:block;color:#7a849a;margin-top:1px}.bmi-gauge-curved{max-height:390px;margin:0 auto}.bmi-chart-note{margin:-2px 12px 4px;padding-top:9px;border-top:1px solid #e5e9f1;text-align:center;color:#737d92;font-size:12px}.wellness-empty-chart .empty-icon{font-size:28px;margin-bottom:5px}
.wellness-comments>div{border:1px solid #dce3ef;border-left:4px solid #79c9e8;background:#fff;border-radius:12px;padding:12px 14px;box-shadow:0 4px 14px rgba(40,51,95,.03)}.wellness-comments b{font-size:14px}.wellness-note-label{padding-top:6px}.wellness-disclaimer{padding:11px 13px;border:1px solid #e1e6ef;border-radius:10px;background:#fbfcfe}
@media(max-width:1050px){.wellness-input-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.wellness-input-grid{grid-template-columns:1fr}.wellness-actions{align-items:stretch;flex-direction:column}.wellness-calc-btn{width:100%}.wellness-head{gap:8px}.wellness-head h2{font-size:20px!important}}
.cloud-ready{border-left:4px solid #49b79c;background:linear-gradient(135deg,#fff,#f4fbfa)}.cloud-ready-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}.cloud-ready-grid>div{border:1px solid #dce7e5;border-radius:11px;padding:12px;background:#fff}.cloud-ready-grid b{display:block;color:#2f6d66;margin-bottom:4px}.cloud-ready-grid span{display:block;color:#6b7589;font-size:12px;word-break:break-word}@media(max-width:800px){.cloud-ready-grid{grid-template-columns:1fr}}

/* EDILAB v7.3: rangos inteligentes + descuentos */
.smart-ref{margin-top:6px}.smart-ref>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:5px}.smart-ref>summary::-webkit-details-marker{display:none}.smart-ref-form{margin-top:8px;padding:10px;border:1px solid #dbe1ec;border-radius:10px;background:#f8faff;min-width:260px}.smart-ref-form label{margin:0 0 8px}.ref-display{max-width:340px;white-space:normal}.inline-smart{min-width:210px}.inline-smart[open]{grid-column:span 2}.receipt-discount-box{margin:16px 0 6px auto;max-width:430px;border:1px solid #dbe1ec;border-radius:14px;padding:14px;background:#f8faff;display:grid;grid-template-columns:1fr 1fr;gap:10px 18px}.receipt-discount-box>div,.receipt-discount-box>label{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0}.receipt-discount-box input{max-width:130px;text-align:right}.receipt-discount-box .receipt-final{grid-column:1/-1;padding-top:10px;border-top:2px solid #303897;font-size:18px;color:#303897}.receipt-discount-box .receipt-final strong{font-size:20px}

/* EDILAB v8.1 · Nube automática + Lenovo/Touch */
.sync-bar{max-width:1240px;margin:10px auto -8px;padding:8px 14px;border-radius:12px;display:flex;align-items:center;gap:8px;font-size:12px;border:1px solid var(--line);background:#fff;box-shadow:0 4px 14px rgba(39,48,96,.035);transition:.2s}
.sync-bar .sync-dot{width:9px;height:9px;border-radius:50%;background:#9aa4b9;box-shadow:0 0 0 3px rgba(154,164,185,.12)}
.sync-bar strong{color:#3a4564}.sync-bar span:last-child{color:var(--muted)}
.sync-online{border-color:#b9ddce;background:#f5fbf8}.sync-online .sync-dot{background:#2f9d69;box-shadow:0 0 0 3px rgba(47,157,105,.14)}
.sync-offline{border-color:#e5c0c0;background:#fff7f7}.sync-offline .sync-dot{background:#b74242;box-shadow:0 0 0 3px rgba(183,66,66,.12)}.sync-offline strong{color:#8f2f2f}
.sync-changed{border-color:#b8d6ee;background:#f4f9ff}.sync-changed .sync-dot{background:#397eb7;box-shadow:0 0 0 3px rgba(57,126,183,.12)}
@media(max-width:700px){.sync-bar{margin:8px 12px -6px;align-items:flex-start;flex-wrap:wrap}.sync-bar span:last-child{width:100%;padding-left:17px}}

/* Convertible Lenovo / pantallas táctiles: conserva interfaz de PC, pero con blancos de toque más grandes. */
@media (pointer:coarse){
  .button,button,.topbar nav a{min-height:44px;padding:11px 14px;font-size:15px;display:inline-flex;align-items:center;justify-content:center}
  input,select,textarea{min-height:44px;font-size:16px;padding:11px 12px}
  input[type=checkbox],input[type=radio]{min-width:22px;min-height:22px;width:22px;height:22px}
  .check{min-height:50px;padding:13px}.topbar{padding-top:10px;padding-bottom:10px}.topbar nav{gap:8px}
  th,td{padding:13px 11px}.resulttable input,.structured-table input,.structured-table select{min-height:42px;font-size:15px}
  details>summary{min-height:44px;display:flex;align-items:center}.container{margin-top:20px}
}
@media (pointer:coarse) and (max-width:1100px){
  .brand-logo{width:175px}.topbar{align-items:flex-start;flex-direction:column}.topbar nav{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
  .topbar nav a{white-space:nowrap}.grid2{grid-template-columns:1fr}.stats-v5{grid-template-columns:repeat(3,1fr)}
}
@media (pointer:coarse) and (max-width:800px){.stats-v5,.stats{grid-template-columns:repeat(2,1fr)}.card{border-radius:14px}}
