:root{--accent:#3f5d5f;--accent-hover:#334d4f;--bg:#f4f1eb;--card:#fffdf9;--text:#1f2933;--muted:#74716b;--line:#e4ded3;--soft:#ebe5dc;--ok:#2f8f5b;--ok-bg:#edf7ef;--warn:#c58a24;--warn-bg:#fff8e7;--bad:#c0392b;--bad-bg:#fff1ef;--shadow:0 16px 45px rgba(74,63,53,.09)}
*{box-sizing:border-box}html,body{height:100%}html{background:var(--bg)}body{margin:0;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:radial-gradient(circle at 50% -10%,#fff 0,#f7f4ee 40%,#eee9df 100%);font-size:16px;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:18px 34px;background:rgba(255,253,249,.88);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}.brand h1{margin:0;font-size:28px;letter-spacing:-.045em;font-weight:800}.brand p{margin:3px 0 0;color:var(--muted);font-size:13px}.right-head{display:flex;gap:16px;align-items:center}.clock{text-align:right}.clock strong{display:block;font-size:13px}.clock small{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.health-details{position:relative}.health-details summary{list-style:none;cursor:pointer}.health-details summary::-webkit-details-marker{display:none}.health{display:flex;align-items:center;gap:8px;border:0;border-radius:999px;padding:8px 13px;background:var(--ok-bg);color:#266749;font:inherit;font-size:14px;box-shadow:inset 0 0 0 1px #d5eadb}.status-led{width:10px;height:10px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 4px rgba(47,143,91,.10)}.health.bad{background:var(--bad-bg);color:#9b2c2c;box-shadow:inset 0 0 0 1px #f2c7c0}.health.bad .status-led{background:var(--bad)}.health.has-alerts{background:var(--warn-bg);color:#735718;box-shadow:inset 0 0 0 1px #ead7a9}.health.has-alerts .status-led{background:var(--warn)}.health em{display:grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:currentColor;color:#fff;font-size:10px;font-style:normal}.status-panel{position:absolute;right:0;top:calc(100% + 9px);z-index:5;width:min(380px,calc(100vw - 28px));padding:11px;background:var(--card);border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}.status-empty{padding:7px 9px}.status-empty strong,.status-empty small{display:block}.status-empty strong{font-size:14px}.status-empty small{margin-top:4px;color:var(--muted);font-size:12px}.status-alerts{display:grid;gap:7px}.status-alert{display:flex;gap:9px;padding:10px;border-radius:12px;background:var(--warn-bg);color:#735718}.status-alert span{width:8px;height:8px;margin-top:5px;border-radius:50%;background:var(--warn);flex:0 0 auto}.status-alert p{margin:0;font-size:12px;font-weight:750;line-height:1.4}.status-alert.danger{background:var(--bad-bg);color:#8f3028}.status-alert.danger span{background:var(--bad)}
.dashboard{width:min(1180px,calc(100% - 38px));height:100%;min-height:0;margin:0 auto;padding:14px 0 10px;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:11px}
.team-strip,.summary,.insight-card{background:rgba(255,253,249,.95);border:1px solid rgba(228,222,211,.92);box-shadow:var(--shadow)}.team-strip{min-height:64px;border-radius:20px;padding:9px 13px;display:flex;align-items:center;gap:13px}.section-label{width:88px;flex:0 0 auto}.section-label span,.section-label small{display:block}.section-label span{font-weight:800}.section-label small{margin-top:3px;color:var(--muted);font-size:11px}.team-row{display:flex;gap:7px;overflow-x:auto;min-width:0;padding:1px 1px 3px;scrollbar-width:thin}.person{flex:0 0 auto;position:relative}.person summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;padding:8px 10px;background:#edf1e9;border:1px solid #ebe4d9;border-radius:12px}.person summary::-webkit-details-marker{display:none}.led{width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 3px rgba(0,0,0,.035);flex:0 0 auto}.led.in_call{background:var(--bad)}.led.ringing{background:var(--warn)}.led.inactive{background:#aeb4aa}.led.unregistered{background:#4f5550}.person-copy strong,.person-copy small{display:block;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person-copy strong{font-size:12px}.person-copy small{margin-top:2px;color:var(--muted);font-size:10px}.person-detail{position:absolute;top:calc(100% + 7px);left:0;z-index:4;width:220px;padding:11px;background:var(--card);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);display:grid;gap:7px}.person-detail div{display:flex;justify-content:space-between;gap:10px;font-size:11px}.person-detail span{color:var(--muted)}.empty{color:var(--muted);font-size:13px}
.summary{border-radius:22px;padding:12px;display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.metric{min-width:0;padding:13px 16px;border-radius:15px;background:#edf1e9}.metric span{display:block;color:var(--muted);font-size:11px;font-weight:800}.metric strong{display:block;margin-top:7px;font-size:30px;line-height:1;letter-spacing:-.05em}
.insight-card{min-height:0;border-radius:24px;padding:16px 20px 14px;display:grid;grid-template-rows:auto minmax(0,1fr)}.insight-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:12px;border-bottom:1px solid var(--line)}.view-tabs{display:flex;gap:4px}.view-tabs button,.segmented button{border:0;cursor:pointer;font:inherit;font-weight:800}.view-tabs button{padding:9px 13px;border-radius:11px;background:transparent;color:var(--muted);font-size:13px}.view-tabs button.active{background:#e7ede5;color:var(--accent)}.panel-tools{display:flex;align-items:center;gap:10px}.segmented{display:flex;padding:3px;border:1px solid var(--line);border-radius:12px;background:#f4efe7}.segmented button{padding:7px 10px;border-radius:9px;background:transparent;color:var(--muted);font-size:11px}.segmented button.active{background:var(--card);color:var(--accent);box-shadow:0 2px 8px rgba(74,63,53,.10)}.download-report{height:34px;padding:0 13px;border-radius:11px;background:var(--accent);color:#fff;text-decoration:none;display:inline-flex;align-items:center;font-size:12px;font-weight:800}.download-report:hover{background:var(--accent-hover)}
.panel{display:none;min-height:0;padding-top:13px}.panel.active{display:grid;grid-template-rows:auto minmax(0,1fr)}.panel-title{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.eyebrow{margin:0 0 3px;color:var(--muted);font-size:11px;font-weight:800}.panel-title h2{margin:0;font-size:21px;letter-spacing:-.035em}.peak-inline{text-align:right}.peak-inline span,.peak-inline small{display:block;color:var(--muted);font-size:10px}.peak-inline strong{display:block;margin:2px 0;font-size:18px}
.chart{min-height:0;height:100%;display:flex;align-items:flex-end;gap:8px;padding:12px 4px 0}.bar-column{height:100%;flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.bar-value{font-size:10px;font-weight:800;color:var(--text);opacity:1}.bar{width:min(29px,72%);min-height:3px;border-radius:8px 8px 3px 3px;background:var(--accent);opacity:.8;transition:height .2s}.bar-label{font-size:10px;color:var(--muted);white-space:nowrap}
.departments{align-self:center;display:grid;gap:18px;width:min(760px,100%);margin:auto}.department>div{display:flex;justify-content:space-between;margin-bottom:6px;font-size:13px}.department i{height:11px;background:var(--soft);display:block;border-radius:10px;overflow:hidden}.department i b{height:100%;display:block;background:var(--accent);border-radius:10px}.trends{align-self:center;display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.trends p{margin:0;min-height:108px;padding:18px;border-radius:16px;background:#edf1e9;font-size:15px;font-weight:750;line-height:1.45;display:flex;align-items:center}
footer{text-align:center;color:var(--muted);font-size:11px;padding:5px 0 9px}
@media(max-height:720px){.topbar{padding-top:12px;padding-bottom:12px}.dashboard{padding-top:9px;gap:8px}.team-strip{min-height:55px;padding-top:6px;padding-bottom:6px}.summary{padding:9px}.metric{padding:10px 14px}.metric strong{font-size:26px}.insight-card{padding-top:12px}.panel-title h2{font-size:19px}}
@media(max-width:760px){body{overflow:auto;display:block}.clock{display:none}.topbar{padding:16px 18px}.dashboard{width:calc(100% - 24px);height:auto;display:block;padding:12px 0}.team-strip,.summary,.insight-card{margin-bottom:10px}.summary{grid-template-columns:1fr}.insight-card{min-height:480px}.insight-head{align-items:stretch;flex-direction:column}.panel-tools{justify-content:space-between}.trends{grid-template-columns:1fr}.person-detail{position:fixed;left:14px;right:14px;top:110px;width:auto}.view-tabs{display:grid;grid-template-columns:repeat(2,1fr)}.view-tabs button{padding-left:7px;padding-right:7px}}

/* PDF/impresión basada en el mismo HTML visible */
#printSheet{display:none}
@page{size:A4 landscape;margin:8mm}
@media print{
  html,body{width:auto!important;height:auto!important;background:#fff!important;overflow:visible!important}
  body>*:not(#printSheet){display:none!important}
  #printSheet{display:grid!important;width:281mm;height:194mm;margin:0;padding:0;background:#fff;color:var(--text);grid-template-rows:auto auto minmax(0,1fr);gap:4mm;overflow:hidden;break-inside:avoid;page-break-inside:avoid}
  .print-header{display:flex;align-items:flex-end;justify-content:space-between;padding:0 1mm 3mm;border-bottom:1px solid var(--line)}
  .print-header div{display:flex;align-items:baseline;gap:4mm}.print-header strong{font-size:22px;letter-spacing:-.04em}.print-header span{font-size:14px;font-weight:800;color:var(--accent)}.print-header small{font-size:9px;color:var(--muted)}
  .print-summary{margin:0!important;padding:3mm!important;border-radius:4mm!important;box-shadow:none!important;background:var(--card)!important;grid-template-columns:repeat(3,1fr)!important;gap:2.5mm!important}
  .print-summary .metric{padding:3mm 4mm!important;border-radius:3mm!important}.print-summary .metric strong{font-size:23px!important}
  .print-panel{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;min-height:0!important;height:100%!important;padding:0 1mm!important;overflow:hidden!important;break-inside:avoid;page-break-inside:avoid}
  .print-panel .panel-title{margin:0 0 2mm}.print-panel .panel-title h2{font-size:18px}.print-panel .eyebrow{font-size:9px}.print-panel .peak-inline strong{font-size:15px}
  .print-panel .chart{height:100%!important;min-height:0!important;padding:3mm 0 0!important;gap:1.5mm!important;overflow:hidden!important}.print-panel .bar-column{gap:1.2mm!important}.print-panel .bar{width:min(7mm,72%)!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.print-panel .bar-value{font-size:8px!important}.print-panel .bar-label{font-size:7px!important}
  .print-panel .departments{width:100%!important;max-width:none!important;gap:5mm!important;padding:5mm 12mm}.print-panel .department>div{font-size:11px}.print-panel .department i{height:3mm}.print-panel .department i b{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .print-panel .trends{height:100%;align-self:stretch;grid-template-columns:repeat(2,1fr);gap:5mm}.print-panel .trends p{min-height:0;height:100%;padding:8mm;font-size:15px;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .print-activity .print-panel{min-height:0}.print-departments .print-panel,.print-trend .print-panel{align-content:stretch}
}

/* CallSuite / ConnectingSuite identity */
:root{--accent:#59634f!important;--accent-hover:#46503f!important;--soft:#ecefe8!important;--bg:#f6f6f2!important;--card:#fff!important;--text:#252a24!important;--muted:#6f756c!important;--line:#dfe2da!important;--ok:#59634f!important}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:linear-gradient(115deg,#f6f6f2 0%,#ecefe8 100%)}
.topbar{background:rgba(246,246,242,.9);backdrop-filter:blur(18px);border-bottom:1px solid rgba(223,226,218,.9)}
.brand-lockup{display:flex;align-items:center;gap:13px}.cs-mark{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#59634f;color:#fff;font-weight:900;letter-spacing:-.06em}.brand span{display:block;color:#59634f;text-transform:uppercase;letter-spacing:.14em;font-size:9px;font-weight:900}.brand h1{margin:1px 0 0;font-size:20px;letter-spacing:-.04em}.brand p{margin:1px 0 0}.logout{height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;display:inline-flex;align-items:center;text-decoration:none;color:var(--muted);font-size:11px;font-weight:800;background:rgba(255,255,255,.5)}
.summary,.insight-card{border-radius:24px}.metric{background:#ecefe8}.download-report{border-radius:999px}.bar{background:#59634f}.department i b{background:#59634f}
footer{display:flex;justify-content:center;gap:18px;flex-wrap:wrap}footer strong{color:#59634f}
.login-page{min-height:100vh;overflow:auto;background:linear-gradient(100deg,#252a24 0%,#59634f 48%,#f6f6f2 48%,#f6f6f2 100%)}.login-shell{min-height:100vh;width:min(1120px,calc(100% - 40px));margin:auto;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:100px}.login-brand{color:#fff}.login-logo{font-size:72px;font-weight:950;letter-spacing:-.09em;line-height:1}.login-brand .eyebrow{color:#dce4d6;margin-top:22px}.login-brand h1{font-size:clamp(4rem,8vw,7rem);line-height:.82;letter-spacing:-.08em;margin:12px 0 28px}.login-brand>p:last-child{font-size:1.4rem;opacity:.8}.login-card{padding:42px;border-radius:28px;background:#fff;box-shadow:0 30px 80px rgba(20,24,19,.18)}.login-kicker{color:#59634f;text-transform:uppercase;letter-spacing:.14em;font-size:10px;font-weight:900}.login-card h2{font-size:2.2rem;letter-spacing:-.05em;margin:10px 0}.login-card>p{color:#6f756c}.login-card form{display:grid;gap:15px;margin-top:28px}.login-card label{display:grid;gap:7px;font-size:12px;font-weight:800}.login-card input{height:50px;border:1px solid #dfe2da;border-radius:14px;padding:0 15px;font:inherit;background:#f6f6f2}.login-card input:focus{outline:2px solid rgba(89,99,79,.25);border-color:#59634f}.login-card button{height:52px;border:0;border-radius:999px;background:#59634f;color:#fff;font-weight:850;cursor:pointer}.login-card small{display:block;margin-top:22px;color:#6f756c}.login-error{margin-top:16px;padding:11px 13px;border-radius:12px;background:#fae8e5;color:#8f3028;font-size:13px;font-weight:750}
@media(max-width:760px){.brand span{display:none}.login-page{background:#f6f6f2}.login-shell{grid-template-columns:1fr;gap:28px;padding:38px 0}.login-brand{color:#252a24}.login-brand .eyebrow{color:#59634f}.login-brand h1{font-size:4rem}.login-card{padding:28px}.right-head{gap:7px}.logout{padding:0 9px}}
