*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#0F172A;background:#F8FAFC;font-size:15px;line-height:1.45}
a{color:#0F766E;text-decoration:none}a:hover{color:#134E4A}
h1{font-size:22px;margin:0 0 4px;color:#134E4A;line-height:1.2}
h2{font-size:17px;margin:0;line-height:1.3}
p{margin:0}
.i{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.logo{font-family:"Trebuchet MS",Arial,sans-serif;font-weight:800;font-size:22px;letter-spacing:-.3px}
.wrap{max-width:760px;margin:0 auto;padding:16px}
.card{background:#fff;border:1px solid #E2E8F0;border-radius:14px;padding:16px}
.stack{display:flex;flex-direction:column;gap:12px}
.row{display:flex;align-items:center;gap:12px}
.between{display:flex;justify-content:space-between;align-items:center;gap:12px}
.muted{color:#475569;font-size:14px}
.small{font-size:13px}
.lbl{font-size:12px;font-weight:700;color:#475569;text-transform:uppercase;letter-spacing:.05em}
.price{font-size:19px;font-weight:800;color:#134E4A;white-space:nowrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border-radius:12px;border:0;background:#0F766E;color:#fff;font:inherit;font-weight:700;font-size:15px;cursor:pointer;text-align:center}
.btn:hover{background:#134E4A;color:#fff}
.btn.full{width:100%}
.btn.sm{min-height:40px;padding:0 14px;font-size:14px;border-radius:10px}
.btn.o{background:#fff;color:#0F766E;border:1.5px solid #0F766E}
.btn.o:hover{background:#F0FDFA}
.btn.red{background:#B91C1C}.btn.red:hover{background:#991B1B}
.btn.ghost{background:#fff;color:#0F172A;border:1.5px solid #CBD5E1}
.chip{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.chip.amber{background:#FEF3C7;color:#92400E}.chip.teal{background:#CCFBF1;color:#134E4A}.chip.green{background:#DCFCE7;color:#166534}
.chip.gray{background:#F1F5F9;color:#334155}.chip.red{background:#FEE2E2;color:#991B1B}.chip.blue{background:#DBEAFE;color:#1E40AF}
.note{padding:12px 14px;border-radius:12px;font-size:14px;line-height:1.45}
.note.info{background:#EFF6FF;color:#1E3A8A}.note.warn{background:#FFFBEB;color:#78350F;border:1px solid #FCD34D}.note.ok{background:#DCFCE7;color:#14532D}.note.mint{background:#F0FDFA;color:#134E4A}.note.err{background:#FEF2F2;color:#7F1D1D;border:1px solid #FCA5A5}
.f{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#334155}
input[type=text],input[type=search],input[type=number],input[type=password],select,textarea{min-height:44px;padding:0 12px;border:1px solid #CBD5E1;border-radius:10px;font:inherit;font-size:15px;color:#0F172A;background:#fff;width:100%}
textarea{padding:10px 12px;min-height:80px;resize:vertical}
input:focus,select:focus,textarea:focus{outline:2px solid #0F766E;outline-offset:1px}
img.prod{border-radius:12px;background:#F1F5F9;flex-shrink:0;display:block}
.pie{text-align:center;color:#64748B;font-size:12px;padding:12px 0 96px}
/* Paciente */
.top{background:#134E4A;color:#fff;position:sticky;top:0;z-index:10}
.top-in{display:flex;align-items:center;gap:10px;padding-top:10px;padding-bottom:10px}
.top .back{color:#fff;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:10px;margin-left:-8px}
.ctx{display:flex;align-items:center;gap:6px;flex:1;min-width:0;font-size:13px;color:#CCFBF1}
.ctx span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cartbtn{position:relative;color:#fff;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:10px}
.badge{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#5EEAD4;color:#134E4A;font-size:12px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}
.cartbtn .badge{position:absolute;top:2px;right:0}
.tabbar{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid #E2E8F0;display:grid;grid-template-columns:repeat(3,1fr);padding:6px 8px 10px;z-index:10}
.tabbar a{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:52px;justify-content:center;font-size:12px;font-weight:600;color:#64748B;border-radius:12px}
.tabbar a.on{color:#0F766E;background:#F0FDFA;font-weight:800}
.search{display:flex;align-items:center;gap:8px;background:#fff;border:1.5px solid #0F766E;border-radius:12px;padding:0 6px 0 12px}
.search input{border:0;min-height:48px;padding:0}
.search input:focus{outline:0}
.res{display:flex;gap:12px;align-items:center;color:#0F172A}
.res:hover{color:#0F172A;border-color:#0F766E}
.opt{border:1px solid #E2E8F0;border-radius:14px;padding:14px;background:#fff;display:flex;flex-direction:column;gap:10px}
.opt.best{border:2px solid #0F766E}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.seg button{min-height:52px;border-radius:10px;border:1px solid #CBD5E1;background:#fff;font:inherit;font-size:13px;color:#334155;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px}
.seg button.on{border:2px solid #0F766E;background:#F0FDFA;color:#134E4A}
.qty{display:flex;align-items:center;gap:6px}
.qty button{width:36px;height:36px;border-radius:10px;border:1px solid #CBD5E1;background:#fff;font:inherit;font-size:18px;font-weight:700;cursor:pointer;color:#0F172A}
.line{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-top:1px solid #F1F5F9;font-size:14px}
.tl{display:flex;flex-direction:column}
.tl .st{display:flex;gap:12px;min-height:36px}
.tl .dot{width:18px;display:flex;flex-direction:column;align-items:center}
.tl .dot b{width:14px;height:14px;border-radius:999px;background:#0F766E;margin-top:3px}
.tl .dot i{flex:1;width:2px;background:#CCFBF1}
.bub{max-width:85%;padding:10px 12px;border-radius:14px;font-size:14px}
.bub.f{align-self:flex-start;background:#fff;border:1px solid #E2E8F0;border-bottom-left-radius:4px}
.bub.p{align-self:flex-end;background:#CCFBF1;border-bottom-right-radius:4px}
.code{font-size:30px;font-weight:800;letter-spacing:.08em;color:#134E4A;text-align:center}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
/* Farmacia */
body.far{background:#F1F5F9}
.ftop{background:#134E4A;color:#fff}
.fwrap{max-width:1180px;margin:0 auto;padding:16px 20px}
.ftop-in{display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding-top:12px;padding-bottom:12px}
.ftag{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#CCFBF1;font-weight:700}
.fsel select{min-height:40px;background:#fff;width:auto}
.fnav{display:flex;flex-wrap:wrap;gap:4px;margin-left:auto}
.fnav a{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 12px;border-radius:10px;color:#CCFBF1;font-weight:600;font-size:14px}
.fnav a.on,.fnav a:hover{background:rgba(255,255,255,.14);color:#fff}
.tbl{overflow-x:auto;background:#fff;border:1px solid #E2E8F0;border-radius:14px}
table{border-collapse:collapse;width:100%;font-size:14px;min-width:680px}
th{text-align:left;font-size:12px;font-weight:700;color:#475569;padding:10px 12px;border-bottom:1px solid #E2E8F0;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
td{padding:10px 12px;border-bottom:1px solid #F1F5F9;vertical-align:middle}
tr.hot td{background:#FFFBEB}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.kpi .v{font-size:28px;font-weight:800;color:#134E4A}
.cols{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start}
.cols>*{flex:1 1 360px;min-width:0}
.inline{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap}
.inline input,.inline select{width:auto;min-height:38px}
@media (min-width:900px){.tabbar{left:50%;right:auto;transform:translateX(-50%);width:760px;border:1px solid #E2E8F0;border-bottom:0;border-radius:16px 16px 0 0}}
