:root {
  --bg-dark: #09090e;
  --bg-card: rgba(18, 18, 26, 0.7);
  --bg-card-hover: rgba(26, 26, 38, 0.85);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(0, 240, 255, 0.4);
  
  --primary: #00f0ff;
  --primary-hover: #00cce0;
  --primary-glow: rgba(0, 240, 255, 0.3);
  
  --secondary: #bd00ff;
  --secondary-hover: #9c00d4;
  --secondary-glow: rgba(189, 0, 255, 0.3);
  
  --accent: #ff007a;
  --accent-hover: #d60064;
  
  --success: #00e676;
  --danger: #ff1744;
  --warning: #ffea00;
  --info: #29b6f6;
  
  --text-main: #f5f5f7;
  --text-muted: #8e8e9f;
  --text-inverse: #09090e;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 16px;
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Fondo de gradientes dinámicos difuminados */
.glass-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(189, 0, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 0, 122, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Contenedor Principal */
.app-container {
  width: 95%;
  max-width: 1280px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 1;
}

/* Cabecera */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  font-size: 2.2rem;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 240, 255, 0.2));
}

.logo-text h1 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bot-status-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(0, 230, 118, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.badge-warning {
  background: rgba(255, 234, 0, 0.1);
  color: var(--warning);
  border: 1px solid rgba(255, 234, 0, 0.2);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-green {
  background-color: var(--success);
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
  animation: pulse-green-anim 1.8s infinite;
}

.pulse-red {
  background-color: var(--danger);
  box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7);
  animation: pulse-red-anim 1.8s infinite;
}

@keyframes pulse-green-anim {
  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 8px rgba(0, 230, 118, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

@keyframes pulse-red-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 23, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); }
}

.status-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Grid Principal */
.app-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
}

/* Tarjeta General (Card) */
.grid-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: var(--transition);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-header h2 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.card-icon {
  font-size: 1.2rem;
  color: var(--primary);
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: -0.5rem;
}

/* Formularios y Inputs */
.config-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.platforms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  font-size: 0.8rem;
  font-weight: 600;
}

.platform-chip input {
  accent-color: var(--primary);
}

.platform-chip:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.platform-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.platform-disabled:hover {
  border-color: var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.platform-unavailable {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
}

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

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tooltip-icon {
  color: var(--text-muted);
  cursor: help;
  font-size: 0.75rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-wrapper input {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.8rem 2.8rem 0.8rem 2.5rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: var(--transition);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  background-color: rgba(0, 0, 0, 0.35);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--text-main);
}

/* Rango e Intervalos */
.range-group {
  margin-top: 0.5rem;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.range-val {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.range-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.range-icon {
  color: var(--text-muted);
}

.range-input-wrapper input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

.range-input-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  cursor: pointer;
  transition: var(--transition);
}

.range-input-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-inverse);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

.btn-accent {
  background: rgba(255, 0, 122, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 0, 122, 0.2);
}

.btn-accent:hover {
  background: var(--accent);
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(255, 0, 122, 0.3);
}

/* Estado de Credenciales */
.credentials-status-info {
  margin-top: 0.5rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.credential-item i {
  margin-right: 0.3rem;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Columna Derecha / Principal */
.main-controls-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Fila de Control */
.control-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Switch Toggle Estilizado */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  transition: .4s;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

input:checked + .slider {
  background-color: rgba(0, 230, 118, 0.15);
  border-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(28px);
  background-color: var(--success);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

.slider.round {
  border-radius: 34px;
}

/* Prueba de Publicación */
.quick-test-area {
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--border-radius);
  padding: 1rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.quick-test-area h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.test-input-row {
  display: flex;
  gap: 0.8rem;
  align-items: stretch;
}

.test-input-row textarea {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  padding: 0.8rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: none;
  min-height: 50px;
  transition: var(--transition);
}

.test-input-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 8px var(--primary-glow);
}

.test-input-row button {
  min-width: 140px;
  align-self: center;
}

/* Fila de imagen en publicación inmediata */
.quick-image-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-upload-quick-img {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.15);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-upload-quick-img:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,240,255,0.05);
}

.quick-img-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border-color);
}

.quick-img-preview img {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 5px;
}

.quick-img-preview.hidden { display: none; }

/* Variaciones / Templates */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.templates-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.templates-list::-webkit-scrollbar {
  width: 6px;
}

.templates-list::-webkit-scrollbar-track {
  background: transparent;
}

.templates-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.templates-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.template-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: var(--transition);
}

.template-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.template-index {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.template-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: vertical;
  min-height: 40px;
  padding: 0.2rem 0;
  transition: var(--transition);
}

.template-input:focus {
  outline: none;
  color: #fff;
}

.btn-delete-template {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-delete-template:hover {
  color: var(--danger);
  background: rgba(255, 23, 68, 0.1);
}

/* Consola / Logs */
.app-console {
  margin-top: 0.5rem;
}

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

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

.btn-console-action {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.btn-console-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-console-action.text-danger:hover {
  color: var(--danger);
  border-color: rgba(255, 23, 68, 0.2);
  background: rgba(255, 23, 68, 0.05);
}

.console-body {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  min-height: 150px;
  max-height: 250px;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.console-body::-webkit-scrollbar {
  width: 6px;
}

.console-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.console-line {
  display: flex;
  gap: 0.8rem;
  line-height: 1.4;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.console-line:last-child {
  border-bottom: none;
}

.log-time {
  color: var(--text-muted);
  flex-shrink: 0;
}

.log-type {
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
  width: 70px;
}

.log-type.success { color: var(--success); }
.log-type.error { color: var(--danger); }
.log-type.info { color: var(--info); }

.log-msg {
  color: var(--text-main);
  word-break: break-word;
}

.log-details {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.75rem;
}

/* Toast de Notificaciones */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 1px var(--primary-glow);
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--primary);
  font-size: 1.1rem;
}

.toast-message {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Nuevos estilos: modales, auth, preview, templates con imagen ===== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal.hidden {
  display: none;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.2rem;
  padding: 1.5rem;
  width: min(460px, 92vw);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.modal-header h2 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  margin: 0;
}

.modal-header i {
  color: var(--primary);
  font-size: 1.2rem;
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.preview-box {
  width: min(560px, 94vw);
}

.preview-frame {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed var(--border-focus);
  border-radius: 0.9rem;
  padding: 1rem;
}

.preview-text {
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 0.8rem;
}

.preview-image {
  max-width: 100%;
  border-radius: 0.7rem;
  margin-top: 0.6rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.preview-meta {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-container.blur {
  filter: blur(4px);
  pointer-events: none;
}

.bot-status-container {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.badge-muted {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.next-run {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.next-run.active {
  color: var(--success);
}

.test-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.template-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.template-item.empty {
  justify-content: center;
  color: var(--text-muted);
}

.template-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
}

.template-index {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
}

.template-input {
  width: 100%;
  min-height: 5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  padding: 0.6rem;
  color: var(--text-main);
  font-family: var(--font-body);
  resize: vertical;
}

.template-image-thumb {
  position: relative;
  display: inline-block;
  max-width: 140px;
}

.template-image-thumb img {
  width: 100%;
  border-radius: 0.5rem;
  display: block;
}

.btn-remove-image {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  border: none;
  color: white;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
}

.btn-upload-template-img {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--primary);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  background: rgba(0, 240, 255, 0.08);
}

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

.btn-delete-template {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem;
}

/* Botón logout */
#btn-logout {
  font-size: 0.75rem;
}

.credential-forms-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.credential-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  padding: 1rem;
}

.credential-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.credential-card-header h4 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1rem;
}

.status-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pill.ok {
  background: rgba(0, 230, 118, 0.15);
  color: var(--success);
}

.status-pill.pending {
  background: rgba(255, 23, 68, 0.15);
  color: var(--danger);
}

.credential-forms-container h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
}

/* Ajustes Responsivos */
@media (max-width: 900px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
  .app-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .bot-status-container {
    width: 100%;
    justify-content: space-between;
  }
}
