:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172033;background:#f3f6fb;--navy:#071426;--navy2:#0b1d35;--line:#e4e9f1;--muted:#718097;--blue:#3068f0;--green:#19a974;--amber:#e59a24;--violet:#7f5ce1}*{box-sizing:border-box}html{scroll-behavior:smooth}html,body{margin:0;min-height:100%;background:#f3f6fb}body{min-height:100vh}button,input{font:inherit}.portal-shell{min-height:100vh;display:flex}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:linear-gradient(180deg,var(--navy),#09182b);color:#fff;padding:24px 18px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:12px;padding:0 8px 26px}.brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#4776ff,#12c6aa);font-weight:900;box-shadow:0 10px 30px rgba(48,104,240,.3)}.brand strong,.brand span{display:block}.brand strong{font-size:1.05rem}.brand span{color:#8fa2bd;font-size:.76rem;margin-top:2px}.nav-menu{display:grid;gap:7px}.nav-item{min-height:45px;padding:0 12px;border-radius:10px;display:flex;align-items:center;gap:12px;color:#a9b8cc;text-decoration:none;font-size:.9rem;font-weight:650}.nav-item>span:first-child{width:22px;text-align:center;font-size:1.05rem}.nav-item:hover,.nav-item.active{color:#fff;background:rgba(255,255,255,.08)}.nav-item.active{box-shadow:inset 3px 0 #4f7eff}.nav-item small{margin-left:auto;color:#6f849f;font-size:.62rem;text-transform:uppercase}.nav-item.disabled{opacity:.65}.sidebar-footer{margin-top:auto;padding:18px 8px 4px;border-top:1px solid rgba(255,255,255,.08);color:#71859f;display:grid;gap:10px;font-size:.78rem}.status-dot{display:flex;align-items:center;gap:8px;color:#a9b8cc}.status-dot i,.live-pill i,.status-badge i{width:7px;height:7px;border-radius:50%;background:#21c98b;box-shadow:0 0 0 4px rgba(33,201,139,.12)}.main-area{margin-left:248px;min-width:0;width:calc(100% - 248px)}.topbar{height:78px;padding:0 30px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}.topbar-title{display:flex;align-items:center;gap:13px}.menu-button{display:none;border:0;background:transparent;font-size:1.35rem}.eyebrow{margin:0 0 4px;font-size:.65rem;letter-spacing:.15em;color:#8491a5;font-weight:850}.topbar h1{margin:0;font-size:1.15rem;letter-spacing:-.02em}.user-area{display:flex;align-items:center;gap:11px}.update-stamp{padding-right:14px;margin-right:2px;border-right:1px solid var(--line);text-align:right}.update-stamp span,.update-stamp strong,.user-copy strong,.user-copy span{display:block}.update-stamp span,.user-copy span{font-size:.69rem;color:#8a96a8}.update-stamp strong{font-size:.76rem;margin-top:2px}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#eaf0ff;color:#3068f0;font-weight:850}.user-copy{min-width:110px}.user-copy strong{font-size:.82rem}.icon-button{width:36px;height:36px;border:1px solid var(--line);background:#fff;border-radius:9px;color:#66768d;cursor:pointer}.content{padding:28px 30px 42px;max-width:1600px;margin:auto}.hero-row{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:20px}.hero-row h2{margin:0;font-size:1.55rem;letter-spacing:-.035em}.muted{margin:6px 0 0;color:var(--muted);font-size:.88rem}.filter-bar{display:flex;gap:7px;align-items:center}.filter,.date-button,.section-actions button,.outline-button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:9px 12px;color:#596981;font-weight:700;font-size:.76rem;cursor:pointer}.filter.active{background:#152a49;border-color:#152a49;color:#fff}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:18px}.metric-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;display:flex;gap:14px;align-items:center;box-shadow:0 8px 25px rgba(24,43,77,.035)}.metric-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;font-weight:900}.metric-icon.blue{background:#eaf0ff;color:var(--blue)}.metric-icon.green{background:#e8f8f2;color:var(--green)}.metric-icon.amber{background:#fff5e5;color:var(--amber)}.metric-icon.violet{background:#f1edff;color:var(--violet)}.metric-copy span,.metric-copy strong,.metric-copy small{display:block}.metric-copy span{color:#718097;font-size:.73rem;font-weight:700}.metric-copy strong{font-size:1.55rem;line-height:1.15;margin:3px 0}.metric-copy small{color:#98a3b4;font-size:.65rem}.metric-copy small.positive{color:var(--green)}.dashboard-card,.table-card{background:#fff;border:1px solid var(--line);border-radius:14px;margin-bottom:18px;box-shadow:0 8px 25px rgba(24,43,77,.035)}.section-header{min-height:69px;padding:15px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:14px}.section-header h3{margin:0;font-size:1rem}.section-actions{display:flex;align-items:center;gap:10px}.live-pill{display:inline-flex;align-items:center;gap:8px;color:#4f647e;font-size:.7rem}.dashboard-frame{padding:10px}.dashboard-frame iframe{width:100%;height:620px;border:0;border-radius:10px;background:white}.dashboard-placeholder{padding:20px;display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px;min-height:360px}.chart-demo{border:1px solid #edf0f5;border-radius:12px;padding:18px;display:flex;flex-direction:column}.chart-title{display:flex;justify-content:space-between;font-size:.78rem}.chart-title span{color:#8794a7}.bars{height:220px;display:flex;align-items:flex-end;gap:12px;padding:22px 6px 10px;border-bottom:1px solid #dde4ef;background:repeating-linear-gradient(to top,transparent 0,transparent 54px,#eff3f8 55px)}.bars i{flex:1;min-width:8px;background:linear-gradient(180deg,#4f7eff,#2e5dd3);border-radius:5px 5px 0 0}.chart-axis{display:flex;justify-content:space-between;color:#9aa6b6;font-size:.62rem;padding-top:10px}.embed-message{border-radius:12px;background:linear-gradient(145deg,#0d1c31,#102747);color:#fff;display:flex;flex-direction:column;justify-content:center;padding:26px}.embed-message strong{font-size:1.1rem;margin-bottom:10px}.embed-message span{font-size:.8rem;line-height:1.55;color:#aabbd2}.embed-message code{color:#86a8ff}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:14px 18px;border-bottom:1px solid #edf0f5;font-size:.76rem}th{color:#8290a4;font-size:.66rem;text-transform:uppercase;letter-spacing:.04em;background:#fafbfd}tbody tr:last-child td{border-bottom:0}.client-cell{display:flex;align-items:center;gap:10px}.client-cell>span{width:28px;height:28px;border-radius:8px;background:#edf2ff;color:#3565df;display:grid;place-items:center;font-weight:850}.client-cell strong{font-size:.78rem}td code{background:#f3f5f8;padding:4px 7px;border-radius:5px;color:#53647b}.status-badge{display:inline-flex;align-items:center;gap:7px;padding:5px 8px;border-radius:999px;font-weight:750;font-size:.68rem}.status-badge.active{background:#eaf8f3;color:#168b62}.status-badge.inactive{background:#fff2e6;color:#c87522}.status-badge.inactive i{background:#e69a36;box-shadow:0 0 0 4px rgba(230,154,54,.12)}.login-shell,.message-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 20%,rgba(48,100,255,.22),transparent 32%),radial-gradient(circle at 80% 80%,rgba(0,209,178,.12),transparent 28%),#07101f;color:#fff}.login-card,.message-card{width:min(100%,430px);padding:38px;border:1px solid rgba(255,255,255,.1);border-radius:24px;background:rgba(17,22,34,.9);box-shadow:0 30px 80px rgba(0,0,0,.45)}.login-card .brand-mark{margin-bottom:22px}.login-card h1{margin:0;font-size:2.2rem}.subtitle{color:#9aa5ba;margin:10px 0 30px}.login-card label{display:block;margin:18px 0 8px;color:#c9d0de;font-size:.9rem;font-weight:650}.login-card input[type=email],.login-card input[type=password]{width:100%;padding:14px 15px;border-radius:12px;border:1px solid #2a3244;background:#0c111c;color:#fff;outline:none}.remember{display:flex!important;align-items:center;gap:9px}.login-card form>button{width:100%;margin-top:18px;border:0;border-radius:12px;padding:13px 17px;background:linear-gradient(135deg,#4776ff,#3459d4);color:white;font-weight:750}.validation{display:block;color:#ff8d96;font-size:.82rem;margin-top:6px}@media(max-width:1050px){.metric-grid{grid-template-columns:repeat(2,1fr)}.dashboard-placeholder{grid-template-columns:1fr}.embed-message{min-height:150px}}@media(max-width:760px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0);box-shadow:20px 0 60px rgba(0,0,0,.3)}.main-area{margin-left:0;width:100%}.menu-button{display:block}.topbar{padding:0 16px}.update-stamp,.user-copy{display:none}.content{padding:22px 15px}.hero-row{align-items:flex-start;flex-direction:column}.filter-bar{width:100%;overflow:auto}.metric-grid{grid-template-columns:1fr}.section-header{align-items:flex-start}.section-actions{display:none}.dashboard-placeholder{padding:12px}.bars{gap:6px}.dashboard-frame iframe{height:520px}}

/* Estados provenientes de vw_DashboardUsoClientes */
.status-badge.warning{background:#fff7dc;color:#a66b00}.status-badge.warning i{background:#e4a11b;box-shadow:0 0 0 4px rgba(228,161,27,.12)}
.status-badge.danger{background:#ffeded;color:#bf3030}.status-badge.danger i{background:#dc4242;box-shadow:0 0 0 4px rgba(220,66,66,.12)}
.status-badge.unassigned{background:#eaf1ff;color:#2f63c9}.status-badge.unassigned i{background:#3f76e8;box-shadow:0 0 0 4px rgba(63,118,232,.12)}
.status-badge.neutral{background:#f0f2f5;color:#697386}.status-badge.neutral i{background:#8993a3;box-shadow:0 0 0 4px rgba(137,147,163,.12)}
.unassigned-row{background:#f8fbff}
.client-cell>div{display:grid;gap:3px}
.client-message,.last-access-date{display:block;color:#8b97a9;font-size:.64rem;font-weight:500}
.last-contact{display:block;font-size:.74rem}
