/* WhatsApp Web Custom CSS - Premium Dark Mode & Glassmorphic Elements */

:root {
  --wa-bg-main: #0b141a;
  --wa-bg-sidebar: #111b21;
  --wa-bg-header: #202c33;
  --wa-bg-chat: #0b141a;
  --wa-bg-chat-bubble-sent: #005c4b;
  --wa-bg-chat-bubble-received: #202c33;
  
  --text-title: #e9edef;
  --text-body: #d1d7db;
  --text-muted: #8696a0;
  
  --color-green-brand: #00a884;
  --color-green-light: #53bdeb;
  --color-blue-check: #53bdeb;
  
  --glass-bg: rgba(26, 38, 46, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;
  
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #0b0f12;
  color: var(--text-body);
  font-family: var(--font-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Background Glow Effects */
.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}

.glow-1 {
  background: var(--color-green-brand);
  top: -10%;
  left: 10%;
}

.glow-2 {
  background: #673de6; /* Hostinger Purple */
  bottom: -10%;
  right: 10%;
}

/* App Main Container */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  background-color: var(--wa-bg-main);
  z-index: 10;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

@media (min-width: 1440px) {
  .app-container {
    width: 95vw;
    height: 92vh;
    border-radius: 12px;
  }
}

/* =============================================================
   SIDEBAR STYLES
   ============================================================= */
.sidebar {
  width: 380px;
  min-width: 320px;
  height: 100%;
  background-color: var(--wa-bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

/* Sidebar Header */
.sidebar-header {
  height: 60px;
  background-color: var(--wa-bg-header);
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-profile {
  position: relative;
  display: flex;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background-color: #333;
}

.user-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background-color: var(--color-green-brand);
  border: 2px solid var(--wa-bg-header);
  border-radius: 50%;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-title);
  transform: scale(1.05);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* Banner de Modo */
.mode-banner {
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.demo-mode {
  background: rgba(234, 179, 8, 0.1);
  color: #facc15;
}

.live-mode {
  background: rgba(0, 168, 132, 0.1);
  color: var(--color-green-brand);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.banner-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.demo-mode .banner-pulse {
  background-color: #facc15;
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.6);
  animation: pulse-demo 1.6s infinite;
}

.live-mode .banner-pulse {
  background-color: var(--color-green-brand);
  box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.6);
  animation: pulse-live 1.6s infinite;
}

@keyframes pulse-demo {
  70% { box-shadow: 0 0 0 6px rgba(250, 204, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

@keyframes pulse-live {
  70% { box-shadow: 0 0 0 6px rgba(0, 168, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 168, 132, 0); }
}

/* Sidebar Navigation Tabs */
.sidebar-tabs {
  display: flex;
  background-color: var(--wa-bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-title);
  background-color: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--color-green-brand);
  border-bottom-color: var(--color-green-brand);
}

/* Search Bar */
.search-container {
  padding: 0.5rem 0.75rem;
  background-color: var(--wa-bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-wrapper {
  background-color: #202c33;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  height: 35px;
}

.search-icon {
  color: var(--text-muted);
  margin-right: 0.75rem;
}

.search-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-title);
  font-family: var(--font-main);
  font-size: 0.88rem;
  width: 100%;
}

.search-wrapper input::placeholder {
  color: var(--text-muted);
}

/* Scrollbar estilizado */
.chats-list::-webkit-scrollbar,
.templates-list::-webkit-scrollbar,
.messages-container::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.chats-list::-webkit-scrollbar-thumb,
.templates-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Chats List */
.chats-list {
  flex: 1;
  overflow-y: auto;
  background-color: var(--wa-bg-sidebar);
}

/* Chat Item */
.chat-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: background-color 0.2s ease;
}

.chat-item:hover {
  background-color: #202c33;
}

.chat-item.active {
  background-color: #2a3942;
}

.chat-item-details {
  flex: 1;
  margin-left: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chat-item-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-item-name {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-item-row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.chat-item-lastmsg {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.unread-badge {
  background-color: var(--color-green-brand);
  color: #111b21;
  font-size: 0.72rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  padding: 0;
}

.chats-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 1.5rem;
  font-size: 0.9rem;
}

/* =============================================================
   TEMPLATES PANEL STYLES
   ============================================================= */
.templates-list {
  flex: 1;
  overflow-y: auto;
  background-color: var(--wa-bg-sidebar);
  display: flex;
  flex-direction: column;
}

.templates-actions {
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.btn-secondary {
  background-color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-title);
  width: 100%;
  height: 38px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.templates-grid {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.template-card {
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.template-card:hover {
  border-color: rgba(255,255,255,0.08);
  background-color: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.template-card-name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-title);
  word-break: break-all;
}

/* Template status badges */
.template-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}

.badge-approved {
  background-color: rgba(0, 168, 132, 0.15);
  color: var(--color-green-brand);
}

.badge-pending {
  background-color: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.badge-rejected {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.template-card-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
}

.meta-category {
  color: var(--color-green-light);
  background-color: rgba(83, 189, 235, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.meta-lang {
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.template-card-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: pre-wrap;
  background-color: rgba(0,0,0,0.15);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 2px solid var(--color-green-brand);
}

.template-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.03);
  padding-top: 0.65rem;
}

.btn-sm-send {
  background-color: var(--color-green-brand);
  color: #111b21;
  border: none;
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sm-send:hover {
  background-color: #008f70;
}

.btn-sm-delete {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-main);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sm-delete:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
}

/* =============================================================
   CHAT VIEWPORT STYLES
   ============================================================= */
.chat-viewport {
  flex: 1;
  height: 100%;
  background-color: var(--wa-bg-chat);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Splash Screen (Default View) */
.splash-screen {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #222e35;
  border-left: 1px solid rgba(255, 255, 255, 0.02);
  text-align: center;
  padding: 2rem;
}

.splash-content {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.splash-logo {
  color: var(--text-muted);
  opacity: 0.3;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.splash-content h2 {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-title);
  letter-spacing: -0.5px;
}

.splash-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.badge-hostinger {
  margin-top: 0.5rem;
  background-color: rgba(103, 61, 230, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Active Chat Window */
.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.chat-header {
  height: 60px;
  background-color: var(--wa-bg-header);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-btn {
  display: none; 
  margin-right: -0.25rem;
}

.active-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.active-contact-info h3 {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-title);
}

.active-contact-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Message Container */
.messages-container {
  flex: 1;
  overflow-y: auto;
  background-color: #0b141a;
  background-image: radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message-row {
  display: flex;
  width: 100%;
}

.message-row.sent {
  justify-content: flex-end;
}

.message-row.received {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 65%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.sent .message-bubble {
  background-color: var(--wa-bg-chat-bubble-sent);
  color: #e9edef;
  border-top-right-radius: 0;
}

.received .message-bubble {
  background-color: var(--wa-bg-chat-bubble-received);
  color: #e9edef;
  border-top-left-radius: 0;
}

.message-text {
  word-wrap: break-word;
  white-space: pre-wrap;
  margin-bottom: 0.15rem;
}

/* Multimedia render within bubbles */
.bubble-image {
  max-width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0.25rem 0;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
  transition: opacity 0.2s ease;
}

.bubble-image:hover {
  opacity: 0.9;
}

.bubble-video {
  max-width: 100%;
  max-height: 240px;
  border-radius: 6px;
  margin: 0.25rem 0;
  outline: none;
  background-color: #000;
}

.bubble-audio {
  width: 100%;
  min-width: 220px;
  margin: 0.35rem 0;
  outline: none;
  height: 35px;
}

.bubble-doc {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  margin: 0.35rem 0;
  color: var(--text-title);
  text-decoration: none;
  transition: all 0.2s ease;
}

.bubble-doc:hover {
  background-color: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.doc-icon {
  font-size: 1.5rem;
}

.doc-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.doc-name {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-size {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.message-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  align-self: flex-end;
  margin-top: 0.25rem;
}

.message-time {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
}

.check-marks {
  display: flex;
  color: rgba(255, 255, 255, 0.45);
}

.check-marks.read {
  color: var(--color-blue-check);
}

.check-marks.failed {
  color: #ef4444;
}

/* =============================================================
   MEDIA UPLOAD PREVIEW OVERLAY
   ============================================================= */
.upload-preview-overlay {
  position: absolute;
  bottom: 62px;
  left: 0;
  width: 100%;
  background-color: rgba(27, 38, 45, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem;
  z-index: 500;
  display: flex;
  justify-content: center;
  animation: slideUp 0.25s ease-out;
}

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

.preview-box {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.preview-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-title);
}

.preview-content {
  background-color: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 140px;
}

.preview-thumbnail {
  max-width: 100%;
  max-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-thumbnail img {
  max-height: 100px;
  border-radius: 6px;
  object-fit: contain;
}

.preview-thumbnail-icon {
  font-size: 3rem;
  color: var(--color-green-brand);
}

.preview-filename {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
  word-break: break-all;
  text-align: center;
}

.preview-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.preview-footer input {
  flex: 1;
  background-color: #2a3942;
  border: none;
  outline: none;
  height: 40px;
  border-radius: 8px;
  padding: 0 1rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-title);
}

/* Upload Progress Bar */
.upload-progress-bar {
  width: 100%;
  height: 4px;
  background-color: rgba(255,255,255,0.05);
  border-radius: 20px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background-color: var(--color-green-brand);
  transition: width 0.1s ease;
}

/* Input Bar */
.input-bar {
  height: 62px;
  background-color: #202c33;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.input-action-btn {
  color: var(--text-muted);
}

.input-bar input[type="text"] {
  flex: 1;
  background-color: #2a3942;
  border: none;
  outline: none;
  height: 42px;
  border-radius: 8px;
  padding: 0 1.25rem;
  font-family: var(--font-main);
  font-size: 0.92rem;
  color: var(--text-title);
  transition: background-color 0.2s ease;
}

.input-bar input[type="text"]:focus {
  background-color: #31424e;
}

.input-bar input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  background: var(--color-green-brand);
  border: none;
  color: #111b21;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.send-btn:hover {
  background-color: #008f70;
  transform: scale(1.05);
}

.send-btn:active {
  transform: scale(0.95);
}

/* =============================================================
   MODAL DIALOGS
   ============================================================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  display: flex;
  flex-direction: column;
}

.modal-small {
  width: 400px;
}

@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-title);
}

.icon-btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.icon-btn-close:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ef4444;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 70vh;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
}

.form-group input, 
.form-group select,
.form-group textarea {
  background-color: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-main);
  color: var(--text-title);
  outline: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
  height: 38px;
  padding: 0 0.85rem;
}

.form-group input:focus, 
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-green-brand);
  background-color: rgba(0,0,0,0.4);
}

.help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.template-preview-text {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: pre-wrap;
  border-left: 2px solid var(--color-green-brand);
}

/* Accordion Setup Guide */
.accordion {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.accordion-header {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-title);
  background-color: rgba(255, 255, 255, 0.01);
  user-select: none;
}

.accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.chevron {
  transition: transform 0.3s ease;
}

.accordion-header.active .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-body);
}

.guide-list {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-list a {
  color: var(--color-green-light);
  text-decoration: none;
}

.guide-list a:hover {
  text-decoration: underline;
}

.guide-list code {
  font-family: var(--font-mono);
  background-color: rgba(255,255,255,0.08);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  word-break: break-all;
}

/* Modal Footer */
.modal-footer {
  padding: 1rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.01);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-primary {
  background-color: var(--color-green-brand);
  border: none;
  color: #111b21;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #008f70;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.save-status {
  font-size: 0.8rem;
  font-weight: 500;
}

.save-status.success { color: var(--color-green-brand); }
.save-status.error { color: #ef4444; }

.hidden {
  display: none !important;
}

/* =============================================================
   RESPONSIVE LAYOUT (MOBILE DESIGN)
   ============================================================= */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
  }
  
  .chat-viewport {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 30;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .app-container.chat-active .chat-viewport {
    transform: translateX(0);
  }
  
  .back-btn {
    display: flex;
  }
  
  .splash-screen {
    display: none; 
  }
}

/* =============================================================
   SEARCH, HIGHLIGHTS AND DELETION STYLES
   ============================================================= */
.search-divider {
  padding: 0.75rem 1rem 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-green-brand);
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  background-color: rgba(255, 255, 255, 0.01);
}

.message-search-item {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: background-color 0.2s ease;
}

.message-search-item:hover {
  background-color: #202c33;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-item-details {
  flex: 1;
  margin-left: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.search-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-item-contact {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-title);
}

.search-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.search-item-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-match {
  background-color: rgba(250, 204, 21, 0.35);
  color: #fff;
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 500;
}

/* Active chat search bar styles */
.active-chat-search-bar {
  background-color: var(--wa-bg-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.active-chat-search-wrapper {
  display: flex;
  align-items: center;
  background-color: #202c33;
  border-radius: 8px;
  padding: 0 0.5rem 0 0.75rem;
  height: 35px;
  gap: 0.5rem;
}

.active-chat-search-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-title);
  font-family: var(--font-main);
  font-size: 0.88rem;
}

.search-count-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.icon-btn-sm {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.icon-btn-sm:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-title);
}

/* Highlight pulse animation for message bubble */
.highlight-pulse {
  animation: pulse-highlight 2s ease-in-out;
}

@keyframes pulse-highlight {
  0% {
    background-color: rgba(250, 204, 21, 0.5) !important;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.6) !important;
  }
  30% {
    background-color: rgba(250, 204, 21, 0.5) !important;
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.6) !important;
  }
  100% {
    background-color: inherit;
    box-shadow: inherit;
  }
}

/* Delete message button on bubble hover */
.msg-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.message-bubble:hover .msg-delete-btn {
  display: flex;
}

.msg-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.25);
  transform: scale(1.1);
}

/* Adjust padding on bubble to accommodate delete button if visible */
.message-bubble {
  padding-right: 1.5rem !important;
}

/* Style for deleted messages */
.deleted-text {
  color: rgba(255, 255, 255, 0.4) !important;
  font-style: italic;
  user-select: none;
}

/* Modals extra styling */
.btn-danger {
  transition: all 0.2s ease;
}
.btn-danger:hover {
  background-color: #dc2626 !important;
  transform: scale(1.02);
}

.btn-outline {
  transition: all 0.2s ease;
}
.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin {
  animation: spin 1s linear infinite;
}

/* --- ESTILOS DE INICIO DE SESIÓN --- */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background-color: #0b141a;
  background-image: radial-gradient(circle at center, #111b21 0%, #0b141a 100%);
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--color-green-brand);
  filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.25));
}
.login-card h2 {
  text-align: center;
  color: var(--text-title);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--font-main);
}
.login-card p {
  text-align: center;
  color: var(--text-body);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.login-error {
  min-height: 20px;
  color: #ef4444;
  font-size: 0.85rem;
  text-align: center;
}

/* --- ESTILOS DE CARGA / LOADER INICIAL --- */
.chat-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 11000;
  background-color: rgba(11, 20, 26, 0.85);
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}
.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top: 4px solid var(--color-green-brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loader-box p {
  color: var(--text-title);
  font-size: 0.95rem;
  font-weight: 500;
}

/* --- ESTILOS DE LA PESTAÑA CONTACTO (LOTES) --- */
.contacts-list {
  display: flex;
  flex-direction: column;
  height: calc(100% - 94px);
  overflow-y: auto;
}
.contacts-header-title {
  padding: 1.25rem 1rem 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.contacts-header-title h3 {
  color: var(--text-title);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}
.contacts-header-title p {
  color: var(--text-body);
  font-size: 0.82rem;
  margin: 0;
}
.batches-accordion {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.batch-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.batch-header {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-title);
}
.batch-header:hover {
  background: rgba(255, 255, 255, 0.04);
}
.batch-header .chevron-icon {
  transition: transform 0.2s ease;
}
.batch-item.active .batch-header .chevron-icon {
  transform: rotate(180deg);
}
.batch-content {
  display: none;
  padding: 0.25rem 0;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}
.batch-item.active .batch-content {
  display: block;
}
.batch-contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.batch-contact-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-green-brand);
}
.batch-contact-link .contact-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-green-brand);
  color: #111;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* --- DRAGGABLE HEADER CURSOR --- */
.modal-header {
  cursor: move;
  user-select: none;
}

/* --- BANNER DE USUARIO ACTIVO --- */
.session-active-mode {
  background: linear-gradient(90deg, rgba(0, 230, 118, 0.08) 0%, rgba(0, 230, 118, 0.02) 100%) !important;
  border-bottom: 1px solid rgba(0, 230, 118, 0.12) !important;
}
.banner-pulse-green {
  width: 8px;
  height: 8px;
  background-color: var(--color-green-brand);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
  animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(0, 230, 118, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
  }
}

/* --- ESTILOS DE LA TABLA DE USUARIOS --- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}
.admin-table th, .admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.admin-table th {
  background-color: rgba(255,255,255,0.02);
  color: var(--text-title);
  font-weight: 600;
}
.admin-table tr:hover {
  background-color: rgba(255,255,255,0.01);
}
.badge-role {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-role.admin {
  background-color: rgba(0, 230, 118, 0.15);
  color: var(--color-green-brand);
}
.badge-role.operator {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-title);
}
.text-danger {
  color: #ef4444;
}
.btn-danger-sm {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-danger-sm:hover {
  background-color: #ef4444;
  color: white;
}
.btn-edit-sm {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-title);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.25rem;
  transition: all 0.2s ease;
}
.btn-edit-sm:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* =============================================================
   GLOBAL SEARCH RESULTS PANEL STYLES
   ============================================================= */
.search-results-panel {
  width: 350px;
  min-width: 300px;
  height: 100%;
  background-color: var(--wa-bg-sidebar);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: all 0.3s ease;
}

.search-results-panel.hidden {
  display: none !important;
}

.panel-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: 59px;
  flex-shrink: 0;
}

.panel-header h3 {
  color: var(--text-title);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Tarjetas de Resultados */
.search-result-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.search-result-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.search-result-item-name {
  color: #00a884; /* WhatsApp brand green */
  font-size: 0.85rem;
  font-weight: 600;
}

.search-result-item-time {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.search-result-item-text {
  color: var(--text-body);
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
  margin: 0;
}

.search-result-highlight {
  background-color: rgba(255, 235, 59, 0.35); /* yellow highlight */
  color: #fff;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* Efecto de Destello / Resaltado para Burbujas */
@keyframes pulse-highlight {
  0% {
    background-color: rgba(255, 235, 59, 0.25);
    box-shadow: inset 0 0 12px rgba(255, 235, 59, 0.3);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.search-highlight {
  animation: pulse-highlight 3s ease forwards;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .search-results-panel {
    position: absolute;
    right: 0;
    top: 0;
    width: 100% !important;
    height: 100%;
    z-index: 50;
    border-left: none;
  }
  
  .search-results-panel .icon-btn-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .search-results-panel .icon-btn-close svg {
    width: 24px;
    height: 24px;
  }
}

/* =============================================================
   AVATARES CON INICIAL (CHAT AVATAR LETTER)
   ============================================================= */
.chat-avatar-letter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-avatar-letter:hover {
  filter: brightness(1.15);
  transform: scale(1.06);
  box-shadow: 0 0 8px rgba(255,255,255,0.1);
}

.btn-sm-edit {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-main);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sm-edit:hover {
  color: var(--color-green-brand);
  background-color: rgba(0, 168, 132, 0.08);
  border-color: rgba(0, 168, 132, 0.15);
}

/* =============================================================
   SMTP SETTINGS GRID & FORWARD MESSAGE STYLES
   ============================================================= */

/* Dos columnas para ajustes de API y SMTP */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  max-height: 70vh;
}

.settings-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#settings-modal .modal-card {
  width: 850px;
  max-width: 95%;
}

@media (max-width: 768px) {
  #settings-modal .modal-card {
    width: 500px;
    max-width: 90%;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
  }
}

/* Barra de selección superior para reenvío */
.forward-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: #202c33;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  animation: slideDown 0.2s ease-out;
}

.forward-action-info {
  font-size: 0.9rem;
  color: var(--text-title);
  font-weight: 500;
}

.forward-action-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-primary-sm, .btn-secondary-sm {
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  height: 32px;
  transition: all 0.2s ease;
}

.btn-primary-sm {
  background-color: var(--color-green-brand);
  color: white;
  border: none;
}

.btn-primary-sm:hover:not(:disabled) {
  background-color: #008f70;
}

.btn-primary-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary-sm {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-title);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary-sm:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

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

/* Checkbox Premium a la derecha del mensaje */
.premium-checkbox-container {
  display: none;
  position: relative;
  cursor: pointer;
  user-select: none;
  margin-left: 12px;
  align-self: center;
  flex-shrink: 0;
}

/* Modo reenvío activo */
.app-container.forward-mode .premium-checkbox-container {
  display: inline-block;
}

.premium-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.premium-checkmark {
  position: relative;
  display: block;
  height: 22px;
  width: 22px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-checkbox-container:hover input ~ .premium-checkmark {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.premium-checkbox-container input:checked ~ .premium-checkmark {
  background-color: var(--color-green-brand);
  border-color: var(--color-green-brand);
  box-shadow: 0 0 8px rgba(0, 168, 132, 0.4);
}

.premium-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.premium-checkbox-container input:checked ~ .premium-checkmark:after {
  display: block;
}

.premium-checkbox-container .premium-checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Autocomplete Dropdown List */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #202c33;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 2000;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  color: var(--text-body);
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-green-brand);
}

.autocomplete-dropdown::-webkit-scrollbar {
  width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* AI Settings Modal */
#ai-settings-modal .modal-card {
  width: 650px;
  max-width: 95%;
}

#setting-ai-instructions {
  font-family: var(--font-mono), monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  background-color: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 768px) {
  #ai-settings-modal .modal-card {
    width: 500px;
    max-width: 90%;
  }
}

/* Template Status Badges */
.template-status-badge {
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  display: inline-block;
}
.template-status-badge.approved {
  background-color: rgba(0, 230, 118, 0.15);
  color: #00e676;
}
.template-status-badge.pending {
  background-color: rgba(255, 179, 0, 0.15);
  color: #ffb300;
}
.template-status-badge.rejected {
  background-color: rgba(244, 67, 54, 0.15);
  color: #f44336;
}




