/* ============================================================
   components.css — Componentes UI de ApuntesHub
   ============================================================ */

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--t-normal),
    box-shadow var(--t-normal),
    background var(--t-fast),
    opacity var(--t-fast);
  user-select: none;
  white-space: nowrap;
}

/* Ripple effect */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: rippleEffect 0.6s ease-out forwards;
  pointer-events: none;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--purple-bright));
  color: white;
  box-shadow: var(--shadow-sm), 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: var(--shadow-md), 0 8px 25px var(--accent-glow);
  background: linear-gradient(135deg, var(--accent-hover), var(--purple-deep));
}

/* Secondary */
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--accent);
}

/* Danger */
.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(242, 63, 67, 0.3);
}
.btn-danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  box-shadow: 0 4px 15px rgba(242, 63, 67, 0.4);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Discord */
.btn-discord {
  background: #5865f2;
  color: white;
  gap: 10px;
  font-size: 0.95rem;
  padding: 12px 24px;
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}
.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 6px 30px rgba(88, 101, 242, 0.6);
  transform: translateY(-3px);
}

.btn-discord svg { width: 20px; height: 20px; }

/* Sizes */
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-icon {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
}
.btn-icon-sm {
  width: 30px; height: 30px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Disabled */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Note Card ───────────────────────────────────────────── */
.note-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  animation: cardEnter 0.4s cubic-bezier(0.34, 1.1, 0.64, 1) both;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.note-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t-normal);
  border-radius: inherit;
  pointer-events: none;
}

.note-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-xl), 0 20px 60px rgba(88, 101, 242, 0.25);
  border-color: rgba(88, 101, 242, 0.4);
}

.note-card:hover::before { opacity: 1; }

/* Card accent line at top */
.note-card__accent {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple-bright));
  flex-shrink: 0;
}

.note-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.note-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.note-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-fast);
}

.note-card:hover .note-card__title { color: var(--accent-light); }

.note-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.note-card__footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.note-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.note-card__author-avatar {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1.5px solid var(--bg-elevated);
  flex-shrink: 0;
}

.note-card__author-avatar--placeholder {
  background: linear-gradient(135deg, var(--accent), var(--purple-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
}

.note-card__author-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.note-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: var(--space-2);
}

/* ─── Vote Button ─────────────────────────────────────────── */
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}

.vote-btn__icon {
  font-size: 16px;
  transition: transform var(--t-spring);
  display: inline-block;
}

.vote-btn:hover {
  background: var(--success-dim);
  border-color: var(--success);
  color: var(--success);
  transform: translateY(-2px);
}

.vote-btn:hover .vote-btn__icon {
  transform: scale(1.3);
}

.vote-btn.voted {
  background: var(--success-dim);
  border-color: var(--success);
  color: var(--success);
}

.vote-btn.voted .vote-btn__icon {
  animation: bounceVote 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vote-btn.voted:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: var(--danger);
}

.vote-count {
  font-variant-numeric: tabular-nums;
  transition: transform var(--t-spring), color var(--t-fast);
}

/* ─── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-career {
  background: rgba(88, 101, 242, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(88, 101, 242, 0.25);
}

.badge-subject {
  background: rgba(155, 89, 182, 0.15);
  color: #c39bd3;
  border: 1px solid rgba(155, 89, 182, 0.25);
}

/* ─── Form Elements ───────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label .required {
  color: var(--danger);
  margin-left: 3px;
}

.form-control {
  width: 100%;
  background: var(--bg-deep);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--t-fast);
  line-height: 1.5;
}

.form-control::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-control:focus {
  border-color: var(--accent);
  background: rgba(88, 101, 242, 0.05);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.form-control:focus-visible { outline: none; }

.form-control.error {
  border-color: var(--danger);
  background: rgba(242, 63, 67, 0.05);
  box-shadow: 0 0 0 4px var(--danger-dim);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2380848e' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select.form-control option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Drive URL field with icon */
.input-with-icon {
  position: relative;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}
.input-with-icon .form-control {
  padding-left: 44px;
}

/* Validation states */
.form-control.valid {
  border-color: var(--success);
  background: rgba(35, 165, 90, 0.05);
}
.validation-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

/* ─── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-modal);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: backdropFadeIn var(--t-normal) ease forwards;
}

.modal-backdrop.closing { animation: fadeIn var(--t-fast) ease reverse forwards; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(88, 101, 242, 0.15);
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  position: relative;
}

.modal.modal-lg { max-width: 800px; }
.modal.modal-xl { max-width: 1000px; max-height: 95vh; }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.modal__close:hover {
  background: var(--danger-dim);
  color: var(--danger);
  transform: rotate(90deg);
}

.modal__body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.modal__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Drive preview modal */
.drive-preview {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-deep);
}

.drive-preview-loading {
  height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ─── Toast / Notifications ──────────────────────────────── */
.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  min-width: 280px;
  max-width: 380px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  pointer-events: all;
}

.toast.leaving {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast-success {
  background: rgba(35, 165, 90, 0.9);
  border-color: rgba(35, 165, 90, 0.5);
}

.toast-error {
  background: rgba(242, 63, 67, 0.9);
  border-color: rgba(242, 63, 67, 0.5);
}

.toast-info {
  background: rgba(88, 101, 242, 0.9);
  border-color: rgba(88, 101, 242, 0.5);
}

.toast-warning {
  background: rgba(240, 178, 50, 0.9);
  border-color: rgba(240, 178, 50, 0.5);
}

.toast__icon { font-size: 20px; flex-shrink: 0; }
.toast__text { font-size: 0.9rem; font-weight: 500; color: white; }

/* ─── Skeleton Loading ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-tertiary) 25%,
    var(--bg-elevated) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-md);
}

.skeleton-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 0;
}

.skeleton-card .skeleton-accent {
  height: 3px;
  background: var(--bg-elevated);
}

.skeleton-card .skeleton-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.skeleton-card .skeleton-badges {
  display: flex;
  gap: var(--space-2);
}

/* ─── Admin Panel ─────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-6) 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.admin-sidebar__title {
  padding: 0 var(--space-5) var(--space-4);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.admin-nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.admin-nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  border-left-color: var(--accent);
  font-weight: 600;
}

.admin-nav-item__icon { font-size: 18px; }

.admin-content {
  padding: var(--space-8);
  overflow-y: auto;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-section__header {
  margin-bottom: var(--space-6);
}

.admin-section__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-1);
}

.admin-section__subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Permission Matrix */
.permission-matrix {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.permission-matrix table {
  width: 100%;
  border-collapse: collapse;
}

.permission-matrix th {
  background: var(--bg-tertiary);
  padding: var(--space-4);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.permission-matrix th:first-child { text-align: left; }

.permission-matrix td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
  transition: background var(--t-fast);
}

.permission-matrix td:first-child { text-align: left; }
.permission-matrix tr:last-child td { border-bottom: none; }
.permission-matrix tr:hover td { background: rgba(255, 255, 255, 0.02); }

.permission-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.permission-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Custom checkbox */
.perm-checkbox {
  width: 22px;
  height: 22px;
  appearance: none;
  background: var(--bg-deep);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t-normal);
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.perm-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.perm-checkbox:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.perm-checkbox:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.perm-checkbox:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.data-table th {
  background: var(--bg-tertiary);
  padding: var(--space-3) var(--space-4);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Careers/subjects list */
.career-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  transition: border-color var(--t-fast);
}

.career-card:hover { border-color: rgba(255, 255, 255, 0.12); }

.career-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.career-card__name {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.career-card__subjects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.subject-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.subject-tag .remove-btn {
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0;
  transition: all var(--t-fast);
}

.subject-tag .remove-btn:hover {
  background: var(--danger-dim);
  color: var(--danger);
}

/* Add new inline */
.add-inline {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.add-inline .form-control {
  padding: 8px 12px;
  font-size: 0.875rem;
}

/* ─── Login Screen ────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background:
    radial-gradient(ellipse at 20% 50%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(155, 89, 182, 0.1) 0%, transparent 50%),
    var(--bg-primary);
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-10);
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: slideInUp 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.login-card__logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--purple-bright));
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-accent);
  animation: float 3s ease-in-out infinite;
}

.login-card__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-2);
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card__subtitle {
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  font-size: 0.95rem;
  line-height: 1.6;
}

.login-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  text-align: left;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-feature__icon { font-size: 18px; }

/* ─── Hero/Stat strip ─────────────────────────────────────── */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.stats-strip-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.stats-strip-thermometer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-left: auto;
  flex-wrap: wrap;
}

.stats-thermometer-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.stats-thermometer-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-mood-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 5px 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--t-fast);
}

.stat-mood-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.stat-mood-btn.active {
  background: rgba(88, 101, 242, 0.25);
  border-color: var(--accent);
  color: var(--accent-light);
  font-weight: 700;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--purple-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Dropdown ────────────────────────────────────────────── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  animation: scaleIn 0.2s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  transform-origin: top right;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  width: 100%;
  border: none;
  background: none;
  font-family: var(--font);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item.danger:hover {
  background: var(--danger-dim);
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: var(--space-2) 0;
}

/* ─── Access Denied ───────────────────────────────────────── */
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  text-align: center;
  padding: var(--space-6);
}

.access-denied__icon {
  font-size: 80px;
  margin-bottom: var(--space-4);
  animation: breathe 2s ease-in-out infinite;
}

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-content { padding: var(--space-4); }
  .stats-strip { flex-wrap: wrap; gap: var(--space-3); }
  .modal { max-width: 100%; margin: var(--space-2); border-radius: var(--radius-xl); }
  .drive-preview { height: 300px; }
}


/* ============================================================
   RANKING DE PROFESORES
   ============================================================ */

/* ─── Wrapper general ────────────────────────────────────── */
.ranking-wrapper {
  padding-bottom: var(--space-10);
}

/* ─── Header del ranking ─────────────────────────────────── */
.ranking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.ranking-header__title {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.ranking-header__icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 12px rgba(255, 180, 0, 0.6));
  animation: trophyPulse 3s ease-in-out infinite;
}

@keyframes trophyPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 180, 0, 0.6)); }
  50%       { filter: drop-shadow(0 0 24px rgba(255, 180, 0, 0.9)); }
}

.ranking-header__text {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700, #ffa500, #ff6b00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1.2;
}

.ranking-header__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* ─── Notice de login ────────────────────────────────────── */
.ranking-login-notice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  animation: fadeInDown 0.4s ease;
}

/* ─── Buscador de profesores ─────────────────────────────── */
.ranking-search-wrap {
  margin-bottom: var(--space-5);
}

.ranking-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 520px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
  overflow: hidden;
}

.ranking-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.15);
}

.ranking-search__icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.ranking-search__input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
}

.ranking-search__input::placeholder { color: var(--text-muted); }

.ranking-search__clear {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.ranking-search__clear:hover { background: var(--danger); color: white; }

/* ─── Chips de carrera ───────────────────────────────────── */
.ranking-career-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.ranking-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--t-normal),
    border-color var(--t-normal),
    color var(--t-normal),
    transform var(--t-fast);
  white-space: nowrap;
}
.ranking-chip:hover {
  background: var(--bg-tertiary);
  border-color: rgba(88,101,242,0.4);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.ranking-chip.active {
  background: rgba(88,101,242,0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Lista del ranking ──────────────────────────────────── */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ─── Card de profesor ───────────────────────────────────── */
.prof-card {
  display: grid;
  grid-template-columns: 44px 52px 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  transition:
    transform var(--t-normal),
    box-shadow var(--t-normal),
    border-color var(--t-normal);
  animation: fadeInUp 0.3s ease both;
  position: relative;
  overflow: hidden;
}

.prof-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(88,101,242,0.03));
  pointer-events: none;
}

.prof-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(88,101,242,0.15);
  border-color: rgba(88,101,242,0.2);
}

/* Podio: top 3 */
.prof-card--rank-1 {
  border-color: rgba(255, 215, 0, 0.35);
  background: linear-gradient(135deg, rgba(255,215,0,0.05) 0%, var(--bg-secondary) 60%);
  box-shadow: 0 4px 20px rgba(255,215,0,0.08);
}
.prof-card--rank-1:hover { border-color: rgba(255,215,0,0.6); }

.prof-card--rank-2 {
  border-color: rgba(192, 192, 192, 0.3);
  background: linear-gradient(135deg, rgba(192,192,192,0.05) 0%, var(--bg-secondary) 60%);
}
.prof-card--rank-2:hover { border-color: rgba(192,192,192,0.5); }

.prof-card--rank-3 {
  border-color: rgba(205, 127, 50, 0.3);
  background: linear-gradient(135deg, rgba(205,127,50,0.05) 0%, var(--bg-secondary) 60%);
}
.prof-card--rank-3:hover { border-color: rgba(205,127,50,0.5); }

/* Posición / medalla */
.prof-card__rank {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prof-medal {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  animation: medalBounce 2s ease-in-out infinite;
}
.prof-card--rank-2 .prof-medal { animation-delay: 0.2s; }
.prof-card--rank-3 .prof-medal { animation-delay: 0.4s; }

@keyframes medalBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

.prof-rank-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
  text-align: center;
}

.prof-card__avatar-wrap {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--t-normal), filter var(--t-normal);
  position: relative;
}
.prof-card__avatar-wrap:hover {
  transform: scale(1.08);
  filter: brightness(1.15);
}

.prof-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prof-avatar--img {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.2);
}

/* Paleta de colores para avatares de iniciales */
.prof-avatar--initials {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.prof-avatar--initials[data-idx="0"] { background: linear-gradient(135deg, #5865f2, #7c3aed); }
.prof-avatar--initials[data-idx="1"] { background: linear-gradient(135deg, #06b6d4, #0284c7); }
.prof-avatar--initials[data-idx="2"] { background: linear-gradient(135deg, #10b981, #059669); }
.prof-avatar--initials[data-idx="3"] { background: linear-gradient(135deg, #f59e0b, #d97706); }
.prof-avatar--initials[data-idx="4"] { background: linear-gradient(135deg, #ef4444, #dc2626); }
.prof-avatar--initials[data-idx="5"] { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* Info del profesor */
.prof-card__info {
  min-width: 0;
  flex: 1;
}

.prof-card__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.prof-card__career {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Barra de ratio */
.vote-bar {
  height: 5px;
  background: rgba(242,63,67,0.25);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
  max-width: 200px;
}

.vote-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #23a55a, #2dc974);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--t-spring);
  min-width: 4px;
}

/* Acciones (stats + botones) */
.prof-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}

.prof-card__stats {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.prof-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.prof-stat--up   { color: rgba(35, 165, 90, 0.8); }
.prof-stat--down { color: rgba(242, 63, 67, 0.7); }
.prof-stat--ratio {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.75rem;
  min-width: 34px;
  text-align: right;
}

/* Botones de voto */
.prof-card__btns {
  display: flex;
  gap: var(--space-2);
}

.thumb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  font-size: 1.2rem;
  cursor: pointer;
  transition:
    transform var(--t-fast),
    background var(--t-normal),
    border-color var(--t-normal),
    box-shadow var(--t-normal);
  position: relative;
  overflow: hidden;
  line-height: 1;
}

.thumb-btn:hover:not(:disabled) {
  transform: scale(1.12);
}

.thumb-btn:active:not(:disabled) {
  transform: scale(0.92);
}

/* Estado: voto positivo activo */
.thumb-btn--up-active {
  background: rgba(35, 165, 90, 0.2);
  border-color: #23a55a;
  box-shadow: 0 0 12px rgba(35, 165, 90, 0.3);
  animation: thumbPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Estado: voto negativo activo */
.thumb-btn--down-active {
  background: rgba(242, 63, 67, 0.2);
  border-color: var(--danger);
  box-shadow: 0 0 12px rgba(242, 63, 67, 0.3);
  animation: thumbPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thumb-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

@keyframes thumbPop {
  0%   { transform: scale(0.85); }
  60%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ─── Estado vacío del ranking ───────────────────────────── */
.ranking-empty {
  text-align: center;
  padding: var(--space-14) var(--space-6);
  color: var(--text-muted);
}

.ranking-empty__icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.ranking-empty__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.ranking-empty__sub {
  font-size: 0.85rem;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Responsive Mobile ──────────────────────────────────── */
@media (max-width: 640px) {

  .ranking-header { flex-direction: column; align-items: flex-start; }
  .ranking-header__icon { font-size: 2rem; }
  .ranking-header__text { font-size: 1.3rem; }

  .ranking-search { max-width: 100%; }

  .prof-card {
    grid-template-columns: 36px 44px 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }

  .prof-card__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: var(--space-2);
    margin-top: var(--space-1);
  }

  .prof-medal { font-size: 1.3rem; }

  .prof-avatar {
    width: 40px;
    height: 40px;
  }

  .vote-bar { max-width: 100%; }

  .prof-card__name { font-size: 0.88rem; }

  .thumb-btn {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }

  .ranking-career-tabs { gap: var(--space-1); }
  .ranking-chip { font-size: 0.75rem; padding: 6px 12px; }
}


@media (max-width: 380px) {
  .prof-card__stats { gap: var(--space-2); }
  .prof-stat { font-size: 0.72rem; }
}

/* ============================================================
   Community Rankings — Sub-tabs
   ============================================================ */
.community-wrapper { animation: fadeUp 0.4s ease; }

.community-subtabs {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.community-subtab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 40px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.community-subtab:hover {
  border-color: rgba(88,101,242,0.4);
  color: var(--text-primary);
  background: rgba(88,101,242,0.08);
}

.community-subtab.active {
  background: linear-gradient(135deg, rgba(88,101,242,0.2), rgba(155,89,182,0.15));
  border-color: var(--accent);
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================================
   WhatsApp Groups — Cards
   ============================================================ */
.wa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.wa-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: 16px;
  background: rgba(37,211,102,0.04);
  border: 1.5px solid rgba(37,211,102,0.15);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.wa-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,211,102,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wa-card:hover {
  border-color: rgba(37,211,102,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.12);
}

.wa-card:hover::before { opacity: 1; }

.wa-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(37,211,102,0.4));
}

.wa-card__content {
  flex: 1;
  min-width: 0;
}

.wa-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  transition: color 0.2s ease;
}

.wa-card:hover .wa-card__name {
  color: #25d366;
}

.wa-card__subject,
.wa-card__career {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: var(--space-2) 0 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-card__btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}

.wa-card:hover .wa-card__btn {
  box-shadow: 0 6px 16px rgba(37,211,102,0.45);
  transform: scale(1.03);
}

@media (max-width: 560px) {
  .wa-grid { grid-template-columns: 1fr; }
  .wa-card { flex-direction: column; }
  .wa-card__btn { width: 100%; justify-content: center; }
}

/* ─── Stats Strip - Contador de Usuarios / Sorteo Rojo ─── */
.stat-value--red {
  color: #ff3344 !important;
  background: linear-gradient(135deg, #ff2a4b 0%, #ff6b81 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 0 10px rgba(255, 51, 68, 0.45));
}

.stat-value-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.stat-target {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
}

.stat-item--raffle {
  position: relative;
  cursor: pointer;
}

.raffle-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 51, 68, 0.15);
  border: 1px solid rgba(255, 51, 68, 0.35);
  color: #ff4d6d;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: rafflePulse 2.5s infinite ease-in-out;
  margin-left: 4px;
}

/* Tooltip no invasivo del sorteo */
.raffle-tooltip {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  bottom: auto !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(-6px) !important;
  background: rgba(22, 24, 30, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 51, 68, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 51, 68, 0.25);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: normal;
  width: max-content;
  max-width: min(300px, 90vw);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 99999 !important;
}

.raffle-tooltip::after {
  content: '' !important;
  position: absolute !important;
  top: auto !important;
  bottom: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border-width: 0 6px 6px !important;
  border-style: solid !important;
  border-color: transparent transparent rgba(22, 24, 30, 0.95) transparent !important;
}

.stat-item--raffle:hover .raffle-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}

@keyframes rafflePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 51, 68, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 10px 2px rgba(255, 51, 68, 0.3);
    transform: scale(1.04);
  }
}

/* ─── Searchable Combobox (Buscador Incremental de Carreras) ─── */
.combobox-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1;
  width: 100%;
  max-width: min(340px, 85vw);
  z-index: 10;
}

.combobox-wrapper.open {
  z-index: 9999 !important;
}

.combobox-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 8px 30px 8px 30px;
  outline: none;
  transition: all var(--t-fast);
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.combobox-input:focus,
.combobox-wrapper.open .combobox-input {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background-color: var(--bg-elevated);
}

.combobox-icon-search {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.combobox-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  line-height: 1;
}

.combobox-clear-btn:hover {
  background: var(--danger-dim);
  color: var(--danger);
}

.combobox-wrapper.has-value .combobox-clear-btn {
  display: flex;
}

.combobox-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
  max-height: 280px;
  overflow-y: auto;
  z-index: 99999 !important;
  display: flex;
  flex-direction: column;
  padding: 6px;
  backdrop-filter: blur(12px);
}

.combobox-dropdown.hidden {
  display: none;
}

.combobox-item {
  padding: 9px 12px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--t-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combobox-item:hover,
.combobox-item.highlighted {
  background: var(--accent-dim);
  color: #fff;
}

.combobox-item.selected {
  background: rgba(88, 101, 242, 0.25);
  color: var(--accent-light);
  font-weight: 600;
}

.combobox-no-results {
  padding: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════ */
/* ─── MURO EFÍMERO ESTUDIANTIL                              */
/* ═══════════════════════════════════════════════════════════ */

.wall-wrapper {
  max-width: 860px;
  margin: 0 auto var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.wall-header {
  padding: var(--space-4) 0;
}

.wall-header__title {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.wall-header__icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 12px rgba(88, 101, 242, 0.6));
}

.wall-header__text {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #5865f2, #9b59b6, #e91e63);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.wall-header__sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Composer Card */
.wall-composer-card {
  background: rgba(26, 27, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: border-color var(--t-normal);
}

.wall-composer-card:focus-within {
  border-color: rgba(88, 101, 242, 0.4);
}

.wall-type-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-2);
}

.wall-type-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}

.wall-type-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.wall-type-btn.active {
  background: rgba(88, 101, 242, 0.25);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ─── Toolbar de Filtros y Búsqueda del Muro ─── */
.wall-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-4) 0 var(--space-5);
  flex-wrap: wrap;
}

.wall-search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
}

.wall-search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.wall-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 8px 36px 8px 34px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--t-fast);
}

.wall-search-input:focus {
  border-color: var(--accent);
}

.wall-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
}

.wall-search-clear:hover {
  color: var(--text-primary);
}

.wall-sort-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wall-sort-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}

.wall-sort-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.wall-sort-btn.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Botón Cargar Más */
.wall-load-more-container {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

.wall-load-more-btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.3);
  color: var(--accent-light);
  cursor: pointer;
  transition: all var(--t-fast);
}

.wall-load-more-btn:hover {
  background: rgba(88, 101, 242, 0.3);
  transform: translateY(-2px);
}

.wall-composer {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.wall-composer__top {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.wall-composer__field {
  flex: 1;
}

.wall-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color var(--t-fast);
}

.wall-textarea:focus {
  border-color: var(--accent);
}

.wall-composer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.wall-composer__info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.wall-char-counter {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 10px;
  border-radius: 12px;
}

.wall-char-counter.warning {
  color: #f0a500;
  background: rgba(240, 165, 0, 0.15);
}

.wall-char-counter.danger {
  color: #f04747;
  background: rgba(240, 71, 71, 0.2);
}

.wall-ttl-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.2);
  padding: 3px 10px;
  border-radius: 12px;
}

/* Prompt si no inició sesión */
.wall-login-prompt {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  flex-wrap: wrap;
}

/* Feed */
.wall-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.wall-empty {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: rgba(26, 27, 30, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  color: var(--text-muted);
}

.wall-empty__icon {
  font-size: 2.8rem;
  margin-bottom: var(--space-3);
}

.wall-empty__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.wall-empty__sub {
  font-size: 0.88rem;
  margin-top: 4px;
}

/* Tarjeta del Post */
.wall-card {
  background: rgba(26, 27, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  backdrop-filter: blur(12px);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.wall-card:hover {
  border-color: rgba(88, 101, 242, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.wall-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.wall-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wall-avatar--sm {
  width: 32px;
  height: 32px;
}

.wall-avatar--initials {
  background: linear-gradient(135deg, #5865f2, #9b59b6);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wall-card__meta {
  flex: 1;
}

.wall-card__author-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.wall-card__author {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.wall-role-badge {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-block;
}

.wall-role-badge--admin { background: rgba(88, 101, 242, 0.2); color: #5865f2; border: 1px solid rgba(88, 101, 242, 0.4); }
.wall-role-badge--mod   { background: rgba(240, 165, 0, 0.2); color: #f0a500; border: 1px solid rgba(240, 165, 0, 0.4); }
.wall-role-badge--student { background: rgba(35, 165, 90, 0.2); color: #23a55a; border: 1px solid rgba(35, 165, 90, 0.4); }

.wall-card__academic-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 9px;
  border-radius: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wall-card__sub-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.wall-card__badge-ttl {
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
}

.wall-card__delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: color var(--t-fast), background var(--t-fast);
}

.wall-card__delete-btn:hover {
  color: var(--danger);
  background: rgba(240, 71, 71, 0.15);
}

.wall-card__content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  word-break: break-word;
  white-space: pre-wrap;
}

.wall-card__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: var(--space-3);
}

.wall-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--t-fast);
}

.wall-action-btn:hover {
  background: rgba(88, 101, 242, 0.12);
  color: var(--text-primary);
  border-color: rgba(88, 101, 242, 0.3);
}

.wall-action-btn.active {
  background: rgba(88, 101, 242, 0.2);
  color: var(--accent-light);
  border-color: var(--accent);
}

/* Sección de Comentarios */
.wall-comments-section {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.wall-comments-section.hidden {
  display: none;
}

.wall-comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.wall-comment-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: rgba(0, 0, 0, 0.2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.wall-comment-body {
  flex: 1;
}

.wall-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.wall-comment-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.wall-comment-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.wall-comment-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

.wall-no-comments {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding: var(--space-2) 0;
}

.wall-comment-form {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.wall-comment-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

.wall-comment-input:focus {
  border-color: var(--accent);
}

.wall-comment-login-notice {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
}

/* ============================================================
   NUEVAS FUNCIONALIDADES: TERMÓMETRO, POLLS, ESTUDIO MATCH & GAMIFICACIÓN
   ============================================================ */

/* Badge de Puntos de Usuario */
.user-points-pill {
  background: linear-gradient(135deg, rgba(240, 165, 0, 0.2), rgba(255, 215, 0, 0.15));
  border: 1px solid rgba(240, 165, 0, 0.4);
  color: #f0a500;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(240, 165, 0, 0.15);
}

/* Reacciones Universitarias */
.wall-reactions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.wall-reaction-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--t-fast);
}

.wall-reaction-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.wall-reaction-btn.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: rgba(88, 101, 242, 0.4);
  color: var(--accent-light);
  font-weight: 600;
}

/* Termómetro & Encuestas Wrapper */
.polls-widget-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .polls-widget-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Termómetro Card */
.thermometer-card {
  background: rgba(26, 27, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.thermometer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-3);
}

.thermometer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thermometer-icon {
  font-size: 1.8rem;
}

.thermometer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.thermometer-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.thermometer-badge-today {
  background: rgba(233, 30, 99, 0.2);
  border: 1px solid rgba(233, 30, 99, 0.4);
  color: #e91e63;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 8px;
}

.thermometer-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: var(--space-3) 0;
}

.thermometer-btn {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--t-fast);
}

.thermometer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.thermometer-btn.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.3);
}

.thermometer-emoji { font-size: 1.4rem; }
.thermometer-label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-align: center; }
.thermometer-pct { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); }

.thermometer-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin-top: 4px;
}

.thermometer-bar__fill { height: 100%; transition: width 0.4s ease; }
.thermometer-bar__fill--tranqui { background: #23a55a; }
.thermometer-bar__fill--estudio { background: #5865f2; }
.thermometer-bar__fill--rip     { background: #f0a500; }

/* Poll Card (Encuesta 24h) */
.poll-card {
  background: rgba(26, 27, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.poll-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.poll-badge {
  background: rgba(88, 101, 242, 0.2);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
}

.poll-timer {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.poll-question {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 12px;
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option-btn {
  position: relative;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: border-color var(--t-fast);
}

.poll-option-btn:hover:not(:disabled) {
  border-color: var(--accent);
}

.poll-option-btn.selected {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(88, 101, 242, 0.25);
}

.poll-option-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  background: rgba(88, 101, 242, 0.2);
  transition: width 0.5s ease;
  pointer-events: none;
}

.poll-option-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poll-option-text { font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }
.poll-option-pct { font-size: 0.82rem; font-weight: 800; color: var(--accent-light); }

.poll-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Estudio Match Componentes */
.studymatch-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.studymatch-header {
  margin-bottom: var(--space-2);
}

.studymatch-header__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.studymatch-header__icon {
  font-size: 2.2rem;
}

.studymatch-header__text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.studymatch-header__sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.studymatch-composer-card {
  background: rgba(26, 27, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  backdrop-filter: blur(12px);
}

.studymatch-form-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.studymatch-contact-options {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 42px;
}

.studymatch-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.studymatch-composer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-whatsapp {
  background: #25d366 !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-whatsapp:hover {
  background: #20bd5a !important;
  transform: translateY(-1px);
}

.studymatch-subject-pill {
  display: inline-block;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.3);
  color: var(--accent-light);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin: var(--space-3) 0 var(--space-2);
}

.studymatch-card__footer {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studymatch-discord-tag {
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 8px;
}


