:root {
  --support-primary: #696cff;
  --support-primary-rgb: 105, 108, 255;
  --support-page-bg: #f5f5f9;
  --support-text: #697a8d;
  --support-heading: #566a7f;
}

html, body, #app { min-height: 100%; }
body { background: var(--support-page-bg); }

.support-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--support-primary-rgb), .12);
  color: var(--support-primary);
  font-size: 1.35rem;
}

.support-brand-text {
  font-size: 1.4rem;
  letter-spacing: -.35px;
  color: #566a7f;
}

.support-avatar-initial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: rgba(var(--support-primary-rgb), .12);
  color: var(--support-primary);
}

.support-avatar-initial.sm { width: 36px; height: 36px; font-size: .875rem; }
.support-avatar-initial.lg { width: 48px; height: 48px; font-size: 1.05rem; }

.support-page-title { color: #566a7f; font-weight: 600; }
.support-muted { color: #a1acb8; }

.layout-menu .menu-inner > .menu-item.active > .menu-link {
  color: #696cff;
  background: rgba(105,108,255,.16) !important;
}
.layout-menu .menu-inner > .menu-item.active:before { background: #696cff; }

.support-navbar-search { max-width: 520px; width: 100%; }
.support-navbar-search .form-control { background: transparent; }

.support-stat-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  background: rgba(var(--support-primary-rgb), .12);
  color: var(--support-primary);
  font-size: 1.35rem;
}
.support-stat-icon.success { background: rgba(113,221,55,.14); color: #71dd37; }
.support-stat-icon.info { background: rgba(3,195,236,.14); color: #03c3ec; }
.support-stat-icon.warning { background: rgba(255,171,0,.14); color: #ffab00; }

.support-card-link { transition: transform .15s ease, box-shadow .15s ease; }
.support-card-link:hover { transform: translateY(-2px); box-shadow: 0 .35rem 1.25rem rgba(67,89,113,.14) !important; }

.support-inbox-shell {
  height: calc(100vh - 190px);
  min-height: 570px;
  overflow: hidden;
}
.support-conversations { min-width: 0; height: 100%; border-right: 1px solid #d9dee3; }
.support-conversation-list { overflow-y: auto; min-height: 0; }
.support-conversation-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f0f2f4;
  background: #fff;
  text-align: left;
  padding: .85rem 1rem;
  transition: background .15s ease;
}
.support-conversation-row:hover { background: #f8f8fb; }
.support-conversation-row.active { background: rgba(var(--support-primary-rgb), .08); }
.support-conversation-row .conversation-preview { color: #8592a3; font-size: .78rem; }
.support-conversation-row .project-label { font-size: .72rem; font-weight: 600; }

.support-chat-panel { min-width: 0; height: 100%; background: #f7f7fb; }
.support-chat-header { min-height: 70px; background: #fff; border-bottom: 1px solid #d9dee3; }
.support-chat-messages {
  min-height: 0;
  overflow-y: auto;
  background-color: #f7f7fb;
  background-image: radial-gradient(rgba(105,108,255,.07) 1px, transparent 1px);
  background-size: 20px 20px;
}
.support-chat-composer { background: #fff; border-top: 1px solid #d9dee3; }
.support-chat-composer textarea { resize: none; max-height: 120px; }

.support-message-row { display: flex; margin-bottom: .55rem; }
.support-message-row.mine { justify-content: flex-end; }
.support-message-row.theirs { justify-content: flex-start; }
.support-message-bubble {
  max-width: 80%;
  border-radius: .5rem;
  padding: .65rem .8rem;
  box-shadow: 0 .125rem .25rem rgba(67,89,113,.08);
  background: #fff;
  color: #566a7f;
}
.support-message-row.mine .support-message-bubble {
  background: #696cff;
  color: #fff;
}
.support-message-row.mine .support-message-meta { color: rgba(255,255,255,.75); }
.support-message-meta { margin-top: .35rem; color: #a1acb8; font-size: .68rem; display: flex; gap: .3rem; justify-content: flex-end; }
.support-message-agent { font-size: .7rem; color: #696cff; font-weight: 600; margin-bottom: .2rem; }
.support-message-row.mine .support-message-agent { color: rgba(255,255,255,.8); }
.support-bot-option {
  display: block;
  width: 100%;
  margin-top: .45rem;
  text-align: left;
  border: 1px solid rgba(105,108,255,.35);
  border-radius: .375rem;
  padding: .5rem .65rem;
  background: #fff;
  color: #696cff;
  font-size: .78rem;
  font-weight: 500;
}
.support-bot-option:hover { background: rgba(var(--support-primary-rgb), .06); }

.support-project-code {
  border: 1px solid #d9dee3;
  background: #f5f5f9;
  border-radius: .375rem;
  padding: .8rem;
  overflow-wrap: anywhere;
  color: #697a8d;
  font-size: .78rem;
}

.support-chatbot-step { border-left: 3px solid #696cff; }
.support-option-row { border: 1px solid #e7e7ef; border-radius: .5rem; padding: .8rem; }

.support-widget-page {
  min-height: 100vh;
  background: #f5f5f9;
}
.support-widget-shell {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.support-widget-shell.full {
  max-width: 1100px;
  height: calc(100vh - 3rem);
  margin: 1.5rem auto;
  border-radius: .625rem;
  box-shadow: 0 .125rem .375rem rgba(67,89,113,.12);
}
.support-widget-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  color: #fff;
  background: #696cff;
}
.support-widget-header .support-avatar-initial { background: rgba(255,255,255,.2); color: #fff; }
.support-widget-prechat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: #f5f5f9;
}
.support-widget-prechat .card { width: 100%; max-width: 480px; }
.support-widget-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.support-widget-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f7f7fb;
  background-image: radial-gradient(rgba(105,108,255,.07) 1px, transparent 1px);
  background-size: 20px 20px;
}
.support-widget-composer { padding: .75rem; border-top: 1px solid #d9dee3; background: #fff; }

.support-phone-grid { display: grid; grid-template-columns: minmax(150px, 42%) 1fr; gap: .5rem; }

.support-preview-frame {
  width: 100%;
  min-height: 640px;
  border: 1px solid #d9dee3;
  border-radius: .625rem;
  background: #fff;
}

.support-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(67,89,113,.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.support-modal-card { width: 100%; max-width: 560px; }

.support-mobile-overlay { display: none; }

@media (max-width: 1199.98px) {
  .support-mobile-open .layout-menu {
    transform: translate3d(0,0,0) !important;
    visibility: visible !important;
  }
  .support-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(67,89,113,.5);
  }
  .support-mobile-open .support-mobile-overlay { display: block; }
}

@media (max-width: 767.98px) {
  .support-inbox-shell { height: calc(100vh - 155px); min-height: 520px; }
  .support-inbox-grid { display: block !important; }
  .support-conversations { width: 100%; border-right: 0; }
  .support-inbox-grid.has-selection .support-conversations { display: none; }
  .support-chat-panel { display: none !important; }
  .support-inbox-grid.has-selection .support-chat-panel { display: flex !important; }
  .support-message-bubble { max-width: 88%; }
  .support-widget-shell.full { height: 100vh; margin: 0; border-radius: 0; box-shadow: none; }
  .support-phone-grid { grid-template-columns: 1fr; }
  .support-preview-frame { min-height: 560px; }
}

/* Panel v3 */
.support-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: .375rem;
  color: #697a8d;
}
.support-sidebar-toggle:hover { background: rgba(67,89,113,.06) !important; color: #696cff; }

@media (min-width: 1200px) {
  html.layout-menu-collapsed .layout-page { padding-left: 5.25rem !important; }
  html.layout-menu-collapsed .layout-menu { width: 5.25rem !important; }
  html.layout-menu-collapsed .layout-menu:not(:hover) .support-brand-text,
  html.layout-menu-collapsed .layout-menu:not(:hover) .menu-link > div,
  html.layout-menu-collapsed .layout-menu:not(:hover) .menu-header-text { opacity: 0; width: 0; overflow: hidden; white-space: nowrap; }
  html.layout-menu-collapsed .layout-menu:not(:hover) .menu-header { padding-left: 0; padding-right: 0; text-align: center; }
  html.layout-menu-collapsed .layout-menu:not(:hover) .menu-link { justify-content: center; }
  html.layout-menu-collapsed .layout-menu:not(:hover) .menu-icon { margin-right: 0 !important; }
  html.layout-menu-collapsed .layout-menu:hover { width: 16.25rem !important; box-shadow: 0 .25rem 1rem rgba(67,89,113,.12); }
}

.support-mini-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 1rem;
  align-items: end;
}
.support-chart-column { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .45rem; }
.support-chart-bar-wrap { width: 100%; max-width: 38px; height: 155px; display: flex; align-items: flex-end; justify-content: center; border-radius: .35rem; background: rgba(105,108,255,.06); overflow: hidden; }
.support-chart-bar { width: 100%; min-height: 5px; border-radius: .35rem .35rem 0 0; background: #696cff; transition: height .25s ease; }
.support-chart-value { font-size: .75rem; color: #8592a3; font-weight: 600; }

.support-pre-line { white-space: pre-line; }
.support-quick-reply-card { border-left: 3px solid #696cff; }

.support-calendar-card { overflow: hidden; }
.support-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.support-calendar-weekdays { border-top: 1px solid #e7e7ef; border-bottom: 1px solid #e7e7ef; background: #f8f8fb; }
.support-calendar-weekday { padding: .7rem .5rem; text-align: center; font-size: .75rem; font-weight: 600; color: #8592a3; text-transform: uppercase; }
.support-calendar-day { min-height: 130px; padding: .5rem; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; background: #fff; overflow: hidden; }
.support-calendar-day:nth-child(7n) { border-right: 0; }
.support-calendar-day.outside { background: #fafafa; color: #b4bdc6; }
.support-calendar-day.today { background: rgba(105,108,255,.035); box-shadow: inset 0 0 0 1px rgba(105,108,255,.28); }
.support-calendar-day-number { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; font-size: .82rem; margin-bottom: .25rem; }
.support-calendar-day.today .support-calendar-day-number { background: #696cff; color: #fff; }
.support-calendar-event { width: 100%; border: 0; background: transparent; color: #566a7f; display: flex; align-items: center; gap: .35rem; padding: .18rem .2rem; margin-bottom: .12rem; text-align: left; font-size: .72rem; border-radius: .25rem; }
.support-calendar-event:hover { background: rgba(67,89,113,.06); }
.support-calendar-event-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--event-color, #696cff); }

.min-w-0 { min-width: 0; }

@media (max-width: 767.98px) {
  .support-mini-chart { gap: .35rem; }
  .support-chart-bar-wrap { max-width: 24px; }
  .support-calendar-card { overflow-x: auto; }
  .support-calendar-weekdays, .support-calendar-days { min-width: 760px; }
  .support-calendar-day { min-height: 110px; }
}

/* =========================================================
   FIX MENU LATERAL - ocultar completamente en escritorio
   Evita el estado intermedio de Sneat donde el menu se
   expande al pasar el mouse pero mantiene los textos ocultos.
   ========================================================= */
@media (min-width: 1200px) {
  html.layout-menu-collapsed .layout-page {
    padding-left: 0 !important;
  }

  html.layout-menu-collapsed .layout-menu,
  html.layout-menu-collapsed .layout-menu:hover {
    width: 16.25rem !important;
    transform: translate3d(-100%, 0, 0) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    box-shadow: none !important;
  }

  /* No convertir el menu oculto en una barra angosta de iconos. */
  html.layout-menu-collapsed .layout-menu .support-brand-text,
  html.layout-menu-collapsed .layout-menu .menu-link > div,
  html.layout-menu-collapsed .layout-menu .menu-header-text {
    opacity: 1 !important;
    width: auto !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  html.layout-menu-collapsed .layout-menu .menu-link {
    justify-content: flex-start !important;
  }

  html.layout-menu-collapsed .layout-menu .menu-icon {
    margin-right: 1rem !important;
  }

  /* Cuando el menu esta visible mantiene el ancho y alineacion Sneat. */
  html:not(.layout-menu-collapsed) .layout-menu {
    width: 16.25rem !important;
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
  }

  html:not(.layout-menu-collapsed) .layout-menu .menu-link > div,
  html:not(.layout-menu-collapsed) .layout-menu .support-brand-text,
  html:not(.layout-menu-collapsed) .layout-menu .menu-header-text {
    opacity: 1 !important;
    width: auto !important;
    overflow: visible !important;
  }

  .layout-menu,
  .layout-page {
    transition: transform .25s ease, padding-left .25s ease !important;
  }
}


/* Indicadores de mensajes nuevos / no leídos */
.support-unread-badge,
.support-menu-unread-badge {
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 .35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffab00;
  color: #fff;
  font-size: .72rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 .125rem .25rem rgba(255,171,0,.25);
}

.support-unread-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  font-size: .68rem;
}

.support-menu-unread-badge {
  margin-left: auto;
}

.support-conversation-row:has(.support-unread-badge) .conversation-preview {
  color: #566a7f;
  font-weight: 500;
}

/* ===== Soporte V4: notificaciones, carpetas, adjuntos, calendario y campañas ===== */
.support-navbar-badge{position:absolute;top:-7px;right:-8px;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:#ffab00;color:#fff;font-size:10px;line-height:19px;text-align:center;font-weight:700;box-shadow:0 0 0 2px #fff}
.support-notification-menu{width:min(390px,calc(100vw - 30px));margin-top:.65rem!important;border:0!important;box-shadow:0 .75rem 2rem rgba(67,89,113,.2)!important;border-radius:.6rem!important;overflow:hidden}
.support-notification-list{max-height:430px;overflow:auto}.support-notification-item{width:100%;display:flex;gap:.75rem;align-items:flex-start;padding:.85rem 1rem;border:0;border-bottom:1px solid #f0f1f4;background:#fff}.support-notification-item:hover{background:#f7f7ff}.support-notification-item.is-unread{background:#f4f4ff}.support-notification-icon{width:38px;height:38px;border-radius:50%;background:#e7e7ff;color:#696cff;display:inline-flex;align-items:center;justify-content:center;font-size:1.2rem;flex:0 0 auto}.support-notification-time{font-size:.7rem;color:#a1acb8;margin-top:.2rem}.support-notification-dot{width:8px;height:8px;border-radius:50%;background:#696cff;flex:0 0 auto;margin-top:.45rem}
.support-folder-chip{display:inline-flex;align-items:center;gap:3px;max-width:130px;font-size:10px;line-height:1;padding:3px 6px;border-radius:999px;background:color-mix(in srgb,var(--folder-color,#696cff) 12%,white);color:var(--folder-color,#696cff);vertical-align:middle}.support-header-select{width:auto;max-width:145px}.support-file-strip{display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.2rem}.support-file-pill{display:flex;align-items:center;gap:.4rem;max-width:260px;background:#f5f5f9;border:1px solid #e8e8ee;border-radius:.5rem;padding:.4rem .55rem;font-size:.76rem}.support-file-pill>span{max-width:130px}.support-file-pill small{color:#a1acb8;white-space:nowrap}.support-file-pill button{border:0;background:transparent;padding:0;color:#8592a3;font-size:1rem}
.support-system-row{display:flex;justify-content:space-between;gap:1rem;padding:.62rem 0;border-bottom:1px dashed #e7e7e9}.support-system-row:last-child{border-bottom:0}.support-system-row span{color:#8592a3}.support-system-row strong{text-align:right;color:#566a7f;font-weight:600;word-break:break-word}
.support-datetime-picker{position:relative}.support-datetime-trigger{display:flex!important;align-items:center;justify-content:space-between;text-align:left;cursor:pointer;background:#fff}.support-datetime-popover{position:absolute;z-index:1085;top:calc(100% + 7px);left:0;width:330px;max-width:calc(100vw - 50px);padding:.9rem;background:#fff;border:1px solid #e7e7e9;border-radius:.65rem;box-shadow:0 .75rem 2rem rgba(67,89,113,.18)}.support-datetime-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.65rem}.support-datetime-weekdays,.support-datetime-days{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.support-datetime-weekdays span{text-align:center;font-size:.7rem;color:#a1acb8;padding:.25rem 0}.support-datetime-days button{border:0;background:transparent;border-radius:50%;aspect-ratio:1/1;color:#566a7f;font-size:.78rem}.support-datetime-days button:hover{background:#f1f1ff;color:#696cff}.support-datetime-days button.outside{color:#c2c7d0}.support-datetime-days button.today{box-shadow:inset 0 0 0 1px #696cff}.support-datetime-days button.selected{background:#696cff;color:#fff;box-shadow:0 .2rem .5rem rgba(105,108,255,.35)}.support-datetime-time{display:flex;align-items:center;justify-content:center;gap:.4rem;padding:.8rem 0;margin-top:.6rem;border-top:1px solid #eee}.support-datetime-time .form-select{width:75px}.support-datetime-actions{display:flex;gap:.45rem;border-top:1px solid #eee;padding-top:.75rem}.support-calendar-modal{overflow:visible}.support-calendar-modal .card-body{overflow:visible}
.support-scope-options{display:grid;grid-template-columns:repeat(3,1fr);gap:.55rem}.support-scope-option{position:relative;cursor:pointer}.support-scope-option>input{position:absolute;opacity:0}.support-scope-option>span{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.2rem;padding:.8rem .45rem;border:1px solid #d9dee3;border-radius:.55rem;min-height:96px}.support-scope-option i{font-size:1.4rem;color:#696cff}.support-scope-option small{font-size:.68rem;color:#8592a3;line-height:1.25}.support-scope-option>input:checked+span{border-color:#696cff;background:#f3f3ff;box-shadow:0 0 0 1px #696cff}.support-contact-picker{max-height:280px;overflow:auto;border:1px solid #d9dee3;border-radius:.55rem}.support-contact-check{display:flex;align-items:flex-start;gap:.65rem;padding:.65rem .75rem;border-bottom:1px solid #eee;cursor:pointer}.support-contact-check:last-child{border-bottom:0}.support-contact-check:hover{background:#f8f8fb}.support-contact-check span{display:flex;flex-direction:column;min-width:0}.support-contact-check small{color:#8592a3;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:767.98px){.support-header-select{max-width:115px}.support-datetime-popover{position:fixed;left:15px;right:15px;top:50%;transform:translateY(-50%);width:auto}.support-scope-options{grid-template-columns:1fr}.support-notification-menu{position:fixed!important;top:70px!important;left:15px!important;right:15px!important;width:auto!important;transform:none!important}}
