.detail-wrapper { padding: 8px 0 24px; }
.detail-breadcrumb { color: #5a6b3a; cursor: pointer; margin-bottom: 8px; display:inline-flex; align-items:center; gap:6px;    text-decoration: none; }
.detail-title { font-family: var(--font-heading); font-size: 24px; font-weight: 700; margin: 8px 0 16px; color: var(--figma-text); }
.section-card { border: 1px solid #efe7e4; border-radius: 14px; overflow: hidden; background:#fff; }
.section-card__head { background: var(--figma-secondary); color:#fff; padding: 10px 14px; font-weight: 700; }
.section-card__sub { font-size: 12px; color:#f3ecea; font-weight: 400; }
.section-card__body { padding: 16px; }
.form-grid { display:grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
.avatar-box { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.avatar-circle { width: 140px; height: 140px; border-radius: 50%; background:#dde2e8; }
.avatar-actions { display:flex; gap:8px; }
.avatar-actions .btn { padding: 4px 10px; border-radius: 8px; }
.avatar-actions .btn-outline-danger { border:1px solid #e0b3b3; color:#b85454; }
.avatar-actions .btn-outline-danger:hover { background:#f9e3e3; }
.avatar-actions .btn-outline-primary { border:1px solid var(--figma-primary); color: var(--figma-primary); }
.avatar-actions .btn-outline-primary:hover { background:#f0f7eb; }
.modal .cropper-container { max-width: 100% !important; }
.detail-actions { display:flex; justify-content:flex-end; padding: 12px 0; }
/* Tokenización basada en Figma (fácil de ajustar). Sustituye los valores por los del diseño definitivo. */
:root {
  /* Colores principales (Figma) */
  --figma-primary: #6E8C37;      /* Verde */
  --figma-primary-600: #4A5C2A;
  --figma-secondary: #8FB86E;    /* Verde medio */
  --figma-accent: #C8D4B8;       /* Verde claro */
  --figma-bg: #f8fdf5;           /* Verde muy claro */
  --figma-surface: #ffffff;      /* Blanco */
  --figma-text: #2a3a1a;         /* Verde muy oscuro */
  --figma-muted: #6d7a5b;        /* Verde grisáceo */
  --figma-success: #2e7d32;
  --figma-danger: #c62828;
  --figma-warning: #b26a00;
  --figma-info: #2f5d8a;

  /* Radios y sombras */
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 6px 14px rgba(0,0,0,.08);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.12);

  /* Tipografías (según Figma: Playfair Display para títulos, Roboto para texto) */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html, body {
  background: var(--figma-bg);
  color: var(--figma-text);
  font-family: var(--font-body);
}

/* ======= LOGIN FULLPAGE ======= */
.login-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
  background: var(--figma-bg) url('/img/bg-login.png') center/cover no-repeat fixed;
}

.login-card-confirm {
  width: 100%;
  max-width: 800px;
  min-height: 600px;
  align-content: center;
  background: var(--figma-surface);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  padding: 60px 100px 80px;

}

.login-card {
  width: 100%;
  max-width: 800px;
  background: var(--figma-surface);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  padding: 60px 100px 80px;
}
.login-brand { display:flex; align-items:center; justify-content:center; gap:8px; color:#5a6b3a; margin-bottom:4px; font-weight:700; text-transform: lowercase; }
.login-logo { width: 150px; height: 60px; object-fit: contain; }

.login-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 26px;
  text-align: center;
  color: var(--figma-text);
  margin: 35px 0 15px;
}

.login-subtitle {
  font-size: 10px;
  text-align: center;
  color: var(--figma-muted);
  margin-bottom: 24px;
}
.login-link {
  color: var(--figma-secondary);
  text-decoration: underline;
  font-weight: 500;
}
.login-link:hover {
  text-decoration: none;
  color: #7aa55a;
}

.login-form { margin-top: 8px; }

.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 11px;
  color: var(--figma-muted);
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  height: 36px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1.6px solid #e9dcd6;
  background: #fff;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.field-input:focus {
  border-color: var(--figma-secondary);
  box-shadow: 0 0 0 4px rgba(199,154,139,.18);
}

/* Error state (wrong password) */
.login-card.is-error .field-input { border-color: var(--figma-danger); box-shadow: 0 0 0 4px rgba(198,40,40,.08); }

/* Mensajes de éxito */
.login-success {
  background: #d4edda;
  color: #155724;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.login-success i {
  margin-right: 8px;
  color: #28a745;
}

/* Barras de fortaleza de contraseña */
.strength-wrapper {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  flex: 1;
  background-color: #eae3df;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.password-strength-label {
  font-size: 12px;
  margin-top: 4px;
  color: #666;
}

/* Panel de confirmación de éxito */
.login-card-confirm {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.login-redirect {
  background-color: var(--figma-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

.login-redirect:hover {
  background-color: var(--figma-primary-600);
  color: white;
}
.login-error { color: var(--figma-danger); text-align: center; font-size: 12px; margin: 4px 0 10px; }

.login-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 16px;
}
.remember {
  font-size: 12px;
  color: var(--figma-muted);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.forgot { font-size: 12px; color: var(--figma-secondary); text-decoration: none; }
.forgot:hover { text-decoration: underline; }
.login-redirect {
  display: block;
  padding-top: 7px;
  width: 100%;
  margin: 0 auto;
  height: 40px;
  border-radius: 30px;
  background: var(--figma-secondary);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 100;
  letter-spacing: .2px;
  transition: transform .06s ease, background .2s ease;
}
.login-submit {
  display: block;
  width: 100%;
  margin: 0 auto;
  height: 40px;
  border-radius: 30px;
  background: var(--figma-secondary);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 100;
  letter-spacing: .2px;
  transition: transform .06s ease, background .2s ease;
}
.login-submit:hover { background: #7aa55a; }
.login-submit:active { transform: translateY(1px); }

/* Ocultar navbar y footer en login para igual que el diseño plano */
body:has(.login-hero) .navbar,
body:has(.login-hero) .footer { display: none !important; }
body:has(.login-hero) .alert { display: none !important; }

/* ======= PÁGINA PÚBLICA: PRIMERA SESIÓN ======= */
.public-hero { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: var(--figma-bg) url('/img/bg-login.png') center/cover no-repeat fixed; }
.public-card { width: 100%; max-width: 1160px; background: #FCFCFC; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 54px; }
.public-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 36px; align-items: center; }
.public-title { font-family: 'Playfair Display', serif; color: var(--figma-text); font-size: 50px; font-weight: 600; letter-spacing: 0.2px; margin: 0 0 50px; }
.info-title { margin-bottom: 30px; }
.public-subtitle { font-family: 'Roboto', sans-serif; font-weight: 700; color: var(--figma-text); font-size: 20px; margin: 0 0 30px; }
.public-paragraph { font-family: 'Roboto', sans-serif; color: var(--figma-muted); font-size: 16px; line-height: 1.85; margin: 0 0 16px; }
.public-actions { display:flex; gap:16px; margin-top: 28px; }
.public-primary { font-family: 'Roboto', sans-serif; display:inline-block; background: var(--figma-primary); color:#fff; padding: 12px 38px; border-radius: 12px; text-decoration:none; box-shadow: var(--shadow-sm); transition: background .2s ease, transform .06s ease; font-size: 18px; }
.public-primary:hover { background: var(--figma-primary-600); }
.public-primary:active { transform: translateY(1px); }
.public-secondary { display:inline-block; background:#e8f0e3; color:#6d7a5b; padding: 10px 18px; border-radius: 10px; text-decoration:none; }
.public-secondary:hover { background:#dde8d4; }
.public-illustration { width: 100%; max-width: 350px; display:block; margin: 0 auto; }
@media (max-width: 992px) { .public-grid { grid-template-columns: 1fr; } .public-right { order: -1; } .public-card { padding: 32px; } .public-title { font-size: 36px; } .public-subtitle { font-size: 18px; } .public-paragraph { font-size: 14px; } .public-primary { font-size: 16px; padding: 10px 24px; } }

/* ======= FORGOT / RESET ======= */
.forgot-hero, .reset-hero { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: var(--figma-bg) url('/img/bg-login.png') center/cover no-repeat fixed; }
.forgot-card, .reset-card { width: 100%; max-width: 720px; background: var(--figma-surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 44px 48px 36px; }
.forgot-title, .reset-title { font-family: var(--font-heading); font-weight: 600; font-size: 22px; text-align: center; color: var(--figma-text); margin: 6px 0 10px; }
.forgot-subtitle, .reset-subtitle { font-size: 12px; text-align: center; color: var(--figma-muted); margin-bottom: 24px; }
.forgot-submit, .reset-submit { display: block; width: 240px; margin: 8px auto 0; height: 32px; border-radius: 8px; background: var(--figma-secondary); border: none; color: #fff; font-weight: 600; }
.forgot-submit:hover, .reset-submit:hover { background: #7aa55a; }
body:has(.forgot-hero) .navbar, body:has(.forgot-hero) .footer, body:has(.reset-hero) .navbar, body:has(.reset-hero) .footer { display: none !important; }
/* Mostrar alertas en forgot/reset */

/* Medidor de fuerza simple */
.strength-wrapper { height: 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 10px; }
.strength-bar { height: 5px; border-radius: 999px; background: #eae3df; }
.strength-bar.active-1 { background: #d98c8c; }
.strength-bar.active-2 { background: #e0b06f; }
.strength-bar.active-3 { background: #75b17e; }

/* Label de seguridad de contraseña */
.password-strength-label {
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}

/* Página éxito */
.success-hero { min-height: 100vh; display: grid; place-items: center; background: var(--figma-bg); padding: 40px 16px; }
.success-card { width: 100%; max-width: 720px; background: var(--figma-surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 56px; text-align: center; }
.success-title { font-family: var(--font-heading); color: var(--figma-text); font-size: 24px; margin-bottom: 6px; }
.success-subtitle { color: var(--figma-muted); font-size: 12px; margin-bottom: 16px; }
.success-back { background: var(--figma-secondary); color: #fff; border: none; border-radius: 8px; height: 32px; padding: 0 16px; }

/* Navbar */
.navbar {
  background: var(--figma-primary) !important;
  box-shadow: var(--shadow-md);
}
.navbar-brand { font-family: var(--font-heading); letter-spacing: .2px; }

/* Titulares */
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--font-heading); color: var(--figma-primary); }

/* Cards */
.card { border-radius: var(--radius-lg); border: none; box-shadow: var(--shadow-sm); }
.card-header { background: var(--figma-surface); border-bottom: 1px solid #efe7e4; }

/* Botones */
.btn { border-radius: var(--radius-md); font-weight: 600; }
.btn-primary { background: var(--figma-primary);border: 1px solid var(--figma-primary);font-size: 16px;font-weight: 400; }
.btn-primary:hover { background: var(--figma-primary-600);border: 1px solid var(--figma-primary) }
.btn-outline-primary { color: var(--figma-primary); border: 1px solid var(--figma-primary); }
.btn-outline-primary:hover { color: #fff; background: var(--figma-primary); }

/* Formularios */
.form-control, .form-select { border-radius: var(--radius-md); border: 2px solid #efebe9; padding: .9rem 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--figma-primary); box-shadow: 0 0 0 .2rem rgba(122, 75, 71, .12); }

/* Tablas */
.table thead th { background: #f0f7eb; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; }
.table tbody tr:hover { background: #f8fdf5; }

/* Orden: flechas arriba/abajo */
.sort-arrows { display:inline-flex; flex-direction:column; margin-left:6px; line-height:0.85; vertical-align:middle; }
.sort-arrow { font-size:.7rem; color:#9aa3ad; text-decoration:none; }
.sort-arrow.is-active { color:#58677c; font-weight:700; }

/* Badges de estado */
/* Listado encuestas: tipo como etiqueta junto al título (encuesta general = paleta UBESOL) */
.badge-encuesta-general {
  background-color: var(--figma-primary);
  color: #fff;
  font-weight: 600;
}

.badge-pendiente { background: linear-gradient(135deg, var(--figma-warning), #e19927); }
.badge-confirmada { background: linear-gradient(135deg, var(--figma-success), #3fa243); }
.badge-cancelada { background: linear-gradient(135deg, var(--figma-danger), #e44343); }
.badge-completada { background: linear-gradient(135deg, var(--figma-info), #3c79b2); }

/* Alerts */
.alert { border: none; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

/* Footer */
.footer { background: #2b2322; }

/* ======= ADMIN LAYOUT ======= */
.admin-main { background: #fff; }
.admin-body { background: var(--figma-bg); }
.admin-shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.admin-sidebar { background: #fff; border-right: 1px solid #efe7e4; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .brand { font-family: var(--font-heading); color: var(--figma-primary); font-size: 20px; margin-bottom: 18px; display:flex; align-items:center; }
.menu { display: grid; gap: 6px; }
.menu-item { display: block; padding: 10px 12px; border-radius: 10px; color: var(--figma-text); text-decoration: none; font-weight: 500; }
.menu-item:hover { background: #f0f7eb; }
.menu-item.active { background: #f0f7eb; color: var(--figma-primary); }
.admin-topbar { height: 100px; margin: 0 50px; display: flex; align-items: end; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid black; background: #fff; position: sticky; top: 0; z-index: 5; }
.admin-topbar .page-title { font-weight: 600; font-size: 22px;padding-bottom: 10px; }
.admin-content { padding: 32px 20px 18px; }
.admin-content .container { max-width: 100%;padding: 0 30px;}
.user-mini strong { font-size: 15px; }
.user-mini small { font-size: 12px; color: #8b817d; }

/* ======= RESPONSIVE ADMIN LAYOUT ======= */
@media (max-width: 992px) {
  .admin-shell { 
    grid-template-columns: 1fr; 
    position: relative;
  }
  
  .admin-sidebar { 
    position: fixed; 
    left: -256px; 
    top: 0; 
    z-index: 1000; 
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  }
  
  .admin-sidebar.open { 
    left: 0; 
  }
  
  .admin-topbar { 
    margin: 0; 
    padding: 10px 15px;
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
  }
  
  .admin-topbar .page-title { 
    font-size: 18px; 
    padding-bottom: 0;
    margin: 0;
  }
  
  .admin-content { 
    padding: 24px 10px 15px; 
  }
  
  .admin-content .container { 
    padding: 0 15px; 
  }
  
  .user-mini {
    padding-bottom: 0 !important;
  }
  
  .user-mini strong {
    font-size: 14px !important;
  }
  
  .user-mini small {
    font-size: 11px !important;
  }
  
  /* Overlay para cerrar sidebar al hacer clic fuera */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  /* Asegurar que las tablas tengan scroll horizontal en móvil */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Ajustar cards y formularios */
  .card {
    margin-bottom: 15px;
  }
  
  .form-control, .form-select {
    font-size: 16px; /* Evita zoom en iOS */
  }
}

.dropdown-toggle::after { padding-bottom:10px; }
/* ======= LIST CONTROLS (filtros/orden) ======= */
.list-controls { margin-bottom: 8px; width: 100%;}
.list-controls__bar { display:flex; align-items:center; gap:12px; }
.list-controls__search { display:flex; align-items:center; gap:8px; background:#e6e7e9; border:1px solid #e6e7e9; padding:4px 10px; border-radius:15px; min-width:450px; flex:1; max-width:600px; }
.list-controls__search input { border:none; outline:none; flex:1; min-width:300px; background:transparent; font-size: 15px; }
.list-controls__filters { display:flex; align-items:center; gap:8px; }
.list-controls__filter { border:1px solid #d1dae6; border-radius:12px; padding:6px 12px; background:#fff; font-size:14px; color:#39424e; min-width:140px; }
.list-controls__filter:focus { outline:none; border-color:var(--figma-primary); box-shadow:0 0 0 2px rgba(110, 140, 55, 0.1); }
.list-controls__filters-toggle { 
  border:0px solid #efe7e4; 
  background:#fff; 
  padding:6px 10px; 
  border-radius:10px; 
  display:flex; 
  align-items:center; 
  justify-content:center;
  position:relative;
  color:#58677c;
  transition:all 0.2s ease;
  min-width:40px;
  height:40px;
}
.list-controls__filters-toggle:hover { 
  background:#f8f9fa; 
  color:#39424e;
  border-color:#d1d5db;
}
.list-controls__filters-toggle i { 
  font-size:14px; 
}
.filter-indicator {
  position:absolute;
  top:4px;
  right:4px;
  width:6px;
  height:6px;
  background:#007bff;
  border-radius:50%;
}
.list-controls__spacer { flex:1; }

/* Listado encuestas admin: una sola línea de filtros; scroll horizontal si no cabe */
.encuestas-list-controls .list-controls__bar {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.encuestas-list-controls .list-controls__search {
  flex: 1 1 auto;
  min-width: 280px;
  max-width: none;
  flex-wrap: nowrap;
}
.encuestas-list-controls .list-controls__search input {
  min-width: 100px;
  flex: 1 1 140px;
}
.encuestas-list-controls .list-controls__filter {
  flex-shrink: 0;
  min-width: 7.5rem;
}

/* Acordeón listado encuestas / estadísticas por categoría: cabecera verde al colapsar y al expandir, badge a la derecha antes de la flecha */
.encuestas-list-accordion .accordion-button.encuesta-cat-header,
.estadisticas-list-accordion .accordion-button.encuesta-cat-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--figma-secondary) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.encuestas-list-accordion .accordion-button.encuesta-cat-header:not(.collapsed),
.encuestas-list-accordion .accordion-button.encuesta-cat-header.collapsed,
.estadisticas-list-accordion .accordion-button.encuesta-cat-header:not(.collapsed),
.estadisticas-list-accordion .accordion-button.encuesta-cat-header.collapsed {
  background: var(--figma-secondary) !important;
  color: #fff !important;
}
.encuestas-list-accordion .accordion-button.encuesta-cat-header:focus,
.estadisticas-list-accordion .accordion-button.encuesta-cat-header:focus {
  box-shadow: none !important;
  border-color: transparent;
  z-index: 1;
}
.encuestas-list-accordion .accordion-button.encuesta-cat-header::after,
.estadisticas-list-accordion .accordion-button.encuesta-cat-header::after {
  flex-shrink: 0;
  margin-left: 0.35rem;
  filter: brightness(0) invert(1);
}
.encuestas-list-accordion .encuesta-cat-header__title,
.estadisticas-list-accordion .encuesta-cat-header__title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-align: left;
}
.encuestas-list-accordion .encuesta-cat-header__badge,
.estadisticas-list-accordion .encuesta-cat-header__badge {
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0.35rem;
}
.list-controls__panel { background:#fff; border:1px solid #efe7e4; border-radius:12px; padding:12px; margin-top:10px; }
.list-controls__panel[hidden] { display:none !important; }

/* Email config helpers */
.email-grid .form-label{font-weight:600;color:#39424e}
.email-grid .alert{background:#fafbfc}

.list-controls__footer { display:flex; justify-content:space-between; align-items:center; margin-top:12px; border-top:1px solid #e2dcd9; padding-top:10px; }
.list-controls__footer .pager { margin: 0 auto; }
.pager { display:flex; gap:10px; align-items:center; }
.pager__link { color:#58677c; text-decoration:none; padding:2px 6px; border-radius:8px; }
.pager__link.is-active { background:#eef2f7; font-weight:600; }
.pager__link.is-disabled { pointer-events:none; opacity:.5; }
.pager__gap { color:#9aa3ad; }
.page-size { display:flex; align-items:center; gap:8px; }
.page-size__select { border:1px solid #d1dae6; border-radius:12px; padding:2px 10px; background:#fff; }
.page-size__label { color:#6d7a8b; font-size:.9rem; }


/* Cards "pixel" */
.card { border-radius: 0px; box-shadow: none; border: none; text-align: center; }
.card-header { background: #fff; border-bottom: 1px solid #efe7e4; }
.card-body{padding: 0px;}

/* Flecha de navegación en detalle */
.detail-breadcrumb .fa-arrow-left {
  width: 25px;
  height: 25px;
  font-size: 25px;
}

/* Header de admin en edición */
.admin-header {
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: center;
  padding-left: 10px;
}
.admin-id {
  font-size: 18px;
  font-weight: bold;
  color: white;
  margin-bottom: 4px;
}
.admin-subtitle {
  font-size: 14px;
  color: white;
  opacity: 0.9;
}

/* Layout de dos columnas para admin */
.admin-form-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.admin-form-left {
  flex: 1;
  min-width: 0;
}

.admin-form-left .form-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px 24px !important;
  padding-left: 10px;
}

.admin-form-left .col-6 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: span 1;
  min-width: 350px;
}

.admin-form-right {
  padding-top: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top:30px;
}

.profile-photo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #dde2e8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 48px;
}

.photo-actions {
  padding-top: 30px;
  display: flex;
  flex-direction: row;
  gap: 100px;
  align-items: center;
}

.photo-link {
  color: #616e7c;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.photo-link:hover {
  text-decoration: underline;
}

.photo-link.disabled {
  color: #6c757d;
  cursor: not-allowed;
}

.photo-link.disabled:hover {
  text-decoration: none;
}

/* Mensajes en formularios */
#errorMessage, #successMessage {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

#errorMessage i, #successMessage i {
  font-size: 16px;
}

/* Opciones visuales (texto + imagen) en la encuesta pública */
.option-visual-card {
  min-width: 140px;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.option-visual-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  width: 100%;
}

.option-visual-card__text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #394a2d;
}

.option-visual-card__image img {
  max-height: 80px;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

/* Modal de confirmación para eliminar foto */
#deletePhotoModal .modal-header {
  background-color: var(--figma-secondary);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

#deletePhotoModal .modal-title {
  color: white;
  font-weight: 600;
}

#deletePhotoModal .btn-close {
  filter: invert(1);
}

/* Campo de última conexión (solo lectura) */
.form-control[readonly] {
  background-color: #f8f9fa;
  border-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.form-control[readonly]:focus {
  background-color: #f8f9fa;
  border-color: #e9ecef;
  box-shadow: none;
}

/* Tablas admin */
.table { border-color: #efe7e4; }
.table thead tr { background: #B8D4A3; }
.table thead th { background: #B8D4A3; font-size: 12px; letter-spacing: .04em; color: black; border-bottom: 1px solid #efe7e4; font-weight: 400; }
.table tbody td { border-top-color: #efe7e4; font-size: 14px; }
.table tbody tr:hover { background: #fff; }

/* Envíos recientes (estadísticas): sin cambio de fondo al pasar el ratón (anula reglas globales de .table) */
.estadisticas-envios-recientes__table tbody tr:hover {
  background: #fff;
}

/* Estadísticas: cada bloque de filtros en una sola línea (scroll horizontal si no cabe) */
.estadisticas-filtros-bloque .list-controls__bar {
  width: 100%;
}
.estadisticas-filtros-bloque .list-controls__filters.estadisticas-filtros-una-fila {
  flex: 1;
  min-width: 0;
}
.estadisticas-filtros-una-fila {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
/* Caja gris de búsqueda a ancho completo, sin forzar salto de línea */
.estadisticas-filtros-search-line.list-controls__search {
  max-width: none;
  flex: 1;
  min-width: 0;
  width: 100%;
}
.estadisticas-filtros-search-line.list-controls__search input[type="text"] {
  min-width: 120px;
  flex: 1 1 140px;
}
/* Cabecera verde estándar + botón colapsar (texto blanco) */
.estadisticas-envios-recientes__head.section-card__head {
  background: var(--figma-secondary);
  color: #fff;
}
.estadisticas-envios-recientes__toggle {
  background: transparent !important;
  color: #fff !important;
}
.estadisticas-envios-recientes__toggle:hover,
.estadisticas-envios-recientes__toggle:focus {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #fff !important;
}
.estadisticas-envios-recientes__toggle:focus {
  box-shadow: none;
}
.estadisticas-envios-recientes__chev {
  transition: transform 0.2s ease;
  transform: rotate(0deg);
  opacity: 0.95;
}
.estadisticas-envios-recientes__toggle.collapsed .estadisticas-envios-recientes__chev {
  transform: rotate(-90deg);
}

/* Estadísticas del dashboard */
.stats-card { background:#fff; border:1px solid #efe7e4; border-radius: 14px; padding: 16px; text-align:center; }
.stats-number { font-weight: 700; font-size: 24px; color: var(--figma-primary); }
.stats-label { font-size: 12px; color: var(--figma-muted); }

/* ======= PASO AGENDA (simulado) ======= */
.schedule-hero { min-height: 100vh; display:grid; place-items:center; padding:40px 16px; background: var(--figma-bg) url('/img/bg-login.png') center/cover no-repeat fixed; }
.schedule-card { width: 100%; max-width: 1280px; background: #FCFCFC; border-radius: 15px; box-shadow: 0 19.4px 38.8px rgba(0, 0, 0, .25), 0 13.8574px 13.8574px rgba(0, 0, 0, .22); padding: 40px; box-sizing: border-box; }
.schedule-grid { display:grid; grid-template-columns: 280px 1fr 280px; gap: 24px; align-items:start; }
.schedule-title { display: none; }
.schedule-sidebar .meta-item { font-size: 12px; color:#8a7a75; margin-bottom: 10px; }
.schedule-sidebar .meta-item span { color:#5a6b3a; font-weight:700; margin-right:6px; }
.schedule-sidebar .meta-pill { font-size: 12px; color:#8a7a75; margin-bottom: 10px; }
.schedule-calendar { background: none; border-radius:0; padding: 16px 40px; box-shadow: none; border-left: 1px solid #3F342EB2; border-right: 1px solid #3F342EB2; }
.schedule-times { display:flex; flex-direction:column; gap:12px; }
.times-header { font-weight:700; color:#5a6b3a; padding:8px 0; }
.times-scroll { display:flex; flex-direction:column; gap:8px; }
.times-nav { display:flex; justify-content:center; }
.times-nav button { width:32px; height:32px; border-radius:8px; background:#fff; border:none; color:#5a6b3a; }
.times-list { display:flex; flex-direction:column; gap:20px; max-height: 260px; overflow:hidden; }
.time-btn { font-family: 'Roboto', sans-serif; background:#EDEDED; border:1px solid #E3E3E3; border-radius:8px; height:49px; display:flex; align-items:center; justify-content:center; max-width: 180px; margin: 0 auto; padding:0 50px; text-align:center; font-size:20px; color:#000; box-sizing:border-box; flex: 0 0 49px; }
.time-btn.selected { background:#6E8C37; color:#fff; border-color:#6E8C37; }
.times-actions { margin-top:auto; display:flex; justify-content:center; }
.btn-next { font-family: 'Roboto', sans-serif; display:inline-block; text-align:center; background: var(--figma-primary-600); color:#fff; padding:12px 38px; border-radius:12px; text-decoration:none; box-shadow: var(--shadow-sm); font-size:18px; font-weight:500; margin: 6px auto 0; border: none; }
.info-actions .btn-next { margin: 0; text-align: center; }
.btn-next[aria-disabled="true"] { opacity:.5; pointer-events:none; }
.btn-next.is-active { opacity:1; }

/* Mini calendario */
#fc { --gap: 8px; }
#fc .fc-bar { display:flex; align-items:center; margin-bottom: 10px; }
#fc .title { font-family: 'Roboto', sans-serif; font-weight:700; color:#4A5C2A; flex: 1 1 auto; }
#fc .nav { background:#fff; border:none; border-radius:0; width:42px; height:42px; line-height:40px; text-align:center; color:#4A5C2A; font-size:18px; margin-left:8px; }
#fc .fc-grid { display:grid; grid-template-columns: repeat(7, 1fr); gap: var(--gap); }
#fc .dow { font-family: 'Roboto', sans-serif; text-align:center; font-size: 14px; color:#6E8C37; padding:6px 0; }
#fc .day { font-family: 'Roboto', sans-serif; background: none; border: none; border-radius:999px; width:58px; height:58px; display:grid; place-items:center; margin: 0 auto; color:#294059; cursor:pointer; font-weight:400; font-size:18px; }
#fc .day.disabled { background: #EDEDED; opacity:.35; cursor:not-allowed; text-decoration: line-through; }
#fc .day.disabled.weekend { background: none; text-decoration: none; }
#fc .day.selected { background:#6E8C37; color:#fff; border-color:#6E8C37; }

body:has(.schedule-hero) .navbar, body:has(.schedule-hero) .alert { display:none !important; }

/* ======= PASO INFO ======= */
.info-head { margin-bottom: 18px; position:relative; }
.info-sub { color:#8a7a75; font-size: 14px; margin: 0 0 10px; max-width: 760px; }
.info-badge { position:absolute; right: 12px; top: -10px; background:#fff; color:#6E8C37; border:1px solid rgba(110,140,55,.34); border-radius: 999px; padding: 6px 10px; font-weight:600; box-shadow: var(--shadow-sm); }
.info-form { margin-top: 40px; }
.info-form .row { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 16px; align-items:end; }
.info-form .col { display:flex; flex-direction:column; gap:8px; }
.info-form .col-check { align-items: flex-start; }
.info-label { color:#5a6b3a; font-weight: 600; font-size: 12px; }
.info-input { height: 46px; border-radius: 10px; border: 2px solid #9BB87A; background:#fff; padding: 8px 12px; outline:none; }
.info-input:focus { border-color:#6E8C37; box-shadow: 0 0 0 4px rgba(110,140,55,.15); }
.info-input.is-invalid { border-color: var(--figma-danger); box-shadow: 0 0 0 3px rgba(198,40,40,.12); }
.info-errors { background: #fdecea; color: #b3261e; border:1px solid #f5c2c0; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.info-errors ul { margin-bottom: 0; }
.info-legal { margin: 8px 0 18px; font-size: 14px; color:#8a7a75; }
.info-check { display:flex; align-items:center; gap:8px; font-size:14px; color:#8a7a75; }
.info-check input { width: 18px; height: 18px; accent-color: var(--figma-primary); border-radius: 4px; }
.info-actions { display:flex; justify-content:flex-end; gap:45px; width:100%; }
.btn-prev { display:inline-block; background:#f0f7eb; color:#6d7a5b; padding:12px 38px; border-radius:12px; text-decoration:none; box-shadow: var(--shadow-sm); font-size:18px; font-weight:500; }

/* ======= Responsive: Agenda e Info ======= */
/* Romper a una columna antes de 1280px para evitar cortes horizontales */
@media (max-width: 1279px) {
  .schedule-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .schedule-section { background: none; border: none; border-radius: 12px; padding: 12px; }
  .schedule-title { display:block; font-size: 14px; font-weight: 700; color:#5a6b3a; margin: 0 0 8px; }
}
@media (max-width: 992px) {
  .schedule-card { padding: 28px; }
  .schedule-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .schedule-calendar { padding: 12px 20px; }
  .schedule-section { background: none; border: none; border-radius: 12px; padding: 12px; }
  .schedule-title { display:block; font-size: 14px; font-weight: 700; color:#5a6b3a; margin: 0 0 8px; }
  #fc .nav { width: 36px; height: 36px; line-height: 34px; font-size: 16px; }
  #fc .day { width: 46px; height: 46px; font-size: 16px; }
  .times-list { max-height: 220px; }
  .time-btn { height: 44px; font-size: 18px; padding: 0 36px; }
  .btn-next, .btn-prev { font-size: 16px; padding: 10px 24px; }
}

@media (max-width: 600px) {
  .public-card { padding: 22px; }
  .public-title { font-size: 30px; }
  .public-subtitle { font-size: 16px; }
  .public-paragraph { font-size: 13px; }
  .public-illustration { max-width: 300px; }

  .schedule-hero { padding: 16px; background-attachment: scroll; background-position: center top; overflow-x: hidden; }
  .schedule-card { padding: 16px; box-sizing: border-box; margin: 0 auto; }
  .schedule-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .schedule-calendar { padding: 10px 16px; }
  .schedule-hero #fc { --gap: 6px; }
  .schedule-hero #fc .title { font-size: 16px; }
  .schedule-hero #fc .dow { font-size: 11px; }
  .schedule-hero #fc .nav { width: 20px; height: 20px; line-height: 18px; font-size: 14px; margin-left: 6px; }
  .schedule-hero #fc .nav img { width: 20px; height: 20px; }
  .schedule-hero #fc .day { width: 30px; height: 30px; font-size: 12px; }
  .times-list { max-height: 200px; }
  .time-btn { height: 40px; font-size: 15px; padding: 0 22px; }
  .times-nav button { width: 26px; height: 26px; }
  .schedule-section { background: none; border: none; border-radius: 12px; padding: 10px; }
  .schedule-title { display:block; font-size: 13px; }

  .info-form .row { grid-template-columns: 1fr; }
  .info-actions { justify-content: center; gap: 24px; }
}

/* Ultra-compact phones (~360-400px) */
@media (max-width: 400px) {
  .schedule-hero .schedule-calendar { padding: 10px 16px !important; max-width: 100%; }
  .schedule-hero #fc { --gap: 6px; }
  .schedule-hero #fc .nav { width: 20px; height: 20px; line-height: 18px; font-size: 13px; margin-left: 4px; }
  .schedule-hero #fc .title { font-size: 13px; }
  .schedule-hero #fc .dow { font-size: 10px; }
  .schedule-hero #fc .day { width: 30px; height: 30px; font-size: 12px; }
  .time-btn { height: 40px; font-size: 15px; padding: 0 20px; }
}

/* Very small width (<=360px) */
@media (max-width: 360px) {
  .schedule-hero { padding: 12px; }
  .schedule-card { padding: 12px; }
  .schedule-section { padding: 8px; }
  .schedule-calendar { padding: 8px 16px; }
  #fc { --gap: 5px; }
  .schedule-hero #fc .title { font-size: 12px; }
  .schedule-hero #fc .nav { width: 24px; height: 24px; line-height: 22px; font-size: 12px; margin-left: 4px; }
  .schedule-hero #fc .dow { font-size: 9px; }
  .schedule-hero #fc .day { width: 30px; height: 30px; font-size: 12px; }
}

