/* ============================================
   CREDZAP v6.0 - STYLESHEET COMPLETO
   ============================================ */

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Cores Modo Claro */
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-chat: #efeae2;
  --bg-sidebar: #ffffff;
  --bg-config: #2c3e50;
  --bg-header: #00a884;
  --bg-input: #ffffff;
  --bg-hover: #f5f6f6;
  --bg-active: #e9edef;
  --bg-msg-sent: #d9fdd3;
  --bg-msg-received: #ffffff;
  --bg-login: linear-gradient(135deg, #00a884 0%, #075e54 50%, #128c7e 100%);

  --text-primary: #111b21;
  --text-secondary: #667781;
  --text-white: #ffffff;
  --text-light: #8696a0;

  --border-color: #e9edef;
  --border-light: #f0f2f5;

  --green-primary: #00a884;
  --green-dark: #075e54;
  --green-light: #25d366;
  --red-danger: #ea0038;
  --red-light: #fee2e2;
  --blue-link: #027eb5;
  --orange-warn: #f59e0b;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.18);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 50%;

  --transition: all 0.3s ease;
}

/* ==================== MODO ESCURO ==================== */
[data-theme="dark"] {
  --bg-primary: #0b141a;
  --bg-secondary: #1f2c33;
  --bg-chat: #0b141a;
  --bg-sidebar: #111b21;
  --bg-config: #1a2530;
  --bg-header: #1f2c33;
  --bg-input: #2a3942;
  --bg-hover: #2a3942;
  --bg-active: #2a3942;
  --bg-msg-sent: #005c4b;
  --bg-msg-received: #1f2c33;
  --bg-login: linear-gradient(135deg, #1a2530 0%, #0b141a 50%, #111b21 100%);

  --text-primary: #e9edef;
  --text-secondary: #8696a0;
  --text-white: #e9edef;
  --text-light: #667781;

  --border-color: #2a3942;
  --border-light: #1f2c33;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* ==================== TELA DE LOGIN ==================== */
#login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-login);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 50px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  width: 400px;
  max-width: 90%;
  animation: loginFadeIn 0.6s ease;
}

[data-theme="dark"] .login-container {
  background: rgba(31, 44, 51, 0.95);
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  width: 90px;
  height: 90px;
  background: var(--green-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 15px rgba(0, 168, 132, 0.4);
}

.login-logo i {
  font-size: 45px;
  color: white;
}

.login-title {
  font-size: 28px;
  color: var(--green-dark);
  margin-bottom: 5px;
  font-weight: 700;
}

[data-theme="dark"] .login-title {
  color: var(--green-primary);
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 30px;
}

.login-field {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 15px;
  margin-bottom: 15px;
  transition: var(--transition);
}

.login-field:focus-within {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

.login-field i {
  color: var(--text-secondary);
  font-size: 16px;
  margin-right: 12px;
}

.login-field input {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 0;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
}

.login-button {
  width: 100%;
  padding: 14px;
  background: var(--green-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.login-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.login-error {
  color: var(--red-danger);
  font-size: 13px;
  margin-top: 15px;
  min-height: 20px;
}

/* ==================== LAYOUT PRINCIPAL - 4 COLUNAS ==================== */
#app {
  display: grid;
  grid-template-columns: 68px 350px 1fr 380px;
  height: 100vh;
  overflow: hidden;
}

#app.panel-closed {
  grid-template-columns: 68px 350px 1fr 0px;
}

/* ==================== COLUNA 1 - MENU CONFIG ==================== */
#config-panel {
  overflow: visible !important;
  background: var(--bg-config);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 0;
  border-right: 1px solid rgba(255,255,255,0.1);
  overflow-y: auto;
}

.config-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
  width: 100%;
}

.config-user-avatar {
  width: 42px;
  height: 42px;
  background: var(--green-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.config-user-avatar i {
  color: white;
  font-size: 20px;
}

.config-user-name {
  color: rgba(255,255,255,0.7);
  font-size: 10px;
  text-align: center;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 2px;
}

.config-btn {
  width: 54px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
  gap: 3px;
}

.config-btn i {
  font-size: 18px;
}

.config-btn span {
  font-size: 8px;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-btn:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.config-btn.active {
  background: rgba(0, 168, 132, 0.3);
  color: var(--green-light);
}

.config-divider {
  width: 36px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 8px 0;
}

.config-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
  width: 100%;
}

.logout-btn:hover {
  color: var(--red-danger) !important;
  background: rgba(234, 0, 56, 0.15) !important;
}

.config-version {
  color: rgba(255,255,255,0.3);
  font-size: 9px;
  margin-top: 8px;
}

/* ==================== COLUNA 2 - SIDEBAR CONTATOS ==================== */
#sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  background: var(--bg-header);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.sidebar-header h2 {
  color: white;
  font-size: 20px;
  font-weight: 600;
}

.sidebar-header h2 i {
  margin-right: 8px;
}

.search-box {
  padding: 10px 15px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box i {
  color: var(--text-secondary);
  font-size: 14px;
}

.search-box input {
  flex: 1;
  border: none;
  background: var(--bg-secondary);
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}

#contacts {
  flex: 1;
  overflow-y: auto;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.contact-item:hover {
  background: var(--bg-hover);
}

.contact-item.active {
  background: var(--bg-active);
}

.contact-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.contact-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-item-avatar i {
  font-size: 24px;
  color: var(--text-secondary);
}

.contact-item-info {
  flex: 1;
  min-width: 0;
}

.contact-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-item-last-msg {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.contact-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.contact-item-time {
  font-size: 11px;
  color: var(--text-light);
}

.contact-item-badge {
  background: var(--green-primary);
  color: white;
  font-size: 11px;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.contact-item-labels {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}

.contact-label-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}
/* ==================== COLUNA 3 - ÁREA DO CHAT ==================== */
#chat-area {
  display: flex;
  flex-direction: column;
  background: var(--bg-chat);
  overflow: hidden;
}

#chat-header {
  background: var(--bg-header);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

[data-theme="dark"] #chat-header {
  background: var(--bg-secondary);
}

.chat-contact-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
}

.chat-contact-info i {
  font-size: 38px;
  color: rgba(255,255,255,0.8);
}

[data-theme="dark"] .chat-contact-info i {
  color: var(--text-secondary);
}

#chat-contact-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  display: block;
}

[data-theme="dark"] #chat-contact-name {
  color: var(--text-primary);
}

.chat-phone {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  display: block;
}

[data-theme="dark"] .chat-phone {
  color: var(--text-secondary);
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-actions button {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.chat-actions button:hover {
  background: rgba(255,255,255,0.25);
}

[data-theme="dark"] .chat-actions button {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

[data-theme="dark"] .chat-actions button:hover {
  color: var(--text-primary);
}

.file-upload-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.file-upload-btn:hover {
  background: rgba(255,255,255,0.25);
}

[data-theme="dark"] .file-upload-btn {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* ==================== MENSAGENS ==================== */
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="dark"] #messages {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-align: center;
  gap: 15px;
}

.welcome-icon {
  width: 100px;
  height: 100px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.welcome-icon i {
  font-size: 45px;
  color: var(--green-primary);
}

.welcome-message h2 {
  font-size: 22px;
  color: var(--text-primary);
  font-weight: 300;
}

.welcome-message p {
  font-size: 14px;
}

.message {
  max-width: 65%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

.message.sent {
  align-self: flex-end;
  background: var(--bg-msg-sent);
  border-bottom-right-radius: 2px;
}

.message.received {
  align-self: flex-start;
  background: var(--bg-msg-received);
  border-bottom-left-radius: 2px;
}

.message .msg-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.message .msg-time {
  font-size: 11px;
  color: var(--text-light);
  text-align: right;
  margin-top: 4px;
}

.message .msg-media img {
  max-width: 300px;
  max-height: 300px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: block;
  margin-bottom: 5px;
}

.message .msg-media video {
  max-width: 300px;
  max-height: 250px;
  border-radius: var(--radius-sm);
  display: block;
  margin-bottom: 5px;
}

.message .msg-media audio {
  max-width: 280px;
  margin-bottom: 5px;
}

.message .msg-media .doc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(0,0,0,0.05);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.message .msg-media .doc-link i {
  font-size: 24px;
  color: var(--green-primary);
}

.msg-date-separator {
  align-self: center;
  background: rgba(255,255,255,0.9);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  margin: 10px 0;
}

[data-theme="dark"] .msg-date-separator {
  background: var(--bg-secondary);
}

/* ==================== INPUT DE MENSAGEM ==================== */
#chat-input {
  background: var(--bg-primary);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-color);
}

#msg-input {
  flex: 1;
  border: none;
  background: var(--bg-secondary);
  padding: 12px 18px;
  border-radius: 25px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-sm);
}

#msg-input::placeholder {
  color: var(--text-light);
}

.emoji-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  padding: 5px;
}

.emoji-btn:hover {
  color: var(--green-primary);
  transform: scale(1.1);
}

.send-btn {
  background: var(--green-primary);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.send-btn:hover {
  background: var(--green-dark);
  transform: scale(1.05);
}

/* ==================== EMOJI PICKER ==================== */
.emoji-picker {
  position: fixed;
  bottom: 70px;
  left: 450px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 9999;
  border: 1px solid var(--border-color);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}

.emoji-grid span {
  font-size: 22px;
  padding: 5px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: var(--transition);
}

.emoji-grid span:hover {
  background: var(--bg-hover);
  transform: scale(1.2);
}

/* ==================== COLUNA 4 - PAINEL DO CONTATO ==================== */
.contact-panel {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: var(--transition);
}

.contact-panel.hidden {
  display: none;
}

.contact-panel-header {
  background: var(--bg-header);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 60px;
}

[data-theme="dark"] .contact-panel-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.close-panel-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-panel-btn:hover {
  background: rgba(255,255,255,0.25);
}

[data-theme="dark"] .close-panel-btn {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.contact-panel-header h3 {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

[data-theme="dark"] .contact-panel-header h3 {
  color: var(--text-primary);
}

.contact-panel-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Avatar Section */
.contact-avatar-section {
  display: flex;
  justify-content: center;
}

.contact-info-avatar {
  position: relative;
  width: 120px;
  height: 120px;
}

.contact-info-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--green-primary);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border-color);
}

.avatar-placeholder i {
  font-size: 50px;
  color: var(--text-secondary);
}

.avatar-upload-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 36px;
  height: 36px;
  background: var(--green-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.avatar-upload-btn i {
  color: white;
  font-size: 14px;
}

.avatar-upload-btn:hover {
  background: var(--green-dark);
  transform: scale(1.1);
}

/* Info Fields */
.contact-info-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-field label i {
  margin-right: 5px;
  color: var(--green-primary);
}

.info-field input,
.info-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  transition: var(--transition);
}

.info-field input:focus,
.info-field textarea:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

.info-field textarea {
  min-height: 70px;
  resize: vertical;
  font-family: inherit;
}

.info-field small {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 3px;
}

/* Labels Section */
.contact-labels-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-labels-section > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.labels-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.label-tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  color: white;
  display: flex;
  align-items: center;
  gap: 5px;
}

.label-tag .remove-label {
  cursor: pointer;
  font-size: 10px;
  opacity: 0.7;
  transition: var(--transition);
}

.label-tag .remove-label:hover {
  opacity: 1;
}

.add-label-btn {
  background: var(--bg-primary);
  border: 2px dashed var(--border-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.add-label-btn:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
}

/* Stats Section */
.contact-stats-section {
  background: var(--bg-primary);
  padding: 15px;
  border-radius: var(--radius-md);
}

.contact-stats-section h4 {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-item {
  background: var(--bg-secondary);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-primary);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stat-last-msg {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.stat-last-msg i {
  margin-right: 5px;
  color: var(--green-primary);
}

/* Danger Zone */
.contact-danger-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.danger-btn {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.danger-btn:hover {
  background: var(--red-light);
  color: var(--red-danger);
  border-color: var(--red-danger);
}

.danger-btn.delete:hover {
  background: var(--red-danger);
  color: white;
}
/* ==================== MODAIS ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.2s ease;
  backdrop-filter: blur(3px);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 450px;
  max-width: 90%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box.modal-large {
  width: 650px;
  max-width: 95%;
}

.modal-box.modal-danger .modal-header {
  background: var(--red-danger);
}

.modal-header {
  background: var(--green-primary);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  color: white;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.modal-body {
  padding: 25px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-body p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.modal-body p strong {
  color: var(--red-danger);
}

.modal-password-field {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 15px;
  margin-top: 15px;
  transition: var(--transition);
}

.modal-password-field:focus-within {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

.modal-password-field i {
  color: var(--text-secondary);
  font-size: 16px;
  margin-right: 12px;
}

.modal-password-field input {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
}

.modal-error {
  color: var(--red-danger);
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}

.modal-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.btn-cancel {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cancel:hover {
  background: var(--bg-hover);
}

.btn-primary {
  padding: 10px 20px;
  background: var(--green-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-danger {
  padding: 10px 20px;
  background: var(--red-danger);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-danger:hover {
  background: #c50030;
}

/* ==================== MODAL ETIQUETAS ==================== */
.new-label-form {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.new-label-form input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
}

.new-label-form input[type="text"]:focus {
  border-color: var(--green-primary);
}

.new-label-form input[type="color"] {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 3px;
  background: var(--bg-input);
}

.new-label-form button {
  padding: 10px 15px;
  background: var(--green-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.new-label-form button:hover {
  background: var(--green-dark);
}

.labels-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.label-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.label-list-item:hover {
  background: var(--bg-hover);
}

.label-list-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label-list-item-color {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
}

.label-list-item-actions {
  display: flex;
  gap: 5px;
}

.label-list-item-actions button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.label-list-item-actions button:hover {
  color: var(--green-primary);
  background: var(--bg-secondary);
}

.label-list-item-actions button.delete-label:hover {
  color: var(--red-danger);
}

/* ==================== MODAL IMPORTAR ==================== */
.import-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}

.import-tab {
  flex: 1;
  padding: 10px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-secondary);
}

.import-tab.active {
  border-color: var(--green-primary);
  color: var(--green-primary);
  background: rgba(0, 168, 132, 0.05);
}

.import-tab:hover {
  border-color: var(--green-primary);
}

.file-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  gap: 10px;
  margin-top: 10px;
}

.file-drop-zone:hover {
  border-color: var(--green-primary);
  background: rgba(0, 168, 132, 0.03);
}

.file-drop-zone i {
  font-size: 40px;
  color: var(--green-primary);
}

.file-drop-zone span {
  font-size: 14px;
}

.csv-preview {
  margin-top: 15px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.csv-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.csv-preview th {
  background: var(--bg-primary);
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
}

.csv-preview td {
  padding: 6px 10px;
  border-top: 1px solid var(--border-light);
  color: var(--text-primary);
}

.import-result {
  margin-top: 15px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.import-result.success {
  background: rgba(0, 168, 132, 0.1);
  color: var(--green-dark);
  border: 1px solid var(--green-primary);
}

.import-result.error {
  background: var(--red-light);
  color: var(--red-danger);
  border: 1px solid var(--red-danger);
}

/* ==================== MODAL DASHBOARD ==================== */
.dashboard-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

.dashboard-card {
  background: var(--bg-primary);
  padding: 18px 12px;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dashboard-card i {
  font-size: 24px;
  color: var(--green-primary);
}

.dashboard-number {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==================== MODAL CONFIGURAÇÕES ==================== */
.settings-section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.settings-section h4 {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section h4 i {
  color: var(--green-primary);
}

.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.settings-option span {
  font-size: 14px;
  color: var(--text-primary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 46px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-color);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: var(--radius-full);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--green-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* ==================== MODAL TEMPLATES ==================== */
.template-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  resize: vertical;
  font-family: inherit;
  margin-bottom: 15px;
  transition: var(--transition);
}

.template-textarea:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

.templates-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
}

.template-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.template-item:hover {
  background: var(--bg-hover);
}

.template-item-info {
  flex: 1;
  min-width: 0;
}

.template-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.template-item-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.template-item-actions {
  display: flex;
  gap: 5px;
}

.template-item-actions button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.template-item-actions button:hover {
  color: var(--green-primary);
  background: var(--bg-secondary);
}

.template-item-actions button.delete-template:hover {
  color: var(--red-danger);
}

/* ==================== GALERIA DE MÍDIAS ==================== */
.media-filter-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.media-tab {
  padding: 8px 15px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  color: var(--text-secondary);
}

.media-tab.active {
  background: var(--green-primary);
  color: white;
  border-color: var(--green-primary);
}

.media-tab:hover {
  border-color: var(--green-primary);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.media-grid-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-grid-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.media-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-grid-item .media-icon {
  font-size: 30px;
  color: var(--text-secondary);
}

/* ==================== SCROLLBAR PERSONALIZADA ==================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==================== ANIMAÇÕES ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}


}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-slideLeft { animation: slideInLeft 0.3s ease; }
.animate-slideRight { animation: slideInRight 0.3s ease; }
.animate-slideUp { animation: slideInUp 0.3s ease; }
.animate-pulse { animation: pulse 0.4s ease; }
.animate-shake { animation: shake 0.4s ease; }

/* Animação de nova mensagem */
.message.new-msg {
  animation: slideInUp 0.3s ease;
}

/* Animação do contato */
.contact-item {
  animation: fadeIn 0.2s ease;
}

/* ==================== NOTIFICAÇÃO TOAST ==================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  min-width: 280px;
  max-width: 400px;
}

.toast.success {
  background: var(--green-primary);
}

.toast.error {
  background: var(--red-danger);
}

.toast.warning {
  background: var(--orange-warn);
}

.toast.info {
  background: var(--blue-link);
}

.toast i {
  font-size: 18px;
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 16px;
  padding: 0 5px;
}

.toast-close:hover {
  color: white;
}

/* ==================== LOADING SPINNER ==================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--green-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

[data-theme="dark"] .loading-overlay {
  background: rgba(11, 20, 26, 0.8);
}

/* ==================== STATUS ONLINE/OFFLINE ==================== */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.status-dot.online {
  background: var(--green-light);
  box-shadow: 0 0 6px rgba(37, 211, 102, 0.5);
}

.status-dot.offline {
  background: var(--text-light);
}

/* ==================== BADGE DE CONTAGEM ==================== */
.unread-badge {
  background: var(--green-primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== TOOLTIP ==================== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

/* ==================== SELEÇÃO DE TEXTO ==================== */
::selection {
  background: rgba(0, 168, 132, 0.3);
  color: var(--text-primary);
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 1200px) {
  #app {
    grid-template-columns: 68px 300px 1fr 320px;
  }

  #app.panel-closed {
    grid-template-columns: 68px 300px 1fr 0px;
  }

  .dashboard-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  #app {
    grid-template-columns: 58px 260px 1fr 0px;
  }

  #app.panel-closed {
    grid-template-columns: 58px 260px 1fr 0px;
  }

  .contact-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 350px;
    z-index: 500;
    box-shadow: var(--shadow-lg);
  }

  .contact-panel.hidden {
    display: none;
  }

  .config-btn span {
    display: none;
  }

  .config-btn {
    width: 44px;
    height: 44px;
  }

  .message {
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  #app {
    grid-template-columns: 1fr;
    position: relative;
  }

  #app.panel-closed {
    grid-template-columns: 1fr;
  }

  #config-panel {
  overflow: visible !important;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 60px;
    z-index: 600;
    transform: translateX(-100%);
    transition: var(--transition);
  }

  #config-panel.open {
    transform: translateX(0);
  }

  #sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }

  #sidebar.hidden-mobile {
    display: none;
  }

  #chat-area {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 400;
  }

  #chat-area.active-mobile {
    display: flex;
  }

  .contact-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 500;
  }

  .chat-actions {
    gap: 3px;
  }

  .chat-actions button {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .file-upload-btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  .message {
    max-width: 85%;
  }

  .message .msg-media img {
    max-width: 220px;
  }

  .message .msg-media video {
    max-width: 220px;
  }

  .modal-box {
    width: 95%;
    max-height: 90vh;
  }

  .modal-box.modal-large {
    width: 95%;
  }

  .dashboard-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .dashboard-card {
    padding: 12px 8px;
  }

  .dashboard-number {
    font-size: 20px;
  }

  .emoji-picker {
    left: 10px;
    right: 10px;
    bottom: 65px;
  }

  .emoji-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Botão voltar no mobile */
  .mobile-back-btn {
    display: flex;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    margin-right: 5px;
  }
}

@media (min-width: 769px) {
  .mobile-back-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 35px 25px;
    width: 95%;
  }

  .login-logo {
    width: 70px;
    height: 70px;
  }

  .login-logo i {
    font-size: 35px;
  }

  .login-title {
    font-size: 24px;
  }

  .sidebar-header {
    padding: 12px 15px;
  }

  .contact-item {
    padding: 10px 15px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .import-tabs {
    flex-direction: column;
  }
}

/* ==================== PRINT ==================== */
@media print {
  #config-panel,
  #sidebar,
  #contact-panel,
  #chat-input,
  .chat-actions,
  .modal-overlay {
    display: none !important;
  }

  #app {
    grid-template-columns: 1fr !important;
  }

  #chat-area {
    display: flex !important;
  }

  .message {
    max-width: 100% !important;
    box-shadow: none !important;
  }
}

/* ==================== AVATAR NO HEADER DO CHAT ==================== */
.chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-header-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #075e54, #00a884);
  border-radius: 50%;
}

.chat-header-initials i {
  font-size: 20px !important;
  color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .chat-header-avatar {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .chat-header-initials {
  background: linear-gradient(135deg, #1a6b5a, #1fa855);
}

/* Remover o ícone antigo do header */
.chat-contact-info > i.fa-user-circle {
  display: none !important;
}

/* ==================== INICIAIS NA SIDEBAR (CONTATOS SEM FOTO) ==================== */
.contact-item-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #075e54, #00a884);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 50%;
  text-transform: uppercase;
}

[data-theme="dark"] .contact-item-initials {
  background: linear-gradient(135deg, #1a6b5a, #1fa855);
}









/* ==================== LIGHTBOX ==================== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 

.exit
  color: rgba(255,255,255,0.6);
}


/* ==================== LIGHTBOX ==================== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1);
}

.lightbox-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.lightbox-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.lightbox-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* Melhorar clicabilidade das imagens no chat */
.msg-media img {
  cursor: pointer;
  transition: opacity 0.2s;
  border-radius: 8px;
}

.msg-media img:hover {
  opacity: 0.9;
}

/* ==================== STATUS CHECKS ==================== */
.msg-status {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  font-size: 11px;
}

.message.sent .msg-status {
  color: #667781;
}

.message.sent .msg-status.delivered {
  color: #667781;
}

.message.sent .msg-status.read {
  color: #53bdeb;
}

.message.sent .msg-status.failed {
  color: #ff6b6b;
}

.message.received .msg-status {
  display: none;
}

[data-theme="dark"] .message.sent .msg-status {
  color: rgba(255,255,255,0.5);
}

[data-theme="dark"] .message.sent .msg-status.delivered {
  color: rgba(255,255,255,0.6);
}

[data-theme="dark"] .message.sent .msg-status.read {
  color: #53bdeb;
}

/* ==================== LOCATION MESSAGE ==================== */
.msg-location .location-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.msg-location .location-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  min-width: 220px;
}

.dark-mode .msg-location .location-preview {
  background: rgba(255,255,255,0.08);
}

.msg-location .location-icon {
  font-size: 28px;
  color: #e74c3c;
  flex-shrink: 0;
}

.msg-location .location-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-location .location-info strong {
  font-size: 13px;
  color: var(--text-primary);
}

.msg-location .location-info small {
  font-size: 11px;
  color: var(--text-secondary);
}

.msg-location .location-open {
  font-size: 12px;
  color: var(--primary-color);
  margin-top: 4px;
}

.msg-location .location-link:hover .location-preview {
  background: rgba(0,0,0,0.1);
}

.dark-mode .msg-location .location-link:hover .location-preview {
  background: rgba(255,255,255,0.12);
}

/* Maps link inline (texto) */
.maps-link-inline {
  color: var(--primary-color) !important;
  text-decoration: none;
  background: rgba(37,211,102,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  word-break: break-all;
}

.maps-link-inline:hover {
  background: rgba(37,211,102,0.2);
}

.maps-link-inline .fa-map-marker-alt {
  color: #e74c3c;
}

/* ==================== RESPOSTAS AUTOMATICAS ==================== */
.ar-status-section { margin-bottom: 20px; }
.ar-status-section h4,
.ar-schedule-section h4,
.ar-override-section h4,
.ar-cooldown-section h4,
.ar-messages-section h4 {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ar-status-buttons {
  display: flex;
  gap: 10px;
}

.ar-status-btn {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.ar-status-btn.online .fa-circle { color: #00a884; }
.ar-status-btn.busy .fa-circle { color: #f39c12; }
.ar-status-btn.offline .fa-circle { color: #e74c3c; }

.ar-status-btn.active.online { background: rgba(37,211,102,0.15); border-color: #00a884; color: #00a884; }
.ar-status-btn.active.busy { background: rgba(243,156,18,0.15); border-color: #f39c12; color: #f39c12; }
.ar-status-btn.active.offline { background: rgba(231,76,60,0.15); border-color: #e74c3c; color: #e74c3c; }

.ar-status-btn:hover { transform: translateY(-1px); }

.ar-schedule-section,
.ar-override-section,
.ar-cooldown-section { margin-bottom: 15px; }

.ar-time-row {
  display: flex;
  gap: 15px;
  margin-top: 8px;
}

.ar-time-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ar-time-field label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ar-time-field input[type="time"],
.ar-time-field input[type="number"] {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  width: 100px;
}

.ar-days-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.ar-day {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.2s;
}

.ar-day:has(input:checked) {
  background: rgba(37,211,102,0.15);
  border-color: #00a884;
  color: #00a884;
}

.ar-override-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ar-message-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.ar-message-card:hover {
  border-color: var(--primary-color);
}

.ar-msg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ar-msg-icon { font-size: 18px; }

.ar-msg-title {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.toggle-sm {
  transform: scale(0.85);
}

.ar-msg-preview {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 10px;
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
  line-height: 1.4;
}

.dark-mode .ar-msg-preview {
  background: rgba(255,255,255,0.05);
}

.ar-msg-text {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  line-height: 1.4;
}

.ar-msg-text:focus {
  border-color: var(--primary-color);
  outline: none;
}

.ar-editable {
  border-left: 3px solid var(--primary-color);
}

.ar-fixed {
  border-left: 3px solid var(--border-color);
}

/* Botao robot no menu */
.config-btn .fa-robot { color: #00a884; }

/* ==================== AGENDA DE CONTATOS ==================== */
.modal-xl {
  max-width: 900px !important;
  width: 95% !important;
  max-height: 90vh !important;
}

.agenda-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.agenda-search-box {
  display: flex;
  align-items: center;
  background: var(--bg-input, #f0f2f5);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  min-width: 200px;
}

.agenda-search-box i {
  color: var(--text-secondary, #667781);
  margin-right: 8px;
}

.agenda-search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: var(--text-primary);
}

.agenda-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px !important;
  font-size: 12px !important;
}

.btn-secondary {
  background: var(--bg-input, #f0f2f5) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color, #e0e0e0) !important;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--hover-bg, #e0e0e0) !important;
}

.agenda-counter {
  font-size: 12px;
  color: var(--text-secondary, #667781);
  white-space: nowrap;
}

/* Formulario */
.agenda-form {
  background: var(--bg-input, #f0f2f5);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color, #e0e0e0);
}

.agenda-form h4 {
  margin: 0 0 12px 0;
  color: var(--primary-color, #00a884);
  font-size: 15px;
}

.agenda-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agenda-notes-field {
  grid-column: 1 / -1;
}

.agenda-form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.agenda-divider {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin: 10px 0;
}

.agenda-import-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Lista header */
.agenda-list-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 2fr 1.2fr 120px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary, #667781);
  border-bottom: 2px solid var(--border-color, #e0e0e0);
  letter-spacing: 0.5px;
}

/* Lista */
.agenda-list {
  max-height: 400px;
  overflow-y: auto;
}

.agenda-item {
  display: grid;
  grid-template-columns: 2fr 1.5fr 2fr 1.2fr 120px;
  padding: 10px 12px;
  align-items: center;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  font-size: 13px;
  transition: background 0.15s;
}

.agenda-item:hover {
  background: var(--hover-bg, #f0f2f5);
}

.agenda-item-name {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.agenda-item-name i {
  color: var(--primary-color, #00a884);
  font-size: 16px;
}

.agenda-item-phone {
  color: var(--text-secondary, #667781);
  font-family: monospace;
  font-size: 12px;
}

.agenda-item-email {
  color: var(--text-secondary, #667781);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-item-cpf {
  color: var(--text-secondary, #667781);
  font-size: 12px;
  font-family: monospace;
}

.agenda-item-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.agenda-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s;
}

.agenda-btn-chat {
  color: #00a884;
}
.agenda-btn-chat:hover {
  background: rgba(0, 168, 132, 0.1);
}

.agenda-btn-edit {
  color: #f0a500;
}
.agenda-btn-edit:hover {
  background: rgba(240, 165, 0, 0.1);
}

.agenda-btn-delete {
  color: #e74c3c;
}
.agenda-btn-delete:hover {
  background: rgba(231, 76, 60, 0.1);
}

.agenda-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary, #667781);
}

.agenda-empty i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.agenda-empty p {
  font-size: 16px;
  margin: 8px 0;
}

.agenda-empty small {
  font-size: 12px;
  opacity: 0.7;
}

/* Responsivo */
@media (max-width: 768px) {
  .agenda-form-grid {
    grid-template-columns: 1fr;
  }
  .agenda-list-header {
    display: none;
  }
  .agenda-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px;
  }
  .agenda-item-actions {
    justify-content: flex-start;
    margin-top: 8px;
  }
  .agenda-toolbar {
    flex-direction: column;
  }
}

/* Botao Salvar na Agenda no painel de info */
.agenda-add-btn {
  background: var(--primary-color, #00a884) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 8px 0 !important;
  width: 100% !important;
  justify-content: center !important;
  transition: all 0.2s !important;
}

.agenda-add-btn:hover {
  background: #008f72 !important;
}

/* Placeholder do telefone na agenda */
.agenda-phone-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}


/* ==================== SUBMENU SIDEBAR (LATERAL) ==================== */
.config-btn-group {
  position: relative;
}

.config-btn-group .submenu-arrow {
  font-size: 10px;
  margin-left: auto;
  transition: transform 0.2s;
  opacity: 0.5;
}

.config-btn-group.open .submenu-arrow {
  transform: rotate(-90deg);
}

.config-submenu {
  display: none;
  padding: 0;
  margin: 0 6px 4px 6px;
  background: rgba(0, 168, 132, 0.06);
  border-radius: 0 0 10px 10px;
  border-left: 3px solid var(--primary-color, #00a884);
}

.config-submenu .config-btn {
  padding: 8px 10px 8px 14px !important;
  font-size: 12px !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.config-submenu .config-btn i {
  font-size: 13px !important;
  width: 18px !important;
  color: var(--primary-color, #00a884) !important;
}

.config-submenu .config-btn span {
  font-size: 12px !important;
}

.config-submenu .config-btn:hover {
  background: #ceefc9 !important;
}

/* ==================== CREDITOS DESENVOLVEDOR ==================== */
/* Login */
.dev-credit {
  text-align: center;
  margin-top: 20px;
  padding: 12px 0 0 0;
}

.dev-credit > span {
  display: block;
  margin-bottom: 4px;
  font-size: 8px;
  color: #34aa91;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dev-credit-brands {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.dev-credit-brands a {
  color: #34aa91;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  transition: color 0.2s;
}

.dev-credit-brands a:hover {
  color: #145648;
  text-decoration: underline;
}

.dev-sep {
  color: #34aa91;
  font-size: 11px;
  opacity: 0.6;
}

.dev-contact a {
  color: #34aa91;
  text-decoration: none;
  font-size: 10px;
  transition: color 0.2s;
  opacity: 0.8;
}

.dev-contact a:hover {
  color: #145648;
  opacity: 1;
}

.dev-contact i {
  margin-right: 3px;
}

/* Sidebar */
.dev-credit-sidebar {
  text-align: center;
  padding: 6px 4px 2px 4px;
  line-height: 1.4;
  opacity: 0.65;
  border-top: 1px solid var(--border-color, #e0e0e0);
  margin-top: 4px;
  transition: opacity 0.2s;
}

.dev-credit-sidebar:hover {
  opacity: 1;
}

.dev-credit-sidebar > span {
  display: block;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary, #667781);
  margin-bottom: 1px;
}

.dev-sidebar-brands {
  font-size: 9px;
  color: var(--text-secondary, #667781);
}

.dev-sidebar-brands a {
  color: var(--primary-color, #00a884);
  text-decoration: none;
  font-weight: 700;
  font-size: 9px;
}

.dev-sidebar-brands a:hover {
  text-decoration: underline;
}

.dev-sidebar-phone {
  display: block;
  color: var(--text-secondary, #667781) !important;
  text-decoration: none !important;
  font-size: 8px;
  margin-top: 1px;
}

.dev-sidebar-phone:hover {
  color: #00a884 !important;
}

.dev-sidebar-phone i {
  margin-right: 2px;
}

/* ==================== BROADCAST / TRANSMISSAO ==================== */
.bc-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bc-lists-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.bc-list-card {
  background: var(--bg-input, #f0f2f5);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.bc-list-card:hover {
  border-color: var(--primary-color, #00a884);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bc-list-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.bc-list-card-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.bc-list-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.bc-list-card-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.2s;
}

.bc-list-card-actions .bc-btn-edit { color: #f0a500; }
.bc-list-card-actions .bc-btn-edit:hover { background: rgba(240,165,0,0.1); }
.bc-list-card-actions .bc-btn-delete { color: #e74c3c; }
.bc-list-card-actions .bc-btn-delete:hover { background: rgba(231,76,60,0.1); }

.bc-contact-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.bc-contacts-list {
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.bc-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  font-size: 13px;
}

.bc-contact-item-info {
  display: flex;
  flex-direction: column;
}

.bc-contact-item-name {
  font-weight: 600;
  color: var(--text-primary);
}

.bc-contact-item-phone {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: monospace;
}

.bc-contact-remove {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.bc-contact-remove:hover {
  background: rgba(231,76,60,0.1);
}

.bc-source-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.bc-tab {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: none;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.bc-tab.active {
  background: var(--primary-color, #00a884);
  color: white;
  border-color: var(--primary-color);
}

.bc-available-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.bc-available-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  font-size: 13px;
}

.bc-available-item input[type="checkbox"] {
  accent-color: var(--primary-color, #00a884);
}

.bc-compose-area {
  margin-bottom: 12px;
}

.bc-compose-area textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  resize: vertical;
  background: var(--bg-input);
  color: var(--text-primary);
}

.bc-templates-hint {
  margin-top: 8px;
}

.bc-template-list {
  max-height: 150px;
  overflow-y: auto;
  margin-top: 8px;
}

.bc-template-item {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.bc-template-item:hover {
  background: #ceefc9;
}

.bc-progress {
  margin: 12px 0;
}

.bc-progress-bar {
  height: 8px;
  background: var(--bg-input, #e0e0e0);
  border-radius: 4px;
  overflow: hidden;
}

.bc-progress-fill {
  height: 100%;
  background: var(--primary-color, #00a884);
  border-radius: 4px;
  transition: width 0.3s;
}

.bc-progress p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-align: center;
}

.bc-send-btn {
  width: 100%;
  padding: 12px !important;
  font-size: 15px !important;
}

.bc-send-section {
  margin-top: 10px;
}

.bc-logs-list {
  max-height: 400px;
  overflow-y: auto;
}

.bc-log-item {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
}

.bc-log-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bc-log-item-name {
  font-weight: 700;
  font-size: 14px;
}

.bc-log-item-date {
  font-size: 11px;
  color: var(--text-secondary);
}

.bc-log-item-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.bc-log-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bc-log-stat-sent { color: #00a884; }
.bc-log-stat-failed { color: #e74c3c; }
.bc-log-stat-total { color: var(--text-secondary); }

.bc-log-item-msg {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-style: italic;
  max-height: 40px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .bc-lists-grid {
    grid-template-columns: 1fr;
  }
}
