/* ==========================================================================
   ESTILOS DEL PANEL DE ADMINISTRACIÓN — BODA MIRIAM & ALAN
   ========================================================================== */

@import url('main.css');

.admin-body {
  background: #F8F6F0;
  color: #222;
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
}

.admin-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* Barra superior */
.admin-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 0.8rem 1.4rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-decoration: none;
}

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

.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.admin-nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.admin-nav-link:hover, .admin-nav-link.active {
  color: var(--gold-dark);
}

/* Tarjetas de estadísticas / KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--white);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  text-align: center;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-top: 0.2rem;
}

.kpi-label {
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Barra de controles y switches */
.controls-card {
  background: var(--cream-glow);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
}

.switches-group {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.switch-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Toggle switch styling */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CCC;
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--gold);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Filtros y acciones por lote */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #D8D0C0;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
}

.pill-btn.active {
  background: var(--gold-dark);
  color: var(--white);
  border-color: var(--gold-dark);
}

/* Grid de administración de medios */
.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.media-card {
  background: var(--white);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

.media-thumb-box {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #222;
  overflow: hidden;
}

.media-thumb-box img, .media-thumb-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  accent-color: var(--gold-dark);
  cursor: pointer;
  z-index: 5;
}

.status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--white);
  z-index: 5;
}

.status-approved { background: var(--ok); }
.status-pending { background: #B38600; }
.status-hidden { background: var(--danger); }

.media-info {
  padding: 0.9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.media-guest-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.media-table-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.media-message-text {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0.5rem 0;
  flex: 1;
  font-style: italic;
  line-height: 1.4;
}

.media-meta-footer {
  font-size: 0.7rem;
  color: var(--ink-muted);
  border-top: 1px solid #EEE;
  padding-top: 0.5rem;
  margin-top: auto;
}

.media-actions {
  display: flex;
  border-top: 1px solid #EAE3D4;
  background: #FCFBF9;
}

.action-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-decoration: none;
  color: var(--ink-soft);
}

.action-btn:not(:last-child) {
  border-right: 1px solid #EAE3D4;
}

.action-btn.approve:hover { background: #EAF4EC; color: var(--ok); }
.action-btn.hide:hover { background: #FFF4E5; color: #B38600; }
.action-btn.delete:hover { background: #FDE8E8; color: var(--danger); }

/* Formulario de Login */
.login-box {
  max-width: 400px;
  margin: 5rem auto;
  background: var(--white);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  text-align: center;
}
