:root {
  color-scheme: only light;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
}

/* =========================
   CLIENTE - MOBILE
========================= */

/* =========================
   CLIENTE - ESTILO WHATSAPP
========================= */

.cliente-body {
  background: #efeae2;
  color: #111b21;

  overflow: hidden;
}

/* =========================
   CONTENEDOR
========================= */

.cliente-chat {
  width: 100%;
  height: 100dvh;

  display: flex;
  flex-direction: column;

  background: #efeae2;
}

/* =========================
   HEADER
========================= */
.cliente-header {
  min-height: 64px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px 12px;

  background: #ffffff;
  color: #111b21;

  border-bottom: 1px solid #e9edef;

  z-index: 10;
}

.cliente-back-button {
  width: 32px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 0;
  margin: 0;

  border: none;
  background: transparent;

  color: #111b21;

  font-size: 38px;
  font-family: Arial, sans-serif;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
}
.cliente-menu-button {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 0;

  border: none;
  background: transparent;

  color: #111b21;

  cursor: pointer;
}

.cliente-back-button {
  font-size: 32px;
  font-weight: 300;
}

.cliente-menu-button {
  margin-left: auto;

  font-size: 28px;
  font-weight: 700;
}

.cliente-avatar {
  width: 40px;
  height: 40px;

  flex: 0 0 40px;

  padding: 0;

  border-radius: 50%;
  overflow: hidden;

  background: #d9fdd3;
  position: relative;
  overflow: visible;
}

.cliente-avatar img {
  width: 100%;
  height: 100%;

  border-radius: 50%;
  object-fit: cover;

  display: block;
}
.cliente-avatar::after {
  content: "";

  position: absolute;

  width: 12px;
  height: 12px;

  right: -3px;
  bottom: 2px;

  background-color: #25d366;
  border: 2px solid white;
  border-radius: 50%;

  box-sizing: border-box;
  z-index: 10;
}
.cliente-header-info {
  min-width: 0;
  flex: 1;
}

.cliente-header h1 {
  margin: 0;

  color: #111b21;

  font-size: 17px;
  font-weight: 600;
}

.cliente-header p {
  margin-top: 2px;

  color: #667781;

  font-size: 12px;
}

/* =========================
   ÁREA DE MENSAJES
========================= */
/* 
.cliente-messages {
  flex: 1;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 12px 10px 18px;

  background-color: #efeae2;

  background-image:
    linear-gradient(rgba(239, 234, 226, 0.78), rgba(239, 234, 226, 0.6)),
    url("./images/chat-pattern.png");

  background-repeat: repeat, repeat;

  background-size:
    auto,
    400px auto;

  background-position:
    top left,
    top left;
} */

.cliente-messages {
  flex: 1;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 12px 10px 18px;

  background-color: #efeae2;
  background-image: url("./images/chat-pattern.png");
  background-repeat: repeat;
  background-size: 400px auto;
  background-position: top left;
}
/* .cliente-messages > * {
  position: relative;
  z-index: 1;
} */

/* =========================
   BURBUJAS
========================= */

.cliente-body .message {
  position: relative;

  width: fit-content;
  max-width: 82%;

  margin-bottom: 4px;

  padding: 7px 9px 8px;

  border-radius: 8px;

  color: #111b21;

  font-size: 16px;
  line-height: 1.35;

  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;

  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

/* OPERADOR -> CLIENTE */

.cliente-body .message.received {
  margin-right: auto;

  background: #ffffff;
  color: #111b21;

  border-top-left-radius: 2px;
}

/* CLIENTE -> OPERADOR */

.cliente-body .message.sent {
  margin-left: auto;

  background: #d9fdd3;
  color: #111b21;

  border-top-right-radius: 2px;
}

/* =========================
   FORMULARIO
========================= */

.cliente-form {
  display: flex;
  align-items: center;

  gap: 7px;

  padding: 7px 8px;

  background: #f0f2f5;

  border-top: none;
}

/* INPUT */

.cliente-form {
  display: flex;
  align-items: center;

  gap: 8px;

  padding: 7px 8px 9px;

  background: #efeae2;

  border: none;
}

.cliente-form #message-input {
  flex: 1;

  min-width: 0;
  height: 46px;

  padding: 0 17px;

  border: none;
  border-radius: 24px;

  background: #ffffff;
  color: #111b21;

  font-size: 16px;

  outline: none;
}

.cliente-form #message-input::placeholder {
  color: #667781;
}

.cliente-form #image-button {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 0;

  border: none;
  border-radius: 50%;

  background: #ffffff;
  color: #54656f;

  font-size: 23px;

  cursor: pointer;
}

.cliente-form .cliente-send-button {
  width: 46px;
  height: 46px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 0;

  border: none;
  border-radius: 50%;

  background: #00a884;
  color: #ffffff;

  font-size: 21px;

  cursor: pointer;
}
/* =========================
   OPERADOR - DESKTOP
========================= */

.operador-body {
  background: #111315;
  color: #f1f1f1;

  height: 100vh;
  overflow: hidden;
}

.operador-panel {
  width: 100%;
  height: 100vh;

  display: flex;

  background: white;
}

.operador-sidebar {
  width: 320px;
  min-width: 320px;

  border-right: 1px solid #ddd;

  background: #f7f7f7;
}

.operador-sidebar h2 {
  padding: 20px;

  font-size: 20px;

  border-bottom: 1px solid #ddd;
}

.conversation {
  padding: 18px 20px;

  cursor: pointer;

  border-bottom: 1px solid #e5e5e5;
}

.conversation.active {
  background: #eaeaea;
}

.operador-chat {
  flex: 1;

  display: flex;
  flex-direction: column;

  min-width: 0;
}

.operador-header {
  height: 75px;

  padding: 15px 20px;

  border-bottom: 1px solid #ddd;

  background: white;
}

.operador-header h2 {
  font-size: 18px;
}

.operador-header p {
  margin-top: 5px;

  font-size: 13px;
  color: #777;
}

.operador-messages {
  flex: 1;

  padding: 20px;

  overflow-y: auto;

  background: #f2f2f2;
}

.operador-form {
  display: flex;

  position: relative;

  gap: 10px;

  padding: 15px;

  border-top: 1px solid #ddd;

  background: white;
}

.operador-form input {
  flex: 1;

  padding: 12px 15px;

  border: 1px solid #ccc;
  border-radius: 8px;

  outline: none;
}

.operador-form button {
  padding: 0 20px;

  border: none;
  border-radius: 8px;

  background: #222;
  color: white;

  cursor: pointer;
}
.conversation-top {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 10px;
}

.conversation-top strong {
  font-size: 14px;
}

.conversation-top span {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.conversation-preview {
  margin-top: 6px;

  font-size: 13px;
  color: #777;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}

.conversation-preview {
  flex: 1;
  min-width: 0;
}

.unread-badge {
  min-width: 21px;
  height: 21px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 6px;

  border-radius: 50px;

  background: #25d366;
  color: white;

  font-size: 11px;
  font-weight: bold;

  flex-shrink: 0;
}
.conversation-status {
  margin-top: 4px;
}

.online-status {
  display: flex;
  align-items: center;
  gap: 5px;

  font-size: 11px;
  color: #25d366;
}

.online-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #25d366;
}

.offline-status {
  font-size: 11px;
  color: #999;
}
.empty-chat {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  text-align: center;

  color: #777;
}

.empty-chat h3 {
  margin-bottom: 8px;

  font-size: 20px;
  color: #444;
}

.empty-chat p {
  font-size: 14px;
  color: #999;
}
.editar-contacto-btn {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-left: auto;

  border: none;
  border-radius: 50%;

  background: transparent;
  color: #555;

  font-size: 22px;

  cursor: pointer;

  transition:
    background 0.2s,
    color 0.2s;
}

.editar-contacto-btn:hover {
  background: #eeeeee;
  color: #111;
}
.contact-status.online {
  color: #25d366;
}

.contact-status.offline {
  color: #999;
}
.image-message {
  padding: 5px;
  overflow: hidden;
}

.image-message img {
  display: block;

  width: 100%;
  max-width: 280px;
  max-height: 350px;

  object-fit: cover;

  border-radius: 10px;
}
.image-message img {
  cursor: pointer;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background: rgba(0, 0, 0, 0.9);
}

.image-viewer.active {
  display: flex;
}

.image-viewer img {
  max-width: 95%;
  max-height: 90vh;

  object-fit: contain;

  border-radius: 8px;
}

.image-viewer-close {
  position: absolute;
  top: 20px;
  right: 25px;

  width: 45px;
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.15);
  color: white;

  font-size: 32px;
  line-height: 1;

  cursor: pointer;
}

.image-viewer-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.capture-editor {
  position: fixed;
  inset: 0;

  z-index: 10000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 25px;

  background: rgba(0, 0, 0, 0.85);
}

.capture-editor.active {
  display: flex;
}

.capture-editor-content {
  width: 100%;
  max-width: 1100px;
  max-height: 95vh;

  display: flex;
  flex-direction: column;

  background: #fff;

  border-radius: 12px;
  overflow: hidden;
}

.capture-editor-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 12px;

  border-bottom: 1px solid #ddd;
}

.capture-editor-toolbar button {
  padding: 9px 14px;

  border: none;
  border-radius: 7px;

  cursor: pointer;
}

#capture-send {
  background: #25d366;
  color: white;
}

.capture-canvas-container {
  flex: 1;

  overflow: auto;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: #222;
}

#capture-canvas {
  display: block;

  max-width: 100%;
  max-height: 75vh;

  cursor: crosshair;
}
.reply-preview {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 8px 10px;

  border-left: 3px solid #25d366;

  background: #f3f3f3;

  border-radius: 8px;
}

.reply-preview-content {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

#reply-preview-label {
  font-size: 11px;
  font-weight: 600;
  color: #25d366;
}

#reply-preview-text {
  margin-top: 2px;
  max-width: 100px;
  font-size: 12px;
  color: #555;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-preview-close {
  border: none;
  background: transparent;

  font-size: 20px;

  cursor: pointer;

  color: #777;
}

/* .message {
  position: relative;
  padding-right: 38px;
} */

.reply-message-btn {
  position: absolute;
  top: 50%;
  right: 6px;

  transform: translateY(-50%);

  display: none;

  width: 24px;
  height: 24px;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.85);

  cursor: pointer;
}

.message:hover .reply-message-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}
.quoted-message {
  min-width: 180px;
  max-width: 320px;

  margin-bottom: 7px;
  padding: 8px 10px;

  border-left: 3px solid #25d366;
  border-radius: 5px;

  background: rgba(255, 255, 255, 0.1);

  font-size: 12px;
  line-height: 1.35;
  color: #d6d6d6;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message:has(.quoted-message) {
  min-width: 200px;
}
.quoted-message-author {
  margin-bottom: 3px;

  font-size: 12px;
  font-weight: 600;

  color: #25d366;
}

.quoted-message-content {
  font-size: 12px;
  line-height: 1.35;

  color: #d6d6d6;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message.received .quoted-message {
  background: #e9e9e9;
  border-left: 3px solid #25d366;
}

.message.received .quoted-message-content {
  color: #555;
}

.message.received .quoted-message-author {
  color: #20b858;
}
.contact-modal {
  position: fixed;
  inset: 0;

  z-index: 12000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.5);
}

.contact-modal.active {
  display: flex;
}

.contact-modal-content {
  width: 100%;
  max-width: 420px;

  background: white;

  border-radius: 12px;
  overflow: hidden;

  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 20px;

  border-bottom: 1px solid #e5e5e5;
}

.contact-modal-header h3 {
  font-size: 18px;
}

#contact-modal-close {
  width: 32px;
  height: 32px;

  border: none;
  border-radius: 50%;

  background: transparent;

  font-size: 24px;
  color: #666;

  cursor: pointer;
}

#contact-modal-close:hover {
  background: #f0f0f0;
}

.contact-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 20px;
}

.contact-modal-body label {
  font-size: 13px;
  font-weight: 600;

  color: #555;
}

.contact-modal-body input {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid #ccc;
  border-radius: 8px;

  font-size: 15px;

  outline: none;
}

.contact-modal-body input:focus {
  border-color: #25d366;
}

.contact-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 15px 20px;

  border-top: 1px solid #e5e5e5;
}

.contact-modal-actions button {
  padding: 9px 16px;

  border: none;
  border-radius: 7px;

  cursor: pointer;
}

.contact-modal-cancel {
  background: #eeeeee;
  color: #444;
}

.contact-modal-save {
  background: #25d366;
  color: white;
}
.message a {
  color: #1a73e8;
  text-decoration: underline;
  word-break: break-word;
}

.message a:hover {
  opacity: 0.8;
}
.link-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.5);
}

.link-modal.active {
  display: flex;
}

.link-modal-content {
  width: 100%;
  max-width: 440px;

  background: white;
  border-radius: 12px;
  overflow: hidden;

  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

.link-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.link-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

#link-modal-close {
  width: 32px;
  height: 32px;

  border: none;
  border-radius: 50%;

  background: transparent;

  font-size: 24px;
  color: #666;

  cursor: pointer;
}

#link-modal-close:hover {
  background: #f0f0f0;
}

.link-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 20px;
}

.link-modal-body label {
  margin-top: 5px;

  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.link-modal-body input {
  width: 100%;

  padding: 11px 13px;

  border: 1px solid #ccc;
  border-radius: 8px;

  font-size: 14px;
  outline: none;
}

.link-modal-body input:focus {
  border-color: #25d366;
}

.link-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 15px 20px;

  border-top: 1px solid #e5e5e5;
}

.link-modal-actions button {
  padding: 9px 16px;

  border: none;
  border-radius: 7px;

  cursor: pointer;
}

.link-modal-cancel {
  background: #eee;
  color: #444;
}

.link-modal-send {
  background: #25d366;
  color: white;
}
.link-message {
  padding: 8px;
  min-width: 280px;
  max-width: 340px;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
  padding: 18px 16px 14px;

  text-align: center;
  box-sizing: border-box;
}

.link-card-title {
  width: 100%;
  margin-bottom: 8px;

  font-size: 16px;
  font-weight: 700;
  text-align: center;

  color: #ffffff;
}

.link-card-description {
  width: 100%;
  margin-bottom: 14px;

  font-size: 13px;
  line-height: 1.4;
  text-align: center;

  color: #ffffff;
  opacity: 0.8;
}

.link-card-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;

  margin-top: 4px;
  padding: 11px 16px;

  box-sizing: border-box;

  border-radius: 8px;

  background: #25d366;

  color: #ffffff;
  text-decoration: none;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.link-card-button:visited {
  color: #ffffff;
}

.link-card-button:hover {
  color: #ffffff;
  text-decoration: none;
  background: #20bd5a;
  transform: translateY(-1px);
}

.link-card-button:active {
  transform: translateY(0);
}
.message .link-card .link-card-button,
.message .link-card .link-card-button:link,
.message .link-card .link-card-button:visited {
  color: #ffffff !important;
  text-decoration: none !important;
}

.message .link-card .link-card-button:hover {
  color: #ffffff !important;
  text-decoration: none !important;
  background: #20bd5a;
}

.message .link-card .link-card-button:active {
  color: #ffffff !important;
  text-decoration: none !important;
}
/* =========================
   SIDEBAR TABS
========================= */

.sidebar-tabs {
  display: flex;

  padding: 10px;
  gap: 6px;

  border-bottom: 1px solid #ddd;
  background: #f7f7f7;
}

.sidebar-tab {
  flex: 1;

  padding: 10px;

  border: none;
  border-radius: 8px;

  background: transparent;

  font-size: 13px;
  font-weight: 600;
  color: #777;

  cursor: pointer;
}

.sidebar-tab:hover {
  background: #eeeeee;
}

.sidebar-tab.active {
  background: #222;
  color: white;
}

/* =========================
   ATAJOS
========================= */

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 15px;

  border-bottom: 1px solid #ddd;
}

.shortcuts-header h3 {
  font-size: 16px;
}

#nuevo-atajo-btn {
  border: none;
  border-radius: 7px;

  padding: 8px 11px;

  background: #25d366;
  color: white;

  font-size: 12px;
  font-weight: 600;

  cursor: pointer;
}

#nuevo-atajo-btn:hover {
  background: #20bd5a;
}

.shortcut-item {
  padding: 14px 15px;

  border-bottom: 1px solid #e5e5e5;
}

.shortcut-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;
}

.shortcut-name {
  font-size: 14px;
  font-weight: 600;
}

.shortcut-key {
  min-width: 35px;

  padding: 4px 7px;

  border-radius: 6px;

  background: #222;
  color: white;

  font-size: 11px;
  font-weight: 700;

  text-align: center;
}

.shortcut-type {
  margin-top: 5px;

  font-size: 12px;
  color: #888;
}
.shortcuts-empty {
  padding: 30px 20px;

  font-size: 13px;
  text-align: center;
  color: #999;
}
.shortcut-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.5);
}

.shortcut-modal.active {
  display: flex;
}

.shortcut-modal-content {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;

  display: flex;
  flex-direction: column;

  background: white;

  border-radius: 12px;
  overflow: hidden;

  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

.shortcut-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 20px;

  border-bottom: 1px solid #e5e5e5;
}

.shortcut-modal-header h3 {
  font-size: 18px;
}

#shortcut-modal-close {
  width: 32px;
  height: 32px;

  border: none;
  border-radius: 50%;

  background: transparent;

  font-size: 24px;
  color: #666;

  cursor: pointer;
}

.shortcut-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 20px;

  overflow-y: auto;
}

.shortcut-modal-body label {
  margin-top: 5px;

  font-size: 13px;
  font-weight: 600;

  color: #555;
}

.shortcut-modal-body input,
.shortcut-modal-body select,
.shortcut-modal-body textarea {
  width: 100%;

  padding: 11px 13px;

  border: 1px solid #ccc;
  border-radius: 8px;

  font-size: 14px;

  outline: none;
}

.shortcut-modal-body textarea {
  min-height: 100px;
  resize: vertical;
}

.shortcut-modal-body input:focus,
.shortcut-modal-body select:focus,
.shortcut-modal-body textarea:focus {
  border-color: #25d366;
}

#shortcut-link-fields,
#shortcut-copy-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcut-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  padding: 15px 20px;

  border-top: 1px solid #e5e5e5;
}

.shortcut-modal-actions button {
  padding: 9px 16px;

  border: none;
  border-radius: 7px;

  cursor: pointer;
}

#shortcut-modal-cancel {
  background: #eee;
  color: #444;
}

#shortcut-modal-save {
  background: #25d366;
  color: white;
}
.shortcut-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shortcut-edit-btn,
.shortcut-delete-btn {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 6px;

  background: transparent;

  cursor: pointer;

  font-size: 14px;
}

.shortcut-edit-btn:hover {
  background: #eeeeee;
}

.shortcut-delete-btn:hover {
  background: #ffe7e7;
}
.emoji-picker {
  position: absolute;
  bottom: 65px;
  left: 10px;

  display: none;

  width: 280px;
  padding: 10px;

  background: #ffffff;

  border: 1px solid #ddd;
  border-radius: 12px;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);

  z-index: 1000;
}

.emoji-picker.active {
  display: block;
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.emoji-picker-grid button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  padding: 0;

  border: none;
  border-radius: 6px;

  background: transparent;

  font-size: 20px;

  cursor: pointer;
}

.emoji-picker-grid button:hover {
  background: #eeeeee;
  transform: scale(1.15);
}
/* =========================================
   MODO OSCURO - SOLO PANEL OPERADOR
========================================= */

.operador-body {
  background: #111315;
  color: #f1f1f1;
}

/* Panel completo */
.operador-body .operador-panel {
  background: #111315;
}

/* Sidebar */
.operador-body .operador-sidebar {
  background: #181a1d;
  border-color: #303338;
}

/* Tabs Conversaciones / Atajos */
.operador-body .sidebar-tabs {
  background: #181a1d;
  border-color: #303338;
}

.operador-body .sidebar-tab {
  color: #9da3aa;
}

.operador-body .sidebar-tab:hover {
  background: #25282c;
}

.operador-body .sidebar-tab.active {
  background: #2d3035;
  color: #ffffff;
}

/* Cada conversación */
.operador-body .conversation {
  background: #181a1d;
  border-color: #2b2e32;
  color: #ffffff;
}

.operador-body .conversation:hover {
  background: #202326;
}

.operador-body .conversation.active {
  background: #25282c;
}

/* Nombre */
.operador-body .conversation-name {
  color: #ffffff;
}

/* Preview del último mensaje */
.operador-body .conversation-preview {
  color: #a4a9af;
}

/* Horas */
.operador-body .conversation-time {
  color: #8d939a;
}

/* Área principal del chat */
.operador-body .operador-chat {
  background: #111315;
}

/* Área donde aparecen los mensajes */
.operador-body .operador-messages {
  background: #111315;
}

/* Header del contacto */
.operador-body .operador-header {
  background: #181a1d;
  border-color: #303338;
  color: #ffffff;
}

/* Nombre del contacto abierto */
.operador-body #contact-name {
  color: #ffffff;
}

/* Pantalla "Elegí una conversación" */
.operador-body .empty-chat {
  color: #ffffff;
}

.operador-body .empty-chat h3 {
  color: #f1f1f1;
}

.operador-body .empty-chat p {
  color: #8d939a;
}

/* Formulario inferior */
.operador-body form {
  background: #181a1d;
  border-color: #303338;
}

/* Input de mensajes */
.operador-body form input[type="text"] {
  background: #25282c;
  border-color: #393d42;

  color: #ffffff;
}

.operador-body form input[type="text"]::placeholder {
  color: #858b92;
}

.operador-body form input[type="text"]:focus {
  border-color: #25d366;
}

/* =====================
   ATAJOS
===================== */

.operador-body .shortcuts-header {
  background: #181a1d;
  border-color: #303338;
}

.operador-body .shortcuts-header h3 {
  color: #ffffff;
}

.operador-body .shortcut-item {
  background: #181a1d;
  border-color: #2b2e32;
}

.operador-body .shortcut-item:hover {
  background: #202326;
}

.operador-body .shortcut-name {
  color: #ffffff;
}

.operador-body .shortcut-type {
  color: #92989f;
}

.operador-body .shortcut-key {
  background: #303338;
  color: #ffffff;
}

/* Botones editar/eliminar */
.operador-body .shortcut-edit-btn,
.operador-body .shortcut-delete-btn {
  color: #ffffff;
}

.operador-body .shortcut-edit-btn:hover {
  background: #303338;
}

.operador-body .shortcut-delete-btn:hover {
  background: #492626;
}

/* Sin atajos */
.operador-body .shortcuts-empty {
  color: #8d939a;
}
.operador-body .message.received {
  background: #2a2d31;
  color: #f1f1f1;

  border-bottom-left-radius: 4px;
}
/* =========================================
   MODAL ATAJOS - MODO OSCURO OPERADOR
========================================= */

.operador-body .shortcut-modal-content {
  background: #1b1e21;
  color: #f1f1f1;
}

.operador-body .shortcut-modal-header {
  background: #1b1e21;
  border-bottom-color: #303338;
}

.operador-body .shortcut-modal-header h3 {
  color: #f1f1f1;
}

.operador-body #shortcut-modal-close {
  color: #aeb3b8;
}

.operador-body #shortcut-modal-close:hover {
  background: #2a2d31;
  color: #ffffff;
}

/* CUERPO */

.operador-body .shortcut-modal-body {
  background: #1b1e21;
}

.operador-body .shortcut-modal-body label {
  color: #b8bdc2;
}

/* INPUTS, SELECT Y TEXTAREA */

.operador-body .shortcut-modal-body input,
.operador-body .shortcut-modal-body select,
.operador-body .shortcut-modal-body textarea {
  background: #25282c;

  border-color: #3a3e43;

  color: #f1f1f1;
}

.operador-body .shortcut-modal-body input::placeholder,
.operador-body .shortcut-modal-body textarea::placeholder {
  color: #777d84;
}

.operador-body .shortcut-modal-body input:focus,
.operador-body .shortcut-modal-body select:focus,
.operador-body .shortcut-modal-body textarea:focus {
  border-color: #25d366;
}

/* SELECT */

.operador-body .shortcut-modal-body select {
  color-scheme: dark;
}

/* PARTE INFERIOR */

.operador-body .shortcut-modal-actions {
  background: #1b1e21;
  border-top-color: #303338;
}

/* CANCELAR */

.operador-body #shortcut-modal-cancel {
  background: #303338;
  color: #d7dade;
}

.operador-body #shortcut-modal-cancel:hover {
  background: #3a3e43;
}

/* GUARDAR */

.operador-body #shortcut-modal-save {
  background: #25d366;
  color: #ffffff;
}

.operador-body #shortcut-modal-save:hover {
  background: #20bd5a;
}
/* Tarjeta de enlace - cliente */

.cliente-body .link-card-title {
  color: #222222;
}

.cliente-body .link-card-description {
  color: #020202;
}

.cliente-body .link-card-button {
  color: #ffffff;
}
#operador-image-button {
  font-size: 24px;
}
/* =========================
   LOGIN OPERADOR
========================= */

.login-body {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: #111315;
}

.login-card {
  width: 100%;
  max-width: 380px;

  padding: 32px;

  background: #1b1e21;

  border: 1px solid #303338;
  border-radius: 16px;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);

  text-align: center;
}

.login-card h1 {
  margin-bottom: 8px;

  color: #ffffff;
}

.login-card > p {
  margin-bottom: 24px;

  color: #9da3aa;
}

.login-card form {
  display: flex;
  flex-direction: column;

  gap: 12px;
}

.login-card input {
  width: 100%;

  padding: 13px 15px;

  border: 1px solid #393d42;
  border-radius: 9px;

  background: #25282c;
  color: #ffffff;

  outline: none;

  font-size: 15px;
}

.login-card input:focus {
  border-color: #25d366;
}

.login-card button {
  padding: 13px;

  border: none;
  border-radius: 9px;

  background: #25d366;
  color: #ffffff;

  font-size: 15px;
  font-weight: 600;

  cursor: pointer;
}

.login-card button:hover {
  background: #20bd5a;
}

.login-card .login-error {
  display: none;

  margin: 15px 0 0;

  color: #ff6b6b;
}

.login-card .login-error.visible {
  display: block;
}
/* =========================================
   MENSAJES - PANEL OPERADOR
========================================= */

.operador-body .message {
  position: relative;

  width: fit-content;
  max-width: 70%;

  padding: 10px 38px 10px 13px;
  margin-bottom: 10px;

  border-radius: 14px;

  font-size: 15px;
  line-height: 1.4;

  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

/* MENSAJES DEL CLIENTE -> IZQUIERDA */

.operador-body .message.received {
  margin-left: 0;
  margin-right: auto;

  background: #2a2d31;
  color: #f1f1f1;

  border-bottom-left-radius: 4px;
}

/* MENSAJES DEL OPERADOR -> DERECHA */

.operador-body .message.sent {
  margin-left: auto;
  margin-right: 0;

  background: #005c4b;
  color: #ffffff;

  border-bottom-right-radius: 4px;
}
.operador-body .operador-sidebar {
  height: 100vh;

  display: flex;
  flex-direction: column;

  overflow: hidden;
}

.operador-body .sidebar-tabs {
  flex-shrink: 0;
}

.operador-body #seccion-conversaciones {
  flex: 1;

  min-height: 0;

  overflow: hidden;
}

.operador-body #conversation-list {
  height: 100%;

  overflow-y: auto;
  overflow-x: hidden;
}
.operador-body #conversation-list::-webkit-scrollbar {
  width: 7px;
}

.operador-body #conversation-list::-webkit-scrollbar-track {
  background: #181a1d;
}

.operador-body #conversation-list::-webkit-scrollbar-thumb {
  background: #3a3e43;
  border-radius: 10px;
}

.operador-body #conversation-list::-webkit-scrollbar-thumb:hover {
  background: #4a4f55;
}
/* =========================
   SCROLL LISTA DE ATAJOS
========================= */

.operador-body #seccion-atajos {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.operador-body #shortcuts-list {
  height: 100%;

  overflow-y: auto;
  overflow-x: hidden;
}

/* Scrollbar */
.operador-body #shortcuts-list::-webkit-scrollbar {
  width: 7px;
}

.operador-body #shortcuts-list::-webkit-scrollbar-track {
  background: #181a1d;
}

.operador-body #shortcuts-list::-webkit-scrollbar-thumb {
  background: #3a3e43;
  border-radius: 10px;
}

.operador-body #shortcuts-list::-webkit-scrollbar-thumb:hover {
  background: #4a4f55;
}
/* ========================================
   MODAL ACTIVAR NOTIFICACIONES
======================================== */

.push-permission-box {
  position: fixed;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  z-index: 10001;

  width: calc(100% - 40px);
  max-width: 420px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 18px;

  padding: 28px 24px;

  background: #ffffff;

  border-radius: 18px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);

  text-align: center;
}

/* Fondo borroso detrás */

.push-permission-box::before {
  content: "";

  position: fixed;

  inset: 0;

  z-index: -1;

  background: rgba(0, 0, 0, 0.28);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);

  width: 100vw;
  height: 100vh;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);
}

/* Título */

.push-permission-box strong {
  display: block;

  color: #111b21;

  font-size: 21px;
  font-weight: 700;

  line-height: 1.3;
}

/* Explicación */

.push-permission-box p {
  margin: 8px 0 0;

  color: #54656f;

  font-size: 16px;
  line-height: 1.5;
}

/* Botón */

.push-permission-box button {
  width: 100%;

  padding: 14px 20px;

  border: none;
  border-radius: 10px;

  background: #00a884;
  color: #ffffff;

  font-size: 16px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.push-permission-box button:hover {
  background: #008f72;
}

.push-permission-box button:active {
  transform: scale(0.98);
}
.push-status {
  display: block;
  margin-top: 3px;

  font-size: 11px;
  line-height: 1.2;
}

.push-enabled {
  color: #25d366;
}

.push-disabled {
  color: #8d939a;
}
.push-icon {
  display: inline-block;
  font-size: 20px !important;
  line-height: 1;
}
.copy-card {
  min-width: 230px;
  max-width: 320px;

  padding: 16px;

  display: flex;
  flex-direction: column;
  gap: 8px;

  text-align: center;
}

.copy-card-title {
  font-size: 15px;
  font-weight: 700;
}

.copy-card-description {
  font-size: 15px;
  /* opacity: 0.8; */
}

.copy-card-value {
  padding: 8px 10px;

  background: rgba(255, 255, 255, 0.08);

  border-radius: 8px;

  font-size: 13px;
  word-break: break-all;
}

.copy-card-button {
  width: 100%;

  margin-top: 5px;

  padding: 10px 14px;

  border: none;
  border-radius: 8px;

  background: #25d366;
  color: #ffffff;

  font-weight: 600;

  cursor: pointer;
}

.copy-card-button:hover {
  background: #20bd5a;
}
.cliente-avatar img {
  cursor: pointer;
}

.avatar-viewer {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.96);

  z-index: 9999;
}

.avatar-viewer.active {
  display: flex;
}

.avatar-viewer img {
  width: 100%;
  max-width: 600px;
  max-height: 80vh;

  object-fit: contain;
}

.avatar-viewer-close {
  position: absolute;

  top: 18px;
  left: 18px;

  width: 42px;
  height: 42px;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12);
  color: white;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;

  z-index: 10000;
}
.push-blocked-notice {
  position: fixed;

  top: 70px;
  left: 50%;

  transform: translateX(-50%);

  width: calc(100% - 30px);
  max-width: 420px;

  padding: 12px 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  background: #fff3cd;
  color: #664d03;

  border: 1px solid #ffecb5;
  border-radius: 10px;

  font-size: 13px;

  z-index: 1000;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.push-blocked-notice button {
  border: none;

  background: transparent;

  color: #664d03;

  font-weight: 700;

  cursor: pointer;
}
