/* ══════════════════════════════════════════════════════
   AKSTRA AGENTES — Estilos del módulo
   Paleta: #072720 (teal oscuro) + #4ADE80 (verde lima)
   ══════════════════════════════════════════════════════ */

/* ── Layout principal ───────────────────────────────── */
.akstra-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.akstra-header {
  padding: 20px 28px 0;
  flex-shrink: 0;
}

.akstra-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.akstra-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.akstra-title-icon {
  width: 36px;
  height: 36px;
  background: #072720;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.akstra-title-icon svg {
  width: 18px;
  height: 18px;
  color: #4ADE80;
}

.akstra-title h1 {
  font-size: 20px;
  font-weight: 800;
  color: #0D1B2A;
  letter-spacing: -.4px;
}

.akstra-title span {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 400;
}

/* ── Tabs ───────────────────────────────────────────── */
.akstra-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #F3F4F6;
}

.akstra-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.akstra-tab:hover { color: #0D1B2A; }
.akstra-tab.active {
  color: #072720;
  border-bottom-color: #4ADE80;
  font-weight: 700;
}

.akstra-tab .tab-badge {
  background: #4ADE80;
  color: #052018;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}

/* ── Contenido de tabs ──────────────────────────────── */
.akstra-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.akstra-panel { display: none; }
.akstra-panel.active { display: block; }

/* ── Grid de agentes ────────────────────────────────── */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.agent-card {
  background: #fff;
  border: 1px solid #E8E8EC;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #072720, #4ADE80);
  opacity: 0;
  transition: opacity .2s;
}

.agent-card:hover {
  box-shadow: 0 8px 24px rgba(7,39,32,.12);
  transform: translateY(-2px);
  border-color: #4ADE80;
}

.agent-card:hover::before { opacity: 1; }

.agent-icon {
  width: 44px;
  height: 44px;
  background: #F0FDF4;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
  transition: background .15s;
}

.agent-card:hover .agent-icon { background: #DCFCE7; }

.agent-name {
  font-size: 14px;
  font-weight: 700;
  color: #0D1B2A;
  margin-bottom: 4px;
}

.agent-desc {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.5;
  margin-bottom: 14px;
}

.agent-cat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.agent-cat.marketing { background: #EEF2FF; color: #2B2BFF; }
.agent-cat.ventas     { background: #D1FAE5; color: #065F46; }
.agent-cat.operaciones{ background: #FEF3C7; color: #92400E; }

/* ── Panel de generación de contenido ───────────────── */
.gen-panel {
  background: #fff;
  border: 1px solid #E8E8EC;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0;
}

.gen-panel-hd {
  background: #072720;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gen-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gen-panel-close {
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,.7);
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background .15s;
}

.gen-panel-close:hover { background: rgba(255,255,255,.2); color: #fff; }

.gen-panel-body { padding: 18px; }

.gen-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.gen-preset {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: #F3F4F6;
  border: 1px solid #E8E8EC;
  color: #374151;
  cursor: pointer;
  transition: all .15s;
}

.gen-preset:hover {
  background: #F0FDF4;
  border-color: #4ADE80;
  color: #065F46;
}

.gen-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.gen-select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #E8E8EC;
  border-radius: 7px;
  font-size: 12px;
  color: #374151;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}

.gen-select:focus { border-color: #4ADE80; }

.gen-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E8E8EC;
  border-radius: 7px;
  font-size: 13px;
  color: #374151;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color .15s;
  font-family: var(--font-sans);
  margin-bottom: 10px;
}

.gen-input:focus { border-color: #4ADE80; }

.gen-result {
  background: #F8FAFC;
  border: 1px solid #E8E8EC;
  border-radius: 7px;
  padding: 14px;
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 120px;
  margin-bottom: 12px;
  display: none;
}

.gen-result.visible { display: block; }

.gen-result-actions {
  display: flex;
  gap: 8px;
  display: none;
}

.gen-result-actions.visible { display: flex; }

/* ── Lista de contenido ─────────────────────────────── */
.content-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.content-filter-select {
  padding: 6px 10px;
  border: 1px solid #E8E8EC;
  border-radius: 7px;
  font-size: 12px;
  color: #374151;
  background: #fff;
  outline: none;
}

.content-filter-select:focus { border-color: #4ADE80; }

.content-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-item {
  background: #fff;
  border: 1px solid #E8E8EC;
  border-radius: 10px;
  padding: 14px 16px;
  transition: box-shadow .15s;
}

.content-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }

.content-item-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.content-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.content-type-badge {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  background: #F0FDF4;
  color: #065F46;
}

.content-status {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.content-status.borrador    { background: #FEF3C7; color: #92400E; }
.content-status.aprobado    { background: #D1FAE5; color: #065F46; }
.content-status.publicado   { background: #EEF2FF; color: #2B2BFF; }
.content-status.archivado   { background: #F3F4F6; color: #6B7280; }

.content-agent {
  font-size: 11px;
  color: #9CA3AF;
}

.content-week {
  font-size: 11px;
  color: #9CA3AF;
}

.content-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.content-action-btn {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #E8E8EC;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all .15s;
}

.content-action-btn:hover { background: #F3F4F6; }
.content-action-btn.approve { border-color: #4ADE80; color: #065F46; }
.content-action-btn.approve:hover { background: #F0FDF4; }
.content-action-btn.publish { border-color: #2B2BFF; color: #2B2BFF; }
.content-action-btn.publish:hover { background: #EEF2FF; }
.content-action-btn.archive { border-color: #E8E8EC; color: #9CA3AF; }

.content-item-body {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 120px;
  overflow: hidden;
  position: relative;
}

.content-item-body.expanded { max-height: none; }

.content-expand {
  font-size: 11px;
  color: #4ADE80;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
}

.content-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #F3F4F6;
  border: none;
  color: #374151;
  cursor: pointer;
  margin-top: 8px;
  transition: all .15s;
}

.content-copy-btn:hover { background: #E5E7EB; }
.content-copy-btn.copied { background: #D1FAE5; color: #065F46; }

/* ── Check-in semanal ───────────────────────────────── */
.checkin-card {
  background: #fff;
  border: 1px solid #E8E8EC;
  border-radius: 12px;
  padding: 22px;
  max-width: 580px;
}

.checkin-week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.checkin-week-label {
  font-size: 13px;
  font-weight: 700;
  color: #0D1B2A;
  flex: 1;
}

.checkin-week-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #E8E8EC;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  font-size: 14px;
  transition: all .15s;
}

.checkin-week-btn:hover { background: #F3F4F6; color: #0D1B2A; }

.checkin-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.checkin-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 5px;
}

.checkin-num {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #E8E8EC;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 700;
  color: #0D1B2A;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color .15s;
}

.checkin-num:focus { border-color: #4ADE80; }

.checkin-notes {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #E8E8EC;
  border-radius: 7px;
  font-size: 13px;
  color: #374151;
  resize: vertical;
  min-height: 72px;
  outline: none;
  font-family: var(--font-sans);
  transition: border-color .15s;
  margin-bottom: 14px;
}

.checkin-notes:focus { border-color: #4ADE80; }

/* ── Tabla resumen equipo (CEO) ─────────────────────── */
.team-summary {
  background: #fff;
  border: 1px solid #E8E8EC;
  border-radius: 12px;
  overflow: hidden;
}

.team-summary-hd {
  padding: 14px 18px;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-week-selector {
  padding: 5px 10px;
  border: 1px solid #E8E8EC;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  outline: none;
}

/* ── Estado vacío ───────────────────────────────────── */
.akstra-empty {
  text-align: center;
  padding: 48px 24px;
  color: #9CA3AF;
}

.akstra-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.akstra-empty h3 {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}

.akstra-empty p {
  font-size: 13px;
  line-height: 1.5;
}

/* ── Spinner ────────────────────────────────────────── */
@keyframes akstra-spin { to { transform: rotate(360deg); } }

.akstra-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(74,222,128,.3);
  border-top-color: #4ADE80;
  border-radius: 50%;
  animation: akstra-spin .7s linear infinite;
  vertical-align: middle;
}

/* ── Botón verde Akstra ─────────────────────────────── */
.btn-akstra {
  background: #072720;
  color: #4ADE80;
  border: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
  font-family: var(--font-sans);
}

.btn-akstra:hover { background: #0a3829; }
.btn-akstra:disabled { opacity: .5; cursor: not-allowed; }
