/* ==========================================================================
   PANEL ADMINISTRATIVO DE PRENSA - SENADORA MARY JURADO
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --admin-emerald: #073f3a;
  --admin-emerald-dark: #042e2b;
  --admin-emerald-light: #0d6860;
  --admin-gold: #c5972d;
  --admin-gold-light: #ecd07a;
  --admin-bg: #f4f7f6;
  --admin-card: #ffffff;
  --admin-border: #e0e7e5;
  --admin-text: #132220;
  --admin-muted: #5e7370;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: all 0.25s ease;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
}

/* LOGIN SCREEN */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #042e2b 0%, #073f3a 100%);
}

.login-box {
  background: #ffffff;
  max-width: 440px;
  width: 100%;
  padding: 44px 36px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid rgba(197, 151, 45, 0.4);
}

.login-box img {
  height: 54px;
  margin: 0 auto 20px auto;
}

.login-box h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  color: var(--admin-emerald-dark);
  margin-bottom: 6px;
}

.login-box p {
  color: var(--admin-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* DASHBOARD LAYOUT */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--admin-emerald-dark);
  color: #ffffff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.admin-brand img {
  height: 44px;
  margin-bottom: 10px;
}

.admin-brand span {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--admin-gold-light);
  font-weight: 700;
}

/* TARJETA DE USUARIO EN SIDEBAR */
.admin-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.user-badge-icon {
  width: 32px;
  height: 32px;
  background: var(--admin-gold);
  color: var(--admin-emerald-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.user-badge-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-badge-role {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--admin-gold-light);
  letter-spacing: 0.5px;
}

.user-badge-email {
  font-size: 0.82rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.admin-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: #c9dedb;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.admin-nav-item.active {
  background: var(--admin-emerald-light);
  border-left: 4px solid var(--admin-gold);
}

.admin-sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-main {
  flex-grow: 1;
  padding: 36px 44px;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.admin-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  color: var(--admin-emerald-dark);
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.stat-card {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 18px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon.emerald {
  background: #e0f2f0;
  color: var(--admin-emerald);
}

.stat-icon.gold {
  background: #fbf5e4;
  color: var(--admin-gold);
}

.stat-info h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--admin-text);
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--admin-muted);
}

/* TABLES & CARDS */
.admin-card-container {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--admin-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 30px;
}

.card-top-bar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-top-bar h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  color: var(--admin-emerald-dark);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background: var(--admin-bg);
  padding: 14px 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.92rem;
}

.admin-table tr:hover td {
  background: #fbfdfc;
}

.table-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.action-btn.edit {
  background: #e0f2f0;
  color: var(--admin-emerald);
  margin-right: 6px;
}

.action-btn.delete {
  background: #fee2e2;
  color: #dc2626;
}

.action-btn:hover {
  filter: brightness(0.92);
}

/* MODAL FORM */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 46, 43, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-card {
  background: #ffffff;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-md);
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.admin-modal-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  color: var(--admin-emerald-dark);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-emerald);
}

/* DROPZONE & PREVIEWS MULTIFOTO */
.upload-dropzone {
  border: 2px dashed #b2ccc7;
  background: #f0f7f5;
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--admin-emerald);
  background: #e1efe9;
}

.upload-icon {
  font-size: 2rem;
  color: var(--admin-emerald);
  margin-bottom: 8px;
}

.upload-dropzone p {
  font-size: 0.95rem;
  color: var(--admin-emerald-dark);
  margin-bottom: 4px;
}

.upload-dropzone span {
  font-size: 0.8rem;
  color: var(--admin-muted);
}

.image-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.preview-item {
  position: relative;
  width: 100%;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--admin-border);
  background: #000000;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .remove-photo-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.preview-item .remove-photo-btn:hover {
  background: #b91c1c;
  transform: scale(1.1);
}

.preview-item .badge-main-photo {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(4, 46, 43, 0.85);
  color: #f6df8a;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* BOTONES PRESET DE HORARIOS */
.btn-time-preset {
  background: #eef5f3;
  color: var(--admin-emerald-dark);
  border: 1px solid #c9dedb;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-time-preset:hover {
  background: var(--admin-emerald);
  color: #ffffff;
  border-color: var(--admin-emerald);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* BOTONES GLOBALES ADMIN */
.btn-admin-primary {
  background: var(--admin-emerald);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-admin-primary:hover {
  background: var(--admin-emerald-light);
}

.btn-admin-secondary {
  background: #e2e8e5;
  color: var(--admin-text);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 850px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
  }
  .admin-main {
    padding: 20px;
  }
}
