/* ================================
   Shared styles: Login & Admin Panel
   Note: global.css is loaded first
   This file contains shared components between login and admin
================================ */

/* Material Symbols Outlined */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 18px;
  display: inline-flex;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}

/* Override body for login/admin pages */
body {
  overflow-x: hidden;
  display: flex;
}

/* ================================
   Container (for login and forms)
================================ */
.container {
  margin: 1rem;
  background: #ffffff;
  width: 90%;
  max-width: 500px;
  padding: 0px 24px 32px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
}

/* ================================
   Header & Logo
================================ */
header {
  margin: 0 3rem 0;
}

header img {
  width: 140px;
  height: auto;
  background-color: #7a7a7a;
  padding: 1.5rem 1rem 0.5rem;
}

/* ================================
   Login Box
================================ */
.login-box {
  margin: 1rem 0;
  text-align: left;
}

.login-box label {
  display: block;
  text-align: left;
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #737373;
}

.login-box input {
  width: 100%;
}

/* ================================
   Forgot password link
================================ */
.forgot-password-link {
  margin-top: 1rem;
  text-align: center;
}

.forgot-password-link a {
  color: #ce5d9f;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.forgot-password-link a:hover {
  text-decoration: underline;
  color: #a84980;
}

/* ================================
   Buttons (primary button style)
================================ */
button[id$="-btn"] {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  background: #ce5d9f;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(206, 93, 159, 0.35);
}

button[id$="-btn"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(206, 93, 159, 0.45);
}

button[id$="-btn"]:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(206, 93, 159, 0.35);
}

button[id$="-btn"]:disabled {
  background: linear-gradient(90deg, #e7a8cf, #d99bbf);
  opacity: 0.7;
}

/* Login specific button */
#login-btn {
  margin-top: 0;
}

/* ================================
   SIDEBAR
================================ */
.sidebar {
  width: 240px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar-header {
  padding: 0rem 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

.sidebar-header img {
  width: 90px;
  height: auto;
  background-color: #7a7a7a;
  padding: 0.8rem 0.5rem 0;
  margin-bottom: 1.5rem;
}

.sidebar-header h2 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ce5d9f;
  letter-spacing: 0.5px;
  margin: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  gap: 0.75rem;
}

.nav-item:hover {
  background: #f9fafb;
  color: #ce5d9f;
}

.nav-item.active {
  background: #fdf2f8;
  color: #ce5d9f;
  border-left-color: #ce5d9f;
  font-weight: 600;
}

.nav-item .icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.nav-item .label {
  font-size: 0.85rem;
}

.logout-btn {
  width: calc(100% - 4rem);
  margin: 1rem 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #6b7280;
  transition: all 0.3s ease;
}

/* ================================
   MAIN CONTENT
================================ */
.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #6b7280;
  font-size: 0.9rem;
}

/* ================================
   METRICS GRID (Dashboard)
================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-icon {
  font-size: 2rem;
  background: #fdf2f8;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-info h3 {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ce5d9f;
  margin: 0;
}

/* ================================
   CHARTS
================================ */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  gap: 0.5rem;
}

.bar-item {
  padding-top: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  height: 100%;
}

.bar {
  width: 50%;
  background: linear-gradient(to top, #ce5d9f, #e88fc4);
  height: var(--percentage, 2px);
  min-height: 2px;
  transition: height 0.5s ease;
}

.bar-label {
  font-size: 1.5rem;
}

.bar-value {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
}

#weekly-canvas {
  width: 100%;
  height: 200px;
}

/* ================================
   RANKING
================================ */
.ranking-filters {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ranking-filters label {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 0;
}

.ranking-filters select {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #ffffff;
  cursor: pointer;
  outline: none;
}

.ranking-filters select:focus {
  border-color: #ce5d9f;
  box-shadow: 0 0 0 3px rgba(206, 93, 159, 0.1);
}

/* Contenedor grid para rankings paralelos */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 968px) {
  .ranking-grid {
    grid-template-columns: 1fr;
  }
}

.ranking-column {
  display: flex;
  flex-direction: column;
}

.ranking-column-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #ce5d9f;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ranking-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
}

.ranking-position {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ce5d9f;
  min-width: 40px;
  text-align: center;
}

.ranking-position.gold {
  color: #fbbf24;
}

.ranking-position.silver {
  color: #9ca3af;
}

.ranking-position.bronze {
  color: #d97706;
}

.ranking-position.non-eligible {
  color: #9ca3af;
  font-size: 1.5rem;
}

.ranking-item.non-eligible-item {
  opacity: 0.6;
  border-left: 3px solid #e5e7eb;
}

.ranking-item.non-eligible-item .ranking-name {
  color: #6b7280;
}

.ranking-info {
  flex: 1;
}

.ranking-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.ranking-sector {
  font-size: 0.8rem;
  color: #6b7280;
}

.ranking-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.ranking-stat {
  text-align: center;
}

.ranking-stat-label {
  font-size: 0.7rem;
  color: #6b7280;
  display: block;
}

.ranking-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ce5d9f;
}

/* ================================
   SECTOR CARDS
================================ */
.sector-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.sector-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sector-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sector-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.sector-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sector-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sector-stat-label {
  font-size: 0.85rem;
  color: #6b7280;
}

.sector-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: #ce5d9f;
}

/* ================================
   SECRETARIA GRID
================================ */
.secretaria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.secretaria-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.secretaria-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.secretaria-header {
  margin-bottom: 1rem;
}

.secretaria-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.secretaria-sector {
  font-size: 0.85rem;
  color: #6b7280;
}

.secretaria-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.sec-stat {
  text-align: center;
}

.sec-stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  display: block;
  margin-bottom: 0.25rem;
}

.sec-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ce5d9f;
}

/* ================================
   SECRETARY PROFILE
================================ */
.secretary-profile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}

.profile-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
}

.profile-rank {
  background: #fce7f3;
  color: #ce5d9f;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-stat {
  background: #f9fafb;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-align: center;
}

.profile-stat .value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #ce5d9f;
  margin: 0.25rem 0;
}

.profile-stat .label {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
}

.profile-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-section h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #374151;
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  color: #374151;
}

.profile-item .value {
  font-weight: 600;
  color: #ce5d9f;
}

.profile-item.empty {
  justify-content: flex-start;
  color: #9ca3af;
}

.profile-comments {
  border-top: 1px solid #f3f4f6;
  padding-top: 1rem;
}

.profile-comment {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-comment .meta {
  font-size: 0.6rem;
  color: #6b7280;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-comment .text {
  font-size: 0.7rem;
  color: #1f2937;
}

.empty-state {
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 10px;
  color: #6b7280;
  text-align: center;
}

/* ================================
   SECRETARY OF THE MONTH
================================ */
.secretary-of-month {
  display: flex;
  justify-content: center;
  padding: 0 0 2rem;
}

.award-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem 2rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(206, 93, 159, 0.2);
  border: 1px solid #fce7f3;
}

.award-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.award-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ce5d9f;
  margin-bottom: 0.5rem;
}

.som-sector {
  color: #6b7280;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.som-stats {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
}

.som-history {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2rem;
  margin-top: 3rem;
}

.som-history-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.som-history-header label {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 0;
}

.som-history-header select {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #ffffff;
  cursor: pointer;
  outline: none;
}

.som-history-header select:focus {
  border-color: #ce5d9f;
  box-shadow: 0 0 0 3px rgba(206, 93, 159, 0.1);
}

.som-history-card {
  max-width: 400px;
}

.hidden {
  display: none !important;
}

.stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ce5d9f;
}

/* ================================
   ADMIN TABS
================================ */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid #f3f4f6;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #ce5d9f;
}

.tab-btn.active {
  color: #ce5d9f;
  border-bottom-color: #ce5d9f;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.admin-controls {
  margin-bottom: 1.5rem;
}

/* ================================
   BUTTONS
================================ */
.btn-primary {
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: #ce5d9f;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(206, 93, 159, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(206, 93, 159, 0.4);
}

.btn-secondary {
  padding: 0.65rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-edit {
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ce5d9f;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-edit:hover {
  background: rgba(206, 93, 159, 0.1);
  transform: scale(1.1);
}

.btn-delete {
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ce5d9f;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-delete:hover {
  background: rgba(206, 93, 159, 0.1);
  transform: scale(1.1);
}

/* ================================
   TABLE
================================ */
.table-container {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f9fafb;
}

.data-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 0rem 1rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.7rem;
  color: #1f2937;
}

.data-table tbody tr:hover {
  background: #fafafa;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

/* ================================
   FORMS
================================ */
.password-form {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.password-form h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #ce5d9f;
  box-shadow: 0 0 0 3px rgba(206, 93, 159, 0.1);
}

/* ================================
   MODAL
================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 4rem 1rem 1rem;
  }

  .section-header h1 {
    font-size: 1.5rem;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .sector-cards {
    grid-template-columns: 1fr;
  }

  .secretaria-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    overflow-x: auto;
  }

  .tab-btn {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.65rem 1rem;
  }

  .table-container {
    overflow-x: auto;
  }

  .data-table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .ranking-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .som-stats {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ================================
   Responsive for Login & Container
================================ */
@media (max-width: 768px) {
  .container {
    width: 95%;
    max-width: 100%;
    padding: 0px 16px 24px;
  }

  header {
    margin: 0 2rem 0;
  }

  header img {
    width: 120px;
    padding: 1.5rem 0.8rem;
  }
}

@media (max-width: 420px) {
  .container {
    width: 100%;
    padding: 0px 12px 20px;
    border-radius: 12px;
  }

  header {
    margin: 0 1.5rem 0;
  }

  header img {
    width: 100px;
    padding: 1rem 0.5rem;
  }

  .login-box label {
    font-size: 0.85rem;
  }

  button[id$="-btn"] {
    font-size: 0.8rem;
    padding: 0.65rem 0.8rem;
  }
}
/* ================================
   COMENTARIOS MODULE STYLES
================================ */
.comentarios-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.comment-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.comment-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.score-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.score-badge.score-1,
.score-badge.score-2 {
  background: #fef2f2;
  color: #dc2626;
}

.score-badge.score-3 {
  background: #fef3c7;
  color: #f59e0b;
}

.score-badge.score-4,
.score-badge.score-5 {
  background: #f0fdf4;
  color: #16a34a;
}

.comment-date {
  color: #6b7280;
  font-size: 0.85rem;
}

.comment-info {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.comment-tag {
  background: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.comment-body {
  margin-top: 0.75rem;
}

.comment-body p {
  color: #374151;
  line-height: 1.6;
  margin: 0;
  word-break: break-word;
}

/* ================================
   EMAILS BAJOS MODULE STYLES
================================ */
.emails-bajos-container {
  margin-top: 1.5rem;
}

.filters-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
}

.filter-group select {
  padding: 0.65rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-size: 0.9rem;
  min-width: 180px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-group select:hover {
  border-color: #ce5d9f;
}

.filter-group select:focus {
  outline: none;
  border-color: #ce5d9f;
  box-shadow: 0 0 0 3px rgba(206, 93, 159, 0.1);
}

.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.email-cell {
  font-family: 'Courier New', monospace;
  color: #ce5d9f;
  font-weight: 500;
}

.table-footer {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-footer p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
  font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group select {
    min-width: 100%;
  }
  
  .comment-header {
    flex-direction: column;
  }
  
  .table-container {
    font-size: 0.85rem;
  }
}