/* ==========================================================================
   auth.css — Formularios de autenticación VibraSelva
   ========================================================================== */

/* ── Layout de página auth ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Panel izquierdo — imagen/branding */
.auth-panel-left {
  background:
    linear-gradient(165deg, rgba(10,28,12,.88) 0%, rgba(26,61,32,.80) 60%, rgba(61,122,64,.6) 100%),
    url('../../images/hero.jpg') center/cover no-repeat;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 64px 56px;
  position: relative; overflow: hidden;
}
.auth-panel-left::after {
  content: '🌿';
  position: absolute; right: -30px; bottom: -20px;
  font-size: 22rem; opacity: .06;
  pointer-events: none; user-select: none;
}
.auth-brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-size: 1.6rem;
  font-weight: 700; color: var(--white);
  margin-bottom: 40px; text-decoration: none;
}
.auth-brand-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--green-bright), var(--green-lime));
  border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem;
}
.auth-panel-left h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700; color: var(--white);
  line-height: 1.15; margin-bottom: 18px;
}
.auth-panel-left h2 em { font-style: italic; color: var(--green-lime); }
.auth-panel-left p {
  color: rgba(255,255,255,.7);
  font-size: .95rem; line-height: 1.72;
  max-width: 380px; margin-bottom: 36px;
}
.auth-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,.14);
}
.auth-stat-num {
  font-family: var(--font-display); font-size: 1.9rem;
  font-weight: 700; color: var(--white); line-height: 1;
}
.auth-stat-num sup { color: var(--green-lime); font-size: .9rem; }
.auth-stat-label { font-size: .75rem; color: rgba(255,255,255,.5); margin-top: 4px; }

/* Panel derecho — formulario */
.auth-panel-right {
  background: var(--white);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 56px 48px;
  overflow-y: auto;
}
.auth-form-wrap {
  width: 100%; max-width: 420px;
}
.auth-form-header { margin-bottom: 32px; }
.auth-form-header h1 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 6px;
}
.auth-form-header p {
  font-size: .9rem; color: var(--text-mid); line-height: 1.6;
}
.auth-form-header a {
  color: var(--green-bright); font-weight: 600;
}
.auth-form-header a:hover { color: var(--green-dark); }

/* Campos del formulario */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: .82rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 7px;
  letter-spacing: .03em;
}
.form-label .required { color: var(--green-bright); margin-left: 2px; }
.form-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .93rem;
  color: var(--text-dark); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(90,170,80,.15);
}
.form-input.error { border-color: #e05555; }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(224,85,85,.15); }
.form-input-wrap { position: relative; }
.form-input-wrap .form-input { padding-right: 44px; }
.form-input-icon {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-light); font-size: 1rem;
  padding: 4px; transition: color var(--transition);
}
.form-input-icon:hover { color: var(--green-bright); }
.form-hint {
  font-size: .76rem; color: var(--text-light);
  margin-top: 5px; display: block;
}
.form-error {
  font-size: .78rem; color: #e05555;
  margin-top: 5px; display: block;
}

/* Checkbox y opciones */
.form-check {
  display: flex; align-items: center; gap: 10px;
  font-size: .87rem; color: var(--text-mid);
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--green-bright);
  cursor: pointer;
}
.form-check a { color: var(--green-bright); font-weight: 600; }

/* Botón submit */
.btn-auth {
  width: 100%; padding: 14px;
  background: var(--green-bright); color: var(--white);
  border: none; border-radius: 50px;
  font-family: var(--font-body); font-size: .97rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
  margin-top: 8px;
}
.btn-auth:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(90,170,80,.4);
}
.btn-auth:disabled {
  background: var(--green-light); color: var(--text-light);
  transform: none; box-shadow: none; cursor: not-allowed;
}

/* Divisor */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--text-light); font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--green-light);
}

/* Mensajes de alerta */
.alert {
  padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: .87rem; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
  border: 1.5px solid transparent;
}
.alert-error   { background: #fef0f0; border-color: #f5c6c6; color: #c0392b; }
.alert-success { background: #f0faf0; border-color: #b8e0b8; color: #1a5c1a; }
.alert-info    { background: #f0f5ff; border-color: #c0d0f0; color: #1a2d5c; }
.alert-icon    { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* Fortaleza de contraseña */
.password-strength { margin-top: 8px; }
.strength-bar {
  height: 4px; background: var(--green-light);
  border-radius: 99px; overflow: hidden; margin-bottom: 5px;
}
.strength-fill {
  height: 100%; border-radius: 99px;
  transition: width .3s ease, background .3s ease;
  width: 0%;
}
.strength-label { font-size: .73rem; color: var(--text-light); }

/* Link de volver */
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .83rem; color: var(--text-mid);
  margin-bottom: 24px; transition: color var(--transition);
}
.auth-back:hover { color: var(--green-bright); }

/* ── Navbar en páginas auth (simplificada) ───────────────────────────────── */
.auth-page .navbar { display: none; }

/* ── Admin — menú usuario en navbar ─────────────────────────────────────── */
.nav-user {
  display: flex; align-items: center; gap: 10px;
  position: relative;
}
.nav-user-btn {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 50px; padding: 6px 14px 6px 6px;
  cursor: pointer; transition: all var(--transition);
  color: var(--white);
}
.nav-user-btn:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
}
.nav-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.nav-user-name {
  font-size: .84rem; font-weight: 600;
  max-width: 120px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}
.nav-user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); min-width: 220px;
  border: 1.5px solid var(--green-light);
  display: none; z-index: 200;
  overflow: hidden;
}
.nav-user-dropdown.open { display: block; }
.dropdown-header {
  padding: 16px 18px; background: var(--green-pale);
  border-bottom: 1px solid var(--green-light);
}
.dropdown-header strong { display: block; font-size: .9rem; color: var(--text-dark); }
.dropdown-header small  { font-size: .75rem; color: var(--text-light); }
.dropdown-role {
  display: inline-block; margin-top: 5px;
  padding: 2px 10px; border-radius: 50px;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.dropdown-menu { padding: 8px 0; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; font-size: .87rem; color: var(--text-mid);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.dropdown-item:hover { background: var(--green-pale); color: var(--green-dark); }
.dropdown-item.danger:hover { background: #fef0f0; color: #c0392b; }
.dropdown-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.dropdown-divider { height: 1px; background: var(--green-light); margin: 4px 0; }

/* ── Admin dashboard ─────────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--green-deep);
  padding: 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.admin-sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: flex-start;
  flex-direction: column; gap: 6px;
}
.admin-nav { padding: 16px 0; }
.admin-nav-section {
  padding: 6px 20px 4px;
  font-size: .65rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.35); margin-top: 8px;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; font-size: .87rem;
  color: rgba(255,255,255,.65);
  transition: all var(--transition); cursor: pointer;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.admin-nav-item:hover { background: rgba(255,255,255,.07); color: var(--white); }
.admin-nav-item.active {
  background: rgba(141,198,63,.12);
  color: var(--green-lime);
  border-left-color: var(--green-lime);
}
.admin-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-main { background: #f4f8f4; }
/* overflow-x NO va en .admin-main porque fuerza overflow-y:auto,
   lo que rompe position:sticky en los hijos. En su lugar
   clip-path o nada — el layout de grid contiene el desbordamiento. */
.admin-topbar {
  background: var(--white); padding: 16px 32px;
  border-bottom: 1px solid var(--green-light);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.admin-topbar h1 { font-size: 1.25rem; font-weight: 700; }
.admin-content { padding: 32px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 32px; }
.admin-stat-card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 24px; border: 1.5px solid var(--green-light);
  box-shadow: var(--shadow-sm);
}
.admin-stat-card .icon { font-size: 1.6rem; margin-bottom: 12px; }
.admin-stat-card .num {
  font-family: var(--font-display); font-size: 2.2rem;
  font-weight: 700; color: var(--green-dark); line-height: 1;
}
.admin-stat-card .lbl { font-size: .8rem; color: var(--text-light); margin-top: 4px; }

/* Tabla de usuarios admin */
.admin-table-wrap {
  background: var(--white); border-radius: var(--radius-md);
  border: 1.5px solid var(--green-light); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-table-header {
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--green-light);
}
.admin-table-header h2 { font-size: 1.05rem; font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.admin-table th {
  padding: 11px 16px; text-align: left;
  background: var(--green-pale); color: var(--text-mid);
  font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid var(--green-light);
}
.admin-table td { padding: 13px 16px; border-bottom: 1px solid #f0f5f0; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafdf9; }
.admin-user-cell { display: flex; align-items: center; gap: 11px; }
.admin-user-cell img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.admin-user-cell strong { display: block; font-size: .88rem; color: var(--text-dark); }
.admin-user-cell small  { font-size: .76rem; color: var(--text-light); }
.badge-rol {
  display: inline-block; padding: 3px 10px;
  border-radius: 50px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.badge-admin   { background: #fff3cd; color: #856404; }
.badge-lutier  { background: #d4edda; color: #1a5c1a; }
.badge-usuario { background: #e8f4fd; color: #1a3d5c; }
.badge-activo   { background: #d4edda; color: #1a5c1a; }
.badge-inactivo { background: #f8d7da; color: #7a1a1a; }
.admin-actions { display: flex; gap: 6px; }
.action-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid var(--green-light);
  background: var(--white); font-size: .85rem;
  transition: all var(--transition);
}
.action-btn:hover { background: var(--green-pale); border-color: var(--green-bright); }
.action-btn.danger:hover { background: #fef0f0; border-color: #f5c6c6; }

/* ══════════════════════════════════════════════════════════════════════════
   PERFIL DE USUARIO
   ══════════════════════════════════════════════════════════════════════════ */

.perfil-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  align-items: start;
}

/* ── Sidebar del perfil ───────────────────────────────────────────────────── */
.perfil-sidebar {
  position: sticky;
  top: 88px;
}
.perfil-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--green-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.perfil-card-header {
  background: linear-gradient(145deg, var(--green-deep) 0%, var(--green-dark) 100%);
  padding: 36px 24px 28px;
  text-align: center;
  position: relative;
}
.perfil-card-header::after {
  content: '🌿';
  position: absolute; right: -10px; bottom: -12px;
  font-size: 7rem; opacity: .07;
  pointer-events: none; user-select: none;
}
.perfil-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}
.perfil-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.3);
  display: block;
}
.perfil-avatar-badge {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 22px; height: 22px;
  background: var(--green-lime);
  border-radius: 50%;
  border: 2px solid var(--green-deep);
  display: grid; place-items: center;
  font-size: .6rem;
}
.perfil-nombre {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--white); margin-bottom: 4px;
  line-height: 1.2;
}
.perfil-email {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 12px;
  word-break: break-all;
}
.perfil-rol-badge {
  display: inline-block;
  padding: 4px 14px; border-radius: 50px;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.perfil-card-body {
  padding: 20px 0;
}
.perfil-stat-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  border-bottom: 1px solid var(--green-pale);
  font-size: .85rem;
}
.perfil-stat-row:last-child { border-bottom: none; }
.perfil-stat-label {
  color: var(--text-mid);
  display: flex; align-items: center; gap: 8px;
}
.perfil-stat-value {
  font-weight: 700; color: var(--green-dark);
  font-size: .9rem;
}
.perfil-nav {
  margin-top: 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--green-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.perfil-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  font-size: .87rem; color: var(--text-mid);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 1px solid var(--green-pale);
}
.perfil-nav-item:last-child { border-bottom: none; }
.perfil-nav-item:hover {
  background: var(--green-pale);
  color: var(--green-dark);
  border-left-color: var(--green-light);
}
.perfil-nav-item.active {
  background: #f0faf0;
  color: var(--green-bright);
  border-left-color: var(--green-bright);
  font-weight: 600;
}
.perfil-nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .65; }
.perfil-nav-item.active svg { opacity: 1; }

/* ── Panel principal del perfil ───────────────────────────────────────────── */
.perfil-main {}
.perfil-panel {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--green-light);
  box-shadow: var(--shadow-sm);
  display: none;
}
.perfil-panel.active { display: block; }
.perfil-panel-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--green-light);
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
}
.perfil-panel-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 4px;
}
.perfil-panel-header p {
  font-size: .83rem; color: var(--text-light); line-height: 1.5;
}
.perfil-panel-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--green-pale);
  border-radius: 12px; display: grid; place-items: center;
  font-size: 1.3rem;
}
.perfil-panel-body { padding: 28px; }

/* Grid de campos del formulario de perfil */
.perfil-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.perfil-form-grid .form-group.full { grid-column: 1 / -1; }
.form-textarea {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .93rem;
  color: var(--text-dark); background: var(--white);
  resize: vertical; min-height: 100px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; line-height: 1.6;
}
.form-textarea:focus {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(90,170,80,.15);
}
.form-readonly {
  background: var(--green-pale) !important;
  color: var(--text-light) !important;
  cursor: not-allowed;
}
.perfil-form-actions {
  display: flex; align-items: center;
  gap: 12px; margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--green-light);
}
.btn-save {
  padding: 11px 28px;
  background: var(--green-bright); color: var(--white);
  border: none; border-radius: 50px;
  font-family: var(--font-body); font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.btn-save:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(90,170,80,.35);
}
.btn-save:disabled {
  background: var(--green-light); color: var(--text-light);
  transform: none; box-shadow: none; cursor: not-allowed;
}
.btn-cancel-edit {
  padding: 11px 20px;
  background: transparent; color: var(--text-mid);
  border: 1.5px solid var(--green-light); border-radius: 50px;
  font-family: var(--font-body); font-size: .9rem;
  cursor: pointer; transition: all var(--transition);
}
.btn-cancel-edit:hover { background: var(--green-pale); color: var(--text-dark); }
.saving-indicator {
  font-size: .82rem; color: var(--text-light);
  display: none; align-items: center; gap: 6px;
}
.saving-indicator.show { display: flex; }

/* ── Sección de seguridad ──────────────────────────────────────────────────── */
.security-section {
  padding: 0 0 24px;
  border-bottom: 1px solid var(--green-light);
  margin-bottom: 24px;
}
.security-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.security-section-title {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-light); margin-bottom: 18px;
}
.security-info-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--green-pale);
}
.security-info-row:last-child { border-bottom: none; }
.security-info-label {
  font-size: .85rem; color: var(--text-mid);
  display: flex; align-items: center; gap: 8px;
}
.security-info-label svg { width: 15px; opacity: .5; }
.security-info-value {
  font-size: .85rem; font-weight: 600; color: var(--text-dark);
}
.security-info-value.muted { color: var(--text-light); font-weight: 400; }

/* ── Actividad ─────────────────────────────────────────────────────────────── */
.actividad-section { margin-bottom: 28px; }
.actividad-section:last-child { margin-bottom: 0; }
.actividad-section-title {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-light);
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.actividad-empty {
  text-align: center; padding: 32px 16px;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--green-light);
}
.actividad-empty p { font-size: .87rem; color: var(--text-light); margin-top: 8px; }

/* Ruta de progreso */
.ruta-progreso-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--green-pale);
}
.ruta-progreso-item:last-child { border-bottom: none; }
.ruta-progreso-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--green-pale); border-radius: 10px;
  display: grid; place-items: center; font-size: 1.1rem;
}
.ruta-progreso-info { flex: 1; min-width: 0; }
.ruta-progreso-nombre {
  font-size: .88rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ruta-progreso-bar {
  height: 6px; background: var(--green-light);
  border-radius: 99px; overflow: hidden;
}
.ruta-progreso-fill {
  height: 100%; background: var(--green-bright);
  border-radius: 99px; transition: width .5s ease;
}
.ruta-progreso-pct {
  font-size: .8rem; font-weight: 700;
  color: var(--green-dark); white-space: nowrap;
}

/* Descarga reciente */
.descarga-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--green-pale);
}
.descarga-item:last-child { border-bottom: none; }
.descarga-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: #e8f4fd; border-radius: 8px;
  display: grid; place-items: center; font-size: .95rem;
}
.descarga-nombre {
  flex: 1; font-size: .85rem; color: var(--text-dark);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.descarga-fecha { font-size: .75rem; color: var(--text-light); white-space: nowrap; }

/* Zona de peligro */
.danger-zone {
  background: #fef6f6;
  border: 1.5px solid #f5c6c6;
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.danger-zone-text strong { font-size: .9rem; color: #7a1a1a; display: block; margin-bottom: 3px; }
.danger-zone-text p { font-size: .82rem; color: #a04040; }
.btn-danger {
  padding: 10px 22px;
  background: transparent; color: #c0392b;
  border: 1.5px solid #f5c6c6; border-radius: 50px;
  font-family: var(--font-body); font-size: .85rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: all var(--transition);
}
.btn-danger:hover { background: #fef0f0; border-color: #c0392b; }

/* ── Responsive perfil ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .perfil-layout { grid-template-columns: 1fr; padding: 24px 16px 60px; }
  .perfil-sidebar { position: static; }
  .perfil-form-grid { grid-template-columns: 1fr; }
}

/* ── Responsive auth ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 40px 24px; justify-content: flex-start; padding-top: 80px; }
  .auth-page .navbar { display: flex !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN SIDEBAR — RESPONSIVE
   Opción 3: Mini sidebar con íconos + tooltips  (769px – 1100px)
   Opción 1: Hamburger button + drawer lateral   (≤ 768px)
══════════════════════════════════════════════════════════════════════════ */

/* ── Overlay oscuro detrás del drawer ── */
.admin-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 198;
  background: rgba(10,28,12,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.admin-overlay.open { display: block; }

/* ── Botón hamburger ── */
.admin-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  color: var(--text-dark);
  transition: background var(--transition);
  flex-shrink: 0;
}
.admin-menu-toggle:hover { background: var(--green-pale); }
.admin-menu-toggle:focus { outline: 2px solid var(--green-bright); outline-offset: 2px; }
.admin-menu-toggle svg { width: 22px; height: 22px; display: block; }

/* ── Tooltip (oculto por defecto) ── */
.admin-nav-item .nav-tooltip { display: none; }

/* ── Subtítulo del logo ── */
.admin-sidebar-subtitle {
  font-size: .63rem; opacity: .55;
  font-family: var(--font-body); font-weight: 400;
  letter-spacing: .04em; display: block; white-space: nowrap;
}


/* ══════════════════════════════════════════════════════
   OPCIÓN 3 — MINI SIDEBAR  (769px – 1100px)
══════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1100px) {

  .admin-layout { grid-template-columns: 64px 1fr; }

  .admin-sidebar { width: 64px; overflow: visible; }

  .admin-sidebar-logo {
    padding: 18px 0 !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .admin-sidebar-logo img {
    height: 26px; max-width: 44px;
    object-fit: contain; object-position: left center;
  }
  .admin-sidebar-subtitle { display: none; }
  .admin-nav-section     { display: none; }

  .admin-nav-item {
    padding: 14px 0;
    justify-content: center;
    position: relative;
  }
  .admin-nav-item svg     { width: 20px; height: 20px; flex-shrink: 0; }
  .admin-nav-item .nav-label { display: none; }

  /* Tooltip */
  .admin-nav-item .nav-tooltip {
    display: block;
    position: absolute;
    left: calc(100% + 10px); top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: var(--green-deep); color: var(--white);
    font-size: .78rem; font-weight: 600;
    padding: 6px 12px; border-radius: 6px;
    white-space: nowrap; pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 300;
    box-shadow: 0 4px 16px rgba(0,0,0,.28);
  }
  .admin-nav-item .nav-tooltip::before {
    content: '';
    position: absolute; right: 100%; top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--green-deep);
  }
  .admin-nav-item:hover .nav-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}


/* ══════════════════════════════════════════════════════
   OPCIÓN 1 — DRAWER + HAMBURGER  (≤ 768px)
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  .admin-layout { grid-template-columns: 1fr; }

  .admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px; height: 100vh;
    z-index: 199;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s ease;
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,.3);
  }

  /* Restaurar logo en columna */
  .admin-sidebar-logo {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    padding: 20px !important;
  }
  .admin-sidebar-logo img { height: 32px; }
  .admin-sidebar-subtitle { display: block; }

  /* Restaurar ítems */
  .admin-nav-item {
    padding: 11px 20px;
    justify-content: flex-start;
  }
  .admin-nav-item .nav-label   { display: inline; }
  .admin-nav-item .nav-tooltip { display: none !important; }
  .admin-nav-section           { display: block; }

  /* Mostrar botón hamburger */
  .admin-menu-toggle { display: flex; align-items: center; }

  .admin-topbar   { padding: 14px 18px; }
  .admin-content  { padding: 20px 16px; }
  .admin-stat-grid { grid-template-columns: repeat(2,1fr); gap: 14px; }
}
