:root{--green:#087d49;--greendark:#08643b;--bright:#15995a;--mint:#e8f5ed;--bg:#f4f7f5;--line:#e3ece7;--ink:#22332c;--muted:#7b8d84;--red:#c14747;--gold:#af751a;--white:#fff;--shadow:0 12px 36px rgba(31,87,56,.06)}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}.hidden{display:none!important}.app{display:flex;min-height:100vh}.sidebar{width:256px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;flex-shrink:0;position:sticky;top:0;height:100vh;padding:25px 15px 19px}.brand{display:flex;align-items:center;gap:12px;padding:3px 9px 28px}.brand-image{width:47px;height:47px;border-radius:13px;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 1px 8px #c8dacd}.brand-image img{width:100%;height:100%;object-fit:contain}.brand strong{font-size:17px;font-weight:800;letter-spacing:-.7px;color:#173e29}.brand span{display:block;color:#87998f;font-size:10px;letter-spacing:.1px;margin-top:2px}.side-label{font-size:10px;font-weight:800;letter-spacing:1.3px;color:#9aaa9f;margin:0 12px 10px}nav{display:flex;flex-direction:column;gap:5px}nav button{width:100%;border:0;background:transparent;border-radius:10px;color:#6b8073;text-align:left;padding:13px 13px;font-size:13px;font-weight:620;display:flex;gap:12px;align-items:center}nav button span{font-size:18px;color:#8da79a;min-width:19px;text-align:center}nav button:hover{background:#f5faf7;color:#145f3a}nav button.active{background:var(--mint);color:var(--greendark);font-weight:780}nav button.active span{color:var(--green)}.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding:16px 10px 0}.demo-pill{color:#327c55;background:#e9f5ed;border-radius:20px;font-size:10px;letter-spacing:.7px;font-weight:800;padding:9px 11px;width:max-content}.side-help{color:#91a49a;font-size:10px;line-height:1.5;padding:13px 0}.logout-btn{border:0;background:none;color:#697e71;padding:7px 0;font-size:12px}.workspace{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{height:75px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px;position:sticky;top:0;z-index:5}.breadcrumb{color:#89968d;font-size:13px}.breadcrumb span{margin:0 13px;color:#cad6cf}.breadcrumb b{color:#253d2f}.top-meta{display:flex;align-items:center;gap:19px;color:#9baa9e;font-size:12px}.user-pill{background:#e5f4eb;color:#1b7c4b;border-radius:18px;padding:9px 12px;font-weight:700}.main{width:100%;max-width:1510px;margin:0 auto;padding:28px 35px 42px;flex:1}footer{text-align:center;color:#9ca9a2;font-size:11px;padding:15px 30px}.eyebrow{font-size:11px;color:var(--green);font-weight:800;letter-spacing:1.3px;text-transform:uppercase}.pagehead{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}.pagehead h1{font-size:28px;margin:8px 0 6px;letter-spacing:-1px;line-height:1.2;color:#1c3528}.pagehead p{font-size:13px;color:#82938a;margin:0;line-height:1.55}.btn{border:1px solid var(--line);background:#fff;color:#28483a;border-radius:10px;padding:11px 16px;font-size:12px;font-weight:760;display:inline-flex;gap:8px;align-items:center;justify-content:center;white-space:nowrap}.btn:hover{filter:brightness(.97)}.btn.primary{background:var(--green);color:white;border-color:var(--green);box-shadow:0 3px 10px #087d4925}.btn.soft{background:var(--mint);border-color:var(--mint);color:var(--green)}.btn.small{font-size:11px;padding:7px 11px}.btn.full{width:100%}.btn.danger{color:var(--red);background:#fcf0ef;border-color:#f4dad8}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:19px}.kpi,.card{background:white;border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}.kpi{padding:21px 21px 19px;min-height:140px}.kpi-icon{height:30px;width:30px;background:#e8f6ee;color:#158454;border-radius:9px;display:grid;place-items:center;font-size:18px;margin-bottom:14px}.kpi-label{color:#7d9387;font-size:12px;margin-bottom:5px}.kpi-value{font-size:25px;letter-spacing:-1px;font-weight:820;color:#213b2c}.kpi-sub{color:#a3b0a6;font-size:10px;margin-top:6px}.cols{display:grid;grid-template-columns:1.5fr 1fr;gap:17px;margin-bottom:18px}.card{padding:22px 23px}.card h2{font-size:15px;color:#284234;margin:0}.card .sub{color:#97a99f;font-size:11px;margin:6px 0 17px}.chart{height:205px;display:flex;align-items:flex-end;gap:15px;padding-top:15px;border-bottom:1px solid var(--line)}.chart-col{flex:1;display:flex;justify-content:end;flex-direction:column;align-items:center;gap:8px;min-width:12px}.chart-bars{height:175px;width:70%;display:flex;justify-content:center;align-items:end;gap:4px}.bar{width:36%;min-height:3px;background:#19995b;border-radius:5px 5px 0 0}.bar.secondary{background:#cae9d6}.chart-lbl{font-size:10px;color:#9daea4;white-space:nowrap}.legend{display:flex;gap:15px;margin:10px 0 0;color:#82978b;font-size:10px}.legend i{display:inline-block;height:8px;width:8px;border-radius:2px;background:#19995b;margin-right:5px}.legend i.soft{background:#cae9d6}.notice{display:flex;gap:11px;align-items:flex-start;background:#ebf6ef;border:1px solid #d3ebdc;color:#276548;padding:14px;border-radius:12px;font-size:12px;line-height:1.6;margin-bottom:20px}.notice strong{color:#1c6a41}.tag{display:inline-flex;align-items:center;border-radius:8px;background:#e6f5ec;color:#177d48;padding:6px 9px;font-size:10px;font-weight:800}.tag.warn{background:#fff3dd;color:#a86b16}.tag.gray{background:#eef1ef;color:#77847c}.tag.danger{background:#fff0ed;color:#bc4b40}.mini-list{display:flex;flex-direction:column;gap:8px}.mini-row{display:flex;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #eff3f0}.mini-row:last-child{border:0}.mini-dot{display:grid;place-items:center;width:34px;height:34px;background:#edf7f1;border-radius:9px;color:var(--green);font-size:16px;flex-shrink:0}.mini-row strong{font-size:12px}.mini-row small{display:block;color:#95a69b;font-size:10px;margin-top:4px}.mini-row .right{margin-left:auto;text-align:right}.table-wrap{overflow:auto;border-radius:12px;border:1px solid var(--line)}table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}th{background:#f7faf8;color:#84958b;font-size:10px;letter-spacing:.3px;font-weight:800;padding:14px 15px;white-space:nowrap}td{padding:13px 15px;border-top:1px solid #ecf2ed;white-space:nowrap;color:#40564a}td strong{color:#233b2c}td.muted{color:#91a298}.grid-forms{display:grid;grid-template-columns:1fr 1fr;gap:17px}.form-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.span2{grid-column:1/-1}label{display:block;color:#597267;font-size:11px;font-weight:800;line-height:1.5}input,select,textarea{width:100%;border:1px solid #dfe9e2;border-radius:9px;padding:10px 11px;color:#274132;background:white;font-size:12px;outline:none;margin-top:5px;min-height:40px}input:focus,select:focus,textarea:focus{border-color:#129457;box-shadow:0 0 0 3px #15995a15}input::placeholder{color:#adbcb1}textarea{resize:vertical}.card-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.line-entry{display:grid;grid-template-columns:minmax(0,1.7fr) .6fr auto;gap:8px;align-items:end;margin-bottom:9px}.line-entry input{min-width:0}.section-gap{margin-top:21px}.totals{background:#edf7f1;border-radius:11px;padding:15px;margin:17px 0;font-size:12px}.totals b{font-size:20px;color:#117e4d}.hint{color:#95a39a;font-size:11px;line-height:1.65}.empty{color:#98a9a0;text-align:center;padding:32px;font-size:12px}.section-title{margin:28px 0 13px;font-size:16px}.login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:25px;background:radial-gradient(circle at 80% 20%,#d5f1de 0%,#f2f9f5 34%,#e5f0e8 100%)}.login-card{background:#fff;width:min(430px,100%);padding:30px 35px 33px;border-radius:22px;box-shadow:0 25px 65px #25613e17;text-align:center}.login-logo{width:94px;height:94px;object-fit:contain}.login-card h1{font-size:24px;letter-spacing:-1px;margin:12px 0 4px;color:#145b36}.login-card p{color:#9aa99d;font-size:12px}.login-card form{text-align:left;margin-top:22px}.login-card label{margin-bottom:13px}.login-card .btn{margin-top:14px}.login-card .hint{text-align:center;font-size:10px;margin-top:18px}.demo-alert{background:#e9f5ee;border-radius:10px;padding:11px;text-align:left;color:#26704a;font-size:11px;margin-top:20px}.demo-alert span{display:block;margin-top:3px}.toast{position:fixed;right:22px;bottom:24px;background:#1f7447;color:white;box-shadow:0 15px 35px #0002;padding:15px 20px;border-radius:10px;font-size:12px;z-index:100;max-width:400px;display:none}.toast.show{display:block}.toast.error{background:#bc4e46}.hamburger{display:none;background:none;border:0;color:#275637;font-size:23px}.row-actions{display:flex;gap:5px;align-items:center}.badge-num{background:#e8f5ee;border-radius:7px;padding:7px;font-size:11px;color:#177b4a;font-weight:800}.key-item{background:#f7faf8;border:1px solid #e8f0eb;border-radius:12px;padding:13px}.key-item .t{font-size:10px;color:#93a79a}.key-item .v{font-size:16px;font-weight:800;margin-top:5px;color:#1c5735}.quick{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.quick button{background:#f5faf7;border:1px solid #e8f3ed;border-radius:11px;padding:17px;text-align:left;font-weight:800;font-size:12px;color:#236d43;display:flex;flex-direction:column;gap:9px}.quick button span{font-size:23px}.pending{background:#fff7e9;border:1px solid #f6e5c8;color:#a9772b;padding:12px;border-radius:11px;font-size:11px;margin-top:12px}.stack{display:flex;flex-direction:column;gap:13px}.responsive-hide{display:table-cell}
@media(max-width:1150px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.cols{grid-template-columns:1fr}.sidebar{width:220px}.main{padding:24px}.quick{grid-template-columns:repeat(3,1fr)}}
@media(max-width:750px){.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:20;transform:translateX(-110%);width:270px;box-shadow:8px 0 25px #0001;transition:transform .2s}.sidebar.open{transform:none}.topbar{height:63px;padding:0 16px}.hamburger{display:block}.top-meta>span{display:none}.main{padding:24px 15px}.pagehead{align-items:flex-start}.pagehead h1{font-size:23px}.pagehead p{font-size:12px}.pagehead .btn{padding:9px;font-size:10px}.kpis{gap:9px}.kpi{padding:15px;min-height:125px}.kpi-value{font-size:20px}.grid-forms{grid-template-columns:1fr}.card{padding:17px}.quick{grid-template-columns:repeat(3,1fr)}.quick button{font-size:10px;padding:12px}.responsive-hide{display:none}.form-fields{gap:9px}.line-entry{grid-template-columns:1fr 66px auto}.chart{gap:5px}.top-meta{gap:6px}.user-pill{font-size:10px;padding:8px}.breadcrumb{font-size:11px}}@media(max-width:400px){.quick{grid-template-columns:repeat(2,1fr)}.kpi-value{font-size:18px}}

/* TerraPharma v2 — refinamiento corporativo */
:root{--shadow:0 14px 38px rgba(22,79,48,.055);--bg:#f4f8f5;--mint:#e6f5ea;--green:#118551;--greendark:#0f643e}
body{background:radial-gradient(ellipse 85% 50% at 78% -20%,#e0f2e8 0,transparent 80%),var(--bg)}
.sidebar{border-right:1px solid #e0eee5;box-shadow:7px 0 24px rgba(31,90,55,.018)}
.brand{border-bottom:1px solid #edf3ef;margin-bottom:21px;padding-bottom:21px}
.brand-image{box-shadow:0 6px 20px rgba(31,85,45,.10)}
nav button{transition:background .18s,color .18s,transform .18s}
nav button:hover{transform:translateX(2px)}
nav button.active{box-shadow:inset 3px 0 0 #169857}
.topbar{background:rgba(255,255,255,.94);backdrop-filter:blur(12px)}
.main{padding-top:35px}
.pagehead{margin-bottom:27px}
.pagehead h1{font-size:clamp(25px,2.4vw,34px);font-weight:820;letter-spacing:-1.35px}
.pagehead p{font-size:13px;max-width:660px}
.kpi,.card{border-color:#e1ebe5;box-shadow:0 7px 24px rgba(35,90,54,.035);transition:box-shadow .18s}
.kpi:hover,.card:hover{box-shadow:0 12px 32px rgba(35,90,54,.075)}
.kpi{position:relative;overflow:hidden}
.kpi:before{content:"";position:absolute;width:80px;height:80px;right:-20px;top:-30px;border-radius:50%;background:radial-gradient(circle,#e4f6e980,transparent 70%)}
.kpi-icon{height:36px;width:36px;font-size:20px;border-radius:11px}
.kpi-value{font-size:clamp(23px,2vw,30px);letter-spacing:-.8px}
.card h2{font-weight:780;letter-spacing:-.25px}
.btn{transition:transform .15s,filter .15s,box-shadow .15s}
.btn:focus-visible,nav button:focus-visible{outline:3px solid #55b783;outline-offset:2px}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:linear-gradient(135deg,#0b8b51,#05713e);box-shadow:0 8px 18px #087d4928}
.table-wrap{border-color:#e0eae3}
tr:hover td{background:#f8fcf9}
input,select,textarea{transition:border-color .17s,box-shadow .17s;background:#fdfefd}
input:focus,select:focus,textarea:focus{background:#fff}
.notice{border-left:4px solid #2da26a}
.demo-pill{background:#eaf7ef;color:#227d4d}
.login-shell{background:radial-gradient(circle at 20% 15%,#dcf2e5 0%,#f6faf7 45%,#e2f2e7 100%)}
.login-card{box-shadow:0 24px 80px #1d67412a;border:1px solid #e0ede4}
.login-logo{border-radius:22px;background:white;padding:7px;box-shadow:0 9px 24px #185c3921}
.demo-alert{border:1px solid #dbeddf}
@media(max-width:750px){.main{padding-top:22px}.topbar{backdrop-filter:none}.brand{margin-bottom:10px}.kpi{min-height:120px}.kpi-icon{height:30px;width:30px}.pagehead h1{letter-spacing:-.7px}}

/* TERRAPHARMA v3 · expediente del medico sin fotos ni textos de perfil */
.party-intro{grid-template-columns:1.06fr .94fr}
.link-doctor{border:0;background:transparent;padding:0;cursor:pointer;font-family:inherit;font-size:12px;color:#185f3c;text-align:left;font-weight:800;max-width:300px;white-space:normal}.link-doctor span{opacity:.65;padding-left:4px}.link-doctor:hover,.text-link:hover{text-decoration:underline}.text-link{color:#168751;font-weight:700;text-decoration:none}
.form-buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.address-cell{white-space:normal;min-width:170px;max-width:360px}.all-map{min-height:340px;height:340px;border-radius:13px;overflow:hidden;border:1px solid #dcece0;background:#edf4ef}.no-map{min-height:170px;background:linear-gradient(130deg,#eff6f1,#dceddf);color:#719180;border:1px dashed #c6dfce;display:flex;align-items:center;justify-content:center;text-align:center;border-radius:12px;padding:20px;font-size:12px;line-height:1.7}.map-hint{font-size:10px;color:#8d9c91;margin-top:11px;line-height:1.5}.leaflet-container{z-index:0!important;font-family:inherit}.leaflet-popup-content button{margin-top:10px}
.profile-top{display:grid;grid-template-columns:minmax(330px, 1.1fr) minmax(510px,1.6fr);gap:13px;margin-bottom:14px}.profile-identity{padding:21px}.identity-grid{display:grid;grid-template-columns:82px 1fr;gap:16px;align-items:start}.profile-initials{width:74px;height:74px;border-radius:50%;background:#dff4e6;color:#137345;font-size:25px;font-weight:900;display:flex;align-items:center;justify-content:center;letter-spacing:-1px}.identity-details h2{font-size:19px;color:#1a2b23;margin-bottom:5px}.specialty-name{font-weight:800;color:#149052;font-size:12px;margin-bottom:15px}.profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.profile-fields>div{min-width:0}.profile-fields span{display:block;color:#899d90;font-size:10px;margin-bottom:3px}.profile-fields strong{display:block;font-size:11px;color:#344e3c;overflow-wrap:anywhere;font-weight:650}.profile-tags{margin-top:14px;display:flex;gap:7px;flex-wrap:wrap}.profile-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.profile-kpi{display:flex;align-items:flex-start;gap:12px;padding:20px 17px;background:#fff;border:1px solid #e0eae3;border-radius:15px;box-shadow:0 8px 30px rgba(35,90,54,.035)}.profile-kpi-icon{width:37px;height:37px;flex:none;display:flex;align-items:center;justify-content:center;color:#138350;background:#e9f6ed;border-radius:11px;font-size:20px}.profile-kpi span{color:#788a7e;font-size:11px;display:block;margin-bottom:8px}.profile-kpi strong{display:block;color:#202e25;font-size:22px;letter-spacing:-.7px;white-space:nowrap}.profile-kpi small{display:block;color:#9aaba1;font-size:10px;margin-top:5px}.profile-kpi:nth-child(3) strong{color:#d58219}
.profile-content{display:grid;grid-template-columns:minmax(0,2fr) minmax(290px,.82fr);gap:14px;align-items:start}.profile-main,.profile-side{min-width:0;display:flex;flex-direction:column;gap:14px}.profile-tables{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.profile-content .card{padding:18px}.profile-content .card-heading{margin-bottom:12px}.profile-content .card h2{font-size:14px}.profile-content td,.profile-content th{padding:10px;font-size:10px}.profile-content th{font-size:9px}.profile-content .table-wrap{max-height:290px;overflow:auto}.profile-edit{margin-bottom:15px}.profile-edit form>button{margin-top:17px}.doctor-address{font-size:11px;color:#76877b;line-height:1.6;margin-bottom:10px}.doctor-map{height:255px;width:100%;border:1px solid #e0ebe3;border-radius:11px}.map-buttons{display:flex;gap:8px;margin-top:10px}.map-buttons .btn{flex:1;text-align:center;font-size:11px}.document-list{display:flex;flex-direction:column;gap:5px}.document-item{display:flex;gap:10px;align-items:center;text-decoration:none;color:#233d2e;border:1px solid #f0f3f0;padding:10px;border-radius:9px;font-size:11px}.document-item:hover{background:#f5faf6}.document-item span:nth-child(2){flex:1;min-width:0}.document-item small{font-size:10px;color:#91a396;display:block;margin-top:5px}.doc-icon{color:#149153;font-size:18px;background:#e9f6ee;padding:7px;border-radius:8px}.timeline{margin:10px 0}.timeline-row{display:grid;grid-template-columns:88px 12px minmax(0,1fr) 90px;gap:10px;align-items:start;padding:12px 0;border-bottom:1px solid #edf2ee;font-size:11px}.timeline-date{font-weight:700;color:#2d4233}.timeline-dot{background:#149451;border-radius:50%;width:10px;height:10px;margin-top:2px}.timeline-row b{font-weight:700;color:#167a48}.timeline-row small{display:block;font-size:10px;margin-top:4px;color:#8da399}.timeline-rep{font-size:10px;text-align:right;color:#8a9b91}.next-visit{display:flex;justify-content:space-between;gap:12px;border-radius:10px;background:#edf8ef;color:#177d4c;padding:14px;margin-top:16px;font-size:11px}.next-visit span{font-weight:800}
@media(max-width:1360px){.profile-top{grid-template-columns:1fr}.profile-content{grid-template-columns:1fr}.profile-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.party-intro{grid-template-columns:1fr 1fr}}
@media(max-width:950px){.profile-tables,.profile-side,.party-intro{grid-template-columns:1fr}.profile-kpi strong{font-size:20px}.identity-grid{grid-template-columns:64px 1fr}.profile-initials{width:58px;height:58px;font-size:21px}}
@media(max-width:580px){.profile-top{grid-template-columns:1fr}.profile-stats{gap:8px}.profile-kpi{padding:13px 10px;gap:8px}.profile-kpi-icon{width:29px;height:29px;font-size:17px}.profile-kpi strong{font-size:16px;white-space:normal}.profile-kpi span{font-size:10px}.profile-initials{width:50px;height:50px}.identity-grid{grid-template-columns:50px 1fr;gap:10px}.profile-fields{grid-template-columns:1fr 1fr;gap:10px}.profile-content .card{padding:14px}.map-buttons{flex-direction:column}.timeline-row{grid-template-columns:70px 10px 1fr;gap:7px}.timeline-rep{grid-column:3;text-align:left}.pagehead .row-actions{flex-wrap:wrap}}

/* TerraPharma PRO v4.2 · visor cartográfico resistente a 403 */
.all-map,.geo-stage{position:relative;isolation:isolate;overflow:hidden;background:#e8f3eb}
.geo-schematic{position:absolute;inset:0;overflow:hidden;background:#e7f4e9}
.geo-schematic>svg{width:100%;height:100%;position:absolute;inset:0;display:block}
.geo-map-caption{position:absolute;top:14px;left:14px;z-index:2;display:flex;flex-direction:column;gap:2px;background:#ffffffed;border:1px solid #d9e9df;border-radius:11px;box-shadow:0 4px 16px #24573910;padding:11px 14px}
.geo-map-caption strong{font-size:12px;color:#185937}.geo-map-caption small{font-size:10px;color:#778c7b}
.geo-compass{position:absolute;top:13px;right:13px;background:#fff;color:#1d7651;box-shadow:0 5px 15px #164b3020;border-radius:9px;padding:8px 10px;font-size:12px;font-weight:800}
.geo-credits{position:absolute;left:9px;bottom:7px;background:#ffffffdb;padding:4px 7px;border-radius:5px;color:#617d6e;font-size:9px}
.geo-pin{position:absolute;z-index:3;transform:translate(-50%,-100%);display:flex;flex-direction:column;align-items:center;gap:2px;background:transparent;border:0;cursor:pointer;color:#104a33;max-width:170px}
.geo-pin-dot{display:grid;place-items:center;width:33px;height:38px;background:#087d4b;color:white;clip-path:polygon(0 0,100% 0,100% 71%,50% 100%,0 71%);border:2px solid #fff;box-shadow:0 7px 12px #185e3d3b;font-size:19px;font-weight:bold}
.geo-pin-label{display:block;font-size:10px;font-weight:750;background:#fffffff2;color:#13452e;border:1px solid #d8e6dc;border-radius:8px;padding:5px 7px;max-width:155px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;box-shadow:0 6px 14px #18482b22}
.geo-pin:focus-visible .geo-pin-dot,.geo-pin:hover .geo-pin-dot{background:#0fa96a}
.geo-pin-large .geo-pin-dot{width:42px;height:45px;font-size:22px}
.geo-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:210px;height:100%;text-align:center;padding:16px;background:linear-gradient(120deg,#eef8f1,#dfede3)}
.geo-empty strong{font-size:14px;color:#225a3c}.geo-empty span{color:#64806d;font-size:11px}
.geo-vector-layer{position:absolute;z-index:5;inset:0;opacity:0;visibility:hidden;transition:opacity .3s}
.geo-ready .geo-vector-layer{opacity:1;visibility:visible}
.geo-ready .geo-schematic{display:none}
.vector-doc-pin{border:3px solid #fff;background:#08824d;color:white;border-radius:50% 50% 50% 0;transform:rotate(-45deg);width:35px;height:35px;box-shadow:0 4px 14px #183e2a88;cursor:pointer;font-size:18px}
.maplibregl-control-container{font-size:9px}.maplibregl-ctrl-attrib{background:#ffffffe8!important}
.doctor-map{height:260px;min-height:260px;border:1px solid #e1ebe4;border-radius:12px}
@media(max-width:750px){.all-map{height:310px;min-height:310px}.geo-pin-label{max-width:95px;font-size:9px}.doctor-map{height:255px}.geo-map-caption{padding:8px}.geo-map-caption small{display:none}}

.profile-shortcuts{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:-3px 0 15px}.profile-shortcuts-hint{color:#819789;font-size:11px}.profile-shortcuts .btn{white-space:nowrap}
@media(max-width:580px){.profile-shortcuts .btn{flex:1}.profile-shortcuts-hint{width:100%}}

/* ===== TERRAPHARMA 4.3 · PANEL GPS AUTÓNOMO ===== */
:root{--green:#087d49;--mint:#edf8f1;--shadow:0 14px 40px rgba(18,77,45,.055)}
.topbar{border-bottom:1px solid #e0ece3}
.profile-identity,.profile-kpi,.card{border-radius:17px}
.profile-stats .profile-kpi{background:linear-gradient(145deg,#fff 62%,#f5fbf7)}
.card-heading h2{color:#173c28}
.profile-initials{border:2px solid #d0eddc;box-shadow:inset 0 0 0 5px #edf9f1}
.all-map{height:400px;min-height:400px;border:1px solid #d3e9da}
.doctor-map{height:280px;min-height:280px}
.tp-map-board{position:relative;isolation:isolate;overflow:hidden;width:100%;height:100%;min-height:240px;background:linear-gradient(135deg,#eef9f1,#cfe6d7);border-radius:12px}
.tp-map-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.tp-map-head{position:absolute;z-index:4;top:16px;left:17px;background:#fffffff2;display:flex;flex-direction:column;gap:3px;padding:12px 15px;border:1px solid #dbebe1;box-shadow:0 10px 24px #1c5d3b18;border-radius:12px;max-width:58%}
.tp-map-head strong{color:#194e31;font-size:13px;font-weight:820}
.tp-map-head small{color:#6e8b79;font-size:10px}
.tp-map-chip{font-size:9px;color:#0a8650;font-weight:850;letter-spacing:1.1px}
.tp-map-north{position:absolute;right:15px;top:15px;background:#fff;color:#145938;border:1px solid #d4e9da;border-radius:10px;padding:9px 11px;font-size:12px;font-weight:800;box-shadow:0 7px 16px #16452a15}
.tp-map-credit{position:absolute;bottom:7px;left:8px;background:#ffffffe3;border-radius:6px;padding:5px 8px;color:#5b7867;font-size:9px;z-index:2}
.tp-gps-marker{position:absolute;z-index:3;border:0;background:none;cursor:pointer;transform:translate(-50%,-80%);display:flex;align-items:center;flex-direction:column;gap:2px;min-width:36px;max-width:155px;filter:drop-shadow(0 4px 9px rgba(16,72,43,.2))}
.tp-marker-icon{display:grid;place-items:center;width:36px;height:36px;background:#07834d;color:white;border:3px solid #fff;border-radius:50% 50% 50% 12%;transform:rotate(-45deg);font-size:22px;box-shadow:0 6px 12px rgba(11,66,35,.28);transition:background .15s,scale .15s}
.tp-gps-marker:hover,.tp-gps-marker:focus-visible{z-index:6}
.tp-gps-marker:hover .tp-marker-icon,.tp-gps-marker:focus-visible .tp-marker-icon{background:#10a865;scale:1.12}
.tp-marker-label{font-size:10px;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px 9px;background:#fff;box-shadow:0 4px 11px #164c3022;color:#0c4a2f;border:1px solid #dcebe1;border-radius:7px;font-weight:800}
.tp-map-board.is-compact .tp-map-head{top:8px;left:8px;padding:7px 10px}
.tp-map-board.is-compact .tp-map-head strong{font-size:11px}
.tp-map-board.is-compact .tp-marker-label{max-width:120px;font-size:9px}
.tp-map-board.is-compact .tp-gps-marker{transform:translate(-50%,-25%)}
.tp-map-board.is-compact .tp-map-head small{display:none}
.tp-map-footer{display:flex;justify-content:space-between;gap:8px;padding-top:10px;font-size:10px;color:#6b8775}
.tp-map-help{color:#097747;font-weight:800;text-decoration:none}
.tp-empty-map{height:100%;min-height:180px;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:8px;padding:25px;text-align:center;color:#53715f}
.tp-empty-map strong{color:#215637;font-size:14px}.tp-empty-map span{max-width:320px;line-height:1.5;font-size:11px}
.tp-empty-icon{background:#fff;border:1px solid #d0e9d8;border-radius:50%;width:52px;height:52px;display:grid;place-items:center;font-size:30px;color:#0d7a49}
.party-intro .card{min-width:0}
@media(max-width:850px){.party-intro{grid-template-columns:1fr}.tp-map-board .tp-map-head{max-width:65%}}
@media(max-width:600px){.all-map{height:330px;min-height:330px}.tp-gps-marker .tp-marker-label{max-width:86px;font-size:9px}.tp-map-footer{flex-wrap:wrap}.profile-kpi strong{font-size:17px}}

/* TerraPharma PRO 4.5 | experiencia corporativa y navegación accesible */
html,body{min-height:100%;scroll-behavior:smooth}body{font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;color:#17372c}
.app{min-height:100vh}.workspace{min-width:0;max-width:100vw}.main{min-width:0;overflow-x:auto}.sidebar{display:flex;flex-direction:column;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.sidebar nav{min-height:0;flex:1 0 auto}.sidebar-bottom{flex-shrink:0;padding-bottom:18px}
.card,.table-wrap,.grid-forms,.cols{min-width:0}.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}table{min-width:600px}
.logout-top{border:1px solid #cfe3d7;background:#f2faf5;color:#176142;border-radius:10px;padding:9px 12px;cursor:pointer;font-weight:750;font-size:12px}.logout-top:hover{background:#dff4e7}.logout-top:focus-visible{outline:3px solid #75bb91}
.top-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.user-pill{font-weight:750;color:#194e35}.pagehead{border-bottom:1px solid #e3ece7;padding-bottom:16px}
.login-shell{background:linear-gradient(90deg,rgba(5,24,28,.57),rgba(6,37,32,.32)),url('huehuetenango-concepto.webp') center/cover fixed;min-height:100dvh}.login-card{background:#ffffffed;backdrop-filter:blur(14px);box-shadow:0 30px 90px #051b1866}.login-location{font-size:11px;color:#366b52;letter-spacing:.3px}
@media(max-width:750px){.logout-top{padding:7px;font-size:11px}.top-meta #today{display:none}.sidebar{max-height:100dvh;overflow-y:auto}.workspace{width:100%}.main{overflow-x:auto}.login-shell{background-attachment:scroll}.login-card{margin:16px}}


/* TerraPharma PRO 4.6 | Rediseño de panel y mapas profesionales */
:root{--green:#08774a;--greendark:#075435;--bright:#11a16a;--mint:#e8f6ed;--bg:#f3f6f8;--line:#dce7e3;--ink:#1d3040;--muted:#607484;--shadow:0 12px 34px rgba(20,54,65,.055)}
body{font-size:14px;color:var(--ink);background:#f3f6f8}
.sidebar{width:268px;background:linear-gradient(180deg,#103c34,#123b35 67%,#0e332d);border:0;padding:24px 14px 18px;box-shadow:3px 0 24px #052f2010}
.brand strong,.brand span,.side-label{color:#fff}.brand span{opacity:.68}.side-label{opacity:.57}
.sidebar nav button{color:#d0e5dc;font-size:13px;font-weight:600;padding:12px 14px;transition:background .16s,color .16s}
.sidebar nav button span{color:#a9d4c3}.sidebar nav button:hover{background:#ffffff17;color:white}.sidebar nav button.active{background:#e5f4e9;color:#125e42;box-shadow:inset 3px 0 #23a778}
.sidebar nav button.active span{color:#087d49}.sidebar-bottom{border-top:1px solid #ffffff29}.side-help{color:#b3c7bd}.logout-btn{color:#fff}.demo-pill{color:#c7f2d9;background:#ffffff19}
.workspace{background:#f5f7f9}.topbar{background:#fff;height:72px;box-shadow:0 2px 14px #183c3208;z-index:50;padding:0 clamp(15px,2.5vw,40px)}
.breadcrumb b{color:#193e32}.top-meta{gap:12px}.user-pill{background:#e7f6ef;border-radius:10px;padding:9px 13px}
.main{padding:clamp(16px,2.5vw,36px);max-width:1650px;overflow-x:visible}.pagehead{margin-bottom:22px}.pagehead h1{font-size:clamp(23px,2.2vw,32px);font-weight:800;color:#163f32}.pagehead p{font-size:13px;color:#667f79}
.card,.profile-identity,.profile-kpi{background:#fff;border:1px solid #e1e9e7;border-radius:16px;box-shadow:0 5px 20px rgba(20,63,48,.035)}
.card{padding:clamp(16px,1.8vw,26px)}.card h2,.card-heading h2{font-size:16px;color:#163e34;letter-spacing:-.25px}.sub,.hint{line-height:1.55}
.btn{border-radius:9px;transition:background .18s,transform .12s,box-shadow .18s}.btn:hover:not(:disabled){transform:translateY(-1px)}.btn.primary{background:#08784d;box-shadow:0 5px 12px #08784d22}.btn.primary:hover{background:#06653e}
input,textarea,select{max-width:100%;border-radius:9px}input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #249e75;outline-offset:2px}
.table-wrap{width:100%;max-width:100%;overflow:auto;border-radius:11px;border:1px solid #e6eeeb}table{border-collapse:separate;border-spacing:0}thead th{background:#eff6f2!important;color:#3e6153!important;font-size:11px;letter-spacing:.25px}tbody tr:nth-child(even){background:#fbfdfc}tbody tr:hover{background:#edf7f1}
.party-intro{display:grid;grid-template-columns:1fr!important;align-items:start;gap:20px}.party-intro>.card:first-child{order:2}.party-intro>.card:nth-child(2){order:1}
#doctors-map{height:510px;min-height:510px;border:1px solid #d4e5dc;border-radius:14px;overflow:hidden;background:#e8f0ed;z-index:0}
.doctor-map,#business-map{border-radius:13px;overflow:hidden;background:#e8f0ed;z-index:0}
.leaflet-container{font:inherit!important;background:#e9f1eb}.leaflet-control-attribution{font-size:10px!important}.leaflet-control-zoom a{color:#176144!important}
.tp-leaflet-pin-wrap{border:0;background:transparent}.tp-leaflet-pin{display:grid;place-items:center;background:#0b8759;color:#fff;font-weight:900;width:34px;height:34px;border-radius:50% 50% 50% 7px;transform:rotate(-45deg);box-shadow:0 3px 12px #123e2980;border:3px solid #fff;font-size:17px}.tp-map-tool{padding:9px 13px;background:#ffffffed;border-radius:10px;color:#145d41;font-weight:800;border:1px solid #d8e6df;box-shadow:0 6px 12px #1d4e3712;font-size:11px}
.tp-popup strong{font-size:13px;color:#1c4832}.tp-popup p{font-size:12px;color:#577061;line-height:1.5}.tp-popup a{font-size:12px;color:#08794c;font-weight:800}
.tp-map-message{height:100%;min-height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;padding:25px;color:#61776b;background:linear-gradient(135deg,#ecf6ee,#dce9e3)}.tp-map-message strong{color:#1b5940;font-size:16px}.tp-map-message span{font-size:12px;max-width:350px}
.tp-map-error{position:absolute;z-index:800;bottom:30px;left:50%;transform:translateX(-50%);width:min(92%,390px);padding:11px 15px;text-align:center;background:#fff8ea;border:1px solid #e8d0a0;color:#735325;border-radius:10px;box-shadow:0 7px 20px #0002;pointer-events:none;display:flex;flex-direction:column;gap:4px;font-size:11px}.tp-map-error strong{font-size:13px}
.tp-map-footer{font-size:12px;padding-top:13px}.tp-map-help{color:#08794c}.section-gap{margin-top:22px}
@media(max-width:950px){.sidebar{width:255px}.main{padding:18px}.party-intro{grid-template-columns:1fr!important}#doctors-map{height:400px;min-height:400px}}
@media(max-width:750px){.sidebar{position:fixed;z-index:200;height:100dvh;max-height:100dvh}.topbar{padding:0 12px}.top-meta{gap:6px}.top-meta #who{max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main{overflow-x:visible;padding:15px}.card{padding:15px}#doctors-map{height:350px;min-height:350px}.pagehead{align-items:flex-start}.tp-map-tool{font-size:10px}.tp-map-footer{flex-wrap:wrap}}

/* TerraPharma 4.7 - revisión de accesibilidad, tablas y mapas */
:root{--bg:#f3f6f5;--ink:#19372f;--line:#dce7e2;--shadow:0 4px 26px rgba(20,61,49,.055)}
body{font-size:14px} .workspace{min-width:0;max-width:none} .main{max-width:1700px;width:100%;overflow-x:clip}
.sidebar{overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain}.sidebar nav{flex:0 0 auto}
.card{border-radius:16px}.card h2{font-size:15px}.card .sub,.hint,.map-hint{font-size:12px;line-height:1.55}
.table-wrap{max-width:100%;overflow-x:auto;scrollbar-width:thin}.table-wrap table{min-width:640px}td,th{font-size:12px;padding:12px 14px}
.card-heading{flex-wrap:wrap;align-items:center}.profile-content{grid-template-columns:minmax(0,1.65fr) minmax(320px,.85fr)}
.profile-tables{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-content .table-wrap{width:100%;overflow-x:auto}.profile-content .table-wrap table{min-width:540px}
input,select,textarea{font-size:13px;min-height:42px}.form-fields{gap:15px}.btn:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #dbb66f;outline-offset:2px}
#doctors-map{height:490px;min-height:350px;background:#e4ede9} .doctor-map,#business-map{height:290px;min-height:260px;background:#e4ede9}
.maplibregl-map{width:100%;height:100%;font-family:inherit}.maplibregl-control-container{font-size:11px} .maplibregl-popup-content{border-radius:12px;padding:12px 14px;box-shadow:0 9px 30px #173f3230}
.tp-vector-marker{width:32px;height:38px;border:2px solid #fff;border-radius:18px 18px 18px 5px;transform:rotate(-45deg);background:#08784c;color:#fff;box-shadow:0 4px 15px #102d2966;font-weight:900;font-size:17px;cursor:pointer}.tp-vector-marker:hover{background:#0aab70}.tp-vector-popup{display:flex;flex-direction:column;gap:7px;line-height:1.5}.tp-vector-popup strong{color:#124b37}.tp-vector-popup span{color:#5f756b}.tp-vector-popup a{font-weight:800;color:#08764f}
.tp-map-fallback{min-height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:15px;padding:24px;background:linear-gradient(125deg,#eaf4ee,#dcebe5)}.tp-map-fallback-title{display:flex;gap:12px;align-items:center;max-width:540px}.tp-map-fallback-title strong{display:block;color:#174e3a;font-size:17px}.tp-map-fallback-title small{display:block;line-height:1.6;margin-top:5px;color:#5e756b}.tp-map-fallback-icon{font-size:40px;color:#138b58}.tp-map-fallback-list{width:min(540px,100%);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.tp-map-fallback-item{background:#fff;border:1px solid #d6e7dc;padding:12px;border-radius:11px;text-decoration:none;color:#08774c;font-size:12px;font-weight:750;overflow-wrap:anywhere}.tp-map-fallback-item:hover{border-color:#0d8b5b;background:#f7fffa}
@media(max-width:1350px){.profile-content{grid-template-columns:1fr}.profile-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:950px){.profile-tables,.profile-side{grid-template-columns:1fr}.topbar{padding:0 16px}.top-meta{gap:8px}.top-meta #who{max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:750px){.main{padding:17px}.sidebar{height:100dvh}.profile-tables{grid-template-columns:1fr}.tp-map-fallback-list{grid-template-columns:1fr}#doctors-map{height:370px}.pagehead{flex-wrap:wrap}.row-actions{flex-wrap:wrap}}

/* TerraPharma PRO v4.8 | Directorio y mapa estilo red profesional */
.tp-directory-card{padding:24px}.tp-map-layout{display:grid;grid-template-columns:minmax(250px,310px) minmax(0,1fr);gap:14px;margin-top:18px;align-items:stretch}
.tp-map-directory{border:1px solid #d7e5dd;background:#fbfdfc;border-radius:14px;display:flex;flex-direction:column;min-height:450px;max-height:520px;overflow:hidden}
.tp-map-search-label{font-size:12px;font-weight:800;color:#1b4e39;padding:15px 15px 5px}.tp-map-search{margin:5px 13px 12px;width:calc(100% - 26px)!important;min-height:40px!important;border-radius:9px}
.tp-map-list{overflow-y:auto;min-height:0;scrollbar-width:thin;padding:0 10px 11px;flex:1}.tp-map-list-item{display:flex;gap:10px;border:1px solid #e0ebe5;border-radius:11px;padding:12px;margin:5px 2px 10px;background:#fff;align-items:flex-start}.tp-map-list-item[hidden]{display:none!important}
.tp-map-list-icon{width:29px;height:29px;flex:0 0 29px;border-radius:10px;background:#e1f4e9;color:#067b4b;display:grid;place-items:center;font-weight:900}.tp-map-list-body{min-width:0;flex:1}.tp-map-list-body strong{display:block;color:#174331;font-size:12px;line-height:1.4}.tp-map-list-body small{font-size:11px;color:#6a7c72;display:block;margin:5px 0 7px;line-height:1.45;overflow-wrap:anywhere}.tp-map-list-actions{display:flex;gap:11px;align-items:center;flex-wrap:wrap}.tp-map-open-profile{background:none;border:0;padding:0;color:#05754a;font-size:12px;font-weight:800;cursor:pointer}.tp-map-list-actions a{font-size:11px;color:#24705b;font-weight:700;text-decoration:none}.tp-map-canvas{border:1px solid #dae6df;border-radius:14px;overflow:hidden;min-height:450px;background:#e7efea;position:relative}.tp-map-toolbar{height:48px;background:#fff;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid #dae6df}.tp-map-toolbar strong{font-size:12px;color:#204c3b}.tp-map-status{font-size:11px;font-weight:800;color:#777;background:#f1f4f1;border-radius:30px;padding:6px 10px}.tp-map-status.is-ready{color:#087b4d;background:#e4f6ed}.tp-map-status.is-error{color:#905422;background:#fff0df}#doctors-map{height:472px!important;min-height:400px!important;border:none!important;border-radius:0!important}.tp-map-canvas .tp-map-fallback{height:100%;min-height:400px}.tp-map-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}.tp-map-empty-list{padding:20px;font-size:12px;color:#567363}
@media(max-width:1070px){.tp-map-layout{grid-template-columns:1fr}.tp-map-directory{min-height:0;max-height:250px}.tp-map-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tp-map-list-item{margin:0}}
@media(max-width:650px){.tp-directory-card{padding:16px}.tp-map-list{display:block}.tp-map-directory{max-height:280px}.tp-map-toolbar{padding:9px 11px}#doctors-map{height:370px!important;min-height:350px!important}}


/* TerraPharma v4.9 — acceso corporativo; no altera módulos internos */
.login-shell{position:relative;isolation:isolate;min-height:100dvh;display:grid;place-items:center;overflow:hidden;padding:56px 22px;background:#183e37 url('huehuetenango-concepto.webp') center center / cover no-repeat fixed}
.login-shell::before{content:"";position:absolute;inset:0;background:linear-gradient(96deg,rgba(5,31,30,.48) 0%,rgba(5,31,30,.20) 48%,rgba(6,33,35,.52) 100%);z-index:-1;pointer-events:none}
.login-card{width:min(460px,100%);padding:36px 39px 25px;border-radius:24px;background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.8);box-shadow:0 28px 82px rgba(0,22,28,.34);text-align:left;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.login-brand-lockup{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;margin-bottom:14px}
.login-logo-frame{width:80px;height:80px;border-radius:20px;background:#fff;box-shadow:0 8px 28px rgba(18,61,44,.11);display:grid;place-items:center;overflow:hidden;border:1px solid #e6eee9}
.login-logo{width:74px;height:74px;padding:5px;box-shadow:none;border-radius:12px;object-fit:contain}
.login-eyebrow{font-size:10px;letter-spacing:2px;font-weight:800;color:#337b57}
.login-card h1{margin:0;color:#123d2c;text-align:center;font-size:26px;font-weight:800;line-height:1.2;letter-spacing:-.7px}
.login-card .login-subtitle{text-align:center;font-size:13px;color:#688076;margin:8px 0 0}
.login-divider{height:1px;background:linear-gradient(90deg,transparent,#dceae1 20%,#dceae1 80%,transparent);margin:23px 0 18px}
.login-card .login-intro{font-size:13px;line-height:1.55;color:#52685d;margin:0 0 17px;text-align:center}
.login-card form{margin-top:0;text-align:left}
.login-card form label{display:block;color:#254939;font-size:12px;font-weight:750;margin:0 0 16px}
.login-card form input{display:block;margin-top:7px;width:100%;height:48px;padding:12px 14px;border:1px solid #d9e7dd;border-radius:11px;background:#fafdfb;color:#183d2c;font-size:14px;transition:border-color .15s,box-shadow .15s}
.login-card form input:focus{outline:none;border-color:#138453;box-shadow:0 0 0 4px rgba(19,132,83,.13)}
.login-card form input::placeholder{color:#91a59b;font-weight:400}
.login-password-row{display:flex;position:relative;align-items:center}
.login-password-row input{padding-right:87px!important}
.login-password-row .password-toggle{position:absolute;right:8px;top:7px;padding:8px;border:0;background:transparent;color:#196e49;font-weight:750;font-size:11px;border-radius:7px;cursor:pointer}
.login-password-row .password-toggle:hover{background:#ecf6f0}
.login-card .login-submit{width:100%;height:49px;margin-top:8px;border-radius:11px;background:linear-gradient(135deg,#098451,#086941);border:1px solid #087448;color:#fff;font-size:13px;font-weight:800;justify-content:center;gap:12px;box-shadow:0 10px 18px rgba(8,116,72,.19)}
.login-card .login-submit:hover{filter:brightness(1.05)}
.login-secure-note{display:flex;justify-content:center;align-items:center;gap:7px;color:#647d6f;font-size:11px;margin-top:19px;text-align:center}
.login-secure-note span{color:#18a16a;font-size:10px}
.login-card-foot{margin:24px -39px -25px;padding:16px 20px;text-align:center;border-top:1px solid #e9efea;color:#82958a;font-size:10px;border-radius:0 0 24px 24px;background:rgba(248,251,249,.9)}
.login-card-foot span{margin:0 5px}
.login-scene-caption{position:absolute;top:34px;left:42px;color:#f6fcfa;letter-spacing:2.4px;font-size:10px;font-weight:750;text-shadow:0 1px 8px rgba(0,0,0,.4)}
.scene-line{display:inline-block;width:24px;border-top:2px solid #c5dfcb;vertical-align:middle;margin-right:10px}
.login-photo-credit{position:absolute;bottom:20px;right:27px;color:rgba(255,255,255,.8);font-size:10px;text-shadow:0 1px 6px #0008}
@media(max-width:650px){.login-shell{background-attachment:scroll;padding:44px 16px 32px}.login-card{padding:28px 23px 22px;border-radius:20px}.login-card h1{font-size:23px}.login-card-foot{margin:21px -23px -22px;border-radius:0 0 20px 20px}.login-scene-caption{top:15px;left:17px;font-size:9px}.login-photo-credit{display:none}}
@media(prefers-reduced-motion:reduce){.login-card *{transition:none!important}}


/* TerraPharma v5.0 — refinamiento visual del acceso y mapa */
.login-shell{background-position:center center;background-size:cover;background-attachment:fixed;}
.login-shell::before{background:linear-gradient(90deg,rgba(6,28,28,.58) 0%,rgba(6,28,28,.34) 42%,rgba(8,31,31,.56) 100%)}
.login-card{width:min(430px,100%);padding:34px 34px 22px;border-radius:22px;background:rgba(255,255,255,.94);box-shadow:0 26px 78px rgba(0,22,28,.28)}
.login-logo-frame{width:76px;height:76px;border-radius:18px}.login-card h1{font-size:24px}.login-card .login-subtitle{font-size:12px;color:#6f867b}.login-card .login-intro{font-size:12px;color:#61776c}.login-card-foot{font-size:10px;color:#7d9087}.login-scene-caption{letter-spacing:2px;font-size:9px;opacity:.95}.workspace,.main{background:#f5f8f6}.topbar{background:rgba(255,255,255,.92);backdrop-filter:saturate(120%) blur(10px)}.card,.kpi{box-shadow:0 12px 28px rgba(24,55,39,.05)}.tp-map-canvas{background:#f4f8f6;border:1px solid #e1ece5;border-radius:16px;overflow:hidden}#doctors-map,.doctor-map,.business-map{height:460px;min-height:380px;border-radius:0;background:#e8efea}.tp-map-status.is-ready{color:#0a7d4d;background:#e6f6ee}.tp-map-status.is-error{color:#8f5b16;background:#fff2e2}.tp-map-message{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:280px;color:#5a7468;font-size:13px;gap:8px}.tp-map-fallback{display:flex;flex-direction:column;gap:14px;padding:18px;min-height:280px;background:linear-gradient(180deg,#f7faf8,#edf5f0)}.tp-map-fallback-title{display:flex;gap:12px;align-items:flex-start;color:#29473a}.tp-map-fallback-title small{display:block;margin-top:4px;color:#72877d;font-size:12px;line-height:1.55}.tp-map-fallback-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e3f2e9;color:#0c7c4d;font-size:18px;flex:none}.tp-map-fallback-list{display:grid;gap:10px}.tp-map-fallback-item{border:1px solid #dbe8df;border-radius:12px;padding:12px;background:#fff;color:#284336;font-size:12px}.tp-map-fallback-item strong{display:block;margin-bottom:8px}.tp-fallback-links{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.tp-fallback-links a,.tp-fallback-links button{border:0;background:none;padding:0;color:#087b47;font-size:12px;font-weight:800;text-decoration:none;cursor:pointer}.tp-fallback-links a:hover,.tp-fallback-links button:hover{text-decoration:underline}.tp-leaflet-marker-wrap{background:transparent;border:0}.tp-leaflet-marker{width:28px;height:28px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:linear-gradient(135deg,#10a360,#087447);box-shadow:0 8px 18px rgba(8,116,71,.25);border:2px solid #fff}.tp-leaflet-marker::before{content:"✚";color:#fff;display:grid;place-items:center;transform:rotate(45deg);font-size:14px;font-weight:800;width:100%;height:100%}.leaflet-popup-content-wrapper{border-radius:14px;box-shadow:0 18px 36px rgba(0,0,0,.15)}.leaflet-popup-content{margin:12px 14px}.leaflet-container{font:12px/1.4 Inter,ui-sans-serif,system-ui,sans-serif;color:#22332c}.leaflet-control-zoom a{color:#234033}@media(max-width:900px){#doctors-map,.doctor-map,.business-map{height:380px;min-height:320px}.login-card{padding:28px 24px 20px}}

/* V5.1 | Mapa Google Maps: estados y fichas legibles */
.tp-google-fallback{background:linear-gradient(155deg,#eef5f0,#e1ece6);min-height:310px;height:100%;display:flex;flex-direction:column;gap:14px;padding:22px;overflow:auto;color:#193d2c}
.tp-google-fallback-heading{max-width:520px}
.tp-google-fallback-heading strong{font-size:17px}
.tp-google-fallback-heading p{font-size:13px;line-height:1.6;color:#516b5d}
.tp-google-fallback-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}
.tp-google-fallback-item{background:#fff;border-radius:12px;padding:14px;border:1px solid #d9e8df;font-size:12px;display:flex;flex-direction:column;gap:10px}
.tp-google-fallback-links{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.tp-google-fallback-links a,.tp-google-fallback-links button{color:#087648;font-weight:750;background:none;border:0;cursor:pointer;font:inherit;text-decoration:none}
.tp-google-popup{min-width:180px;max-width:260px;padding:4px;color:#213c30;font-family:system-ui,sans-serif}
.tp-google-popup strong{font-size:14px}
.tp-google-popup p{font-size:12px;color:#637a6b;line-height:1.5}
#doctor-location-map,#business-map{min-height:310px}


/* TerraPharma PRO v5.2 — mapa y espacio de trabajo empresarial */
:root{--bg:#f3f6f5;--line:#dfe8e3;--shadow:0 8px 28px rgba(13,58,37,.05)}
.workspace,.main{background:#f3f6f5!important}
.main{max-width:1650px;padding:27px clamp(16px,2.4vw,38px) 52px}
.topbar{box-shadow:0 2px 12px rgba(20,57,38,.025)}
.card,.kpi{border:1px solid #dfe9e3;border-radius:18px;box-shadow:0 8px 26px rgba(18,63,39,.045)}
.pagehead{margin-bottom:22px}
.pagehead h1{font-size:clamp(22px,2vw,30px);letter-spacing:-.7px}
.pagehead p{font-size:13px;line-height:1.65;color:#697f73}
.tp-directory-card{padding:24px!important}
.tp-directory-card > .card-heading{border-bottom:1px solid #e9eeeb;padding-bottom:17px;margin-bottom:20px}
.tp-directory-card .card-heading h2{font-size:19px;color:#163e2b;letter-spacing:-.3px}
.tp-directory-card .card-heading .sub{font-size:12px;color:#718778;margin:7px 0 0}
.tp-map-layout{grid-template-columns:minmax(290px,330px) minmax(0,1fr)!important;gap:20px!important;align-items:stretch!important;margin-top:0!important}
.tp-map-directory{background:#f9fbfa!important;border:1px solid #dfeae3!important;border-radius:15px!important;min-height:580px!important;max-height:650px!important;overflow:hidden!important;padding:15px!important;display:flex;flex-direction:column;gap:12px}
.tp-map-search-label{color:#234b37;font-weight:800;font-size:12px}
.tp-map-search{margin-top:0!important;min-height:44px!important;border-radius:11px!important;font-size:13px!important;background:#fff!important}
.tp-map-list{min-height:0!important;max-height:none!important;overflow-y:auto!important;display:flex!important;flex-direction:column!important;gap:10px!important;padding:0 5px 4px 0!important}
.tp-map-list-item{flex-shrink:0;align-items:flex-start;min-height:100px;border-radius:13px!important;background:#fff!important;border:1px solid #e1ebe5!important;padding:14px!important;box-shadow:0 2px 8px rgba(13,48,27,.025);transition:border-color .15s,box-shadow .15s}
.tp-map-list-item:hover{border-color:#94c5a6!important;box-shadow:0 5px 13px rgba(5,95,52,.065)}
.tp-map-list-body{min-width:0;flex:1}
.tp-map-list-body strong{font-size:12px!important;color:#183d2c;line-height:1.5}
.tp-map-list-body small{font-size:11px!important;color:#6a8073!important;line-height:1.6;display:block;margin:5px 0 8px}
.tp-map-list-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tp-map-list-actions button,.tp-map-list-actions a{font-size:11px!important;font-weight:800!important;color:#087b4a!important;white-space:nowrap}
.tp-map-canvas{min-width:0;border:1px solid #dce8e0!important;border-radius:15px!important;background:#f5f8f6!important;overflow:hidden}
.tp-map-toolbar{min-height:55px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px!important;background:#fff!important;border-bottom:1px solid #e4eee7}
.tp-map-toolbar strong{font-size:13px;color:#1c4632}
.tp-map-status{font-size:10px!important;letter-spacing:.1px}
#doctors-map{height:580px!important;min-height:580px!important;width:100%!important;background:#edf4ef!important;border-radius:0!important}
.tp-map-footer{padding-top:16px;color:#687e70;font-size:12px}
.tp-map-footer a{font-size:12px;font-weight:800}
.map-hint{font-size:11px!important;line-height:1.6}
.doctor-map,#doctor-location-map,#business-map{height:365px!important;min-height:365px!important;width:100%!important;background:#edf4ef!important;border-radius:12px!important;overflow:hidden}
.profile-side .card{overflow:hidden}
.profile-side .map-buttons{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.profile-side .map-buttons .btn{min-width:0;white-space:normal;text-align:center}
.tp-google-popup{padding:8px 4px!important}
.tp-google-popup strong{display:block;font-size:14px;line-height:1.4;margin-bottom:6px}
.tp-google-popup p{font-size:12px;line-height:1.6;color:#688071}
.tp-google-fallback{border-radius:12px;min-height:350px}
@media(max-width:1180px){.tp-map-layout{grid-template-columns:minmax(250px,300px) minmax(0,1fr)!important;gap:12px!important}.tp-map-directory{min-height:500px!important;max-height:590px!important}#doctors-map{height:520px!important;min-height:520px!important}}
@media(max-width:900px){.tp-map-layout{grid-template-columns:1fr!important}.tp-map-directory{min-height:0!important;max-height:340px!important}.tp-map-list{display:flex!important;flex-direction:column!important}#doctors-map{height:470px!important;min-height:470px!important}.tp-directory-card{padding:17px!important}}
@media(max-width:560px){#doctors-map{height:380px!important;min-height:380px!important}.tp-map-toolbar{flex-wrap:wrap}.tp-map-directory{max-height:300px!important}.doctor-map,#doctor-location-map,#business-map{height:300px!important;min-height:300px!important}}


/* TerraPharma PRO v5.3 — móvil + estilo Huehuetenango */
:root{
  --tp-huehue-pine:#0b5f43;
  --tp-huehue-forest:#084836;
  --tp-huehue-mist:#eef5f2;
  --tp-huehue-sun:#d9a441;
  --tp-huehue-sky:#5e8497;
  --tp-huehue-earth:#8a7358;
}
body{background:linear-gradient(180deg,#f3f7f5 0%,#edf3ef 100%)}
.app{background:linear-gradient(180deg,#f6faf8 0%,#eff4f1 100%)}
.sidebar{
  background:linear-gradient(180deg,#0a4d39 0%,#083d31 48%,#072f29 100%);
  border-right:1px solid rgba(255,255,255,.06);
  box-shadow:10px 0 30px rgba(4,29,22,.18);
}
.brand{padding-bottom:24px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:14px}
.brand-image{background:rgba(255,255,255,.95);box-shadow:0 10px 26px rgba(0,0,0,.16)}
.brand strong,.brand span,.side-label,.side-help,.logout-btn{color:#e9f4ee}
.side-label{opacity:.72}
nav button{color:#d6e7de;border:1px solid transparent;border-radius:14px;padding:13px 14px}
nav button span{color:#bad6c6}
nav button:hover{background:rgba(255,255,255,.08);color:#fff;transform:none}
nav button.active{
  background:linear-gradient(90deg,rgba(224,245,234,.95) 0%,rgba(236,248,240,.92) 100%);
  color:#114f38;border-color:rgba(255,255,255,.12);box-shadow:0 8px 20px rgba(0,0,0,.12)
}
nav button.active span{color:#0b8050}
.sidebar-bottom{border-top:1px solid rgba(255,255,255,.08)}
.demo-pill{background:rgba(217,164,65,.16);color:#f0cf85;border:1px solid rgba(217,164,65,.22)}
.logout-btn{font-weight:700}.logout-btn:hover{color:#fff}
.topbar{
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(251,253,252,.94));
  backdrop-filter:blur(12px) saturate(130%);
  border-bottom:1px solid #e4ece7;
  box-shadow:0 8px 24px rgba(16,54,39,.05)
}
.user-pill{
  background:linear-gradient(135deg,#e7f5ec,#f6fbf8);
  color:#13553d;border:1px solid #d7e9df
}
.logout-top{
  background:linear-gradient(135deg,#f3fbf6,#e6f3ea);
  color:#16573f;border:1px solid #d7e7de;border-radius:12px
}
.logout-top:hover{background:linear-gradient(135deg,#e9f6ef,#def0e6)}
.main{max-width:1680px;padding:26px clamp(16px,2.4vw,38px) 50px}
.pagehead h1{color:#163b2b}
.pagehead p{color:#6f8679}
.kpi,.card{
  border:1px solid #dce7e1;
  border-radius:20px;
  box-shadow:0 12px 32px rgba(12,53,37,.055);
  background:linear-gradient(180deg,#ffffff 0%,#fbfdfc 100%)
}
.kpi{position:relative;overflow:hidden}
.kpi::before{
  content:"";position:absolute;left:0;top:0;right:0;height:4px;
  background:linear-gradient(90deg,var(--tp-huehue-pine),var(--tp-huehue-sun),var(--tp-huehue-sky));
}
.kpi-label{color:#6d8477}.kpi-value{color:#173c2c}
.card h2{color:#183a2c}
.btn.primary{
  background:linear-gradient(135deg,#0e8a56,#096b43);
  border-color:#096b43;box-shadow:0 10px 22px rgba(9,107,67,.18)
}
.btn.primary:hover{filter:brightness(1.03)}
.btn.soft{background:#edf7f2;border-color:#d8eade;color:#146144}
.notice{background:linear-gradient(180deg,#eef7f1,#e9f3ee)}
.table-wrap{border-radius:16px}
th{background:#f6faf8;color:#6f8578}
input,select,textarea{border-radius:12px;background:#fff}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px rgba(21,153,90,.12)}
.toast{border-radius:14px}
/* login premium */
.login-shell{
  position:relative;
  background:
    linear-gradient(120deg,rgba(8,46,36,.68) 0%,rgba(9,42,38,.30) 42%,rgba(214,165,72,.10) 100%),
    radial-gradient(circle at 18% 72%,rgba(223,173,70,.18) 0%,rgba(223,173,70,0) 30%),
    radial-gradient(circle at 80% 18%,rgba(95,132,151,.16) 0%,rgba(95,132,151,0) 28%),
    url('huehuetenango-concepto.webp') center/cover no-repeat fixed;
}
.login-shell::before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(5,26,21,.18),rgba(5,26,21,.36));
  pointer-events:none;
}
.login-card{
  position:relative;z-index:1;
  width:min(470px,100%);
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.90);
  box-shadow:0 28px 70px rgba(7,34,27,.35);
  backdrop-filter:blur(10px);
  border-radius:28px;
  padding:34px 36px 26px;
}
.login-brand-lockup{display:flex;flex-direction:column;align-items:center;gap:10px}
.login-logo-frame{
  width:86px;height:86px;border-radius:24px;
  background:linear-gradient(180deg,#fff,#eef5f1);
  box-shadow:0 15px 34px rgba(8,66,44,.14);
  display:grid;place-items:center
}
.login-eyebrow{color:#14724a;letter-spacing:3px;font-size:10px;font-weight:900}
.login-card h1{font-size:34px;line-height:1.08;margin-top:4px;color:#133d2c}
.login-subtitle{font-size:13px!important;color:#698074!important}
.login-divider{height:1px;background:linear-gradient(90deg,transparent,#d8e7de,transparent);margin:18px 0}
.login-intro{font-size:13px!important;color:#597267!important;margin-bottom:8px}
.login-card label{color:#224536;font-size:12px;font-weight:800}
.login-card input{
  min-height:48px;border-radius:14px;border:1px solid #d4e2da;background:#fbfdfc;font-size:14px
}
.login-password-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.password-toggle{
  border:1px solid #d9e8df;background:#f3faf6;color:#116543;border-radius:12px;padding:11px 14px;font-weight:800
}
.password-toggle:hover{background:#e9f5ee}
.login-submit{margin-top:18px!important;min-height:50px;border-radius:15px;font-size:14px;font-weight:800}
.login-secure-note{margin-top:14px;color:#557064;font-size:12px;display:flex;justify-content:center;gap:9px;align-items:center}
.login-card-foot{
  margin:24px -36px -26px;padding:15px 24px;
  border-top:1px solid #e0eae4;background:linear-gradient(180deg,#f9fbfa,#f3f7f5);
  border-radius:0 0 28px 28px;color:#6e8478
}
.login-scene-caption,.login-photo-credit{z-index:1}
/* mapa y directorio */
.tp-map-directory{background:linear-gradient(180deg,#f9fcfa,#f3f8f5)!important;border-radius:18px!important}
.tp-map-list-item{border-radius:16px!important;padding:15px!important}
.tp-map-toolbar{background:linear-gradient(180deg,#ffffff,#f9fcfa)!important}
#doctors-map,.doctor-map,#doctor-location-map,#business-map{border-radius:0 0 16px 16px}
/* responsive móvil */
@media (max-width: 980px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cols{grid-template-columns:1fr}
}
@media (max-width: 750px){
  body{background:#eef4f1}
  .sidebar{
    width:min(84vw,300px);
    border-radius:0 22px 22px 0;
    padding:18px 12px 18px;
    box-shadow:14px 0 34px rgba(0,0,0,.22)
  }
  .brand{padding:2px 8px 18px;margin-bottom:10px}
  .brand strong{font-size:18px}
  .side-label{margin:0 10px 10px}
  nav button{padding:14px 12px;font-size:14px}
  .topbar{
    height:auto;min-height:64px;padding:10px 12px;gap:10px;align-items:flex-start;flex-wrap:wrap
  }
  .hamburger{
    display:grid;place-items:center;
    width:42px;height:42px;border-radius:12px;
    background:#f2f8f4;border:1px solid #dbe7e1;color:#134f39
  }
  .breadcrumb{font-size:12px;min-width:0}
  .breadcrumb b{display:inline-block;max-width:46vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
  .top-meta{width:100%;justify-content:space-between;gap:8px;flex-wrap:wrap}
  .top-meta #who{order:1;flex:1;min-width:140px;font-size:11px;padding:9px 11px;border-radius:12px}
  .logout-top{order:2;padding:9px 12px;font-size:11px}
  .main{padding:14px 12px 26px}
  footer{font-size:10px;padding:14px 14px 24px}
  .pagehead{gap:12px;margin-bottom:16px}
  .pagehead h1{font-size:24px}
  .pagehead .row-actions,.row-actions{width:100%;flex-wrap:wrap}
  .kpis{grid-template-columns:1fr 1fr;gap:10px}
  .kpi{min-height:116px;padding:16px 14px;border-radius:18px}
  .kpi-value{font-size:22px}
  .card{padding:16px;border-radius:18px}
  .grid-forms,.form-fields{grid-template-columns:1fr!important}
  .line-entry{grid-template-columns:1fr 72px auto}
  .tp-map-layout{grid-template-columns:1fr!important}
  .tp-map-directory{max-height:330px!important;min-height:0!important;padding:12px!important}
  .tp-map-list{display:flex!important;flex-direction:column!important;gap:10px!important}
  #doctors-map{height:390px!important;min-height:390px!important}
  .doctor-map,#doctor-location-map,#business-map{height:320px!important;min-height:320px!important}
  .tp-map-toolbar{padding:12px!important;flex-wrap:wrap}
  .table-wrap{overflow:auto;-webkit-overflow-scrolling:touch}
  table{min-width:720px}
  .login-shell{padding:56px 14px 22px;background-attachment:scroll}
  .login-card{width:min(100%,460px);padding:28px 22px 20px;border-radius:24px}
  .login-card h1{font-size:28px}
  .login-card-foot{margin:20px -22px -20px;padding:14px 18px;border-radius:0 0 24px 24px}
  .login-scene-caption{top:14px;left:14px;font-size:9px;max-width:75vw}
  .login-photo-credit{display:none}
}
@media (max-width: 560px){
  .kpis{grid-template-columns:1fr}
  .top-meta{align-items:stretch}
  .top-meta #who,.logout-top{width:100%}
  .logout-top{text-align:center;justify-content:center}
  .quick{grid-template-columns:1fr 1fr}
  .pagehead h1{font-size:22px}
  .tp-map-directory{max-height:290px!important}
  #doctors-map{height:340px!important;min-height:340px!important}
  .doctor-map,#doctor-location-map,#business-map{height:290px!important;min-height:290px!important}
  .login-card h1{font-size:25px}
  .login-card input{min-height:46px}
  .password-toggle{padding:10px 12px}
}
