/*
Theme Name: Hello Elementor Child
Theme URI: https://wikipol.org
Description: Tema hijo de Hello Elementor para Wikipol
Author: Andres
Template: hello-elementor
Version: 1.0
*/

/* ============================
   LAYOUT GENERAL DASHBOARD
   ============================ */

.wikipol-dashboard {
  font-family: 'Inter', sans-serif;
  background: #f4f4f8;
  padding: 24px 16px;
}

@media (min-width: 1024px) {
  .wikipol-dashboard {
    padding: 32px 40px;
  }
}

.wpk-dashboard-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ============================
   SIDEBAR
   ============================ */

.wpk-sidebar {
  width: 260px;
  background: #f7f7fc;
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.sidebar-user-role {
  font-size: 12px;
  color: #6b7280;
}

/* Navegación Artículos / Galerías */

.sidebar-content-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e5e7f4;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.sidebar-bottom {
  margin-top: 20px;
  border-top: 1px solid #e5e7f4;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-link:hover {
  background: #ececff;
  color: #4b3b9d;
  transform: translateX(1px);
}

.sidebar-link-muted {
  font-weight: 400;
  color: #6b7280;
}

.sidebar-link-muted:hover {
  background: #ececff;
  color: #4b3b9d;
}

.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

/* Estado activo para Artículos / Galerías en sidebar */

.sidebar-tab.active {
  background: #ececff;
  color: #4b3b9d;
}

/* ============================
   CONTENIDO PRINCIPAL
   ============================ */

.wpk-main {
  flex: 1;
  min-width: 0;
}

.wpk-main-header {
  margin-bottom: 12px;
}

.dashboard-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.dashboard-subtitle {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

/* Card blanca 3D que contiene filtros + tabla */

.dashboard-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px 18px 22px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

/* ============================
   TOOLBAR: Publicados / Archivados
   ============================ */

.dashboard-toolbar.uniform-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.button-group-left {
  display: flex;
  gap: 8px;
}

.tab-btn {
  border: none;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  cursor: pointer;
  background: #f3f4ff;
  color: #374151;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #e0e1ff;
}

.tab-btn.active {
  background: #6651e7;
  color: #ffffff;
}

/* ============================
   TAB CONTENT
   ============================ */

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================
   TABLA PREMIUM (opción A)
   ============================ */

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

.dashboard-table thead th {
  text-align: left;
  padding: 10px 10px;
  font-weight: 500;
  font-size: 12px;
  border-bottom: 1px solid #eceff7;
  color: #6b7280;
  background: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid #f3f4fb;
  vertical-align: middle;
  color: #111827;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table tbody tr:hover {
  background: #fafbff;
}

.dashboard-table a {
  text-decoration: none;
  color: #4b3b9d;
  font-weight: 500;
}

.dashboard-table a:hover {
  color: #2f1e72;
  text-decoration: underline;
}

/* Columna PORTADA (galerías) */

.dashboard-table td.col-portada {
  width: 110px;
}

.dashboard-table td.col-portada img {
  width: 96px;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
}

/* ============================
   BOTONES PÍLDORA EN TABLA
   ============================ */

.dashboard-table .accion-link {
  font-size: 12px;
  margin-right: 6px;
  text-decoration: none;
}

.dashboard-table .accion-link.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #d5d6f5;
  background: #f6f6ff;
  color: #34338a;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

.dashboard-table .accion-link.pill:hover {
  background: #e5e6ff;
  border-color: #c2c3f0;
  color: #201f76;
}

/* Variantes Archivar / Desarchivar */

.dashboard-table .accion-link.pill-red {
  border-color: #f9c4c4;
  background: #fff5f5;
  color: #c0392b;
}

.dashboard-table .accion-link.pill-red:hover {
  background: #ffe3e3;
  border-color: #f39c9c;
  color: #992d22;
}

.dashboard-table .accion-link.pill-green {
  border-color: #b7f0c8;
  background: #f0fff5;
  color: #1f7a3a;
}

.dashboard-table .accion-link.pill-green:hover {
  background: #e0ffe9;
  border-color: #92e3aa;
  color: #145526;
}

/* ============================
   PAGINACIÓN
   ============================ */

.dashboard-pagination {
  text-align: center;
  margin-top: 18px;
}

.dashboard-pagination ul {
  list-style: none;
  display: inline-flex;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.dashboard-pagination a,
.dashboard-pagination span {
  background: #ffffff;
  border: 1px solid #d1d5db;
  padding: 7px 12px;
  border-radius: 10px;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 12px;
}

.dashboard-pagination a:hover {
  background: #f3f4ff;
  border-color: #9ca3af;
}

.dashboard-pagination .current {
  background: #6651e7;
  color: #ffffff;
  border-color: #6651e7;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 960px) {
  .wpk-dashboard-layout {
    flex-direction: column;
  }

  .wpk-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .sidebar-top {
    flex: 1;
  }

  .sidebar-bottom {
    border-top: none;
    padding-top: 0;
    align-items: flex-end;
  }

  .sidebar-bottom .sidebar-link {
    padding: 6px 8px;
  }
}

@media (max-width: 720px) {
  .dashboard-card {
    padding: 14px 12px 18px;
  }

  .dashboard-toolbar.uniform-buttons {
    flex-wrap: wrap;
  }
}

/* ============================================
   FIX: Forzar estilos de la tabla del dashboard
   ============================================ */

.dashboard-card table,
.dashboard-card table * {
    all: unset;
    display: revert;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif !important;
}

/* Restaurar estructura básica */
.dashboard-card table {
    width: 100% !important;
    border-collapse: collapse !important;
}

/* Encabezados */
.dashboard-card table thead th {
    padding: 10px 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: #f9fafb !important;
    border-bottom: 1px solid #e3e3ed !important;
    color: #4b5563 !important;
    text-align: left !important;
}

/* Celdas del cuerpo */
.dashboard-card table tbody td {
    padding: 9px 8px !important;
    border-bottom: 1px solid #f1f2f8 !important;
    color: #111827 !important;
    vertical-align: middle !important;
    font-size: 13px !important;
}

/* Hover estilo limpio */
.dashboard-card table tbody tr:hover {
    background: #fafafe !important;
}

/* Enlaces */
.dashboard-card table a {
    color: #4b3b9d !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.dashboard-card table a:hover {
    color: #2f1e72 !important;
    text-decoration: underline !important;
}

/* Portadas */
.dashboard-card td.col-portada img {
    width: 120px !important;
    aspect-ratio: 16/9 !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    display: block !important;
}

/* Botones pill */
.dashboard-card .accion-link.pill {
    padding: 4px 12px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
    border: 1px solid #d5d6f5 !important;
    background: #f6f6ff !important;
    color: #34338a !important;
}
