:root {
  --cream: #F5F2EB;
  --cream-deep: #E8E2D8;
  --ink: #2D2419;
  --ink-soft: #6B5F52;
  --ink-light: #9A8F84;
  --primary: #2C5F8A;
  --primary-dark: #1E4363;
  --primary-light: #4A82B5;
  --primary-pale: #E8EFF6;
  --accent: #D4833B;
  --accent-dark: #B5682A;
  --accent-pale: #F5E8D9;
  --success: #4A7C59;
  --success-dark: #345A40;
  --success-pale: #E2EEE6;
  --danger: #B54A3A;
  --danger-dark: #8C372A;
  --danger-pale: #F5E3DF;
  --warning: #C49B3F;
  --warning-dark: #9A782C;
  --warning-pale: #F5EDDF;
  --font-display: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 3px rgba(45, 36, 25, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 36, 25, 0.08);
  --shadow-lg: 0 8px 32px rgba(45, 36, 25, 0.12);
  --shadow-xl: 0 12px 48px rgba(45, 36, 25, 0.16);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.home-logo{
    text-align:center;
    margin-bottom:20px;
}

.logo-seil{
    width:180px;      /* Ajusta el tamaño si lo deseas */
    max-width:80%;
    height:auto;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(135deg, #E8EFF6 0%, #F5EDDF 25%, #E2EEE6 50%, #F5E8D9 75%, #FFFBF0 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: 2.25rem; line-height: 1.2; }
h2 { font-size: 1.75rem; line-height: 1.3; }
h3 { font-size: 1.25rem; line-height: 1.4; }

/* ===== BOTONES ===== */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(44, 95, 138, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(44, 95, 138, 0.35);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--cream-deep);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-admin {
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid rgba(44, 95, 138, 0.3);
  color: var(--primary);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(44, 95, 138, 0.15);
}

.btn-admin:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 95, 138, 0.25);
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--cream-deep);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  text-decoration: none;
}

.btn-back-home:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-4px);
  box-shadow: var(--shadow-sm);
}

/* ===== HOME ===== */
.home-card {
  background: linear-gradient(145deg, rgba(44, 95, 138, 0.92) 0%, rgba(30, 67, 99, 0.88) 100%);
  border: none;
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  margin-top: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.home-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.home-icon i {
  font-size: 36px;
  color: #fff;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}

.home-card h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #fff;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.home-card p.sub {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem;
  font-size: 15px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.admin-link-wrap {
  text-align: center;
  margin-top: 1.5rem;
}

/* ===== SURVEY SHARED ===== */
.survey-pad {
  padding: 2rem 0;
}

.back-link {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 14px;
  padding: 8px 0;
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  font-weight: 500;
}

.back-link:hover {
  color: var(--primary-dark);
  transform: translateX(-4px);
}

.gauge-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  font-weight: 500;
}

.gauge-track {
  height: 8px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s ease;
}

.cat-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cat-tag-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-tag-icon i {
  font-size: 16px;
}

.cat-tag span.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.field-label {
  font-size: 13px;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.field-label .required {
  color: #dc3545;
  margin-left: 2px;
}

.field-input {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--cream-deep);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}

.field-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.1);
}

.field-input.duplicate {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
  background: #fff5f5 !important;
}
.field-input.available {
  border-color: #4A7C59 !important;
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15) !important;
  background: #f5fff5 !important;
}
.btn-primary.disabled-btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== OPTIONS ===== */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--cream-deep);
  background: #fff;
  font-size: 14px;
  width: 100%;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  color: var(--ink);
}

.opt-btn:hover {
  border-color: var(--primary-light);
  background: var(--primary-pale);
  transform: translateX(4px);
}

.opt-btn.selected {
  border-color: var(--primary);
  background: var(--primary-pale);
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.1);
}

.opt-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: var(--transition);
}

.opt-btn.selected .opt-num {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ===== THANKS ===== */
.thanks-wrap {
  padding: 4rem 0;
  text-align: center;
}

.thanks-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border: 2px solid var(--success);
}

.thanks-icon i {
  font-size: 32px;
  color: var(--success);
}

.thanks-wrap h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.thanks-wrap p {
  color: var(--ink-soft);
  line-height: 1.8;
  font-size: 15px;
  max-width: 400px;
  margin: 0 auto;
}

/* ===== ADMIN LOGIN ===== */
.login-wrap {
  padding: 3rem 0;
  max-width: 400px;
  margin: 0 auto;
}

.login-wrap h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.login-wrap > p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ============================================================
   PANEL DE ADMINISTRACIÓN
   ============================================================ */
.admin-pad {
  padding: 1.75rem 0 3rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(44, 95, 138, 0.08);
}

.admin-header h2 {
  font-size: 1.75rem;
  color: var(--ink);
  margin: 0;
}

.admin-header .eyebrow {
  font-size: 11px;
  margin-bottom: 4px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

#admin-count {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--cream-deep);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}

/* ===== METRIC GRID ===== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}

.metric-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.25rem;
  border-left: 4px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.metric-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.metric-card .m-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
}

.metric-card .m-value {
  font-size: 1.5rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin: 0;
  color: var(--ink);
}

.metric-card .m-value.small {
  font-size: 1rem;
  font-family: var(--font-body);
}

.metric-card .m-value .suffix {
  font-size: 0.875rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 400;
}

/* ===== TARJETAS DE PLANTAS ===== */
.stats-plant-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 1.5rem;
}

.stats-plant-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.25rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #E8E2D8;
  text-align: center;
  cursor: pointer;
}

.stats-plant-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.stats-plant-card .plant-emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}

.stats-plant-card .plant-name {
  font-size: 12px;
  font-weight: 600;
  color: #6B5F52;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.stats-plant-card .plant-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.2;
}

.stats-plant-card .plant-count {
  font-size: 12px;
  color: #9A8F84;
  margin-top: 2px;
}

/* Colores por planta */
.stats-plant-card.saltillo-card {
  border-left: 4px solid #4A7C59;
}
.stats-plant-card.silao-card {
  border-left: 4px solid #C49B3F;
}
.stats-plant-card.sanluis-card {
  border-left: 4px solid #D4833B;
}

/* Tarjeta total */
.stats-plant-card.total-card {
  background: linear-gradient(135deg, #2C5F8A 0%, #1E4363 100%);
  border-color: #2C5F8A;
}
.stats-plant-card.total-card .plant-name {
  color: rgba(255,255,255,0.8);
}
.stats-plant-card.total-card .plant-value {
  color: #ffffff;
}
.stats-plant-card.total-card .plant-count {
  color: rgba(255,255,255,0.7);
}

/* ===== TABS ===== */
.tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #ffffff;
  border: 1.5px solid var(--cream-deep);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.tab-btn:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
  background: var(--cream);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== FILTRO PLANTAS ===== */
.jefe-toggle-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--cream-deep);
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--ink-soft);
  font-family: var(--font-body);
}

.jefe-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.jefe-toggle-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ===== RING GRID ===== */
.ring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 0.5rem;
}

.ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--cream-deep);
}

.ring-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ring-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}

.ring-wrap svg {
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--cream-deep);
}

.ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease;
}

.ring-icon-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-icon-badge i {
  font-size: 16px;
  margin-bottom: 2px;
  color: var(--ink-soft);
}

.ring-icon-badge span {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--ink);
}

.ring-card-label {
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
}

/* ===== CATEGORY ROWS ===== */
.cat-row {
  margin-bottom: 14px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.cat-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.cat-row-name {
  font-size: 13px;
  flex: 1;
  font-weight: 500;
  color: var(--ink);
}

.cat-row-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.bar-track {
  height: 6px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ===== QUESTION TOGGLES ===== */
.qcat-toggle {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--cream-deep);
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  margin-bottom: 8px;
}

.qcat-toggle:hover {
  border-color: var(--primary-light);
  background: var(--primary-pale);
}

.qcat-body {
  padding: 14px 6px;
  display: none;
  animation: slideUp 0.3s ease;
}

.qcat-body.open {
  display: block;
}

.qitem {
  margin-bottom: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--cream-deep);
}

.qitem p.qtext {
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.6;
  color: var(--ink);
}

.hist {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 56px;
}

.hist-col {
  flex: 1;
  text-align: center;
}

.hist-bar-wrap {
  height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hist-bar {
  width: 80%;
  max-width: 32px;
  border-radius: 4px 4px 0 0;
  transition: height 0.4s ease;
  min-height: 2px;
}

.hist-num {
  font-size: 10px;
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-weight: 500;
}

.qmeta {
  font-size: 12px;
  color: var(--ink-light);
  margin: 8px 0 0;
  font-weight: 500;
}

/* ===== COMMENTS ===== */
.comment-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.comment-chip {
  font-size: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--cream-deep);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  font-weight: 500;
}

.comment-chip:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
  background: var(--cream);
}

.comment-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.comment-q {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 14px;
  font-family: var(--font-display);
  color: var(--ink);
}

.comment-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  border-left: 4px solid var(--primary);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.comment-card:hover {
  box-shadow: var(--shadow-md);
}

.comment-card p.body-text {
  font-size: 13px;
  margin: 0;
  line-height: 1.7;
  color: var(--ink);
}

.comment-card p.who {
  font-size: 11px;
  color: var(--ink-light);
  margin: 8px 0 0;
  font-weight: 500;
}

/* ===== DATA TABLE ===== */
table.data-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

table.data-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--ink-soft);
  font-weight: 600;
  border-bottom: 2px solid var(--cream-deep);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--cream);
}

table.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream-deep);
  color: var(--ink);
}

table.data-table tr:hover {
  background: var(--cream);
}

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--cream-deep);
  background: #fff;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--cream-deep);
  box-shadow: var(--shadow-sm);
}

.empty-state i {
  font-size: 40px;
  color: var(--ink-light);
  opacity: 0.4;
}

.empty-state p {
  color: var(--ink-soft);
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== SELECT ===== */
select.gselect {
  font-size: 13px;
  border-radius: 10px;
  border: 1.5px solid var(--cream-deep);
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

select.gselect:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.1);
}

/* ===== DUPLICATE ALERT ===== */
.duplicate-alert {
  background: var(--danger-pale);
  border-left: 4px solid var(--danger);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.duplicate-alert i {
  color: var(--danger);
  font-size: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.duplicate-alert .content {
  flex: 1;
}

.duplicate-alert .title {
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 4px;
  font-size: 15px;
}

.duplicate-alert .detail {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ===== PLANT SELECTOR ===== */
.plant-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.plant-option {
  flex: 1;
  min-width: 100px;
  padding: 12px 16px;
  border: 2px solid var(--cream-deep);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
  user-select: none;
}

.plant-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-pale);
  transform: translateY(-2px);
}

.plant-option.selected {
  border-color: var(--primary);
  background: var(--primary-pale);
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.1);
}

.plant-option .plant-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

.plant-option .plant-label {
  font-size: 12px;
}

.plant-option[data-plant="Saltillo"] {
  border-color: #4A7C59;
}
.plant-option[data-plant="Saltillo"].selected {
  background: #E2EEE6;
  border-color: #4A7C59;
  color: #345A40;
}

.plant-option[data-plant="Silao"] {
  border-color: #C49B3F;
}
.plant-option[data-plant="Silao"].selected {
  background: #F5EDDF;
  border-color: #C49B3F;
  color: #9A782C;
}

.plant-option[data-plant="San Luis"] {
  border-color: #D4833B;
}
.plant-option[data-plant="San Luis"].selected {
  background: #F5E8D9;
  border-color: #D4833B;
  color: #B5682A;
}

/* ============================================================
   ESTILOS PARA JEFES
   ============================================================ */
.jefe-card {
  border: 1px solid #E8EEF5;
  border-radius: 12px;
  padding: 16px 20px;
  background: #FAFCFE;
  margin-bottom: 12px;
  transition: var(--transition);
}

.jefe-card:hover {
  box-shadow: var(--shadow-sm);
}

.jefe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.jefe-card-header h4 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}

.jefe-card-header .jefe-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 4px 0 0;
}

.jefe-card-header .jefe-score-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jefe-card-header .jefe-score-wrap .score-number {
  font-size: 20px;
  font-weight: 700;
}

.jefe-card-header .jefe-chevron {
  transition: transform 0.3s ease;
}
.jefe-card-header .jefe-chevron.open {
  transform: rotate(90deg);
}

.jefe-card-detail {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #E8EEF5;
}
.jefe-card-detail.open {
  display: block;
}

.jefe-progress {
  margin-bottom: 16px;
}

.jefe-progress .progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
}
.jefe-progress .progress-label span:last-child {
  font-weight: 600;
}

.jefe-progress .bar-track {
  height: 8px;
  border-radius: 999px;
  background: #E8EEF5;
  overflow: hidden;
  margin-top: 4px;
}

.jefe-progress .bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

.jefe-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.jefe-cat-grid .cat-item {
  background: #F5F7FA;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jefe-cat-grid .cat-item .cat-name {
  font-size: 12px;
  color: var(--ink-soft);
}

.jefe-cat-grid .cat-item .cat-score {
  font-size: 14px;
  font-weight: 600;
}

.jefe-evaluadores {
  margin-top: 12px;
}

.jefe-evaluadores summary {
  font-size: 12px;
  color: var(--ink-light);
  cursor: pointer;
  padding: 4px 0;
}

.jefe-evaluadores summary:hover {
  color: var(--primary);
}

.jefe-evaluadores .ev-list {
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.jefe-evaluadores .ev-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px solid #F0F2F5;
  font-size: 12px;
}

.jefe-evaluadores .ev-item .ev-name {
  color: var(--ink);
  font-weight: 500;
}

.jefe-evaluadores .ev-item .ev-plant {
  font-size: 11px;
  color: var(--ink-light);
  flex: 1;
  text-align: center;
}

.jefe-evaluadores .ev-item .ev-score {
  font-weight: 600;
}

.jefe-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.jefe-summary-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--cream-deep);
  transition: var(--transition);
  cursor: pointer;
}

.jefe-summary-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.jefe-summary-card .jefe-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.jefe-summary-card .jefe-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
}

.jefe-summary-card .jefe-stats .avg {
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .home-card {
    padding: 2.5rem 1.5rem;
    margin-top: 1.5rem;
    min-height: 320px;
  }
  .home-card h1 { font-size: 1.75rem; }
  .survey-pad { padding: 1.5rem 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .ring-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 14px; }
  .admin-header { flex-direction: column; align-items: stretch; }
  .admin-header-actions { justify-content: flex-start; }
  .stats-plant-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .wrap { padding: 0 0.75rem; }
  .home-card {
    padding: 2rem 1.25rem;
    border-radius: 16px;
    min-height: 280px;
  }
  .home-card h1 { font-size: 1.5rem; }
  .home-icon { width: 60px; height: 60px; }
  .home-icon i { font-size: 26px; }
  .metric-grid { grid-template-columns: 1fr; gap: 10px; }
  .ring-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats-plant-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .btn-primary { padding: 12px 24px; font-size: 14px; width: 100%; justify-content: center; }
  .field-input { padding: 10px 14px; font-size: 13px; }
  .opt-btn { padding: 10px 12px; font-size: 13px; gap: 10px; }
  .opt-num { width: 24px; height: 24px; font-size: 11px; }
  .admin-header h2 { font-size: 1.5rem; }
  .metric-card .m-value { font-size: 1.25rem; }
  .tab-btn { font-size: 12px; padding: 6px 14px; }
  .stats-plant-card .plant-value { font-size: 1.5rem; }
}

@media (max-width: 360px) {
  .stats-plant-grid { grid-template-columns: 1fr; }
  .ring-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
/* ============================================================
   TOAST NOTIFICATION - SUPERIOR
   ============================================================ */
.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  padding: 10px 24px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-family: var(--font-body, -apple-system, sans-serif);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  animation: toastSlideDown 0.3s ease;
  max-width: 400px;
  line-height: 1.4;
  text-align: center;
}

.toast-notification.error {
  background: #dc3545;
}

@keyframes toastSlideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 480px) {
  .toast-notification {
    top: 12px;
    left: 12px;
    right: 12px;
    transform: none;
    max-width: none;
    padding: 10px 16px;
    font-size: 12px;
    border-radius: 8px;
    animation: toastSlideDownMobile 0.3s ease;
  }
  @keyframes toastSlideDownMobile {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}