:root{
  --navy-900:#141a45;
  --navy-800:#1b2263;
  --navy-700:#2a3383;
  --navy-600:#4a55ab;
  --lavender:#b6bee7;
  --lavender-light:#eceffb;
  --gold:#e5b13c;
  --gold-dark:#b6871c;
  --green:#1fa971;
  --green-light:#e3f6ec;
  --red:#d1495b;
  --red-light:#fbe8ea;
  --gray:#8b90b3;
  --gray-light:#eef0f7;
  --bg:#eef0f8;
  --white:#ffffff;
  --text-dark:#171c4a;
  --text-muted:#6c7099;
  --radius:20px;
  --radius-sm:12px;
  --shadow: 0 6px 20px rgba(20,26,69,0.07);
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background:var(--bg);
  color:var(--text-dark);
}
a{ text-decoration:none; color:inherit; }
.hidden{ display:none !important; }

/* ===== LOGIN ===== */
.login-screen{
  min-height:100vh; display:flex;
}
.login-brand-panel{
  flex:0 0 46%; min-width:560px; position:relative; overflow:hidden;
  background:linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 60%, var(--navy-600) 100%);
  display:flex; flex-direction:column; justify-content:space-between;
  padding:56px 60px;
}
.login-brand-glow{ display:none; }
.login-brand-content{ position:relative; z-index:1; max-width:460px; }
.login-logo-img{ width:140px; margin-bottom:48px; display:block; }
.login-headline{ color:#fff; font-size:48px; font-weight:800; line-height:1.15; margin:0 0 18px; letter-spacing:-0.01em; }
.login-headline-sub{ color:#b7bce8; font-size:17px; line-height:1.65; margin:0 0 42px; }
.login-feature-list{ display:flex; flex-direction:column; gap:20px; }
.login-feature{
  display:flex; align-items:center; gap:14px; color:#dfe1f4; font-size:15.5px; font-weight:600;
}
.login-feature i{
  width:38px; height:38px; border-radius:10px; background:rgba(229,177,60,0.16); color:var(--gold);
  display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0;
}
.login-web-link{
  display:inline-flex; align-items:center; gap:8px; margin-top:36px; padding:13px 26px;
  border:1.5px solid rgba(255,255,255,0.6); border-radius:999px; color:#fff; font-size:14px; font-weight:700;
  text-decoration:none; transition:background .15s, border-color .15s; width:fit-content;
}
.login-web-link:hover{ background:rgba(255,255,255,0.1); border-color:#fff; }
.login-form-panel{
  flex:1; display:flex; align-items:center; justify-content:center; background:#fbfbfd; padding:40px 24px;
}
.login-card{
  background:#fff; border-radius:20px; padding:44px 40px; width:100%; max-width:380px;
  box-shadow:0 20px 44px rgba(23,27,70,0.09); border:1px solid #f0f1f8;
}
.login-card .login-sub{ color:var(--navy-900); font-size:19px; font-weight:800; margin-bottom:28px; }
.login-card .form-field{ margin-bottom:16px; }
.login-card label{ display:block; font-size:13px; font-weight:700; color:var(--navy-800); margin-bottom:6px; }
.login-card input{
  width:100%; border:1.5px solid #e2e5f5; border-radius:12px; padding:12px 14px;
  font-size:14.5px; font-family:inherit; transition:border-color .15s, box-shadow .15s;
}
.login-card input:focus{ outline:none; border-color:var(--navy-600); box-shadow:0 0 0 3px rgba(74,85,171,0.12); }
.login-card .btn{ width:100%; justify-content:center; margin-top:8px; }
.login-error{
  background:var(--red-light); color:var(--red); font-size:13.5px; font-weight:600;
  padding:10px 14px; border-radius:10px; margin-bottom:14px; display:none;
}
.login-error.show{ display:block; }
.login-footer{ margin-top:22px; text-align:center; font-size:12.5px; color:var(--text-muted); }
.login-link{ font-size:12.5px; font-weight:700; color:var(--navy-700); text-decoration:none; }
.login-link:hover{ text-decoration:underline; }
.login-info{
  background:var(--green-light); color:var(--green); font-size:13.5px; font-weight:600;
  padding:10px 14px; border-radius:10px; margin-bottom:14px; display:none;
}
.login-info.show{ display:block; }
.input-with-icon{ position:relative; }
.input-with-icon input{ padding-right:42px; }
.toggle-password{
  position:absolute; right:14px; top:50%; transform:translateY(-50%);
  color:var(--text-muted); cursor:pointer; font-size:15px;
}
.toggle-password:hover{ color:var(--navy-700); }
.login-flag-footer{
  position:relative; z-index:1; text-align:left; font-size:11.5px; color:var(--text-muted);
  display:flex; align-items:center; gap:6px;
}
.login-flag-footer .flag-dot{
  width:12px; height:12px; border-radius:50%; display:inline-block;
  background:linear-gradient(to right, #d91023 0% 33%, #fff 33% 67%, #d91023 67% 100%);
  border:1px solid #eee;
}
@media (max-width:860px){
  .login-screen{ flex-direction:column; }
  .login-brand-panel{ flex:none; min-width:0; padding:36px 28px; }
  .login-logo-img{ width:88px; margin-bottom:20px; }
  .login-headline{ font-size:21px; }
  .login-headline-sub{ margin-bottom:22px; }
  .login-feature-list{ display:none; }
  .login-form-panel{ padding:32px 20px 48px; }
  .login-card{ padding:32px 26px; }
}

/* ===== NAVBAR ===== */
.navbar{
  background:var(--navy-900);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 32px;
  flex-wrap:wrap;
  gap:12px;
}
.navbar-left{ display:flex; align-items:center; gap:10px; font-size:17px; position:relative; }
.navbar-left b{ font-weight:800; letter-spacing:-0.01em; }
.navbar-left span.sep{ opacity:0.45; margin:0 2px; }
.client-switch{
  display:flex; align-items:center; gap:8px; font-weight:600; opacity:0.92; font-size:15px;
  cursor:pointer; padding:6px 10px; border-radius:9px; transition:background .15s;
}
.client-switch:hover{ background:rgba(255,255,255,0.08); }
.client-switch i.fa-chevron-down{ font-size:10px; opacity:0.7; }
.client-dropdown{
  position:absolute; top:44px; left:0; background:#fff; border-radius:14px; min-width:250px;
  box-shadow:0 14px 34px rgba(20,26,69,0.25); padding:8px; display:none; z-index:200; color:var(--text-dark);
}
.client-dropdown.open{ display:block; }
.client-dropdown .cd-item{
  display:flex; align-items:center; justify-content:space-between; padding:9px 12px; border-radius:9px;
  cursor:pointer; font-size:14px; font-weight:600;
}
.client-dropdown .cd-item:hover{ background:var(--lavender-light); }
.client-dropdown .cd-item.active{ color:var(--navy-800); background:var(--lavender-light); }
.client-dropdown hr{ border:none; border-top:1px solid #eceefb; margin:6px 4px; }
.client-dropdown .cd-manage{
  display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:9px; cursor:pointer;
  font-size:13.5px; font-weight:700; color:var(--navy-700);
}
.client-dropdown .cd-manage:hover{ background:var(--lavender-light); }
.navtabs{ display:flex; gap:6px; flex-wrap:wrap; }
.navtab{
  display:flex; align-items:center; gap:8px;
  padding:10px 16px; border-radius:12px;
  font-weight:600; font-size:14.5px; cursor:pointer;
  color:#c7cbea; transition:background .15s, color .15s;
  border:none; background:transparent;
}
.navtab:hover{ background:rgba(255,255,255,0.08); color:#fff; }
.navtab.active{ background:rgba(255,255,255,0.16); color:#fff; }
.navtab.hidden{ display:none !important; }
.navtab-wrap{ position:relative; }
.mega-menu{
  position:absolute; top:48px; left:0; background:#fff; border-radius:14px; min-width:230px;
  box-shadow:0 14px 34px rgba(20,26,69,0.25); padding:8px; display:none; z-index:200; color:var(--text-dark);
  border-top:3px solid var(--gold);
}
.mega-menu.open{ display:block; }
.mega-menu .mm-item{
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:9px;
  cursor:pointer; font-size:13.5px; font-weight:600; color:var(--text-dark);
}
.mega-menu .mm-item i{ width:16px; text-align:center; color:var(--navy-700); }
.mega-menu .mm-item:hover{ background:var(--lavender-light); }
.mega-menu .mm-item.active{ background:var(--navy-900); color:#fff; }
.mega-menu .mm-item.active i{ color:var(--gold); }
.nav-badge{
  background:var(--red); color:#fff; font-size:10.5px; font-weight:800; border-radius:10px;
  padding:1px 7px; min-width:18px; text-align:center; line-height:1.5;
}
.navbar-right{ display:flex; align-items:center; gap:14px; position:relative; }
.navbar-right .icon-btn{
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.08); cursor:pointer; border:none; color:#fff;
}
.user-pill{
  background:rgba(255,255,255,0.14); padding:8px 14px; border-radius:20px;
  font-weight:700; font-size:14px; display:flex; align-items:center; gap:8px; cursor:pointer;
}
.role-badge{
  font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:0.03em;
  padding:2px 8px; border-radius:10px; background:rgba(255,255,255,0.18);
}
.user-dropdown{
  position:absolute; top:52px; right:0; background:#fff; border-radius:14px; min-width:210px;
  box-shadow:0 14px 34px rgba(20,26,69,0.25); padding:8px; display:none; z-index:200; color:var(--text-dark);
}
.user-dropdown.open{ display:block; }
.user-dropdown .ud-item{
  display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:9px; cursor:pointer;
  font-size:13.5px; font-weight:700; color:var(--red);
}
.user-dropdown .ud-item:hover{ background:var(--red-light); }

/* ===== LAYOUT ===== */
.container{ max-width:1400px; margin:0 auto; padding:24px 28px 60px; }
.page{ display:none; }
.page.active{ display:block; }
.page.export-render{
  display:block !important;
  position:fixed !important;
  top:0 !important;
  left:-10000px !important;
  z-index:-1 !important;
}
.card{
  background:var(--white); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:24px 28px;
}
.header-card{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:20px; flex-wrap:wrap; gap:16px;
}
.header-card .title-block{ display:flex; align-items:flex-start; gap:14px; }
.header-card .title-icon{ color:var(--navy-700); font-size:22px; margin-top:4px; }
.header-card h1{ margin:0 0 4px; font-size:26px; font-weight:800; color:var(--navy-900); }
.header-card p{ margin:0; color:var(--text-muted); font-size:15px; }
.btn{
  border:none; border-radius:12px; padding:12px 20px; font-weight:700;
  font-size:14.5px; cursor:pointer; display:inline-flex; align-items:center; gap:8px;
  transition:transform .1s, opacity .15s;
}
.btn:hover{ opacity:0.92; }
.btn:active{ transform:scale(0.98); }
.btn-navy{ background:var(--navy-800); color:#fff; }
.btn-gold{ background:var(--gold); color:var(--navy-900); }
.btn-outline{ background:var(--white); color:var(--navy-800); border:1.5px solid #dfe2f3; }
.btn-outline:hover{ background:var(--gray-light); }
.btn-sm{ padding:8px 14px; font-size:13.5px; border-radius:9px; }
.btn-danger{ background:var(--red-light); color:var(--red); }
.btn:disabled{ opacity:0.5; cursor:not-allowed; }

/* ===== METRIC CARDS ===== */
.metrics-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:24px; }
.metric-card{
  border-radius:24px; padding:28px 26px; position:relative; overflow:hidden;
  min-height:126px; display:flex; flex-direction:column; justify-content:space-between;
}
.metric-card .m-value{ font-size:36px; font-weight:800; letter-spacing:-0.01em; }
.metric-card .m-label{ font-size:14.5px; font-weight:600; opacity:0.92; margin-top:6px; }
.metric-card .m-icon{
  position:absolute; top:24px; right:24px; width:44px; height:44px; border-radius:13px;
  display:flex; align-items:center; justify-content:center; font-size:16px;
}
.metric-1{ background:var(--navy-800); color:#fff; }
.metric-1 .m-icon{ background:rgba(255,255,255,0.14); }
.metric-2{ background:var(--navy-600); color:#fff; }
.metric-2 .m-icon{ background:rgba(255,255,255,0.16); }
.metric-3{ background:var(--lavender); color:var(--navy-900); }
.metric-3 .m-icon{ background:rgba(255,255,255,0.5); }
.metric-4{ background:var(--gold); color:var(--navy-900); }
.metric-4 .m-icon{ background:rgba(255,255,255,0.35); }
.metric-5{ background:var(--navy-600); color:#fff; }
.metric-5 .m-icon{ background:rgba(255,255,255,0.16); }
.metrics-row-5{ grid-template-columns:repeat(5,1fr); }
.metric-card-lite{
  border-radius:16px; padding:18px 20px; background:#fff; border:1.5px solid #eceefb;
  min-height:auto; display:flex; align-items:center; gap:14px; box-shadow:none;
}
.metric-card-lite .m-icon{
  position:static; width:38px; height:38px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:14px;
  background:var(--lavender-light); color:var(--navy-700);
}
.metric-card-lite .m-value{ font-size:22px; font-weight:800; color:var(--navy-900); letter-spacing:-0.01em; }
.metric-card-lite .m-label{ font-size:12px; font-weight:600; color:var(--text-muted); margin-top:1px; opacity:1; }
.metric-card-lite.accent-green .m-icon{ background:var(--green-light); color:var(--green); }
.metric-card-lite.accent-gold .m-icon{ background:#fdf1d8; color:var(--gold-dark); }
.metric-card-lite.accent-red .m-icon{ background:var(--red-light); color:var(--red); }

/* ===== QUICK ACTIONS ===== */
.section-card{ margin-bottom:24px; }
.section-title{ display:flex; align-items:center; gap:10px; font-size:18px; font-weight:800; color:var(--navy-900); margin-bottom:4px;}
.section-sub{ color:var(--text-muted); font-size:14px; margin-bottom:16px; }
hr.divider{ border:none; border-top:1px solid #eceefb; margin:14px 0 18px; }
.actions-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:14px; }
.action-tile{
  border:1.5px solid #e7e9f7; border-radius:var(--radius-sm); padding:22px 14px;
  display:flex; flex-direction:column; align-items:center; gap:12px; cursor:pointer;
  background:#fff; transition:border-color .15s, background .15s;
  text-align:center; font-weight:700; font-size:13.5px; color:var(--navy-900);
}
.action-tile:hover{ border-color:var(--navy-600); background:var(--lavender-light); }
.action-tile .a-icon{
  width:42px; height:42px; border-radius:11px; background:var(--lavender-light);
  color:var(--navy-700); display:flex; align-items:center; justify-content:center; font-size:17px;
}

/* ===== FILTER BAR ===== */
.filter-bar{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:18px; }
.filter-bar input, .filter-bar select{
  border:1.5px solid #e2e5f5; border-radius:10px; padding:10px 12px; font-size:14px;
  font-family:inherit; color:var(--text-dark); background:#fff;
}
.filter-bar input[type="text"]{ min-width:220px; }
.filter-bar .grow{ flex:1; }

/* ===== TABLE ===== */
table.data-table{ width:100%; border-collapse:collapse; font-size:13.5px; table-layout:auto; }
table.data-table th{
  text-align:left; padding:10px 10px; background:var(--lavender-light); color:var(--navy-800);
  font-weight:700; font-size:11.5px; text-transform:uppercase; letter-spacing:0.02em; white-space:nowrap;
}
table.data-table th:first-child{ border-radius:10px 0 0 10px; }
table.data-table th:last-child{ border-radius:0 10px 10px 0; }
table.data-table td{ padding:10px 10px; border-bottom:1px solid #f0f1f9; vertical-align:middle; }
table.data-table tr:hover td{ background:#fafbff; }
.pill{ display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:20px; font-weight:700; font-size:12.5px; }
.pill-gray{ background:var(--gray-light); color:#5b6089; }
.pill-blue{ background:#e6ecfb; color:var(--navy-700); }
.pill-gold{ background:#fdf1d8; color:var(--gold-dark); }
.pill-green{ background:var(--green-light); color:#157a4c; }
.pill-red{ background:var(--red-light); color:var(--red); }
.pill-navy{ background:var(--navy-900); color:#fff; }
.pill-select{
  border:none; border-radius:20px; padding:5px 10px; font-weight:700; font-size:12.5px;
  cursor:pointer; outline:none; font-family:inherit; -webkit-appearance:menulist; appearance:menulist;
  transition:filter .1s;
}
.pill-select:hover{ filter:brightness(0.94); }
.pill-select:focus{ box-shadow:0 0 0 2px rgba(23,28,69,0.18); }
.pill-select:disabled{ opacity:0.6; cursor:wait; }
.mini-select{
  border:1.5px solid #e2e5f5; border-radius:7px; padding:3px 6px; font-size:11.5px; font-weight:600;
  color:var(--navy-800); font-family:inherit; cursor:pointer; max-width:150px; background:#fff;
}
.mini-select.sin-asignar{ color:var(--text-muted); border-color:#eceefb; font-style:italic; }
.mini-select:hover{ border-color:var(--navy-600); }
.activity-item{ border-radius:12px; padding:10px 12px; font-size:13px; }
.adjunto-item{
  display:flex; align-items:center; gap:10px; background:#fafbff; border:1.5px solid #eceefb;
  border-radius:10px; padding:8px 12px; font-size:12.5px;
}
.adjunto-item .a-icon{ font-size:16px; color:var(--navy-700); flex-shrink:0; }
.adjunto-item .a-nombre{ flex:1; font-weight:600; color:var(--navy-800); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.adjunto-item .a-meta{ color:var(--text-muted); font-size:11px; white-space:nowrap; }
.activity-item.comment{ background:var(--lavender-light); }
.activity-item.system{ background:#fbfbfe; border:1px dashed #e7e9f7; color:var(--text-muted); font-size:12px; }
.activity-item .a-head{ display:flex; justify-content:space-between; font-weight:700; color:var(--navy-800); margin-bottom:4px; font-size:12.5px; }
.activity-item .a-time{ font-weight:500; color:var(--text-muted); font-size:11px; }
.overdue-dot{ width:7px; height:7px; border-radius:50%; background:var(--red); display:inline-block; margin-left:6px; }
.ticket-num{ font-family:'Courier New', monospace; font-weight:800; font-size:12.5px; color:var(--navy-700); background:var(--lavender-light); padding:3px 8px; border-radius:8px; white-space:nowrap; }
.desc-preview{
  font-size:11.5px; color:var(--text-muted); max-width:230px; margin-top:2px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; text-overflow:ellipsis; line-height:1.35; cursor:help;
}
.correo-item{ padding:14px 18px; border-bottom:1px solid #f2f3fa; cursor:pointer; transition:background .15s; }
.correo-item:hover{ background:var(--lavender-light); }
.correo-item.activo{ background:var(--lavender-light); border-left:3px solid var(--navy-700); }
.correo-item.no-leido .correo-asunto{ font-weight:800; }
.correo-item .correo-top{ display:flex; justify-content:space-between; font-size:11.5px; color:var(--text-muted); margin-bottom:3px; }
.correo-item .correo-remitente{ font-weight:700; font-size:12.5px; color:var(--navy-800); }
.correo-item .correo-asunto{ font-size:12.5px; color:var(--text-dark); margin-top:2px; }
.correo-item .correo-snippet{ font-size:11.5px; color:var(--text-muted); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.correo-bubble{ max-width:80%; padding:12px 16px; border-radius:14px; margin-bottom:14px; font-size:13.5px; line-height:1.5; white-space:pre-wrap; }
.correo-bubble.entrante{ background:var(--lavender-light); align-self:flex-start; }
.correo-bubble.saliente{ background:var(--navy-800); color:#fff; align-self:flex-end; }
.correo-bubble .cb-meta{ font-size:11px; opacity:0.7; margin-bottom:6px; font-weight:700; }
.icon-action{ cursor:pointer; color:var(--text-muted); padding:6px; border-radius:8px; }
.icon-action:hover{ background:var(--gray-light); color:var(--navy-800); }
.empty-state{ text-align:center; padding:50px 20px; color:var(--text-muted); }
.empty-state i{ font-size:32px; color:var(--lavender); margin-bottom:10px; display:block; }
.sub-row td:first-child{ padding-left:38px; }
.sub-row .sub-arrow{ color:var(--lavender); margin-right:8px; }
.sub-row td{ background:#fbfbfe; }
.btn-add-sub{ color:var(--text-muted); cursor:pointer; padding:6px; border-radius:8px; }
.btn-add-sub:hover{ background:var(--gray-light); color:var(--navy-800); }
.subtask-badge{ font-size:11px; font-weight:700; color:var(--text-muted); background:var(--gray-light); padding:2px 8px; border-radius:10px; margin-left:8px; }
.bulk-bar{
  display:flex; align-items:center; gap:12px; background:var(--lavender-light); border-radius:12px;
  padding:12px 16px; margin-bottom:14px; font-weight:700; font-size:13.5px; color:var(--navy-800);
}
.bulk-bar.hidden{ display:none; }
.pagination-bar{
  display:flex; align-items:center; gap:12px; margin-top:14px; font-size:13px; color:var(--text-muted); font-weight:600;
}
.pagination-bar select{
  border:1.5px solid #e2e5f5; border-radius:9px; padding:7px 10px; font-size:13px; font-family:inherit; color:var(--text-dark);
}
.pagination-bar #pagina-actual-label{ font-weight:800; color:var(--navy-800); min-width:50px; text-align:center; }
input[type="checkbox"]{ width:16px; height:16px; cursor:pointer; accent-color:var(--navy-700); }
.gantt-group-header{ display:flex; align-items:center; background:var(--navy-900); color:#fff; font-weight:800; font-size:12.5px; padding:8px 16px; position:sticky; left:0; }
.gantt-sub .gantt-label{ padding-left:34px; }
.gantt-sub .g-title{ font-weight:600; font-size:12px; color:var(--navy-700); }
.gantt-sub .gantt-bar{ opacity:0.82; height:18px; top:11px; }

/* ===== MODAL ===== */
.modal-overlay{
  position:fixed; inset:0; background:rgba(23,27,70,0.55); display:none;
  align-items:center; justify-content:center; z-index:100; padding:20px;
}
.modal-overlay.active{ display:flex; }
.modal-box{
  background:#fff; border-radius:18px; padding:28px 30px; max-width:560px; width:100%;
  max-height:90vh; overflow-y:auto; box-shadow:0 20px 50px rgba(23,27,70,0.3);
}
#page-solicitud-detalle{ padding:0; }
.solicitud-detalle-grid{
  display:grid; grid-template-columns:340px 1fr; gap:20px; align-items:start;
}
.solicitud-col-izq, .solicitud-col-der{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.solicitud-col-izq .card, .solicitud-col-der .card{ margin:0; }
.solicitud-info-titulo{
  font-size:11px; font-weight:800; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em;
  margin:20px 0 12px; padding-top:16px; border-top:1.5px solid #eceefb;
}
/* Dentro del modal chico de "Nueva solicitud", los mismos campos se ven en
   grid de 2 columnas (como el resto de los modales del software); dentro
   de la pagina de detalle (columna angosta) se quedan en 1 columna. */
#modal-nueva-solicitud #solicitud-form-fields{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
#modal-nueva-solicitud #solicitud-form-fields .form-field.full{ grid-column:1 / -1; }

/* ---- Hilo de correos (dentro del detalle de solicitud) ---- */
/* ---- Checklist: columnas por categoría + tarjetas cuadradas ---- */
.checklist-columnas{ display:flex; gap:18px; overflow-x:auto; padding-bottom:10px; align-items:flex-start; }
.checklist-columna{ background:#f4f5fb; border-radius:16px; padding:14px; min-width:280px; flex-shrink:0; }
.checklist-columna-header{
  font-weight:800; color:var(--navy-900); font-size:12.5px; text-transform:uppercase; letter-spacing:.02em;
  margin-bottom:12px; display:flex; justify-content:space-between; align-items:center; gap:8px;
}
.checklist-columna-body{ display:flex; flex-direction:column; gap:14px; }
.checklist-card-cuadrada{
  width:252px; height:252px; background:#fff; border-radius:14px; box-shadow:var(--shadow);
  padding:14px; display:flex; flex-direction:column;
}
.checklist-card-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:8px; margin-bottom:2px; }
.checklist-card-titulo{ font-weight:800; color:var(--navy-900); font-size:12.5px; line-height:1.3; }
.checklist-card-responsable{ font-size:10.5px; color:var(--text-muted); margin-bottom:8px; }
.checklist-card-barra{ height:5px; background:#eceefb; border-radius:4px; overflow:hidden; margin-bottom:10px; flex-shrink:0; }
.checklist-card-items{ flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:6px; }
.checklist-card-item{ display:flex; align-items:flex-start; gap:7px; font-size:11.5px; cursor:pointer; color:var(--text-dark); }
.checklist-card-item input{ width:auto; margin-top:1px; flex-shrink:0; }
.checklist-card-item.completado{ color:var(--text-muted); text-decoration:line-through; }

.correo-hilo-item{
  display:flex; gap:12px; padding:14px 16px; border:1.5px solid #eceefb; border-radius:14px;
  transition:border-color .15s, box-shadow .15s;
}
.correo-hilo-item:hover{ border-color:#d7dcf5; box-shadow:0 6px 18px rgba(23,27,70,0.07); }
.correo-hilo-item.expandido{ border-color:var(--navy-600); box-shadow:0 6px 20px rgba(74,85,171,0.12); }
.correo-hilo-item.saliente{ background:var(--lavender-light); }
.correo-hilo-avatar{
  width:36px; height:36px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:14px; color:#fff; box-shadow:0 2px 6px rgba(23,27,70,0.15);
}
.correo-hilo-item.entrante .correo-hilo-avatar{ background:var(--gold); color:var(--navy-900); }
.correo-hilo-item.saliente .correo-hilo-avatar{ background:var(--navy-800); }
.correo-hilo-cuerpo{ flex:1; min-width:0; }
.correo-hilo-top{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.correo-hilo-de{ font-size:12.5px; font-weight:700; color:var(--navy-800); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.correo-hilo-fecha{ font-size:11px; color:var(--text-muted); white-space:nowrap; flex-shrink:0; display:flex; align-items:center; gap:8px; }
.correo-hilo-toggle{
  width:22px; height:22px; border-radius:50%; border:1.5px solid #e2e5f5; background:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center; color:var(--navy-700); transition:background .15s, border-color .15s;
  padding:0;
}
.correo-hilo-toggle:hover{ background:var(--lavender-light); border-color:var(--navy-600); }
.correo-hilo-chevron{ font-size:9px; transition:transform .2s; }
.correo-hilo-item.expandido .correo-hilo-toggle{ background:var(--navy-800); border-color:var(--navy-800); color:#fff; }
.correo-hilo-item.expandido .correo-hilo-chevron{ transform:rotate(180deg); }
.correo-hilo-asunto{ font-size:13.5px; font-weight:700; color:var(--navy-900); margin-top:4px; }
.correo-hilo-snippet{
  font-size:12.5px; color:var(--text-muted); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.correo-hilo-completo{
  display:none; font-size:13px; color:var(--text-dark); white-space:pre-wrap; margin-top:12px;
  padding-top:12px; border-top:1px solid #e2e5f5; line-height:1.6; max-height:360px; overflow-y:auto;
}
.correo-hilo-item.expandido .correo-hilo-snippet{ display:none; }
.correo-hilo-item.expandido .correo-hilo-completo{ display:block; animation:hiloFadeIn .18s ease; }
@keyframes hiloFadeIn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:translateY(0); } }
@media (max-width:1000px){
  .solicitud-detalle-grid{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .solicitud-detalle-grid{ gap:14px; }
  #page-solicitud-detalle .card{ padding:18px 16px; }
}
.modal-box h2{ margin:0 0 4px; font-size:20px; font-weight:800; color:var(--navy-900); }
.modal-box .modal-sub{ color:var(--text-muted); font-size:13.5px; margin-bottom:18px; }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-grid .full{ grid-column:1 / -1; }
.form-field label{ display:block; font-size:13px; font-weight:700; color:var(--navy-800); margin-bottom:6px; }
.form-field input, .form-field select, .form-field textarea{
  width:100%; border:1.5px solid #e2e5f5; border-radius:10px; padding:10px 12px;
  font-size:14px; font-family:inherit; color:var(--text-dark);
}
.form-field textarea{ resize:vertical; min-height:64px; }
.form-field input:disabled, .form-field select:disabled, .form-field textarea:disabled{
  background:#f5f6fb; color:var(--text-muted); cursor:not-allowed;
}
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.field-note{ font-size:12px; color:var(--text-muted); margin-top:4px; }

/* ===== PAYROLL: modal ancho, pestañas internas, grids extra, navegador de mes ===== */
.modal-box-ancho{ max-width:960px; }
.form-grid.cols-3{ grid-template-columns:1fr 1fr 1fr; }
.form-grid.cols-4{ grid-template-columns:1fr 1fr 1fr 1fr; }
.form-grid.cols-5{ grid-template-columns:1fr 1fr 1fr 1fr 1fr; }
.form-divider{ border:none; border-top:1.5px solid #eceefb; margin:18px 0; }
.modal-tabs{ display:flex; gap:6px; border-bottom:2px solid #eceefb; margin-bottom:20px; }
.modal-tabs button{
  border:none; background:none; padding:10px 4px; margin-right:22px; font-weight:700; font-size:13.5px;
  color:var(--text-muted); cursor:pointer; border-bottom:3px solid transparent; position:relative; top:2px;
}
.modal-tabs button.active{ color:var(--navy-900); border-bottom-color:var(--gold); }
.modal-tab-content{ display:none; }
.modal-tab-content.active{ display:block; }
.navy-section-head{
  background:var(--navy-900); color:#fff; font-weight:800; font-size:12px; letter-spacing:.02em;
  padding:10px 14px; border-radius:8px; margin:20px 0 16px; display:flex; align-items:center; gap:8px;
}
.navy-section-head:first-of-type{ margin-top:0; }
.mes-nav-bar{
  background:var(--navy-900); border-radius:12px; padding:14px 20px; margin-bottom:16px;
  display:flex; align-items:center; justify-content:space-between; color:#fff;
}
.mes-nav-bar .btn-outline{ background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.3); color:#fff; }
.mes-nav-label{ font-weight:800; font-size:17px; }
.mes-nav-sub{ font-size:11.5px; color:#c7cbea; }
.resultados-buscador{
  position:absolute; top:2px; left:0; right:0; background:#fff; border:1.5px solid #e2e5f5;
  border-radius:10px; box-shadow:0 8px 20px rgba(23,28,69,.12); z-index:20; max-height:220px; overflow-y:auto;
}
.resultado-item{ padding:10px 14px; cursor:pointer; font-size:13px; border-bottom:1px solid #f4f5f9; }
.resultado-item:last-child{ border-bottom:none; }
.resultado-item:hover{ background:var(--lavender-light); }
.resultado-item .dni{ color:var(--text-muted); font-size:11.5px; }
.warn-box{
  background:#fff8e1; border:1.5px solid #f3d98a; border-radius:10px; padding:14px 16px; margin-top:22px;
  font-size:12.5px; color:#7a5b00; display:flex; gap:10px;
}
.warn-box i{ color:#c8931f; margin-top:2px; }
.collapse-section{ margin-bottom:16px; }
.collapse-head{
  display:flex; justify-content:space-between; align-items:center; cursor:pointer;
  font-weight:800; color:var(--navy-900); font-size:14px; padding:6px 0; border-bottom:1.5px solid #eceefb; margin-bottom:14px;
}
.collapse-head .fa-chevron-down{ transition:transform .15s; color:var(--text-muted); }
.collapse-section.closed .collapse-head .fa-chevron-down{ transform:rotate(-90deg); }
.collapse-section.closed .collapse-body{ display:none; }
.tags-input{ display:flex; gap:6px; flex-wrap:wrap; border:1.5px solid #e2e5f5; border-radius:9px; padding:8px 10px; }
.tag-chip{ background:var(--lavender-light); color:var(--navy-800); font-size:12px; font-weight:700; padding:4px 10px; border-radius:14px; }
.nested-card{ border:1.5px solid #e2e5f5; border-radius:12px; padding:16px; margin-top:12px; }
.nested-card .nested-head{ background:#e8ecfd; color:var(--navy-900); font-weight:800; font-size:13px; padding:8px 12px; border-radius:8px; margin:-16px -16px 14px; }
.field-hint2{ font-size:11px; color:var(--text-muted); margin-top:3px; }
.chk-field{ display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:700; color:var(--navy-800); }
.hint-icon{ color:var(--text-muted); font-size:11px; margin-left:3px; cursor:help; }


/* ===== GANTT ===== */
.gantt-legend{ display:flex; gap:20px; align-items:center; margin-bottom:16px; flex-wrap:wrap; }
.legend-item{ display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; color:var(--text-muted); }
.legend-dot{ width:12px; height:12px; border-radius:4px; }
.gantt-scroll{ overflow-x:auto; border-radius:12px; border:1px solid #eceefb; }
.gantt-inner{ background:#fff; padding:6px 0; min-width:max-content; }
.gantt-row{ display:flex; align-items:stretch; border-bottom:1px solid #f2f3fa; }
.gantt-row:last-child{ border-bottom:none; }
.gantt-label{
  width:300px; min-width:300px; padding:10px 16px; display:flex; flex-direction:column;
  justify-content:center; gap:2px; background:#fff; position:sticky; left:0; z-index:2;
  border-right:1.5px solid #eceefb;
}
.gantt-label .g-title{ font-weight:700; font-size:13px; color:var(--navy-900); }
.gantt-label .g-sub{ font-size:11.5px; color:var(--text-muted); }
.gantt-header{ display:flex; background:var(--lavender-light); position:sticky; top:0; z-index:3; }
.gantt-header .gantt-label{ background:var(--lavender-light); font-weight:800; color:var(--navy-800); font-size:13px; justify-content:center; }
.gantt-months{ display:flex; position:relative; }
.gantt-month{
  border-right:1px solid #dde1f2; font-size:12px; font-weight:700; color:var(--navy-700);
  text-align:center; padding:10px 0; flex-shrink:0;
}
.gantt-track{ position:relative; flex-shrink:0; }
.gantt-bar{
  position:absolute; border-radius:7px; display:flex; align-items:center;
  padding:0 10px; font-size:11.5px; font-weight:700; color:#fff; white-space:nowrap; overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,0.15);
}
.gantt-gridlines{ position:absolute; inset:0; }
.gantt-gridline{ position:absolute; top:0; bottom:0; border-right:1px dashed #dde1f2; z-index:1; }
.gantt-gridline-week{ position:absolute; top:0; bottom:0; border-right:1px dotted #eef0f7; }
.today-line{ position:absolute; top:0; bottom:0; width:2px; background:var(--red); z-index:1; }
.gantt-subheader{ display:flex; background:#f5f6fc; position:sticky; top:38px; z-index:3; border-bottom:1.5px solid #eceefb; }
.gantt-subheader .gantt-label{ background:#f5f6fc; border-right:1.5px solid #eceefb; }
.gantt-weeks{ display:flex; position:relative; }
.gantt-week{
  border-right:1px dotted #dde1f2; font-size:10.5px; font-weight:700; color:var(--text-muted);
  text-align:center; padding:6px 0; flex-shrink:0;
}

/* ===== CLIENTES / EQUIPOS / USUARIOS ===== */
.two-col{ display:grid; grid-template-columns:1.1fr 1fr; gap:20px; }
.team-block{ border:1.5px solid #eceefb; border-radius:14px; padding:16px 18px; margin-bottom:14px; }
.team-block h3{ margin:0 0 10px; font-size:15.5px; font-weight:800; color:var(--navy-800); display:flex; align-items:center; gap:8px; }
.member-row{ display:flex; align-items:center; justify-content:space-between; padding:9px 0; border-bottom:1px solid #f5f6fb; }
.member-row:last-child{ border-bottom:none; }
.member-name{ font-weight:600; font-size:14px; display:flex; align-items:center; gap:10px; }
.avatar{
  width:30px; height:30px; border-radius:50%; background:var(--navy-700); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800;
}
.member-row select{ border:1.5px solid #e2e5f5; border-radius:8px; padding:6px 10px; font-size:12.5px; }
.checkbox-list{ display:block; max-height:220px; overflow-y:auto; padding:10px 12px; border:1.5px solid #e2e5f5; border-radius:10px; }
.checkbox-list label{
  display:block; font-size:13.5px; font-weight:600; color:var(--text-dark);
  cursor:pointer; padding:5px 0; text-align:left;
}
.checkbox-list label input[type="checkbox"]{ margin:0 8px 0 0; vertical-align:middle; }

/* ===== SELECTOR DE VISTAS (dentro de Solicitudes) ===== */
.view-switch{ display:flex; gap:2px; background:var(--gray-light); border-radius:12px; padding:3px; }
.view-btn{
  border:none; background:transparent; padding:8px 14px; border-radius:9px; font-weight:700; font-size:13px;
  color:var(--text-muted); cursor:pointer; display:flex; align-items:center; gap:7px; white-space:nowrap;
  transition:background .15s, color .15s;
}
.view-btn:hover{ color:var(--navy-800); }
.view-btn.active{ background:#fff; color:var(--navy-800); box-shadow:0 2px 6px rgba(20,26,69,0.12); }
.subvista{ margin-top:18px; }
.subvista.hidden{ display:none; }

/* ===== PIPELINE (kanban) ===== */
.pipeline-board{ display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; align-items:start; }
.pipeline-col{ background:#fafbff; border-radius:14px; border:1.5px solid #eceefb; min-height:120px; }
.pipeline-col-header{
  font-weight:800; font-size:13px; padding:12px 14px; border-radius:14px 14px 0 0;
  display:flex; align-items:center; justify-content:space-between;
}
.pipeline-count{ background:rgba(0,0,0,0.08); border-radius:10px; padding:1px 8px; font-size:11.5px; }
.pipeline-col-body{ padding:12px; display:flex; flex-direction:column; gap:10px; min-height:80px; }
.pipeline-col-body.drag-over{ background:var(--lavender-light); border-radius:10px; }
.pipeline-card{
  background:#fff; border:1.5px solid #eceefb; border-radius:12px; padding:12px 14px; cursor:grab;
  box-shadow:0 1px 4px rgba(20,26,69,0.06); transition:box-shadow .15s, transform .1s;
}
.pipeline-card:hover{ box-shadow:0 4px 12px rgba(20,26,69,0.14); }
.pipeline-card.dragging{ opacity:0.4; }
.pipeline-card-top{ display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.pipeline-card-title{ font-weight:700; font-size:13.5px; color:var(--navy-900); margin-bottom:6px; line-height:1.3; }
.pipeline-card-meta{ font-size:11.5px; color:var(--text-muted); margin-bottom:8px; }
.pipeline-card-footer{ display:flex; justify-content:space-between; align-items:center; font-size:11.5px; color:var(--text-muted); border-top:1px dashed #eceefb; padding-top:8px; }
.overdue-text{ color:var(--red); font-weight:700; }
.pipeline-empty{ text-align:center; color:var(--text-muted); font-size:12.5px; padding:20px 0; }

/* ===== CALENDARIO ===== */
.calendar-header{ display:flex; align-items:center; justify-content:center; gap:18px; margin-bottom:16px; }
.calendar-header #calendar-mes-label{ font-weight:800; font-size:16px; color:var(--navy-900); min-width:160px; text-align:center; }
.cal-weekdays{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:6px; }
.cal-weekdays div{ text-align:center; font-size:11.5px; font-weight:800; color:var(--text-muted); text-transform:uppercase; }
.cal-days{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-cell{ background:#fafbff; border:1.5px solid #eceefb; border-radius:10px; min-height:96px; padding:6px; display:flex; flex-direction:column; gap:3px; min-width:0; overflow:hidden; }
.cal-cell.cal-empty{ background:transparent; border:none; }
.cal-cell.cal-today{ border-color:var(--gold); background:#fffaf0; }
.cal-cell.cal-otro-mes{ background:#f4f5fa; }
.cal-cell.cal-otro-mes .cal-day-num{ color:var(--text-muted); font-weight:600; }
.cal-cell.cal-feriado{ border-color:#e8b4b4; }
.cal-feriado-tag{
  font-size:9px; font-weight:800; color:#a13d3d; background:#fbe8e8; border-radius:5px;
  padding:1px 5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; max-width:100%;
}
.cal-day-num{ font-size:11.5px; font-weight:800; color:var(--navy-700); }
.cal-items{ display:flex; flex-direction:column; gap:3px; overflow:hidden; min-width:0; }
.cal-chip{ font-size:10.5px; font-weight:700; padding:2px 6px; border-radius:6px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#fff; min-width:0; max-width:100%; }
.cal-chip.pill-gray{ background:var(--gray); color:#fff; }
.cal-chip.pill-gold{ background:var(--gold); color:var(--navy-900); }
.cal-chip.pill-green{ background:var(--green); color:#fff; }
.cal-chip.pill-navy{ background:var(--navy-900); color:#fff; }
.cat-item{ padding:9px 12px; border-radius:9px; font-size:13px; font-weight:600; color:var(--navy-800); cursor:pointer; display:flex; justify-content:space-between; }
.cat-item:hover{ background:var(--lavender-light); }
.cat-item.active{ background:var(--navy-900); color:#fff; }
.cat-item .cnt{ color:var(--text-muted); font-size:11.5px; font-weight:700; }
.cat-item.active .cnt{ color:#c7cbea; }
.cal-more{ font-size:10px; color:var(--text-muted); font-weight:700; padding-left:2px; }
.cal-chip[draggable="true"]{ cursor:grab; }
.cal-chip-arrastrando{ opacity:0.4; }
.cal-cell-dropzone{ background:var(--lavender-light); border-color:var(--navy-600); }
.cal-proximo-item{
  display:flex; align-items:flex-start; gap:10px; padding:9px 8px; border-radius:9px; cursor:pointer;
}
.cal-proximo-item:hover{ background:var(--lavender-light); }
.cal-proximo-dot{ width:9px; height:9px; border-radius:50%; margin-top:4px; flex-shrink:0; }
.cal-proximo-dot.pill-gold{ background:var(--gold); }
.cal-proximo-dot.pill-navy{ background:var(--navy-900); }
.cal-proximo-dot.pill-green{ background:var(--green); }
.cal-proximo-titulo{ font-size:12.5px; font-weight:700; color:var(--navy-900); line-height:1.3; }
.cal-proximo-fecha{ font-size:11px; color:var(--text-muted); margin-top:2px; }

@media (max-width: 1100px){
  .pipeline-board{ grid-template-columns:1fr; }
}

@media (max-width: 1100px){
  .metrics-row{ grid-template-columns:repeat(2,1fr); }
  .actions-grid{ grid-template-columns:repeat(3,1fr); }
  .two-col{ grid-template-columns:1fr; }
  .form-grid{ grid-template-columns:1fr; }
}
@media (max-width: 640px){
  .actions-grid{ grid-template-columns:repeat(2,1fr); }
  .navbar{ padding:12px 16px; }
}

/* ---- Calendario de Payroll: responsive ---- */
@media (max-width: 900px){
  .cal-layout-grid{ grid-template-columns:1fr !important; }
}
@media (max-width: 640px){
  .cal-cell{ min-height:64px; padding:4px; gap:2px; }
  .cal-day-num{ font-size:10px; }
  .cal-chip{ font-size:9px; padding:1px 4px; }
  .cal-feriado-tag{ font-size:8px; padding:1px 3px; }
  .cal-weekdays div{ font-size:9.5px; }
  .cal-more{ font-size:8.5px; }
}
@media (max-width: 420px){
  .cal-cell{ min-height:52px; }
  .cal-chip b{ display:none; } /* en muy poco espacio, prioriza el título sobre la hora */
}

/* =========================================================================
   CHAT DE SOPORTE — widget flotante (cliente) + Centro de Ayuda (staff)
   ========================================================================= */
#chat-widget{ position:fixed; bottom:24px; right:24px; z-index:500; }
#chat-widget-burbuja{
  width:58px; height:58px; border-radius:50%; background:var(--navy-900); color:#fff;
  border:none; cursor:pointer; font-size:22px; box-shadow:0 10px 26px rgba(23,27,70,0.35);
  display:flex; align-items:center; justify-content:center; position:relative;
  transition:transform .15s;
}
#chat-widget-burbuja:hover{ transform:scale(1.06); }
#chat-widget-badge{
  position:absolute; top:-4px; right:-4px; background:var(--red); color:#fff; font-size:11px; font-weight:800;
  min-width:20px; height:20px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  padding:0 5px; border:2px solid #fff;
}
#chat-widget-panel{
  position:absolute; bottom:72px; right:0; width:360px; height:520px; background:#fff;
  border-radius:16px; box-shadow:0 20px 50px rgba(23,27,70,0.3); display:flex; flex-direction:column;
  overflow:hidden;
}
.chat-widget-header{
  background:var(--navy-900); color:#fff; padding:14px 16px; display:flex; align-items:center; gap:10px;
  font-weight:800; font-size:14px; flex-shrink:0;
}
.chat-widget-header #chat-widget-titulo{ flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-widget-header button{ background:none; border:none; color:#fff; cursor:pointer; font-size:15px; padding:4px; opacity:0.85; }
.chat-widget-header button:hover{ opacity:1; }
#chat-widget-lista-vista, #chat-widget-hilo-vista{ flex:1; display:flex; flex-direction:column; min-height:0; }
#chat-widget-lista-conversaciones{ flex:1; overflow-y:auto; padding:0 10px 10px; }
.chat-conv-item{
  padding:12px; border-radius:12px; cursor:pointer; margin-bottom:6px; transition:background .15s;
  border:1.5px solid transparent;
}
.chat-conv-item:hover{ background:var(--lavender-light); }
.chat-conv-item.no-leido{ background:#f2f0fb; border-color:#dcd9f5; }
.chat-conv-top{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:2px; }
.chat-conv-tema{ font-size:13px; font-weight:800; color:var(--navy-900); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-conv-fecha{ font-size:10.5px; color:var(--text-muted); flex-shrink:0; }
.chat-conv-snippet{ font-size:12px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-conv-cliente{ font-size:11.5px; font-weight:700; color:var(--navy-700); margin-bottom:2px; }
#chat-widget-mensajes, #ca-mensajes{
  flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; background:#fbfbfd;
}
.chat-burbuja{
  max-width:78%; padding:9px 13px; border-radius:14px; font-size:13px; line-height:1.4; word-wrap:break-word;
}
.chat-burbuja-propia{ align-self:flex-end; background:var(--navy-900); color:#fff; border-bottom-right-radius:4px; }
.chat-burbuja-otra{ align-self:flex-start; background:#fff; color:var(--text-dark); border:1.5px solid #eceefb; border-bottom-left-radius:4px; }
.chat-burbuja-hora{ font-size:10px; opacity:0.65; margin-top:4px; display:block; }
.chat-widget-input-wrap{
  display:flex; gap:8px; padding:12px; border-top:1.5px solid #eceefb; flex-shrink:0; background:#fff;
}
.chat-widget-input-wrap input{
  flex:1; border:1.5px solid #e2e5f5; border-radius:20px; padding:9px 15px; font-size:13px; font-family:inherit;
}
.chat-widget-input-wrap input:focus{ outline:none; border-color:var(--navy-600); }
.chat-widget-input-wrap button{
  width:36px; height:36px; border-radius:50%; background:var(--navy-900); color:#fff; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.chat-widget-input-wrap button:hover{ background:var(--navy-700); }
#chat-widget-cerrada-nota{
  text-align:center; font-size:11.5px; color:var(--text-muted); padding:8px; background:#f4f5fb; flex-shrink:0;
}

/* Centro de Ayuda */
.ca-conv-item{ padding:14px 16px; cursor:pointer; border-bottom:1px solid #f0f1f8; transition:background .15s; }
.ca-conv-item:hover{ background:var(--lavender-light); }
.ca-conv-item.activo{ background:#f2f0fb; }
.ca-conv-item.no-leido .chat-conv-tema{ color:var(--navy-900); }
.ca-thread-header{
  padding:14px 18px; border-bottom:1.5px solid #eceefb; display:flex; justify-content:space-between; align-items:center;
  gap:12px; flex-shrink:0;
}

.chat-estado-dot{ width:9px; height:9px; border-radius:50%; display:inline-block; margin-right:4px; flex-shrink:0; }
.chat-estado-online{ background:var(--green); }
.chat-estado-colacion{ background:var(--gold); }
.chat-estado-offline{ background:#b0b3cc; }
.chat-avatar{
  width:30px; height:30px; border-radius:50%; object-fit:cover; flex-shrink:0; background:var(--navy-700);
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:12px;
}
