/* ==========================================================================
   MOSAICO TV - PANEL ADMINISTRATIVO CMS (NEWSROOM & CONTROL ROOM)
   Estilo: Sistema de Gestión de Contenidos Broadcast Profesional
   ========================================================================== */

.admin-body {
  background-color: #0b1523;
  color: #e3edf8;
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
}

.admin-wrapper {
  display: flex;
  width: 100%;
}

/* Sidebar del CMS */
.admin-sidebar {
  width: 260px;
  background: #060e18;
  border-right: 1px solid #172a41;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #172a41;
  margin-bottom: 1.5rem;
}

.admin-brand-logo {
  height: 38px;
  width: auto;
}

.admin-brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff;
}

.admin-brand-sub {
  font-size: 0.68rem;
  color: #00c7ea;
  text-transform: uppercase;
  font-weight: 700;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  color: #94aec7;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: #0c4f84;
  color: #ffffff;
}

.admin-nav-item span.badge {
  margin-left: auto;
  background: #0097b2;
  color: #ffffff;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
}

.admin-bottom-actions {
  border-top: 1px solid #172a41;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-view-site {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #233e61;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-view-site:hover {
  background: #0097b2;
  border-color: #0097b2;
}

/* Área Principal de Contenido */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #0a1320;
}

.admin-topbar {
  background: #0d1a2d;
  border-bottom: 1px solid #1a3250;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-topbar-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0c4f84;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
}

.admin-content-padding {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

/* Dashboard Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #0f2036;
  border: 1px solid #1a365b;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: #8da7c4;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-meta {
  font-size: 0.72rem;
  color: #00c7ea;
  margin-top: 0.25rem;
}

/* Formulario de Redacción / Edición de Noticias */
.cms-panel-card {
  background: #0f2036;
  border: 1px solid #1a365b;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.cms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1a365b;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.cms-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.cms-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #abc4df;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  background: #081423;
  border: 1px solid #1e3b63;
  color: #ffffff;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #00c7ea;
  outline: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-cms-publish {
  background: linear-gradient(135deg, #0c4f84, #0097b2);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 151, 178, 0.4);
  transition: all var(--transition-fast);
}

.btn-cms-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 151, 178, 0.6);
}

.btn-cms-reset {
  background: #172a41;
  color: #94aec7;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cms-reset:hover {
  background: #233e61;
  color: #ffffff;
}

/* Tabla de Contenidos Gestionables */
.cms-table-wrap {
  overflow-x: auto;
}

.cms-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.cms-table th {
  background: #081423;
  color: #8da7c4;
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #1a365b;
}

.cms-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #132742;
  color: #d1e2f3;
  vertical-align: middle;
}

.cms-table tr:hover td {
  background: #11243d;
}

.status-badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.published {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.status-badge.draft {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tbl-action {
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-tbl-edit {
  background: #173354;
  color: #00c7ea;
}

.btn-tbl-edit:hover {
  background: #0097b2;
  color: #ffffff;
}

.btn-tbl-delete {
  background: rgba(239, 35, 60, 0.15);
  color: #ef233c;
}

.btn-tbl-delete:hover {
  background: #ef233c;
  color: #ffffff;
}

@media (max-width: 992px) {
  .admin-sidebar {
    display: none;
  }
  .cms-form-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
