/* Home is designed for phones first; desktop uses the available viewport. */
#revenueHome{--home-gap:14px;display:flex;flex-direction:column;gap:var(--home-gap);width:100%;max-width:none;margin:0;padding:14px 14px 24px;box-sizing:border-box;font-family:'Plus Jakarta Sans',system-ui,sans-serif}
#revenueHome :is(h2,h3,h4,button){font-family:inherit}
#revenueHome :is(.rc-heading,.rc-status-advice,.rc-chevron,.rc-tile p,.rc-event-body ul,.home-client-overview>h2,.mini-stats-row,.money-stats-row){display:none}
#revenueHome .rc-dashboard{display:contents}
#revenueHome :is(.rc-next,.rc-home-status,.mini-chart-card){border:1px solid #2a3446;border-radius:16px;background:linear-gradient(145deg,#1b2434,#121926);box-shadow:0 6px 22px #00000012;min-width:0}
#revenueHome .rc-next{display:block!important;order:0;margin:0;padding:14px}
#revenueHome .rc-next h2{font-size:12px;font-weight:600;letter-spacing:.02em;color:#b6c3d5;margin:0 0 10px}
#revenueHome .rc-event-photo{height:148px;min-height:0;border-radius:10px;overflow:hidden;margin:0;background:#0e1622}
#revenueHome .rc-event-photo img{width:100%;height:100%;object-fit:cover;object-position:center 35%}
#revenueHome .rc-event-body h3{font-size:20px;font-weight:600;line-height:1.2;letter-spacing:-.03em;margin:12px 0 6px}
#revenueHome .rc-event-body p{font-size:12px;line-height:1.4;color:#aab9cb;margin:5px 0}
#revenueHome .rc-event-date{gap:7px}
#revenueHome .rc-event-date svg{width:16px;height:16px}
#revenueHome .rc-progress-label{display:flex;justify-content:space-between;font-size:11px;margin:12px 0 6px}
#revenueHome .rc-progress{height:5px;background:#2a3547}
#revenueHome .rc-progress span{background:linear-gradient(90deg,#739ac8,#d8c47d)}
#revenueHome .rc-open-event{min-height:44px;padding:10px 12px;margin-top:12px;font-size:13px;background:#2a3a50;border:1px solid #506580;border-radius:9px}
#revenueHome .rc-next .rc-day{display:block!important;padding:0;margin:8px 0 0;border:0;background:none}
#revenueHome .rc-next .rc-day>div{display:none}
#revenueHome .rc-next .rc-day>button{width:100%;min-height:44px;font-size:12px;border-color:#35445a;border-radius:9px;padding:8px}
#revenueHome .rc-next .rc-day:has(>button[hidden]){display:none!important}
#revenueHome .rc-tiles{order:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#revenueHome .rc-tile{min-height:96px;padding:14px;display:flex;justify-content:center;align-items:flex-start;gap:10px;border:1px solid #2d384c;border-radius:14px;background:linear-gradient(140deg,#202b3e,#151d2b);transition:background .15s,border-color .15s}
#revenueHome .rc-tile:hover{background:#25334a;border-color:#546b88}
#revenueHome .rc-tile>svg{width:26px;height:26px;margin:0;color:#27bfd0}
#revenueHome .rc-tile h2{font-size:16px;font-weight:500;letter-spacing:-.02em;margin:0}
#revenueHome .rc-home-status{order:2;max-width:100%;padding:16px}
#revenueHome .rc-status-bars{display:grid;grid-template-columns:1fr;gap:16px}
#revenueHome .rc-status-bars>div{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(38px,1fr) 38px;gap:10px;align-items:center;min-width:0}
#revenueHome .rc-status-bars span{grid-column:1;grid-row:1;font-size:11px;line-height:1.4;color:#b8c5d7}
#revenueHome .rc-status-bars strong{grid-column:3;grid-row:1;text-align:right;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;color:#edf3fc}
#revenueHome .rc-status-bars progress{grid-column:2;grid-row:1;width:100%;height:5px;margin:0;min-width:0;border:0;border-radius:4px;overflow:hidden;appearance:none;background:#293548}
#revenueHome .rc-status-bars progress::-moz-progress-bar{background:linear-gradient(90deg,#739ac8,#d8c47d)}
#revenueHome .rc-status-bars small{display:none}
#revenueHome .home-client-overview{display:block!important;order:3;padding:0;margin:0;border:0;background:none;min-width:0}
#revenueHome #resumenSubview{display:block}
#revenueHome .mini-chart-grid{display:grid;grid-template-columns:1fr;gap:var(--home-gap);margin:0}
#revenueHome .mini-chart-card{padding:14px}
#revenueHome .mini-chart-card h4{font-size:12px;font-weight:500;color:#c4d0df;margin:0 0 12px}
#revenueHome .mini-chart-box{position:relative;height:155px;min-width:0}
#revenueHome .mini-chart-box canvas{max-width:100%}
#revenueHome .rc-feedback{order:4;margin:0;min-height:0;font-size:11px}
#revenueHome .rc-feedback:empty{display:none}
@media(min-width:700px){
 #revenueHome{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,1.2fr);gap:16px;padding:18px}
 #revenueHome .rc-next{grid-column:2;grid-row:1}
 #revenueHome .rc-tiles{grid-column:1;grid-row:1;grid-auto-rows:1fr;gap:12px}
 #revenueHome .rc-home-status{grid-column:1;grid-row:2;display:flex;align-items:stretch}
 #revenueHome .rc-status-bars{width:100%;grid-template-rows:repeat(4,1fr)}
 #revenueHome .rc-status-bars>div{grid-template-columns:minmax(0,1fr) auto;align-content:center;gap:8px}
 #revenueHome .rc-status-bars strong{grid-column:2;font-size:20px}
 #revenueHome .rc-status-bars progress{grid-column:1/-1;grid-row:2;height:6px}
 #revenueHome .rc-status-bars span{font-size:12px}
 #revenueHome .home-client-overview{grid-column:2;grid-row:2}
 #revenueHome .mini-chart-box{height:100px}
 #revenueHome .rc-feedback{grid-column:1/-1;grid-row:3}
}
@media(min-width:1200px){
 #revenueHome{grid-template-columns:minmax(0,1.3fr) minmax(250px,1fr) minmax(215px,.85fr);grid-template-rows:minmax(360px,1.6fr) minmax(170px,1fr);min-height:calc(100dvh - 80px);padding:20px;gap:18px}
 #revenueHome .rc-next{grid-column:1;grid-row:1;display:flex!important;flex-direction:column;padding:18px}
 #revenueHome .rc-event-body{flex:1;display:flex;flex-direction:column;min-height:0}
 #revenueHome .rc-event-photo{flex:1;min-height:120px;height:clamp(120px,20vh,240px);max-height:280px}
 #revenueHome .rc-event-body h3{font-size:clamp(19px,1.5vw,25px)}
 #revenueHome .rc-tiles{grid-column:2;grid-row:1}
 #revenueHome .rc-tile{padding:20px;gap:14px}
 #revenueHome .rc-tile>svg{width:32px;height:32px}
 #revenueHome .rc-tile h2{font-size:18px}
 #revenueHome .rc-home-status{grid-column:3;grid-row:1;padding:22px}
 #revenueHome .rc-status-bars{gap:18px}
 #revenueHome .rc-status-bars strong{font-size:24px}
 #revenueHome .home-client-overview{grid-column:1/-1;grid-row:2;display:flex!important}
 #revenueHome #resumenSubview{width:100%;display:flex}
 #revenueHome .mini-chart-grid{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
 #revenueHome .mini-chart-card{display:flex;flex-direction:column;padding:16px 18px}
 #revenueHome .mini-chart-box{flex:1;height:clamp(100px,18vh,220px);min-height:100px}
 #revenueHome .rc-feedback{grid-row:3}
}
@media(min-width:1200px) and (max-height:800px){
 #revenueHome{padding:12px 18px;gap:12px;grid-template-rows:minmax(350px,1.8fr) minmax(150px,1fr)}
 #revenueHome .rc-next{padding:12px}
 #revenueHome .rc-event-photo{height:120px;min-height:100px}
 #revenueHome .rc-next h2{margin-bottom:8px}
 #revenueHome .rc-event-body h3{margin-top:8px}
 #revenueHome .rc-open-event{margin-top:8px}
 #revenueHome .mini-chart-box{height:100px}
}
@media(prefers-reduced-motion:reduce){#revenueHome .rc-tile{transition:none}}
@media(min-width:1200px){
 #revenueHome{height:calc(100dvh - 80px);min-height:640px}
 #revenueHome .rc-event-photo{position:relative;flex:1 1 0;height:auto}
 #revenueHome .rc-event-photo img{position:absolute;inset:0}
}
/* Compact working dashboard: useful actions replace stretched empty surfaces. */
#revenueHome .rc-priorities{order:2;padding:16px;border:1px solid #2a3446;border-radius:14px;background:#121a27;min-width:0}
#revenueHome .rc-priorities h2{font-size:13px;font-weight:600;margin:0 0 8px;color:#c7d2e1}
#revenueHome .rc-priorities button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 0;background:none;border:0;border-bottom:1px solid #273244;text-align:left;color:#bbc9da;font-size:12px}
#revenueHome .rc-priorities button:last-child{border-bottom:0}
#revenueHome .rc-priorities button span{flex:1}
#revenueHome .rc-priorities button strong{font-size:16px;font-variant-numeric:tabular-nums;color:#eff4fb}
#revenueHome .rc-priorities button svg{width:14px;height:14px;color:#869bb3}
#revenueHome .rc-priorities p{font-size:12px;color:#93a0b8}
#revenueHome .rc-home-status{order:3}
#revenueHome .home-client-overview{order:4}
#revenueHome .rc-tile{background:#182232;min-height:80px;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px}
#revenueHome .rc-tile>svg{width:24px;height:24px;flex-shrink:0}
#revenueHome .rc-tile h2{font-size:14px}
@media(min-width:700px) and (max-width:1199px){
 #revenueHome .rc-priorities{grid-column:1;grid-row:2}
 #revenueHome .rc-home-status{grid-column:1;grid-row:3}
 #revenueHome .home-client-overview{grid-column:2;grid-row:2 / 4}
 #revenueHome .rc-feedback{grid-row:4}
}
@media(min-width:1200px){
 #revenueHome{height:auto;min-height:calc(100dvh - 80px);max-width:1600px;margin:auto;grid-template-columns:minmax(0,1.15fr) minmax(270px,1fr) minmax(230px,.85fr);grid-template-rows:auto auto auto;align-content:start;gap:14px;padding:18px}
 #revenueHome .rc-next{grid-column:1;grid-row:1 / 3;padding:14px;align-self:start}
 #revenueHome .rc-event-body{display:block;flex:none}
 #revenueHome .rc-event-photo{height:155px;min-height:0;flex:none}
 #revenueHome .rc-event-body h3{font-size:20px}
 #revenueHome .rc-tiles{grid-column:2;grid-row:1;grid-auto-rows:70px;gap:8px;align-self:start}
 #revenueHome .rc-tile{min-height:70px;padding:12px;gap:10px}
 #revenueHome .rc-priorities{grid-column:2;grid-row:2;align-self:start;padding:12px 14px}
 #revenueHome .rc-home-status{grid-column:3;grid-row:1 / 3;align-self:start;padding:18px;display:block}
 #revenueHome .rc-status-bars{gap:22px;grid-template-rows:none}
 #revenueHome .rc-status-bars>div{gap:8px}
 #revenueHome .rc-status-bars strong{font-size:20px}
 #revenueHome .home-client-overview{grid-column:1/-1;grid-row:3}
 #revenueHome .mini-chart-box{height:145px;min-height:145px;flex:none}
 #revenueHome .mini-chart-card{padding:14px 16px}
 #revenueHome .rc-feedback{grid-row:4}
}
/* Event-led visual hierarchy: one expressive surface, quiet supporting tools. */
#revenueHome .rc-next{position:relative;isolation:isolate;overflow:hidden;background:#152132;border-color:#38485e;padding:20px;min-height:410px;box-shadow:0 14px 40px #0003}
#revenueHome .rc-next::before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#09101a20 0%,#0d142040 25%,#101a2bed 57%,#101a2b 80%)}
#revenueHome .rc-next h2{position:relative;color:#f0f5fb;font-size:11px;letter-spacing:.08em;text-transform:uppercase;margin:0;z-index:1;text-shadow:0 1px 5px #0008}
#revenueHome .rc-event-photo{position:absolute!important;inset:0;height:100%!important;max-height:none!important;width:100%;border-radius:0;z-index:-2;background:#243750;min-height:0!important}
#revenueHome .rc-event-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 30%}
#revenueHome .rc-event-body{position:static;display:block;flex:none}
#revenueHome .rc-event-body h3{margin:145px 0 8px;font-size:clamp(24px,2.2vw,34px);line-height:1.08;font-weight:600;letter-spacing:-.045em;color:#fff;max-width:95%}
#revenueHome .rc-event-body p{color:#d0d9e5;font-size:12px}
#revenueHome .rc-event-date{font-size:12px;color:#e8eef8!important}
#revenueHome .rc-progress-label{margin-top:16px;color:#d4dfed}
#revenueHome .rc-progress{background:#ffffff1c}
#revenueHome .rc-open-event{background:#dce7f5;color:#142237!important;border:0;font-weight:600;box-shadow:0 4px 14px #0002}
#revenueHome .rc-open-event:hover{background:#fff}
#revenueHome .rc-next .rc-day>button{border-color:#60708680;color:#d8e2ee;background:#101a2b55}
#revenueHome .rc-tile{background:linear-gradient(130deg,#202c3e,#151e2d);border-color:#354155;border-radius:12px}
#revenueHome .rc-tile>svg{box-sizing:content-box;padding:9px;background:#70a3cb14;border-radius:11px;color:#8dc4e6;width:21px;height:21px}
#revenueHome .rc-tile h2{font-size:14px;font-weight:500}
#revenueHome .rc-tile:hover{background:#26374b;border-color:#819db9;transform:translateY(-1px)}
#revenueHome .rc-priorities{background:transparent;border-color:#2c384b}
#revenueHome .rc-priorities h2{font-size:13px;color:#e4edf9;margin-bottom:10px}
#revenueHome .rc-priorities button strong{display:grid;place-items:center;min-width:30px;height:28px;border-radius:7px;background:#d6b97914;color:#e1c48c;font-size:14px}
#revenueHome .rc-home-status{background:linear-gradient(160deg,#1b293c,#111a29);border-color:#344258}
#revenueHome .rc-status-bars>div{padding-bottom:12px;border-bottom:1px solid #ffffff09}
#revenueHome .rc-status-bars>div:last-child{padding-bottom:0;border:0}
#revenueHome .rc-status-bars strong{color:#e1ecfb}
#revenueHome .mini-chart-card{background:#111a28;border-color:#29374b}
#revenueHome .mini-chart-card h4{color:#dbe5f1}
@media(min-width:1200px){
 #revenueHome{grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr) minmax(235px,.8fr);gap:16px;padding:18px 22px}
 #revenueHome .rc-next{align-self:stretch;min-height:420px;grid-row:1 / 3;padding:20px}
 #revenueHome .rc-event-body h3{margin-top:150px}
 #revenueHome .rc-tiles{grid-auto-rows:76px;gap:10px}
 #revenueHome .rc-tile{min-height:76px;padding:12px}
 #revenueHome .rc-home-status{align-self:stretch;display:flex;align-items:stretch}
 #revenueHome .rc-status-bars{grid-template-rows:repeat(4,1fr);gap:14px}
 #revenueHome .rc-status-bars strong{font-size:24px}
 #revenueHome .mini-chart-box{height:135px;min-height:135px}
}
@media(max-width:699px){
 #revenueHome{padding:12px;gap:14px}
 #revenueHome .rc-next{padding:18px;min-height:400px}
 #revenueHome .rc-event-body h3{margin-top:132px;font-size:27px}
 #revenueHome .rc-tile{min-height:78px;padding:12px;gap:10px}
 #revenueHome .rc-tile>svg{padding:7px;width:20px;height:20px}
 #revenueHome .rc-status-bars>div{padding-bottom:0;border:0}
}
@media(prefers-reduced-motion:reduce){#revenueHome .rc-tile:hover{transform:none}}
@media(min-width:1200px) and (max-height:800px){
 #revenueHome{padding:12px 18px;gap:12px}
 #revenueHome .rc-next{min-height:390px;padding:16px}
 #revenueHome .rc-event-body h3{margin-top:125px;font-size:25px}
 #revenueHome .rc-tiles{grid-auto-rows:68px;gap:8px}
 #revenueHome .rc-tile{min-height:68px}
 #revenueHome .mini-chart-box{height:110px;min-height:110px}
}
#revenueHome.planner-home{display:flex;flex-direction:column;max-width:920px;height:auto;min-height:0;margin:0 auto;padding:14px;gap:14px}
#revenueHome.planner-home :is(.rc-home-status,.home-client-overview,.rc-next .rc-day){display:none!important}
#revenueHome.planner-home .rc-next{order:0;min-height:0;display:block!important;padding:14px;background:var(--crm-surface,#121826);border-color:var(--crm-line,#293448);box-shadow:none}
#revenueHome.planner-home .rc-next:before{display:none}
#revenueHome.planner-home .rc-next h2{font-size:13px;text-transform:none;letter-spacing:0;margin:0 0 10px}
#revenueHome.planner-home .rc-event-body{display:grid;gap:8px}
#revenueHome.planner-home .rc-planner-event{display:flex;align-items:center;gap:12px;padding:10px;width:100%;min-height:86px;text-align:left;background:#ffffff03;border:1px solid #ffffff0c;border-radius:10px;color:var(--text-primary)}
.rc-planner-date{display:grid;place-items:center;width:42px;flex:0 0 42px;color:#a9c9e7}.rc-planner-date strong{font-size:23px}.rc-planner-date small{font-size:10px;text-transform:uppercase}
.rc-planner-event-copy{display:grid;gap:5px;flex:1;min-width:0}.rc-planner-event-copy>strong{font-size:14px}.rc-planner-event-copy>small{font-size:11px;color:var(--text-secondary)}.rc-planner-event-copy>span{font-size:10px;color:var(--text-secondary)}.rc-planner-event-copy progress{display:block;width:100%;height:3px;margin-top:5px;accent-color:#9cb5ca}
#revenueHome.planner-home .rc-tiles{order:1;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:8px}
#revenueHome.planner-home .rc-tile{min-height:64px;padding:10px 4px;flex-direction:column;justify-content:center;gap:6px}
#revenueHome.planner-home .rc-tile svg{width:20px;height:20px;padding:0;background:none}
#revenueHome.planner-home .rc-tile h2{font-size:12px}
#revenueHome.planner-home .rc-priorities{order:2}
.chat-contact-meta{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0;max-width:48%}
.chat-contact-meta .chat-lead-state{font-size:10px;line-height:1.3;padding:3px 7px;border-radius:12px;white-space:normal;text-align:right}
.chat-contact-top{align-items:flex-start}
.chat-contact-content{grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:3px;align-items:center}.chat-contact-top,.chat-contact-meta{display:contents}.chat-contact-top>strong{grid-column:1;grid-row:1}.chat-contact-meta time{grid-column:2;grid-row:1;justify-self:end}.chat-contact-preview{grid-column:1;grid-row:2}.chat-contact-meta .chat-lead-state{grid-column:2;grid-row:2;justify-self:end;max-width:115px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 6px;font-size:9px}.chat-contact-bottom{grid-column:1/-1;grid-row:3}.chat-item.chat-contact-row{padding-top:11px;padding-bottom:11px}
