/* HCC BOX P1 · Usar la tipografía y los colores de la aplicación sin alterar módulos anteriores. */
.hcc-box-nav{display:none;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0 18px}
body.role-admin #hcc-box-nav{display:flex}
.hcc-box-nav button{display:inline-flex;align-items:center;gap:9px;padding:10px 17px;border-radius:12px;border:1px solid #d9e1e8;background:#fff;color:#2b425c;cursor:pointer;font-size:14px;font-weight:650}
.hcc-box-nav button.active{border-color:#a1bacd;background:#edf4f8;color:#164266}
.hcc-box-unread{display:inline-flex;min-width:20px;height:20px;align-items:center;justify-content:center;padding:0 5px;border-radius:20px;background:#c42c36;color:#fff;font-size:11px;font-weight:750}
.hcc-box-area{border:1px solid #e1e6ec;border-radius:15px;background:#fff;padding:20px;margin-top:14px}
.hcc-box-area h2{margin:0 0 5px;font-size:19px}.hcc-box-subtitle{color:#657385;font-size:13px;margin:0 0 16px}
.hcc-box-grid{display:grid;grid-template-columns:minmax(250px,.9fr) minmax(0,1.4fr);gap:16px}
.hcc-box-list{display:flex;flex-direction:column;gap:7px;min-height:80px;max-height:550px;overflow:auto}
.hcc-box-thread{font:inherit;display:block;width:100%;text-align:left;border-radius:12px;border:1px solid #e3e8ee;background:#fff;padding:12px;cursor:pointer;color:#1d354a}
.hcc-box-thread:hover,.hcc-box-thread.selected{border-color:#9bb8cf;background:#f4f8fc}
.hcc-box-thread-head,.hcc-box-thread-line{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:5px}
.hcc-box-thread-head strong{font-size:13px;overflow-wrap:anywhere}.hcc-box-thread-head span{font-size:11px;color:#687787;white-space:nowrap}
.hcc-box-thread-line{margin-top:5px;font-size:12px;color:#596a7b}.hcc-box-dot{font-size:11px;font-weight:700;color:#bc2f31}
.hcc-box-status{color:#396b49}.hcc-box-status.is-closed{color:#687787}
.hcc-box-detail{min-height:200px;border:1px solid #e1e7ed;background:#f8fafc;border-radius:12px;padding:13px;min-width:0}
.hcc-box-detail-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;border-bottom:1px solid #e4e9ef;padding-bottom:10px;margin-bottom:12px}
.hcc-box-detail-head>div{display:flex;flex-direction:column;gap:3px}.hcc-box-detail-head small{font-size:12px;color:#687787}
.hcc-box-transcript{display:flex;flex-direction:column;gap:10px;max-height:420px;overflow:auto;padding:5px}
.hcc-box-message{max-width:93%;border:1px solid #e1e6ec;background:#fff;border-radius:12px;padding:10px 12px;align-self:flex-start}
.hcc-box-from-admin{background:#e9f2fa;border-color:#d2e0ed;align-self:flex-end}
.hcc-box-message-meta{color:#728194;font-size:11px;margin-bottom:6px}.hcc-box-message-body{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.hcc-box-reply{display:flex;flex-direction:column;align-items:flex-end;gap:8px;margin-top:14px}.hcc-box-reply textarea{width:100%;min-height:90px;box-sizing:border-box;resize:vertical;border:1px solid #ccd7e2;border-radius:10px;padding:10px;font:inherit;font-size:13px}
.hcc-box-inline-status{font-size:12px;color:#bf313b;margin:0;width:100%}.hcc-box-empty{font-size:13px;color:#6d7e8d}
.hcc-box-pages{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px}.hcc-box-pages button{font-size:12px}
.hcc-box-admin-controls{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0 16px}
.hcc-box-admin-controls select{min-width:150px;border:1px solid #d9e1e8;border-radius:10px;padding:9px}
.hcc-box-toast{position:fixed;z-index:9999;top:18px;right:18px;max-width:350px;background:#163b59;color:white;padding:13px 17px;border-radius:12px;box-shadow:0 10px 30px #0003;pointer-events:none;opacity:0;transform:translateY(-8px);transition:opacity .2s,transform .2s}
.hcc-box-toast-show{opacity:1;transform:translateY(0)}
#hcc-box-main-badge{margin-left:6px;vertical-align:middle}
#hcc-box-my-messages{margin-top:16px}
@media (max-width:760px){.hcc-box-grid{grid-template-columns:minmax(0,1fr)}.hcc-box-area{padding:14px}.hcc-box-list{max-height:300px}}

/* HCC BOX CLIENT P3 · Bandeja dedicada para perfiles de cliente, independiente del router central. */
body:not(.role-client) #hcc-box-client-tab-button,
body.perm-off-access-suggestions #hcc-box-client-tab-button,
body:not(.role-client) #hcc-box-client-view,
body.perm-off-access-suggestions #hcc-box-client-view{display:none!important}
body.hcc-box-client-inbox-open #home-view{display:none!important}
#hcc-box-client-tab-button .hcc-box-unread{margin-left:4px}
#hcc-box-client-view{margin-top:18px;margin-bottom:35px}
.hcc-box-client-page-head{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;padding:9px 0 8px}
.hcc-box-client-page-head h1{font-size:clamp(24px,3vw,32px);margin:6px 0;color:#1b2b40}
.hcc-box-client-page-head p{margin:0;color:#677588;font-size:14px}
.hcc-box-client-page-head button{white-space:nowrap}
#hcc-box-client-view .hcc-box-area{margin-top:16px}
#hcc-box-client-list .hcc-box-empty{margin:12px 4px}
@media(max-width:760px){.hcc-box-client-page-head{align-items:stretch}.hcc-box-client-page-head button{width:100%}}

/* HCC COMMS P4 · Único centro de comunicaciones del cliente, formulario bajo demanda. */
#hcc-box-client-compose[hidden]{display:none!important}
#hcc-box-client-compose{margin-top:18px}
#hcc-box-client-compose .hcc-box-compose-card{max-width:none;margin:0;border-radius:15px}
#hcc-box-client-compose .suggestions-heading{margin-bottom:14px}
#hcc-box-client-compose .suggestions-heading h2{margin:3px 0 5px}
#hcc-box-client-compose .suggestions-heading p{color:#657385;font-size:13px}
#hcc-box-client-compose .hcc-box-compose-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#hcc-box-client-compose .hcc-box-compose-actions .suggestion-note{flex-basis:100%}
@media(max-width:760px){#hcc-box-client-compose .hcc-box-compose-actions button{flex:1}}

/* P5: Communications is a standalone view, never the Home layout below the fold. */
body.hcc-box-client-inbox-open #home-view, body.hcc-box-client-inbox-open #home-view.active{display:none!important}
#hcc-box-client-view[hidden]{display:none!important}
#hcc-box-client-compose[hidden]{display:none!important}
