
:root{
  --gv:#0b2a8f;
  --gv2:#2448a8;
  --gv-soft:#eef3ff;
  --cyan:#e7f8fb;
  --ink:#172033;
  --muted:#667085;
  --line:#dfe5ef;
  --ok:#16875b;
  --warn:#c27a00;
  --danger:#c83b3b;
  --white:#fff;
  --shadow:0 12px 32px rgba(11,42,143,.12);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:#f5f7fb}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}
.muted{color:var(--muted)}
.small{font-size:.82rem}
.tag{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.25rem .55rem;font-weight:700;font-size:.75rem;background:var(--gv-soft);color:var(--gv)}
.tag.ok{background:#e8f7f0;color:var(--ok)}
.tag.warn{background:#fff3d6;color:var(--warn)}
.tag.danger{background:#fdeaea;color:var(--danger)}
.btn{border:0;border-radius:12px;padding:.72rem 1rem;font-weight:800;transition:.18s;display:inline-flex;align-items:center;justify-content:center;gap:.45rem}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:var(--gv);color:#fff}
.btn.secondary{background:var(--gv-soft);color:var(--gv)}
.btn.ghost{background:#fff;border:1px solid var(--line);color:var(--ink)}
.btn.danger{background:#fdeaea;color:var(--danger)}
.btn.ok{background:#e8f7f0;color:var(--ok)}
.btn.full{width:100%}
.btn.small{padding:.48rem .7rem;border-radius:10px;font-size:.82rem}
.icon-btn{width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:#fff}
.card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 5px 20px rgba(16,24,40,.05)}
.login-screen{min-height:100vh;display:grid;place-items:center;padding:1.2rem;background:
 radial-gradient(circle at 15% 10%,#d9e5ff 0,transparent 35%),
 radial-gradient(circle at 85% 80%,#daf6f3 0,transparent 32%),#f5f7fb}
.login-card{width:min(460px,100%);padding:2rem}
.brand{display:flex;align-items:center;gap:1rem}
.brand img{width:74px;height:74px;object-fit:contain;border-radius:16px;background:#fff}
.brand h1{margin:0;color:var(--gv);font-size:1.65rem}
.brand p{margin:.2rem 0 0;color:var(--muted)}
.login-card .notice{margin:1.3rem 0;background:var(--gv-soft);border-left:4px solid var(--gv);padding:.9rem 1rem;border-radius:10px;font-size:.9rem}
.field{display:grid;gap:.42rem;margin:.9rem 0}
.field label{font-weight:800;font-size:.88rem}
.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:.78rem .85rem;background:#fff;color:var(--ink);outline:none}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#7896eb;box-shadow:0 0 0 3px rgba(36,72,168,.12)}
.field textarea{min-height:92px;resize:vertical}
.demo-keys{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;margin:.9rem 0}
.demo-key{background:#f8fafc;border:1px dashed #b9c3d4;border-radius:12px;padding:.7rem;text-align:center;font-size:.82rem}
.app-shell{min-height:100vh}
.topbar{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.95);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:.72rem 1rem}
.topbar .logo-wrap{display:flex;align-items:center;gap:.7rem}
.topbar img{width:46px;height:46px;object-fit:contain}
.topbar h2{margin:0;color:var(--gv);font-size:1.05rem}
.topbar .subtitle{font-size:.72rem;color:var(--muted)}
.user-chip{display:flex;align-items:center;gap:.7rem}
.avatar{width:38px;height:38px;border-radius:50%;background:var(--gv);color:#fff;display:grid;place-items:center;font-weight:900}
.user-meta{display:none}
.content-wrap{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:calc(100vh - 70px)}
.sidebar{background:#fff;border-right:1px solid var(--line);padding:1rem .75rem;position:sticky;top:70px;height:calc(100vh - 70px)}
.nav-btn{width:100%;border:0;background:transparent;border-radius:12px;padding:.76rem .85rem;text-align:left;font-weight:800;color:#475467;margin:.18rem 0}
.nav-btn.active{background:var(--gv-soft);color:var(--gv)}
.sidebar-foot{position:absolute;bottom:1rem;left:.75rem;right:.75rem}
.sync-pill{display:flex;align-items:center;gap:.5rem;border-radius:12px;background:#f8fafc;border:1px solid var(--line);padding:.7rem;font-size:.8rem}
.dot{width:9px;height:9px;border-radius:50%;background:var(--warn)}
.dot.ok{background:var(--ok)}
.main{padding:1.2rem;min-width:0}
.view{display:none}
.view.active{display:block}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.page-head h1{margin:0;font-size:1.55rem}
.page-head p{margin:.3rem 0 0;color:var(--muted)}
.pilot-banner{background:#fff8e5;border:1px solid #f7d98b;color:#795100;border-radius:14px;padding:.8rem 1rem;margin-bottom:1rem;font-size:.88rem}
.filters{display:flex;flex-wrap:wrap;gap:.7rem;align-items:end;margin-bottom:1rem}
.filters .field{margin:0;min-width:150px}
.kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:.8rem;margin-bottom:1rem}
.kpi{padding:1rem}
.kpi .label{font-size:.78rem;color:var(--muted);font-weight:700}
.kpi .value{font-size:1.65rem;font-weight:900;margin-top:.3rem;color:var(--gv)}
.kpi.ok .value{color:var(--ok)}
.kpi.warn .value{color:var(--warn)}
.kpi.danger .value{color:var(--danger)}
.section-title{display:flex;align-items:center;justify-content:space-between;margin:1rem 0 .7rem}
.section-title h3{margin:0}
.route-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:.85rem}
.route-card{padding:1rem;cursor:pointer;transition:.18s}
.route-card:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:#bcc9ef}
.route-card .top{display:flex;justify-content:space-between;gap:.7rem}
.route-card h4{margin:0;font-size:1rem}
.route-card .meta{display:flex;flex-wrap:wrap;gap:.5rem;margin:.65rem 0;color:var(--muted);font-size:.8rem}
.progress{height:8px;background:#eef1f6;border-radius:999px;overflow:hidden}
.progress span{display:block;height:100%;background:var(--ok)}
.empty{padding:2rem;text-align:center;color:var(--muted)}
.search{max-width:340px}
.table-card{overflow:auto}
table{border-collapse:collapse;width:100%;min-width:700px}
th,td{text-align:left;padding:.72rem .8rem;border-bottom:1px solid var(--line);font-size:.86rem}
th{background:#f8fafc;color:#475467;position:sticky;top:0}
.status-text{font-weight:800}
.status-pendiente{color:var(--warn)}
.status-visto,.status-completada,.status-visitada{color:var(--ok)}
.status-no-visto,.status-no-visitada{color:var(--danger)}
.drawer-backdrop{position:fixed;inset:0;background:rgba(16,24,40,.42);z-index:40;display:none}
.drawer-backdrop.open{display:block}
.drawer{position:absolute;right:0;top:0;height:100%;width:min(620px,100%);background:#fff;box-shadow:-20px 0 50px rgba(16,24,40,.18);overflow:auto}
.drawer-head{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);padding:1rem;display:flex;align-items:center;justify-content:space-between;z-index:2}
.drawer-body{padding:1rem}
.doctor-list{display:grid;gap:.65rem}
.doctor-card{border:1px solid var(--line);border-radius:14px;padding:.85rem;display:flex;align-items:center;justify-content:space-between;gap:.7rem}
.doctor-card h4{margin:0}
.doctor-card p{margin:.25rem 0 0;color:var(--muted);font-size:.82rem}
.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.7rem;margin:.8rem 0}
.detail-box{background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:.75rem}
.detail-box .label{color:var(--muted);font-size:.74rem}
.detail-box .value{font-weight:800;margin-top:.2rem}
.visit-clock{background:var(--gv-soft);border-radius:14px;padding:1rem;margin:1rem 0;display:flex;align-items:center;justify-content:space-between}
.sample-add{display:grid;grid-template-columns:1fr 90px auto;gap:.55rem;align-items:end}
.sample-list{display:grid;gap:.5rem;margin:.7rem 0}
.sample-row{display:flex;justify-content:space-between;align-items:center;background:#f8fafc;border:1px solid var(--line);padding:.6rem .7rem;border-radius:10px}
.modal{position:fixed;inset:0;z-index:60;background:rgba(16,24,40,.48);display:none;place-items:center;padding:1rem}
.modal.open{display:grid}
.modal-card{width:min(560px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:var(--shadow)}
.modal-head{padding:1rem;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.modal-body{padding:1rem}
.toast{position:fixed;bottom:1rem;right:1rem;background:#172033;color:#fff;padding:.8rem 1rem;border-radius:12px;z-index:100;box-shadow:var(--shadow);opacity:0;transform:translateY(12px);pointer-events:none;transition:.2s}
.toast.show{opacity:1;transform:translateY(0)}
.admin-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:1rem}
.rep-list{display:grid;gap:.55rem}
.rep-row{display:grid;grid-template-columns:1fr 80px 80px 80px;gap:.5rem;align-items:center;padding:.7rem;border-bottom:1px solid var(--line)}
.mobile-nav{display:none}
@media(max-width:1100px){
  .kpi-grid{grid-template-columns:repeat(3,1fr)}
  .admin-grid{grid-template-columns:1fr}
}
@media(max-width:780px){
  .content-wrap{display:block}
  .sidebar{display:none}
  .main{padding:.9rem .75rem 5.5rem}
  .topbar{padding:.6rem .75rem}
  .user-meta{display:none}
  .kpi-grid{grid-template-columns:repeat(2,1fr)}
  .route-grid{grid-template-columns:1fr}
  .page-head{flex-direction:column}
  .filters{display:grid;grid-template-columns:1fr 1fr}
  .filters .field{min-width:0}
  .filters .field.search{grid-column:1/-1;max-width:none}
  .mobile-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);z-index:30;display:grid;grid-template-columns:repeat(5,1fr);padding:.45rem}
  .mobile-nav button{border:0;background:transparent;padding:.55rem .2rem;font-size:.68rem;color:#667085}
  .mobile-nav button.active{color:var(--gv);font-weight:900}
  .detail-grid{grid-template-columns:1fr}
  .sample-add{grid-template-columns:1fr 80px}
  .sample-add .btn{grid-column:1/-1}
  .drawer{width:100%}
}
@media(max-width:420px){
  .kpi-grid{grid-template-columns:1fr 1fr}
  .kpi .value{font-size:1.35rem}
  .login-card{padding:1.25rem}
}

/* Búsqueda inteligente de productos */
.autocomplete{position:relative}
.autocomplete-list{display:none;position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:12;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);max-height:260px;overflow:auto}
.autocomplete-list.open{display:block}
.autocomplete-option{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:.18rem;border:0;border-bottom:1px solid #eef1f6;background:#fff;padding:.72rem .8rem;text-align:left;color:var(--ink)}
.autocomplete-option:last-child{border-bottom:0}
.autocomplete-option:hover,.autocomplete-option:focus{background:var(--gv-soft);outline:none}
.autocomplete-option span{font-size:.75rem;color:var(--muted)}
.autocomplete-help{padding:.8rem;color:var(--muted);font-size:.82rem}
.selected-products{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.65rem}
.selected-product{display:inline-flex;align-items:center;gap:.45rem;background:var(--gv-soft);color:var(--gv);border-radius:999px;padding:.35rem .45rem .35rem .65rem;font-size:.8rem;font-weight:800}
.selected-product button{width:24px;height:24px;border:0;border-radius:50%;background:#fff;color:var(--gv);font-weight:900;line-height:1}
/* Gerencia */
.admin-search-card{padding:1rem;margin-top:1rem}
.admin-search-card .section-title{margin-top:0}
.admin-search-filters .search{flex:1;max-width:none;min-width:280px}
.admin-kpis{margin-bottom:.7rem}
.kpi.compliance .value{color:var(--gv)}
.kpi.compliance .progress{margin-top:.55rem}
.rep-row-wide{grid-template-columns:minmax(180px,1fr) 80px 65px minmax(120px,220px) 82px}
.rep-row-wide .progress{width:100%}
@media(max-width:780px){
  .autocomplete-list{position:static;margin-top:.4rem;box-shadow:none}
  .rep-row-wide{grid-template-columns:1fr 70px 55px}
  .rep-row-wide .progress{grid-column:1/-1}
  .rep-row-wide .btn{grid-column:1/-1}
  .admin-search-filters .search{min-width:0}
}

/* Panel de gerencia v3 */
.admin-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));align-items:end}
.admin-filter-grid .field.search{grid-column:span 3;max-width:none}
@media(max-width:1100px){.admin-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-filter-grid .field.search{grid-column:1/-1}}
@media(max-width:620px){.admin-filter-grid{grid-template-columns:1fr}.admin-filter-grid .field.search{grid-column:auto}}

/* Gerencia v4: matriz diaria y control estricto por rol */
body.visitor-mode .admin-only{display:none!important}
.period-calendar-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;margin-bottom:1rem}
.period-calendar-card p{margin:.25rem 0 0}
.period-calendar-actions{display:flex;align-items:center;gap:.6rem;min-width:300px}
.period-calendar-actions input{width:100%;border:1px solid var(--line);border-radius:12px;padding:.72rem .8rem;background:#fff;color:var(--ink)}
.report-matrix-stack{display:grid;gap:1rem}
.report-matrix-card{overflow:hidden}
.report-matrix-head{display:flex;align-items:center;justify-content:space-between;padding:1rem 1rem .65rem}
.report-matrix-head h3{margin:0;color:var(--gv)}
.report-matrix-head p{margin:.3rem 0 0;color:var(--muted);font-size:.82rem}
.report-matrix-scroll{overflow:auto;border-top:1px solid var(--line)}
table.report-matrix{min-width:780px;border-collapse:separate;border-spacing:0}
.report-matrix th,.report-matrix td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:center;padding:.65rem .55rem}
.report-matrix thead th{position:static;background:#f8fafc;color:#101828;font-weight:900}
.report-matrix thead tr:first-child th{background:#eef3ff;color:var(--gv)}
.report-matrix thead th:first-child,.report-matrix tbody th{position:sticky;left:0;z-index:2;text-align:left;min-width:190px;background:#fff}
.report-matrix thead th:first-child{z-index:3;background:#eef3ff}
.report-matrix tbody th{font-size:.82rem;color:#344054}
.report-cell{min-width:108px;vertical-align:middle}
.report-cell strong{display:block;font-size:1rem}
.report-cell span{display:block;margin-top:.16rem;font-size:.72rem;color:var(--muted)}
.report-cell small{display:block;margin-top:.2rem;font-size:.65rem;font-weight:800}
.report-cell.reported{background:#edf9f2;color:#087443}
.report-cell.pending{background:#fffaf0;color:#9a6700}
.report-cell.late{background:#e30000!important;color:#fff!important}
.report-cell.late span,.report-cell.late small{color:#fff!important}
.report-cell.empty-cell{background:#f8fafc;color:#98a2b3}
@media(max-width:780px){
  .period-calendar-card{align-items:stretch;flex-direction:column}
  .period-calendar-actions{min-width:0;display:grid;grid-template-columns:1fr}
  .report-matrix-head{padding:.85rem}
  .report-matrix thead th:first-child,.report-matrix tbody th{min-width:155px}
}

/* ===== Versión 5: programaciones e importación de Excel ===== */
.program-control-card{padding:1rem;display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.program-control-main{display:grid;grid-template-columns:minmax(240px,360px) minmax(220px,1fr);gap:1rem;align-items:end;flex:1}
.program-meta{display:flex;gap:.45rem;flex-wrap:wrap;align-items:center;padding-bottom:.35rem}
.program-meta strong{font-size:1.05rem;color:#0b2a8f;margin-right:.35rem}
.program-meta span{background:#eef3ff;border:1px solid #d7e2ff;border-radius:999px;padding:.3rem .62rem;font-size:.78rem;color:#41506b}
.program-actions{display:flex;gap:.55rem;flex-wrap:wrap;justify-content:flex-end}
.form-grid.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}
.program-end-preview{background:#eef3ff;border:1px solid #d7e2ff;border-radius:12px;padding:.75rem 1rem;margin:.8rem 0;color:#334155}
.import-preview{margin-top:1rem}
.import-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:1rem 0}
.import-summary-grid>div{border:1px solid #e0e6f2;border-radius:12px;padding:.75rem;background:#f8faff;display:flex;flex-direction:column;gap:.25rem}
.import-summary-grid span{font-size:.78rem;color:#64748b}.import-summary-grid strong{font-size:1.35rem;color:#0b2a8f}
.import-summary-grid .danger-box{background:#fff2f2;border-color:#ffcaca}.import-summary-grid .danger-box strong{color:#b42318}
.import-errors{margin:0 0 1rem;border:1px solid #ffd2d2;border-radius:12px;background:#fff7f7;padding:.7rem 1rem}
.import-errors summary{font-weight:700;color:#a52a2a;cursor:pointer}.import-errors p{margin:.35rem 0;font-size:.83rem}
.ok-note{background:#ecfdf3!important;border-color:#b7ebc9!important;color:#166534!important}
.danger-note{background:#fff1f2!important;border-color:#fecdd3!important;color:#9f1239!important}
.report-cell.holiday{background:#eef2f7!important;color:#596579!important;min-width:118px}
.report-cell.holiday strong{font-size:.78rem}.report-cell.holiday span{max-width:105px;white-space:normal;text-align:center;line-height:1.15}
.modal-card{max-width:min(760px,94vw)}
@media(max-width:900px){.program-control-card{align-items:stretch;flex-direction:column}.program-control-main{grid-template-columns:1fr}.program-actions{justify-content:flex-start}}
@media(max-width:620px){.form-grid.two,.import-summary-grid{grid-template-columns:1fr 1fr}.program-actions .btn{flex:1 1 100%}}
@media(max-width:420px){.import-summary-grid{grid-template-columns:1fr}.form-grid.two{grid-template-columns:1fr}}

/* ===== GV VISITA 360 V6: DISEÑO CORPORATIVO + KPIs AUTOMÁTICOS ===== */
:root{
  --clinical:#16875b;
  --clinical-soft:#eaf8f2;
  --silver:#eef1f5;
  --silver-deep:#98a2b3;
  --orange:#d97706;
  --orange-soft:#fff4e5;
}
html,body{font-family:"Segoe UI",Roboto,Arial,sans-serif}
body.manager-mode .visitor-only{display:none!important}
body.visitor-mode .admin-only{display:none!important}
@media(min-width:781px){.user-meta{display:block}}
.eyebrow{display:inline-block;color:var(--gv);font-size:.72rem;font-weight:900;letter-spacing:.09em;text-transform:uppercase;margin-bottom:.25rem}
.hero-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.hero-head h1{font-size:1.75rem;margin:.05rem 0 .25rem;letter-spacing:-.025em}.hero-head p{margin:0;color:var(--muted)}
.hero-sync,.version-chip{border-radius:999px;padding:.45rem .72rem;font-size:.72rem;font-weight:900;white-space:nowrap;border:1px solid var(--line);background:#fff}
.hero-sync.online{color:var(--clinical);background:var(--clinical-soft);border-color:#bfe8d6}.hero-sync.offline{color:var(--orange);background:var(--orange-soft);border-color:#f7d49a}.version-chip{color:var(--gv);background:var(--gv-soft)}
.coverage-trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin-bottom:1rem}
.metric-card{border:1px solid var(--line);border-radius:18px;background:#fff;padding:1rem;box-shadow:0 5px 20px rgba(16,24,40,.04)}
.metric-label{font-size:.78rem;color:var(--muted);font-weight:800}.metric-main{font-size:2rem;font-weight:950;color:var(--gv);margin:.18rem 0}.metric-sub{font-size:.76rem;color:var(--muted);margin-bottom:.55rem}
.metric-card.good .metric-main{color:var(--clinical)}.metric-card.mid .metric-main{color:var(--orange)}.metric-card.low .metric-main{color:var(--danger)}
.metric-card.good .progress span,.mini-bar-track span.good{background:var(--clinical)}.metric-card.mid .progress span,.mini-bar-track span.mid{background:var(--orange)}.metric-card.low .progress span,.mini-bar-track span.low{background:var(--danger)}
.auto-kpi-grid{display:grid;grid-template-columns:repeat(7,minmax(105px,1fr));gap:.7rem;margin-bottom:1rem}.auto-kpi-grid.compact{grid-template-columns:repeat(6,minmax(105px,1fr))}
.auto-kpi{padding:.82rem .9rem;box-shadow:none}.auto-kpi span{display:block;font-size:.72rem;font-weight:800;color:var(--muted)}.auto-kpi strong{display:block;font-size:1.45rem;margin-top:.2rem;color:var(--gv)}
.auto-kpi.ok strong{color:var(--clinical)}.auto-kpi.warn strong,.auto-kpi.orange strong{color:var(--orange)}.auto-kpi.danger strong{color:var(--danger)}
.quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin:1rem 0}.quick-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:1rem;text-align:left;color:var(--ink);text-decoration:none;display:flex;flex-direction:column;gap:.18rem;min-height:112px;box-shadow:0 4px 14px rgba(16,24,40,.04);transition:.18s}.quick-card:hover{transform:translateY(-2px);border-color:#b9c8f2;box-shadow:var(--shadow)}.quick-card>span{font-size:1.25rem;color:var(--gv);font-weight:900}.quick-card strong{font-size:.92rem}.quick-card small{color:var(--muted);font-size:.72rem;line-height:1.3}.link-card{cursor:pointer}
.dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1rem 0}.dashboard-grid.triple{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-card{padding:1rem}.dashboard-card>h3{margin:.05rem 0 .85rem}
.mini-bars{display:grid;gap:.68rem}.mini-bar-row{display:grid;grid-template-columns:minmax(100px,180px) 1fr 48px;gap:.6rem;align-items:center}.mini-bar-label{font-size:.78rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-bar-track{height:9px;background:var(--silver);border-radius:999px;overflow:hidden}.mini-bar-track span{display:block;height:100%;border-radius:inherit}.mini-bar-row>strong{text-align:right;font-size:.78rem;color:#475467}
.compact-table{min-width:600px}.coverage-badge{display:inline-flex;padding:.24rem .48rem;border-radius:999px;font-weight:900;font-size:.74rem}.coverage-badge.good{background:var(--clinical-soft);color:var(--clinical)}.coverage-badge.mid{background:var(--orange-soft);color:var(--orange)}.coverage-badge.low{background:#fdeaea;color:var(--danger)}
.segmented{display:inline-grid;grid-template-columns:repeat(3,1fr);background:var(--silver);padding:4px;border-radius:14px;margin-bottom:1rem}.segmented button{border:0;background:transparent;padding:.6rem 1rem;border-radius:10px;font-weight:850;color:#667085}.segmented button.active{background:#fff;color:var(--gv);box-shadow:0 2px 8px rgba(16,24,40,.08)}
.state-banner{display:flex;align-items:center;gap:.7rem;border-radius:14px;padding:.8rem 1rem;margin-bottom:1rem;border:1px solid}.state-banner strong{white-space:nowrap}.state-banner span{font-size:.82rem}.holiday-state{background:var(--silver);border-color:#d8dee8;color:#596579}.permission-state{background:var(--orange-soft);border-color:#f2cb8e;color:#945e00}
.birthday-state{background:#fff5fb;border-color:#efb9d8;color:#8c245f}.birthday-state strong{color:#a11368}.birthday-state span{line-height:1.45}
.contact-check-list{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;margin:.7rem 0}.contact-check-row{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:start;gap:.7rem;width:100%;padding:.72rem .8rem;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}.contact-check-row:hover{border-color:#9db1e8;background:#f7f9ff}.contact-check-row input{width:18px;height:18px;margin:.1rem 0 0}.contact-check-row span{display:grid;gap:.16rem;min-width:0}.contact-check-row strong{display:block;line-height:1.25}.contact-check-row small{display:block;color:var(--muted);line-height:1.35}.permission-contact-picker{max-height:360px;overflow-y:auto;padding-right:.25rem}.permission-request-contacts{margin-top:.55rem;border:1px solid var(--line);border-radius:10px;background:#f8faff;overflow:hidden}.permission-request-contacts summary{cursor:pointer;padding:.55rem .7rem;color:var(--gv);font-size:.72rem;font-weight:900}.permission-request-contacts>div{display:grid;border-top:1px solid var(--line)}.permission-request-contact{display:grid;gap:.1rem;padding:.48rem .7rem;border-bottom:1px solid var(--line)}.permission-request-contact:last-child{border-bottom:0}.permission-request-contact strong{font-size:.76rem}.permission-request-contact span{font-size:.68rem;color:var(--muted)}
.report-cell.permission{background:var(--orange-soft)!important;color:#945e00!important}.report-cell.permission span,.report-cell.permission small{color:#945e00!important}
.status-no-recibe{color:var(--orange)}
.profile-hero{display:flex;align-items:center;gap:1rem;padding:1.25rem;margin-bottom:1rem}.profile-avatar{width:84px;height:84px;border-radius:24px;background:linear-gradient(135deg,var(--gv),#345dcc);display:grid;place-items:center;color:#fff;font-size:1.7rem;font-weight:950}.profile-hero h1{margin:.05rem 0 .3rem}.profile-hero p{margin:0;color:var(--muted)}
.chip-cloud{display:flex;flex-wrap:wrap;gap:.45rem}.permission-mini{display:grid;gap:.12rem;border-bottom:1px solid var(--line);padding:.6rem 0}.permission-mini:last-child{border-bottom:0}.permission-mini span,.permission-mini small{font-size:.76rem;color:var(--muted)}.sync-actions{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.permission-list{display:grid}.permission-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.7rem;align-items:center;padding:.7rem 0;border-bottom:1px solid var(--line)}.permission-row:last-child{border-bottom:0}.permission-row>div:first-child{display:grid;gap:.15rem}.permission-row span,.permission-row small{font-size:.76rem;color:var(--muted)}.permission-actions{display:flex;gap:.4rem}
.holiday-list{display:grid;gap:.5rem}.holiday-list>div{display:flex;justify-content:space-between;gap:.7rem;border-bottom:1px solid var(--line);padding:.55rem 0}.holiday-list span{font-size:.78rem;color:var(--muted);text-align:right}
.audit-list{display:grid;gap:.45rem}.audit-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-bottom:1px solid var(--line);padding:.6rem 0}.audit-row>div:first-child{display:grid}.audit-row>div:first-child span{font-size:.72rem;color:var(--muted)}.audit-numbers{display:flex;flex-wrap:wrap;gap:.35rem;justify-content:flex-end}.audit-numbers span{background:var(--silver);border-radius:999px;padding:.25rem .5rem;font-size:.7rem;color:#475467}
.admin-tools{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1180px){.auto-kpi-grid,.auto-kpi-grid.compact{grid-template-columns:repeat(4,1fr)}.dashboard-grid.triple{grid-template-columns:1fr 1fr}.quick-actions{grid-template-columns:repeat(2,1fr)}}
@media(max-width:780px){.hero-head{align-items:flex-start}.hero-head h1{font-size:1.45rem}.coverage-trio{grid-template-columns:1fr}.metric-card{padding:.85rem}.auto-kpi-grid,.auto-kpi-grid.compact{grid-template-columns:repeat(2,1fr)}.quick-actions{grid-template-columns:repeat(2,1fr)}.quick-card{min-height:100px;padding:.85rem}.dashboard-grid,.dashboard-grid.triple{grid-template-columns:1fr}.mini-bar-row{grid-template-columns:100px 1fr 42px}.profile-hero{padding:1rem}.profile-avatar{width:68px;height:68px;border-radius:20px}.permission-row{grid-template-columns:1fr auto}.permission-actions{grid-column:1/-1}.audit-row{align-items:flex-start;flex-direction:column}.audit-numbers{justify-content:flex-start}.state-banner{align-items:flex-start;flex-direction:column;gap:.25rem}.admin-tools{grid-template-columns:repeat(2,1fr)}}
@media(max-width:420px){.quick-actions{grid-template-columns:1fr 1fr}.quick-card small{display:none}.auto-kpi strong{font-size:1.25rem}.segmented{width:100%}.segmented button{padding:.55rem .5rem}.hero-sync{font-size:.62rem}.mini-bar-row{grid-template-columns:86px 1fr 40px}}
@media(max-width:780px){
  .mobile-nav::before{content:"";position:absolute;left:0;top:-3px;height:3px;width:var(--global-progress,0%);background:var(--clinical);transition:width .25s ease}
}

/* V6.5 · Inicio de jornada + dashboard personal */
.day-start-screen{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:1.2rem;background:linear-gradient(180deg,#0b2a8f 0 23%,#f5f8ff 23% 100%)}
.day-start-card{width:min(520px,100%);padding:1.6rem;text-align:center;border-radius:26px;box-shadow:0 22px 55px rgba(15,35,91,.18)}
.day-start-brand img{width:112px;height:82px;object-fit:contain;margin-top:-.45rem}
.day-start-copy{margin:.4rem 0 .7rem}.day-start-copy h1{color:var(--gv);font-size:2rem;margin:.25rem 0 .15rem}.day-start-copy h2{color:#0b4a8f;font-size:1.65rem;margin:.1rem 0 .35rem}.day-start-copy p{margin:.2rem 0;line-height:1.55}
.day-start-photo{width:150px;height:150px;border-radius:50%;margin:1.15rem auto;display:grid;place-items:center;background:linear-gradient(135deg,#dfe9ff,#f7f9ff);border:5px solid #fff;box-shadow:0 10px 28px rgba(11,42,143,.16);background-size:cover;background-position:center;color:var(--gv);font-size:2.2rem;font-weight:950;overflow:hidden}
.day-start-photo.has-photo span{display:none}.day-start-status{min-height:1.7rem;color:var(--muted);font-size:.92rem}.day-status-ok{display:inline-flex;align-items:center;gap:.4rem;color:#167a45;background:#e8f8ef;padding:.45rem .7rem;border-radius:999px;font-weight:800}
.day-start-main{width:100%;font-size:1.15rem;padding:1rem 1.25rem;margin:.6rem 0 .8rem;border-radius:16px}
.day-start-links{display:grid;gap:.15rem;margin:.35rem 0 .8rem}.day-start-link{border:0;background:transparent;color:var(--gv);padding:.75rem .5rem;font-size:1rem;display:flex;justify-content:center;align-items:center;gap:.65rem;cursor:pointer;border-radius:12px}.day-start-link:hover{background:#eef3ff}.day-start-link span{font-size:1.35rem;color:#2ca8dd}
.friendly-dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.friendly-dashboard-head h1{font-size:1.75rem;margin:.05rem 0 .25rem;color:#0c2d80}.friendly-dashboard-head p{margin:0;color:var(--muted)}
.friendly-coverage{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.85rem;margin-bottom:1rem}.friendly-coverage .metric-card{background:#fff}
.revisit-card b{font-size:1.45rem;color:var(--blue,#12389b)}.revisit-card small{font-size:.66rem;color:#6f7890}
.motivation-card{display:flex;align-items:center;justify-content:center;gap:.7rem;padding:1rem 1.2rem;border:1px solid #9ad6ad;background:#f7fff9;color:#174e2c;text-align:center;margin-bottom:1rem}.motivation-card>span{width:28px;height:28px;border-radius:50%;background:#1ea85b;color:#fff;display:grid;place-items:center;font-weight:900;flex:0 0 auto}.motivation-card strong{font-size:1rem;line-height:1.45}
.dashboard-menu-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin:1rem 0}.dashboard-menu-card{border:1px solid var(--line);border-radius:16px;background:#fff;min-height:112px;padding:.9rem .7rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.45rem;color:#0b2a8f;font-weight:800;box-shadow:0 5px 16px rgba(16,24,40,.06);cursor:pointer}.dashboard-menu-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.dashboard-menu-card span{font-size:1.55rem}.dashboard-menu-card.clinical{color:#178646}.dashboard-menu-card.neutral{color:#60636b}.dashboard-menu-card strong{font-size:.9rem;text-align:center}
.friendly-trend{margin-top:1rem}.global-coverage-card{padding:1rem 1.15rem;margin-top:1rem}.global-coverage-card>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:1rem;color:#0b2a8f}.global-coverage-card>div:first-child span{font-size:1.25rem;font-weight:950}.global-progress-track{height:14px;border-radius:999px;background:#e7ebf2;overflow:hidden;margin-top:.75rem}.global-progress-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#0b2a8f,#1e66d0)}
.avatar.photo-avatar{background-size:cover;background-position:center}
.user-photo-preview{width:86px;height:86px;border-radius:22px;background:#edf2ff;display:grid;place-items:center;color:var(--gv);font-weight:900;background-size:cover;background-position:center;border:1px solid var(--line)}
.user-photo-row{display:flex;align-items:center;gap:1rem;margin:.75rem 0 1rem}.user-photo-row .field{flex:1;margin:0}
.linked-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#edf2ff;color:var(--gv);font-size:.72rem;font-weight:900;background-size:cover;background-position:center}
@media(max-width:780px){.day-start-screen{padding:.7rem;background:linear-gradient(180deg,#0b2a8f 0 18%,#f5f8ff 18% 100%)}.day-start-card{padding:1.25rem;border-radius:22px}.day-start-brand img{width:100px;height:72px}.day-start-copy h1{font-size:1.65rem}.day-start-copy h2{font-size:1.45rem}.day-start-photo{width:130px;height:130px}.friendly-dashboard-head h1{font-size:1.4rem}.friendly-coverage{grid-template-columns:repeat(2,1fr);gap:.55rem}.friendly-coverage .metric-card{padding:.7rem}.dashboard-menu-grid{grid-template-columns:repeat(3,1fr);gap:.55rem}.dashboard-menu-card{min-height:96px;padding:.65rem .4rem}.dashboard-menu-card strong{font-size:.78rem}.dashboard-menu-card span{font-size:1.35rem}}
@media(max-width:420px){.friendly-coverage{grid-template-columns:repeat(2,1fr)}.friendly-coverage .metric-card .metric-value{font-size:1.45rem}.dashboard-menu-grid{grid-template-columns:repeat(3,1fr)}.dashboard-menu-card{min-height:92px}.motivation-card{align-items:flex-start;text-align:left}.day-start-photo{width:118px;height:118px}.day-start-main{font-size:1.05rem}}


/* V6.6 · Reporte simplificado + otros médicos del centro */
.visit-result-toggle{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
.visit-result-btn{min-height:58px;border:2px solid var(--line);border-radius:14px;background:#fff;font-weight:900;font-size:1rem;cursor:pointer;transition:.15s}
.visit-result-btn.positive{color:#167a45}.visit-result-btn.negative{color:#b42318}
.visit-result-btn.positive.selected{background:#e9f8ef;border-color:#34a866;box-shadow:0 0 0 3px rgba(52,168,102,.1)}
.visit-result-btn.negative.selected{background:#fff0ee;border-color:#d92d20;box-shadow:0 0 0 3px rgba(217,45,32,.08)}
.required-mark{color:#d92d20;font-weight:900}.read-only-visit-field{min-height:48px;display:flex;align-items:center;padding:.75rem .85rem;border:1px solid var(--line);border-radius:12px;background:#f7f9fc;color:#344054;font-weight:850}
.other-doctors-title{align-items:flex-start}.other-doctors-title p{margin:.2rem 0 0}.other-plan-doctor{border-left:3px solid var(--clinical)}.other-plan-slots{color:#157f48;margin-top:.25rem;font-weight:750}
.route-filter-grid{align-items:end}
@media(max-width:780px){.visit-result-toggle{grid-template-columns:1fr 1fr}.visit-result-btn{min-height:54px}.user-chip .user-meta{display:none}}

/* V6.6.1 - Horario manual AM/PM en reporte de visita */
.visit-schedule-toggle{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
.visit-schedule-btn{min-height:54px;border:2px solid var(--line);border-radius:14px;background:#fff;color:var(--gv);font-weight:900;font-size:1rem;cursor:pointer;transition:.15s}
.visit-schedule-btn.selected{background:#eef3ff;border-color:var(--gv);box-shadow:0 0 0 3px rgba(20,54,164,.10)}
@media(max-width:780px){.visit-schedule-btn{min-height:54px;font-size:1.02rem}}

/* V6.7 · Matriz mensual, perfil por avatar, reportes y mayúsculas */
#appShell,#dayStartScreen,#profileMissingScreen,.drawer,.modal-card,.toast{text-transform:uppercase}
#appShell input,#appShell textarea,#appShell select,.drawer input,.drawer textarea,.drawer select,.modal-card input,.modal-card textarea,.modal-card select{text-transform:uppercase}
.user-profile-shortcut{border:0;background:transparent;padding:.25rem .35rem;border-radius:14px;color:inherit;text-align:left}
.user-profile-shortcut:hover,.user-profile-shortcut:focus-visible{background:var(--gv-soft);outline:2px solid transparent}
.clickable-kpi{width:100%;text-align:left;border:1px solid var(--line);cursor:pointer}
.clickable-kpi:hover{border-color:#9db1eb;box-shadow:0 6px 18px rgba(11,42,143,.10)}
.clickable-kpi small{display:block;margin-top:.2rem;font-size:.58rem;color:var(--muted);font-weight:900}
.contact-list-modal{display:grid;gap:.55rem}
.contact-list-row{width:100%;border:1px solid var(--line);background:#fff;border-radius:13px;padding:.75rem .85rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;text-align:left;color:var(--ink)}
.contact-list-row:hover{background:var(--gv-soft)}
.contact-list-row>span:first-child{display:grid;gap:.18rem}.contact-list-row small{color:var(--muted)}
.history-search-card{padding:.75rem 1rem;margin-bottom:1rem}.history-search-card .field{margin:0}
.specialty-chip-grid{display:flex;flex-wrap:wrap;gap:.55rem}.specialty-count-chip{display:inline-flex;align-items:center;gap:.45rem;padding:.4rem .65rem;border-radius:999px;background:var(--gv-soft);color:var(--gv);font-weight:900}.specialty-count-chip small{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:999px;background:#fff;color:var(--gv);font-size:.7rem}
.full-month-matrix-card{margin-bottom:1.2rem}.full-month-matrix-card .report-matrix-head{position:relative;z-index:9;background:#fff}.full-month-matrix-card .report-matrix-scroll{max-height:68vh;overflow:auto;position:relative}.full-month-matrix{min-width:max(1320px,100%);--matrix-name-width:190px}
.full-month-matrix thead th{position:sticky!important;top:0;z-index:6;min-width:64px;background:#12365d!important;color:#fff!important;padding:.5rem .35rem}
.full-month-matrix thead th span,.full-month-matrix thead th strong{display:block}.full-month-matrix thead th span{font-size:.58rem;opacity:.85}.full-month-matrix thead th strong{font-size:.78rem;margin-top:.1rem}
.full-month-matrix .sticky-col{position:sticky!important;left:0!important;z-index:7!important;min-width:190px!important;background:#fff!important;color:#102a43!important;text-align:left!important}
.full-month-matrix thead .sticky-col{z-index:10!important;background:#12365d!important;color:#fff!important}
.full-month-matrix .summary-col,.full-month-matrix .summary-cell{position:sticky!important;right:0!important;z-index:7;min-width:120px}
.full-month-matrix .summary-col{background:#0b2a8f!important;color:#fff!important}.full-month-matrix .summary-cell{background:#fff}
.full-month-matrix .days-summary-col,.full-month-matrix .days-summary-cell{position:sticky!important;right:240px!important;z-index:7;min-width:120px;box-shadow:-5px 0 8px rgba(16,42,67,.10)}.full-month-matrix .days-percent-col,.full-month-matrix .days-percent-cell{position:sticky!important;right:120px!important;z-index:7;min-width:120px}.full-month-matrix .days-summary-col,.full-month-matrix .days-percent-col{background:#12365d!important;color:#fff!important}.full-month-matrix .days-summary-cell{background:#f4f7ff;color:#0b2a8f}.full-month-matrix thead .summary-col,.full-month-matrix thead .days-summary-col,.full-month-matrix thead .days-percent-col{z-index:11!important}
.full-month-matrix .matrix-indicator-col{position:sticky!important;z-index:7;min-width:120px;width:120px}.full-month-matrix thead .matrix-indicator-col{z-index:11!important}.matrix-indicator-controls{display:flex;align-items:center;justify-content:flex-end;gap:.28rem;flex-wrap:wrap;max-width:650px}.matrix-indicator-controls>span{font-size:.6rem;font-weight:900;color:#475467;margin-right:.1rem}.matrix-indicator-toggle{border:1px solid #cfd8ea;background:#fff;color:#475467;border-radius:999px;padding:.25rem .42rem;font:inherit;font-size:.58rem;font-weight:900;line-height:1.15;cursor:pointer}.matrix-indicator-toggle.active{background:#eaf0ff;border-color:#7896eb;color:#0b2a8f}.matrix-indicator-toggle:hover{box-shadow:0 0 0 2px rgba(36,72,168,.10)}
.time-report-card{margin-top:0}.time-report-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.time-report-toolbar h3{margin:0;color:var(--gv)}.time-report-toolbar p{margin:.3rem 0 0}.time-report-filters{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(280px,1fr) minmax(320px,1fr);gap:.75rem;max-width:none;align-items:start}.multi-filter-field{display:grid;gap:.42rem}.multi-filter-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.multi-filter-head label{font-weight:900;font-size:.78rem}.multi-filter-head button{border:0;background:transparent;color:var(--gv);font-size:.68rem;font-weight:900;cursor:pointer}.multi-filter-options{display:flex;gap:.35rem;flex-wrap:wrap}.multi-filter-option{position:relative}.multi-filter-option input{position:absolute;opacity:0;pointer-events:none}.multi-filter-option span{display:inline-flex;border:1px solid #d8deea;background:#fff;border-radius:999px;padding:.4rem .58rem;color:#475467;font-size:.72rem;font-weight:800;cursor:pointer}.multi-filter-option input:checked+span{background:#153da8;color:#fff;border-color:#153da8}.multi-filter-field>small{color:var(--muted);font-size:.62rem;font-weight:800}.time-report-summary{margin-top:.8rem;max-height:390px}.time-report-summary table{min-width:760px}.time-report-summary th,.time-report-summary td{text-align:center}.time-report-summary tbody th{background:#f8fafc;color:#102a43}.time-report-detail{max-height:520px}.time-report-detail table{min-width:1080px}
@media(max-width:980px){.report-matrix-head{align-items:flex-start;flex-direction:column}.matrix-indicator-controls{justify-content:flex-start;max-width:none}.time-report-filters{grid-template-columns:1fr}.time-report-toolbar{flex-direction:column}}
.report-cell.invalid-day{background:#ffd9d9!important;color:#9f1515!important}.report-cell.invalid-day strong{font-size:.7rem;line-height:1.05}.permission-banner-button{width:100%;border:0;text-align:left;cursor:pointer;font:inherit}.permission-banner-button:hover{filter:brightness(.98);box-shadow:0 0 0 2px rgba(211,122,0,.16)}.permission-detail-list{display:grid;gap:.55rem}.permission-report-block{display:inline-flex;align-items:center;justify-content:center;padding:.55rem .8rem;border-radius:10px;background:#ffe3e3;color:#b42318;font-weight:900;border:1px solid #ffc9c9}.permission-contact-card{border-color:#ffc9c9!important;background:#fff9f9!important}.permission-contact-block{border-color:#ffc9c9!important;background:#fff1f1!important;color:#9f1515}.tag.danger{background:#ffe3e3;color:#b42318}
.report-cell.manager-valid{background:#dcfce7!important;color:#067647!important;box-shadow:inset 0 0 0 2px #12b76a}.manager-valid-label{font-weight:900;color:#067647!important}.manager-day-validation{display:grid;gap:.65rem;margin:.75rem 0;padding:1rem;border:1px solid #a6f4c5;border-radius:14px;background:#f0fdf4}.manager-valid-notice{border-color:#a6f4c5!important;background:#ecfdf3!important;color:#067647!important}
.permission-cancel-contact{grid-template-columns:auto 1fr;align-items:center;cursor:pointer}.permission-cancel-contact input{width:20px;height:20px;accent-color:#b42318}.permission-cancel-contact span{display:grid;gap:.15rem}.permission-cancel-panel{display:grid;gap:.65rem;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--line)}
.overdue-open-state{border:1px solid #fda29b!important;background:#fff1f1!important;color:#9f1515!important;margin-bottom:.8rem}.overdue-open-state strong{color:#b42318}.overdue-open-row{border-left:4px solid #d92d20!important}
.report-cell.reported{background:#e4f7ec;color:#087443}.report-cell.no-report,.report-cell.late{background:#fff0f0;color:#b42318}.report-cell.future,.report-cell.holiday{background:#eef2f6;color:#667085}.report-cell.permission{background:#fff2d8;color:#a15c00}.report-cell.partial-summary{background:#fff8db;color:#8b6400}.report-cell.summary-cell strong{font-size:.9rem}.report-cell small{display:block;font-size:.56rem;margin-top:.16rem}
@media(max-width:780px){.mobile-nav{grid-template-columns:repeat(4,1fr)}.full-month-matrix{--matrix-name-width:145px}.full-month-matrix .sticky-col{min-width:145px!important}.user-profile-shortcut .user-meta{display:none}.user-profile-shortcut{padding:.2rem}.contact-list-row{align-items:flex-start}.full-month-matrix thead th{min-width:58px}.full-month-matrix .summary-col,.full-month-matrix .summary-cell{min-width:105px}}

/* V6.8 · Edición segura, eliminación gerencial, foto gerente y ciclos 1-5 semanas */
.visit-admin-actions{display:grid;grid-template-columns:1fr;gap:.65rem;margin-top:.8rem}
@media(min-width:680px){.visit-admin-actions{grid-template-columns:1fr 1fr}}
#managerPhotoInput{width:100%}


/* V6.8.1 · LISTADOS GERENCIA Y ELIMINACIÓN VISIBLE */
.manager-dashboard-hint{margin:.75rem 0 1rem;padding:.8rem 1rem;border:1px solid #c9d7f4;background:#f5f8ff;border-radius:14px;color:#18345f;font-size:.88rem}
.manager-kpi-card{cursor:pointer;text-align:left;width:100%;font:inherit;border:1px solid var(--border,#dfe5ef)}
.manager-kpi-card:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(15,44,96,.10)}
.manager-kpi-card small{display:block;margin-top:.25rem;font-size:.66rem;font-weight:800;color:#56647a}
.manager-kpi-list{display:flex;flex-direction:column;gap:.65rem;max-height:62vh;overflow:auto;padding:.15rem}
.manager-kpi-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.7rem;align-items:center;padding:.75rem;border:1px solid #e0e7f1;border-radius:14px;background:#fff}
.manager-kpi-main{display:flex;align-items:center;justify-content:space-between;gap:.8rem;background:none;border:0;text-align:left;min-width:0;padding:0;cursor:pointer;color:inherit}
.manager-kpi-contact{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.manager-kpi-contact strong{font-size:.9rem;color:#102b55}
.manager-kpi-contact small{font-size:.72rem;color:#68758a;white-space:normal}
.manager-kpi-actions{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:flex-end}
.table-row-actions{display:flex;gap:.35rem;flex-wrap:wrap}
@media(max-width:720px){.manager-kpi-row{grid-template-columns:1fr}.manager-kpi-actions{justify-content:flex-start}.manager-kpi-main{align-items:flex-start}.manager-kpi-main>.status-text{white-space:nowrap}}

/* V6.9 - MENSAJE DIARIO PERSONALIZADO */
.daily-message-card{justify-content:flex-start;text-align:left;gap:.9rem;background:linear-gradient(135deg,#f5fff8,#eef8ff);border-color:#a8d9b5;padding:1.05rem 1.2rem}.daily-message-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:#0b2a8f;color:#fff;font-weight:900;letter-spacing:.03em}.daily-message-copy{display:flex;flex-direction:column;gap:.18rem}.daily-message-copy small{font-size:.7rem;font-weight:900;color:#5d6d7e;letter-spacing:.08em}.daily-message-copy strong{font-size:.98rem;line-height:1.45;color:#174e2c}.daily-message-card>span{display:none}
@media(max-width:420px){.daily-message-card{align-items:flex-start}.daily-message-avatar{width:38px;height:38px}.daily-message-copy strong{font-size:.92rem}}


/* V6.9 · FRASE DEL DÍA + NAVEGACIÓN MÓVIL RENOVADA */
.daily-quote-card{position:relative;display:flex;gap:.9rem;align-items:flex-start;padding:1rem 1.15rem;margin-bottom:1rem;overflow:hidden;background:linear-gradient(135deg,#ffffff 0%,#f5f8ff 100%);border:1px solid #d9e3f7}
.daily-quote-card::after{content:"";position:absolute;right:-38px;bottom:-52px;width:130px;height:130px;border-radius:50%;background:rgba(11,42,143,.045);pointer-events:none}
.daily-quote-mark{font-family:Georgia,serif;font-size:3.2rem;line-height:.8;color:#0b2a8f;opacity:.26;flex:0 0 auto;margin-top:.15rem}
.daily-quote-content{min-width:0;flex:1}.daily-quote-heading{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.35rem}.daily-quote-heading small{font-size:.68rem;font-weight:950;letter-spacing:.08em;color:#0b2a8f}.daily-quote-heading span{font-size:.58rem;font-weight:900;color:#356246;background:#eaf8ef;border:1px solid #c8ead4;border-radius:999px;padding:.22rem .48rem;white-space:nowrap}.daily-quote-card blockquote{margin:0;color:#26374d;font-size:.92rem;font-weight:750;line-height:1.5}.daily-quote-author{margin-top:.45rem;font-size:.7rem;color:#667085;font-weight:900}

@media(max-width:780px){
  .mobile-nav{left:.45rem;right:.45rem;bottom:.45rem;border:1px solid #dfe6f2;border-radius:20px;background:rgba(255,255,255,.97);box-shadow:0 12px 30px rgba(16,42,84,.16);padding:.38rem .3rem calc(.38rem + env(safe-area-inset-bottom));gap:.16rem;overflow:visible;backdrop-filter:blur(16px)}
  body.visitor-mode .mobile-nav{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body.manager-mode .mobile-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .mobile-nav button{min-width:0;min-height:56px;border:0;background:transparent!important;border-radius:14px;padding:.32rem .12rem!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.18rem;color:#7a8597!important;line-height:1;transition:transform .16s ease,background .16s ease,color .16s ease;font-weight:800!important}
  .mobile-nav button:active{transform:scale(.96)}
  .mobile-nav-icon{width:29px;height:29px;border-radius:10px;display:grid;place-items:center;font-size:1rem;line-height:1;color:#53627a;background:#f2f5fa;transition:.16s}
  .mobile-nav-label{display:block;max-width:100%;font-size:.55rem;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.01em}
  .mobile-nav button.active{color:#0b2a8f!important;background:#edf3ff!important}
  .mobile-nav button.active .mobile-nav-icon{background:#0b2a8f;color:#fff;box-shadow:0 4px 10px rgba(11,42,143,.22)}
  body.manager-mode .mobile-nav-label{font-size:.49rem}
  body.manager-mode .mobile-nav-icon{width:27px;height:27px;border-radius:9px;font-size:.9rem}
  .mobile-nav::before{left:12px;right:12px;top:-2px;height:2px;border-radius:999px;width:auto;background:linear-gradient(90deg,var(--clinical) 0 var(--global-progress,0%),transparent var(--global-progress,0%) 100%)}
  main.content,.content{padding-bottom:6.2rem!important}
  .daily-quote-card{padding:.9rem .95rem;gap:.65rem}.daily-quote-mark{font-size:2.55rem}.daily-quote-heading{align-items:flex-start;flex-direction:column;gap:.3rem}.daily-quote-card blockquote{font-size:.86rem}
}
@media(max-width:380px){body.manager-mode .mobile-nav-label{font-size:.44rem}.mobile-nav{left:.25rem;right:.25rem}.mobile-nav-icon{width:26px;height:26px}.daily-quote-heading span{white-space:normal}}


/* V6.9.1 · INSTALACIÓN PWA DENTRO DE LA APP */
.install-device-btn{background:linear-gradient(135deg,#0b2a8f,#1558c7)!important;color:#fff!important;border:0!important;box-shadow:0 8px 18px rgba(11,42,143,.16);font-weight:800;letter-spacing:.02em}
.install-device-btn:hover{transform:translateY(-1px)}
.install-app-card{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.install-app-card>div:first-child{min-width:0}
.install-status-ok{display:inline-flex;align-items:center;gap:.45rem;border:1px solid #8bd3aa;background:#e9f8ef;color:#086b35;border-radius:999px;padding:.65rem .9rem;font-size:.78rem;font-weight:800}
.install-help{line-height:1.55}
.install-help h3{color:#0b2a8f;margin:.35rem 0 .8rem}
.install-help ol{padding-left:1.4rem;margin:.6rem 0 1rem}
.install-help li{margin:.55rem 0}
.install-help-icon{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:#eaf0ff;color:#0b2a8f;font-size:1.8rem;font-weight:900}
#dayStartInstallBtn{margin-top:.35rem}
@media(max-width:700px){.install-app-card{align-items:stretch;flex-direction:column}.install-app-card .install-device-btn{width:100%}.sync-actions .install-device-btn{width:100%}}


/* ===== V7.0 · PLAN GENERAL / SOLICITUDES / EXCLUSIONES ===== */
.plan-general-filters,.request-admin-filters,.late-filter-grid{display:grid;grid-template-columns:220px minmax(240px,1fr);gap:.8rem;padding:1rem;margin-bottom:1rem}.plan-general-grid{display:grid;gap:1rem}.plan-general-day{padding:0;overflow:hidden}.plan-general-day-head{display:flex;justify-content:space-between;align-items:center;padding:.85rem 1rem;background:#f3f6fc;border-bottom:1px solid var(--line)}.plan-general-day-head span{color:var(--gv);font-weight:900;font-size:.72rem}.plan-general-day-head h3{margin:.16rem 0 0}.plan-general-day-head>strong{font-size:1.35rem;color:var(--gv)}.plan-general-contacts{display:grid}.plan-general-contact{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.65rem;align-items:center;padding:.75rem 1rem;border-bottom:1px solid var(--line)}.plan-general-contact:last-child{border-bottom:0}.plan-general-contact.excluded{background:#f4f5f7;border-left:4px solid #98a2b3}.plan-general-open{border:0;background:none;text-align:left;padding:0;color:inherit;display:flex;flex-direction:column;gap:.12rem;cursor:pointer}.plan-general-open strong{color:#102b55}.plan-general-open span,.plan-general-open small{color:var(--muted);font-size:.72rem}.plan-general-actions{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:flex-end}.danger-outline{border:1px solid #f2b8b5!important;color:#b42318!important;background:#fff!important}.plan-request-list{display:grid;gap:.65rem}.plan-request-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.8rem;align-items:center;padding:.85rem;border:1px solid #e5e9f1;border-left:5px solid #f79009;border-radius:14px;background:#fff}.plan-request-row.approved{border-left-color:#12b76a}.plan-request-row.rejected{border-left-color:#f04438}.plan-request-row>div:first-child{display:flex;flex-direction:column;gap:.14rem}.plan-request-row span,.plan-request-row small{color:#667085;font-size:.72rem}.request-status{font-size:.68rem;font-weight:900;padding:.38rem .55rem;border-radius:999px;background:#fff4e5;color:#b54708;white-space:nowrap}.request-status.approved{background:#ecfdf3;color:#027a48}.request-status.rejected{background:#fef3f2;color:#b42318}.request-admin-actions{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;justify-content:flex-end}.btn.ok{background:#079455;color:#fff;border-color:#079455}.late-list{display:grid;gap:.55rem;margin-top:1rem}.late-row{display:flex;flex-direction:column;gap:.15rem;width:100%;text-align:left;border:1px solid #fda29b;border-left:5px solid #d92d20;border-radius:13px;background:#fff4f3;padding:.78rem;cursor:pointer;color:#344054}.late-row strong{color:#b42318}.late-row span,.late-row small{font-size:.72rem}.exclusion-list{display:grid;gap:.65rem}.exclusion-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.7rem;align-items:center;border:1px solid var(--line);border-left:5px solid #6941c6;border-radius:14px;padding:.85rem}.exclusion-row.inactive{opacity:.58;border-left-color:#98a2b3}.exclusion-row>div:first-child{display:flex;flex-direction:column;gap:.13rem}.exclusion-row span,.exclusion-row small{font-size:.72rem;color:#667085}.week-check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}.week-check-grid label{border:1px solid var(--line);border-radius:10px;padding:.6rem;background:#fff;font-weight:800}.span-2{grid-column:1/-1}
@media(max-width:780px){.plan-general-filters,.request-admin-filters,.late-filter-grid{grid-template-columns:1fr}.plan-general-contact,.plan-request-row,.exclusion-row{grid-template-columns:1fr}.plan-general-actions,.request-admin-actions{justify-content:flex-start}.week-check-grid{grid-template-columns:1fr 1fr}}

/* V7.1 · KPIS CONSULTABLES Y EXCLUIDOS */
.auto-kpi.excluded{border-color:#9ca3af;background:linear-gradient(180deg,#fff,#f3f4f6)}
.auto-kpi.excluded strong{color:#4b5563}
.status-excluded{color:#6b7280;font-weight:800}
.clickable-kpi{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.clickable-kpi:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(15,42,111,.10);border-color:#9bb1e8}
.clickable-kpi:active{transform:translateY(0)}
.plan-general-filters input:focus{outline:3px solid rgba(23,62,160,.14);border-color:#315dc2}
.page-head-actions{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.cleanup-rep-summary{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.65rem}
.cleanup-rep-summary span{background:#eef3fb;border:1px solid #d9e3f0;border-radius:999px;padding:.35rem .65rem;font-size:.82rem}
.cleanup-actions{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:flex-end;margin-top:1rem}
.cleanup-preview-table{max-height:360px;overflow:auto;margin-top:.75rem}
@media(max-width:720px){.page-head-actions,.cleanup-actions{width:100%}.page-head-actions .btn,.cleanup-actions .btn{flex:1 1 auto}.cleanup-preview-table{max-height:300px}}

/* V7.2 - MATRIZ CLICABLE */
.report-cell.matrix-clickable{cursor:pointer;position:relative;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease}
.report-cell.matrix-clickable:hover{filter:brightness(.98);box-shadow:inset 0 0 0 2px rgba(10,46,154,.18)}
.report-cell.matrix-clickable:active{transform:scale(.985)}
.matrix-click-hint{display:block;font-size:.6rem;line-height:1;margin-top:.15rem;opacity:.58;font-weight:800;letter-spacing:.04em}
@media(max-width:780px){.matrix-click-hint{font-size:.52rem}.report-cell.matrix-clickable{min-width:68px}}

/* ===== V7.2 · SINCRONIZACIÓN VISIBLE + CONTADORES CLICABLES ===== */
.topbar{gap:.55rem}
.top-sync-panel{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:.38rem;
  min-height:34px;
  padding:.38rem .62rem;
  border:1px solid var(--line);
  border-radius:999px;
  background:#f8fafc;
  color:#475467;
  font:inherit;
  font-size:.68rem;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.top-sync-panel .dot{width:8px;height:8px;border-radius:50%;background:#d97706;flex:0 0 auto}
.top-sync-panel .dot.ok{background:var(--clinical)}
.top-sync-panel .dot.warn{background:#d97706}
.top-sync-panel:hover{background:var(--gv-soft);color:var(--gv)}
.table-count-link{
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  padding:.28rem .45rem;
  border-radius:8px;
  min-width:42px;
}
.table-count-link:hover{background:var(--gv-soft);color:var(--gv)}
.coverage-badge.table-count-link{border:0}
.auto-code-box{
  min-height:44px;
  display:flex;
  align-items:center;
  padding:.75rem .85rem;
  border:1px dashed #94a3b8;
  border-radius:12px;
  background:#f8fafc;
  color:#475467;
  font-size:.78rem;
  font-weight:800;
}
@media(max-width:780px){
  .topbar .logo-wrap{min-width:0}
  .top-sync-panel{padding:.32rem .48rem;font-size:.58rem;max-width:132px}
  .top-sync-panel span:last-child{overflow:hidden;text-overflow:ellipsis}
}
@media(max-width:420px){
  .top-sync-panel{max-width:104px}
  .top-sync-panel span:last-child{max-width:78px}
}


/* ===== V7.2.2 · ALERTA DE SOLICITUDES PENDIENTES ===== */
.top-request-alert{
  display:flex;align-items:center;gap:.34rem;min-height:34px;padding:.34rem .52rem;
  border:1px solid #f5c76a;border-radius:999px;background:#fff7df;color:#8a5500;
  font:inherit;font-size:.64rem;font-weight:950;cursor:pointer;white-space:nowrap;
  box-shadow:0 2px 8px rgba(138,85,0,.08);
}
.top-request-alert:hover{background:#ffefbd;color:#714300}
.table-sort-button{border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:left;cursor:pointer;padding:.35rem .2rem;width:100%}
.table-sort-button:hover,.table-sort-button:focus-visible{color:#1236a4;text-decoration:underline;outline-offset:2px}
.table-sort-button span{font-size:.75em;opacity:.75}
.table-card table:not(.report-matrix) thead th:not(:empty){cursor:pointer}
.table-card table:not(.report-matrix) thead th[aria-sort="ascending"],.table-card table:not(.report-matrix) thead th[aria-sort="descending"]{color:#1236a4;background:#eef3ff}
.table-card table:not(.report-matrix) thead th[aria-sort="ascending"]:not(:has(.table-sort-button))::after{content:" ▲";font-size:.7em}
.table-card table:not(.report-matrix) thead th[aria-sort="descending"]:not(:has(.table-sort-button))::after{content:" ▼";font-size:.7em}
.top-request-alert .request-alert-icon{font-size:.82rem;line-height:1}
.top-request-alert strong{display:grid;place-items:center;min-width:22px;height:22px;padding:0 .34rem;border-radius:999px;background:#d97706;color:#fff;font-size:.66rem}
@media(max-width:780px){.top-request-alert{padding:.31rem .4rem}.top-request-alert .request-alert-label{display:none}.top-request-alert strong{min-width:20px;height:20px;font-size:.62rem}}
@media(max-width:420px){.top-request-alert{gap:.2rem}.top-request-alert .request-alert-icon{font-size:.72rem}}
.time-report-reps{max-height:7rem;overflow:auto;align-content:flex-start;padding:.2rem;border-radius:.65rem}
.report-export-filters{display:grid;gap:1rem}.report-filter-wide{min-width:0}.report-filter-scroll{max-height:8rem;overflow:auto;align-content:flex-start;padding:.35rem;border:1px solid #e4e9f2;border-radius:.75rem;background:#fbfcff}.report-date-options{max-height:9rem;overflow:auto;padding:.35rem;border:1px solid #e4e9f2;border-radius:.75rem;background:#fbfcff}.report-date-options .multi-filter-option span{min-width:4.25rem;justify-content:center}.report-secondary-filters{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:.75rem;max-width:700px}@media(max-width:620px){.report-secondary-filters{grid-template-columns:1fr}.report-filter-scroll,.report-date-options{max-height:12rem}}
.equipment-grid{max-height:65vh}.equipment-grid table{min-width:max-content}.equipment-grid th{position:sticky;top:0;z-index:2}.equipment-grid tbody th{left:0;z-index:1;background:#f8fafc;min-width:180px}.equipment-grid td{min-width:220px;vertical-align:top}.equipment-chip{display:grid;gap:.18rem;padding:.55rem;border:1px solid #d8e0ee;border-radius:.6rem;background:#f8fbff;margin:.25rem 0}.equipment-chip strong{color:#123b8f;font-size:.75rem}.equipment-chip span{font-size:.67rem;color:#344054}.equipment-chip small{font-size:.6rem;color:#667085;font-weight:800}.manager-day-invalidation{border:1px solid #f2aaaa;background:#fff5f5;border-radius:1rem;padding:1rem;margin:.8rem 0;display:grid;gap:.7rem}
.modal-card.equipment-modal-card{width:min(1500px,97vw);max-width:97vw}.equipment-modal-card .modal-body{padding:.65rem}.equipment-help{font-size:.68rem;color:#667085;margin:0 0 .55rem}.equipment-grid{max-height:72vh}.equipment-grid table{min-width:max-content;border-collapse:separate;border-spacing:0}.equipment-grid thead th{position:sticky;top:0;z-index:3;background:#123963;color:#fff;text-align:center;min-width:82px;padding:.42rem .3rem}.equipment-grid thead th:first-child{left:0;z-index:4;min-width:145px;text-align:left}.equipment-grid thead th strong{display:block;font-size:.78rem}.equipment-grid thead th small{display:block;font-size:.55rem;margin-top:.1rem}.equipment-grid tbody th{position:sticky;left:0;z-index:2;background:#f8fafc;min-width:145px;max-width:145px;padding:.42rem .5rem;font-size:.67rem;text-align:left}.equipment-grid td{width:82px;min-width:82px;max-width:105px;padding:.22rem;vertical-align:middle;text-align:center}.equipment-id{display:flex;align-items:center;justify-content:center;gap:.2rem;min-height:30px;padding:.28rem .18rem;border:1px solid #cfd9e8;border-radius:.38rem;background:#f7faff}.equipment-id strong{color:#123b8f;font-size:.62rem;line-height:1.1;overflow-wrap:anywhere}.equipment-id small{font-size:.52rem;color:#087443;font-weight:900}.equipment-chip{display:none}@media(max-width:700px){.modal-card.equipment-modal-card{width:99vw;max-width:99vw}.equipment-grid thead th:first-child,.equipment-grid tbody th{min-width:112px;max-width:112px}.equipment-grid thead th,.equipment-grid td{min-width:74px;width:74px}.equipment-id strong{font-size:.57rem}}

/* ===== V8.0 · OPERATIVOS MÉDICOS Y MÓDULO PROMOTORAS ===== */
body.promotora-mode .visitor-only,
body.promotora-mode .admin-only,
body.promotora-mode .non-promotora { display: none !important; }
body:not(.promotora-mode) .promotora-only { display: none !important; }

.operativos-container { display: grid; gap: 1rem; }
.zone-tabs-bar { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
.zone-tab-btn {
  padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-weight: 800; font-size: .82rem; cursor: pointer;
  white-space: nowrap; transition: all .15s ease;
}
.zone-tab-btn.active {
  background: var(--gv, #0b2a8f); color: #fff; border-color: var(--gv, #0b2a8f);
  box-shadow: 0 4px 12px rgba(11,42,143,.25);
}
.zone-quota-pill {
  display: inline-block; padding: .15rem .45rem; border-radius: 999px;
  background: rgba(255,255,255,.25); font-size: .7rem; margin-left: .35rem;
}
.zone-tab-btn:not(.active) .zone-quota-pill { background: #e2e8f0; color: #475569; }

.calendar-month-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; background: #fff; padding: .8rem 1.2rem; border-radius: 14px;
  border: 1px solid var(--line);
}
.calendar-month-nav h2 { margin: 0; font-size: 1.15rem; color: var(--gv, #0b2a8f); font-weight: 900; }

.operativos-grid {
  display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: .75rem; overflow-x: auto; padding-bottom: .5rem;
}
.day-col {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden; min-height: 480px;
}
.day-col-head {
  padding: .65rem .8rem; background: #f1f5f9; border-bottom: 1px solid var(--line);
  font-weight: 900; font-size: .85rem; display: flex; justify-content: space-between; align-items: center;
}
.day-col-head.today { background: #e0e7ff; color: #1e1b4b; border-bottom-color: #c7d2fe; }
.day-col-body { padding: .6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }

.slot-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: .65rem .75rem; display: flex; flex-direction: column; gap: .35rem;
  box-shadow: 0 2px 5px rgba(0,0,0,.03); font-size: .78rem; position: relative;
}
.slot-card.reserved { border-left: 4px solid #f59e0b; }
.slot-card.assigned { border-left: 4px solid #3b82f6; }
.slot-card.in-progress { border-left: 4px solid #06b6d4; background: #f0fdfa; }
.slot-card.completed { border-left: 4px solid #10b981; background: #f8fafc; }
.slot-card.slot-card-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.slot-card.slot-card-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* Resultados de Operativo Modal */
.op-status-badge {
  display: inline-block; padding: .2rem .55rem; border-radius: 999px;
  font-size: .7rem; font-weight: 800; text-transform: uppercase;
}
.op-status-badge.solicitado { background: #fef3c7; color: #92400e; }
.op-status-badge.asignado { background: #dbeafe; color: #1e40af; }
.op-status-badge.en_curso { background: #ccfbf1; color: #0f766e; }
.op-status-badge.completado { background: #d1fae5; color: #065f46; }

.op-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: .55rem; margin: .8rem 0 1rem;
}
.op-kpi-card {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: .65rem .7rem; text-align: center;
}
.op-kpi-card strong { display: block; font-size: 1.35rem; color: #0b2a8f; font-weight: 900; line-height: 1.1; }
.op-kpi-card span { font-size: .65rem; color: #64748b; font-weight: 700; text-transform: uppercase; }

.op-tabs-nav {
  display: flex; gap: .4rem; border-bottom: 2px solid #e2e8f0; margin-bottom: .8rem; overflow-x: auto;
}
.op-tab-btn {
  background: none; border: none; padding: .45rem .75rem; font-weight: 800; font-size: .78rem;
  color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap; transition: all .15s ease;
}
.op-tab-btn.active { color: #0b2a8f; border-bottom-color: #0b2a8f; }

.op-table {
  width: 100%; border-collapse: collapse; font-size: .78rem; text-align: left;
}
.op-table th {
  background: #f1f5f9; padding: .5rem .65rem; font-weight: 800; color: #334155;
  border-bottom: 1px solid #cbd5e1;
}
.op-table td {
  padding: .45rem .65rem; border-bottom: 1px solid #f1f5f9; color: #1e293b; vertical-align: middle;
}
.op-table tr:hover td { background: #f8fafc; }

.op-doc-card {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: .65rem .75rem; margin-bottom: .5rem; background: #fff;
}
.op-doc-header {
  display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed #e2e8f0;
  padding-bottom: .35rem; margin-bottom: .35rem;
}
.op-doc-header h4 { margin: 0; font-size: .84rem; color: #0f172a; }
.op-doc-header span { font-size: .72rem; color: #64748b; }
.slot-card-row { display: flex; flex-direction: column; line-height: 1.25; }
.slot-card-label { font-size: .65rem; color: var(--muted, #64748b); font-weight: 900; letter-spacing: .03em; }
.slot-card-value { font-weight: 800; color: var(--ink, #0f172a); }
.slot-card-value.cm { color: #0b2a8f; font-weight: 900; font-size: .82rem; }
.slot-card-value.rep { color: #0284c7; }
.slot-card-value.prom { color: #059669; }
.slot-card-actions { display: flex; gap: .35rem; margin-top: .35rem; }

.slot-card.empty-slot {
  background: #fff; border: 1.5px dashed #cbd5e1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.2rem .6rem; text-align: center; color: #94a3b8; cursor: pointer;
  transition: all .15s ease; min-height: 110px;
}
.slot-card.empty-slot:hover { border-color: #0b2a8f; color: #0b2a8f; background: #f8fafc; }

/* Vista Promotora */
.promotora-dash { display: grid; gap: 1rem; max-width: 800px; margin: 0 auto; }
.prom-jornada-card {
  background: linear-gradient(135deg, #0b2a8f, #1e40af); color: #fff;
  border-radius: 16px; padding: 1.25rem; display: grid; gap: .75rem;
  box-shadow: 0 10px 25px rgba(11,42,143,.25);
}
.prom-jornada-header { display: flex; justify-content: space-between; align-items: center; }
.prom-jornada-header h3 { margin: 0; font-size: 1.2rem; }
.prom-kpi-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
  background: rgba(255,255,255,.12); border-radius: 12px; padding: .75rem; text-align: center;
}
.prom-kpi-bar strong { display: block; font-size: 1.35rem; font-weight: 900; }
.prom-kpi-bar span { font-size: .68rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }

.prom-center-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.2rem; display: grid; gap: .6rem;
}
.prom-doctor-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem .8rem; border: 1px solid #e2e8f0; border-radius: 10px;
  background: #fff; margin-bottom: .5rem;
}
.prom-doctor-item h4 { margin: 0 0 .2rem; font-size: .88rem; color: #1e293b; }
.prom-doctor-item p { margin: 0; font-size: .75rem; color: #64748b; }

@media(max-width: 900px) {
  .operativos-grid { grid-template-columns: 1fr; }
  .day-col { min-height: auto; margin-bottom: .75rem; }
}

/* ===== CRONOGRAMA MENSUAL DE RUTAS (ESTILO EXCEL) ===== */
.cronograma-container {
  display: grid;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}
.cronograma-header-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.cronograma-header-card h2 { margin: 0; font-size: 1.25rem; color: var(--gv, #0b2a8f); }
.cronograma-wrapper {
  overflow-x: auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  padding: 1rem;
}
.cronograma-title-box {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .06em;
  color: #0f172a;
  text-transform: uppercase;
  margin: 0;
  padding: .75rem;
  background: #fff;
  border: 2px solid #000;
  border-bottom: 0;
}
.cronograma-table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
  font-size: .82rem;
  border: 2px solid #000;
}
.cronograma-table th,
.cronograma-table td {
  border: 1.5px solid #000;
  padding: .45rem .6rem;
  vertical-align: top;
}
.cronograma-table thead th {
  background: #e2e8f0;
  text-align: center;
  font-weight: 900;
  font-size: .9rem;
  color: #0f172a;
  padding: .5rem;
}

/* Colores de Semanas según Excel */
.week-row-1 .week-label-cell { background: #bae6fd; color: #0369a1; }
.week-row-1 .contactos-label-cell { background: #e0f2fe; color: #0284c7; }
.week-row-1 .contactos-num-cell { background: #f0f9ff; }
.week-row-1 .week-total-cell { background: #e0f2fe; color: #0369a1; }

.week-row-2 .week-label-cell { background: #fef08a; color: #854d0e; }
.week-row-2 .contactos-label-cell { background: #fef9c3; color: #a16207; }
.week-row-2 .contactos-num-cell { background: #fefce8; }
.week-row-2 .week-total-cell { background: #fef9c3; color: #854d0e; }

.week-row-3 .week-label-cell { background: #bbf7d0; color: #166534; }
.week-row-3 .contactos-label-cell { background: #dcfce7; color: #15803d; }
.week-row-3 .contactos-num-cell { background: #f0fdf4; }
.week-row-3 .week-total-cell { background: #dcfce7; color: #166534; }

.week-row-4 .week-label-cell { background: #fbcfe8; color: #9d174d; }
.week-row-4 .contactos-label-cell { background: #fce7f3; color: #be185d; }
.week-row-4 .contactos-num-cell { background: #fdf2f8; }
.week-row-4 .week-total-cell { background: #fce7f3; color: #9d174d; }

.week-row-5 .week-label-cell { background: #ddd6fe; color: #5b21b6; }
.week-row-5 .contactos-label-cell { background: #ede9fe; color: #6d28d9; }
.week-row-5 .contactos-num-cell { background: #f5f3ff; }
.week-row-5 .week-total-cell { background: #ede9fe; color: #5b21b6; }

.week-label-cell {
  width: 95px;
  min-width: 95px;
  text-align: center;
  vertical-align: middle !important;
  font-weight: 900;
  font-size: .88rem;
}
.day-cell {
  width: 18%;
  min-width: 165px;
  background: #fff;
  font-size: .75rem;
  line-height: 1.35;
}
.day-cell .sector-title {
  display: block;
  font-weight: 900;
  color: #0b2a8f;
  margin-top: .35rem;
  margin-bottom: .15rem;
  font-size: .76rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.day-cell .sector-title:first-child { margin-top: 0; }
.day-cell .center-item {
  display: block;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: .22rem;
  font-size: .74rem;
}
.contactos-row td {
  padding: .35rem .5rem;
  text-align: center;
  font-weight: 900;
  font-size: .88rem;
}
.contactos-label-cell {
  text-align: center;
  font-weight: 900;
  letter-spacing: .04em;
  font-size: .78rem;
}
.week-total-cell {
  width: 50px;
  min-width: 50px;
  text-align: center;
  vertical-align: middle !important;
  font-weight: 900;
  font-size: .95rem;
}

@media print {
  body * { visibility: hidden !important; }
  .cronograma-wrapper, .cronograma-wrapper * { visibility: visible !important; }
  .cronograma-wrapper {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .cronograma-header-card, .sidebar, .mobile-nav, .topbar { display: none !important; }
}
