
/* ==========================================
   VICE HUB 3.5
   Panel de administración editorial
   Diseño responsive
========================================== */

/* PANEL PRINCIPAL */

.v33-panel {
  margin: 20px 0 30px;
  padding: 24px;
  border: 1px solid #454061;
  border-radius: 20px;
  background: #12192b;
  color: #e0e4ee;
  box-sizing: border-box;
}

.v33-panel *,
.v33-panel *::before,
.v33-panel *::after {
  box-sizing: border-box;
}

.v33-panel [hidden] {
  display: none !important;
}

.v33-panel > h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.3;
  color: #ffffff;
}

.v33-panel .muted {
  color: #a8b1c8;
  font-size: 13px;
  line-height: 1.6;
}

/* ESTADÍSTICAS */

.v35-editor-stats {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.v35-editor-stats:empty {
  display: none;
}

.v35-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-height: 95px;
  padding: 16px;
  border: 1px solid #353a55;
  border-radius: 13px;
  background: linear-gradient(
    135deg,
    #20243b,
    #171d30
  );
}

.v35-stat strong {
  color: #ff80b8;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.v35-stat small {
  color: #b9bfd2;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.v35-stat:nth-child(4) strong {
  color: #86efac;
}

.v35-stat:nth-child(5) strong {
  color: #fbbf24;
}

.v35-stat:nth-child(6) strong {
  color: #93c5fd;
}

.v35-stat:nth-child(7) strong {
  color: #fca5a5;
}

/* FILTROS DEL PANEL */

.v35-editor-filters {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  padding: 18px;
  margin: 20px 0;
  border: 1px solid #353a55;
  border-radius: 14px;
  background: #171d30;
}

.v35-editor-filters > label:first-child {
  grid-column: 1 / -1;
}

.v35-editor-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.v35-editor-field > span {
  font-weight: 650;
  font-size: 13px;
  color: #cbd2e6;
}

/* CAMPOS DE EDICIÓN */

.v33-panel input:not([type="checkbox"]),
.v33-panel textarea,
.v33-panel select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #3c425c;
  border-radius: 9px;
  background: #101323;
  color: #e9ebf5;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition:
    border-color .2s ease,
    box-shadow .2s ease;
}

.v33-panel select {
  min-height: 44px;
  color-scheme: dark;
  cursor: pointer;
}

.v33-panel select option {
  background: #171d30;
  color: #e9ebf5;
}

.v33-panel input::placeholder,
.v33-panel textarea::placeholder {
  color: #929bb5;
}

.v33-panel input:focus,
.v33-panel textarea:focus,
.v33-panel select:focus {
  outline: none;
  border-color: #e83e8c;
  box-shadow: 0 0 0 3px #e83e8c20;
}

.v33-panel textarea {
  resize: vertical;
  min-height: 70px;
}

.v33-panel input[type="search"] {
  min-height: 46px;
}

/* LISTADO DE PUBLICACIONES */

.v33-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.v33-list > .muted {
  padding: 24px;
  text-align: center;
  border: 1px dashed #353a55;
  border-radius: 12px;
  background: #171d30;
}

.v33-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid #353a55;
  border-radius: 15px;
  background: #1a2035;
  transition: border-color .2s ease;
}

.v33-card:hover {
  border-color: #68516f;
}

.v33-card .tag {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #e83e8c35;
  border-radius: 7px;
  background: #e83e8c12;
  color: #ff9aca;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ARTÍCULOS DESPLEGABLES */

.v33-card details {
  min-width: 0;
}

.v33-card details > summary {
  position: relative;
  display: block;
  padding: 8px 32px 8px 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
}

.v33-card details > summary::-webkit-details-marker {
  display: none;
}

.v33-card details > summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  color: #ff80b8;
  font-size: 23px;
  font-weight: 400;
}

.v33-card details[open] > summary::after {
  content: '−';
}

.v33-card details[open] > summary {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #353a55;
}

.v33-card details > .v35-editor-field {
  margin-bottom: 18px;
}

.v33-card details > h4 {
  margin: 22px 0 12px;
  font-size: 14px;
  color: #e0e4ee;
}

.v33-card label {
  font-weight: 650;
  font-size: 13px;
  color: #cbd2e6;
}

/* CATEGORÍAS ADICIONALES */

.v35-category-checks {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 14px;
  margin: 0 0 20px;
  border: 1px solid #353a55;
  border-radius: 12px;
  background: #13182a;
}

.v35-category-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #353a55;
  border-radius: 8px;
  background: #1d243b;
  cursor: pointer;
  transition:
    border-color .2s ease,
    background .2s ease;
}

.v35-category-option:hover {
  border-color: #e83e8c;
}

.v35-category-option span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.v33-panel input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  accent-color: #e83e8c;
  cursor: pointer;
}

.v35-category-option:has(input:checked) {
  border-color: #e83e8c88;
  background: #e83e8c15;
}

.v35-category-option:has(input:disabled) {
  border-color: #a34d82;
  background: #e83e8c22;
  cursor: default;
}

.v35-category-option input:disabled {
  cursor: default;
}

.v33-card details > .v35-category-option {
  margin: 16px 0;
  padding: 14px;
}

/* ENLACES A FUENTES */

.v33-card a {
  display: inline-block;
  max-width: 100%;
  margin: 8px 0 14px;
  color: #ff89bd;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.v33-card a:hover {
  color: #ffc1dc;
}

/* BOTONES */

.v33-panel button {
  min-height: 42px;
  padding: 11px 16px;
  border: 1px solid #414761;
  border-radius: 9px;
  background: #282d46;
  color: #e9ebf5;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
  transition:
    background .2s ease,
    border-color .2s ease,
    opacity .2s ease;
}

.v33-panel button:hover {
  border-color: #ff80b8;
  background: #38283f;
}

.v33-panel button.primary {
  background: #e83e8c;
  border-color: #e83e8c;
  color: #ffffff;
}

.v33-panel button.primary:hover {
  background: #c92d76;
  border-color: #c92d76;
}

.v33-panel button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ACCIONES EDITORIALES */

.v33-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
  padding-top: 18px;
  border-top: 1px solid #353a55;
}

.v33-card .actions button {
  flex: 1 1 auto;
}

.v33-card .actions button:first-child {
  border-color: #526582;
  background: #24344b;
}

.v33-card .actions button:first-child:hover {
  background: #304662;
}

/* MENSAJES DE ESTADO */

.v33-card .note {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #454061;
  border-radius: 9px;
  background: #13182a;
  color: #d0d4e2;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.v33-card .note:empty {
  display: none;
}

/* ACCESIBILIDAD */

.v33-panel button:focus-visible,
.v33-panel summary:focus-visible,
.v33-panel input:focus-visible,
.v33-panel a:focus-visible {
  outline: 2px solid #ff80b8;
  outline-offset: 3px;
}

/* TABLETS */

@media (max-width: 850px) {

  .v35-editor-stats {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .v35-category-checks {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}

/* MÓVILES */

@media (max-width: 600px) {

  .v33-panel {
    padding: 15px;
    border-radius: 15px;
    margin: 15px 0 24px;
  }

  .v33-panel > h3 {
    font-size: 23px;
  }

  .v35-editor-stats {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 16px 0;
  }

  .v35-stat {
    padding: 12px;
    min-height: 80px;
  }

  .v35-stat strong {
    font-size: 26px;
  }

  .v35-stat small {
    font-size: 11px;
  }

  .v35-editor-filters {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }

  .v35-editor-filters > label:first-child,
  .v35-editor-filters > label:nth-child(4) {
    grid-column: 1 / -1;
  }

  .v33-panel input:not([type="checkbox"]),
  .v33-panel textarea,
  .v33-panel select {
    font-size: 16px;
    padding: 11px 12px;
  }

  .v33-card {
    padding: 14px;
    border-radius: 12px;
  }

  .v33-card details > summary {
    font-size: 16px;
  }

  .v35-category-checks {
    gap: 7px;
    padding: 9px;
  }

  .v35-category-option {
    gap: 7px;
    padding: 9px 7px;
    min-height: 44px;
  }

  .v35-category-option span {
    font-size: 11px;
  }

  .v33-card .actions {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .v33-card .actions button {
    width: 100%;
    min-height: 46px;
    padding: 10px 8px;
    font-size: 12px;
  }

}

/* PANTALLAS MUY PEQUEÑAS */

@media (max-width: 360px) {

  .v33-panel {
    padding: 10px;
  }

  .v35-editor-filters,
  .v35-category-checks,
  .v33-card .actions {
    grid-template-columns: 1fr;
  }

  .v35-editor-filters > label {
    grid-column: 1;
  }

}

/* REDUCIR ANIMACIONES */

@media (prefers-reduced-motion: reduce) {

  .v33-panel *,
  .v33-panel *::before,
  .v33-panel *::after {
    transition: none !important;
    animation: none !important;
  }

}
