/* ============================
   Estilos generales / base
   ============================ */

body {
  background-color: #f5f5f7;
}

/* Que las tarjetas no queden tan apretadas en pantallas pequeñas */
.card {
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.04);
}

/* Ajuste suave de padding en card-body según tamaño */
.card-body {
  padding: 1.25rem;
}

/* Tablas: que sean siempre desplazables en horizontal */
.table-responsive {
  overflow-x: auto;
}

/* Las tablas del panel se ven mejor con un poquito menos de padding */
.table-sm th,
.table-sm td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

/* Botones más "finger friendly" en general */
.btn {
  border-radius: 999px;
}

/* ============================
   Móviles pequeños (<= 576px)
   ============================ */
@media (max-width: 576px) {

  body {
    font-size: 0.9rem;
  }

  .container,
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .card-body {
    padding: 0.85rem;
  }

  /* Encabezados con d-flex (como el header de student_panel y panel)
     que se vean uno debajo del otro en móvil */
  .d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  /* Alinear badges y botones con un poco de espacio vertical */
  .d-flex.align-items-center.gap-2,
  .d-flex.align-items-center.gap-1 {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Botones principales casi a ancho completo en cabeceras */
  #btnDownloadPdf,
  #btnStudentLogout,
  .btn-primary,
  .btn-success,
  .btn-outline-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Formularios: que los campos usen todo el ancho en móviles */
  .row .col-md-6,
  .row .col-md-4,
  .row .col-md-3,
  .row .col-md-2 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .form-control,
  .form-select,
  .form-control-sm,
  .form-select-sm {
    font-size: 0.9rem;
  }

  /* Tablas: texto un poco más pequeño para que quepa mejor */
  .table-sm th,
  .table-sm td {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* Evitar que la tabla crezca demasiado en alto: scroll horizontal */
  .table-responsive {
    margin-bottom: 0.75rem;
  }

  /* Cinturón visual (faja) en student_panel: que no quede muy ancho */
  td > div[style*="border-radius: 999px"] {
    max-width: 130px !important;
  }

  /* Modales: que usen casi todo el ancho en móviles */
  .modal-dialog {
    margin: 0.5rem;
    max-width: 100%;
  }
  .hide-on-cell {
      display: none;
  }

}

/* ============================
   Tablets (577px – 991px)
   ============================ */
@media (min-width: 577px) and (max-width: 991.98px) {
 .hide-on-cell {
      display: none;
  }
  .container,
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Header de paneles: aún puede ser horizontal, pero con más espacio */
  .d-flex.justify-content-between.align-items-center {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  /* Botones de acción del header más cómodos */
  #btnDownloadPdf,
  #btnStudentLogout {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Tablas: no tan comprimidas, pero con opción de scroll horizontal */
  .table-sm th,
  .table-sm td {
    font-size: 0.86rem;
  }

}
.truncate {
  max-width: 30ch; /* Limits to ~20 characters */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Adds "..." for overflow */
}

/* ============================
   Mejoras visuales suaves
   ============================ */

/* Títulos de secciones */
.card .h5,
.card h5,
.card h6 {
  font-weight: 600;
}

/* Textos de ayuda */
.form-text {
  font-size: 0.78rem;
}

/* Pie de página / nota pequeña */
.text-muted.small {
  line-height: 1.3;
}

/* Bordes suaves para tablas de resumen */
.table-bordered > :not(caption) > * > * {
  border-color: rgba(0,0,0,0.08);
}

/* =========================
   Modales administrativos
   ========================= */
.admin-modal-shell .modal-content {
  border: 0;
  border-radius: 0.75rem;
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.admin-modal-shell .modal-content > form,
.modal-dialog-scrollable .modal-content > form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  min-height: 0;
}

.admin-modal-shell .modal-content > form > .modal-header,
.admin-modal-shell .modal-content > form > .modal-footer,
.modal-dialog-scrollable .modal-content > form > .modal-header,
.modal-dialog-scrollable .modal-content > form > .modal-footer {
  flex: 0 0 auto;
}

.admin-modal-shell .modal-header {
  align-items: flex-start;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  gap: 0.75rem;
  padding: 1rem 1.1rem;
}

.admin-modal-shell .modal-title {
  color: #0f172a;
  flex: 0 1 auto;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 0.05rem;
}

.admin-modal-shell .modal-title-note {
  color: #64748b;
  flex: 1 1 auto;
  font-size: 0.78rem;
  line-height: 1.25;
  max-width: 54rem;
  padding-top: 0.1rem;
}

.admin-modal-shell .btn-close {
  margin-top: 0.15rem;
}

.admin-modal-shell .modal-body {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.05rem;
  -webkit-overflow-scrolling: touch;
}

.modal-dialog-scrollable .modal-content > form > .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-modal-shell .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -12px 26px rgba(15, 23, 42, 0.08);
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
}

.admin-modal-shell .modal-footer .btn {
  min-height: 2.25rem;
  min-width: 6.25rem;
}

.admin-form-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: -1rem -1rem 1rem;
  padding: 0.85rem 1rem 0.7rem;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  gap: 0.45rem;
}

.admin-form-tabs .nav-link {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.55rem 0.85rem;
  background: #fff;
}

.admin-form-tabs .nav-link.active {
  color: #fff;
  background: #0f172a;
  border-color: #0f172a;
}

.admin-form-section {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
  padding: 1rem;
  margin-bottom: 1rem;
}

.admin-form-section:last-child {
  margin-bottom: 0;
}

.admin-form-section-title {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 0.45rem;
  letter-spacing: 0;
  margin-bottom: 0.8rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  text-transform: uppercase;
}

.admin-form-section-title::before {
  background: #dc2626;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 0.55rem;
  width: 0.55rem;
}

.admin-modal-shell .form-label {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
}

.admin-modal-shell .form-control,
.admin-modal-shell .form-select {
  background-color: #fff;
  border-color: #dbe3ee;
  color: #0f172a;
  min-height: 2.35rem;
}

.admin-modal-shell .form-control-sm,
.admin-modal-shell .form-select-sm {
  min-height: 2.15rem;
}

.admin-modal-shell .form-control:focus,
.admin-modal-shell .form-select:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 0.18rem rgba(100, 116, 139, 0.15);
}

.admin-modal-shell .form-control[readonly],
.admin-modal-shell .form-control:disabled,
.admin-modal-shell .form-select:disabled {
  background-color: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

.admin-modal-shell textarea.form-control {
  line-height: 1.4;
  min-height: 5.75rem;
  resize: vertical;
}

.admin-modal-shell .form-text {
  color: #64748b;
  line-height: 1.35;
  margin-top: 0.35rem;
}

.admin-modal-shell .form-check {
  min-height: 2.15rem;
}

.admin-modal-shell .form-check-input {
  border-color: #cbd5e1;
}

.admin-modal-shell .form-check-input:checked {
  background-color: #0f172a;
  border-color: #0f172a;
}

.admin-modal-shell .table-responsive {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
}

.admin-modal-shell .table {
  margin-bottom: 0;
}

.admin-modal-shell .table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-modal-shell .table tbody td {
  vertical-align: middle;
}

.admin-modal-shell .alert,
.admin-modal-shell .form-control,
.admin-modal-shell .form-select,
.admin-modal-shell .input-group-text {
  border-radius: 0.45rem;
}

.admin-modal-shell .admin-modal-preview,
#studentNoticePreview {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.admin-crop-body {
  padding: 0.85rem;
}

.admin-crop-stage {
  align-items: center;
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.5rem;
  display: flex;
  justify-content: center;
  min-height: min(68vh, 560px);
  overflow: hidden;
}

.admin-crop-image {
  display: block;
  max-height: min(68vh, 560px);
  max-width: 100%;
}

#membershipForm .admin-form-section {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#membershipForm .admin-form-section-title,
#membershipFormMsg,
#membershipForm .admin-form-section > .mb-2:nth-of-type(2),
#membershipForm .admin-form-section > .mb-2:nth-of-type(8) {
  grid-column: 1 / -1;
}

#membershipForm .admin-form-section > .mb-2 {
  margin-bottom: 0 !important;
}

.bulk-edit-option {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  height: 100%;
  padding: 0.85rem;
}

.bulk-edit-option .form-check-label {
  color: #1e293b;
  font-weight: 700;
}

.admin-muted-panel {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  padding: 0.85rem;
}

@media (max-width: 767.98px) {
  .admin-modal-shell .modal-dialog,
  .modal-dialog-scrollable {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .admin-modal-shell .modal-content,
  .modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .admin-modal-shell .modal-header {
    padding: 0.75rem 0.85rem;
  }

  .admin-modal-shell .modal-body {
    padding: 0.85rem;
  }

  .admin-modal-shell .modal-footer {
    padding: 0.65rem 0.85rem;
    flex-wrap: wrap;
  }

  .admin-modal-shell .modal-footer .btn {
    flex: 1 1 auto;
    min-width: min(9rem, 100%);
  }

  .admin-form-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.85rem;
  }

  .admin-form-tabs .nav-link {
    white-space: nowrap;
  }

  .admin-form-section {
    padding: 0.85rem;
  }

  .admin-modal-shell .table-responsive {
    border-radius: 0.45rem;
  }

  .admin-crop-stage {
    min-height: 58vh;
  }

  .admin-crop-image {
    max-height: 58vh;
  }

  #membershipForm .admin-form-section {
    grid-template-columns: 1fr;
  }
}
/* =========================
   Versión móvil / responsive
   ========================= */
@media (max-width: 767.98px) {

  body {
    font-size: 0.92rem;
  }

  /* Contenedores principales del panel */
  #student-panel-wrapper .container,
  #main-panel-wrapper .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .card {
    margin-bottom: 0.75rem;
  }

  /* Ocultar columnas marcadas para móvil */
  .hide-on-cell {
    display: none !important;
  }

  /* Tablas más compactas */
  .table-sm th,
  .table-sm td {
    padding: 0.35rem 0.4rem;
    vertical-align: middle;
    font-size: 0.8rem;
  }

  /* Botones más pequeños cómodos en móvil */
  .btn-group-sm > .btn,
  .btn-sm {
    padding: 0.2rem 0.45rem;
    font-size: 0.78rem;
  }

  /* Headers que deben apilarse en móvil */
  .panel-header-responsive {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .panel-header-responsive .no-print {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-start;
  }

  .panel-header-responsive .no-print > * {
    flex: 1 1 auto;
  }
}

/* =========================
   Acciones tactiles de panel/red social
   ========================= */
.student-action-bar,
.social-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.students-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}

.students-toolbar-actions .dropdown-menu {
  min-width: 14rem;
}

.students-compact-actions {
  display: none;
}

.touch-icon-btn {
  min-width: 2.35rem;
  min-height: 2.35rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  line-height: 1.1;
  white-space: nowrap;
}

.touch-icon-btn > .fa-solid,
.touch-icon-btn > .fa-regular {
  width: 1.15rem;
  flex: 0 0 1.15rem;
  text-align: center;
}

.mobile-action-label {
  display: none;
}

.notification-dot {
  width: .68rem !important;
  height: .68rem !important;
  min-width: .68rem !important;
  min-height: .68rem !important;
  aspect-ratio: 1 / 1;
  padding: 0 !important;
  border-radius: 999px !important;
  top: .2rem !important;
  right: .2rem !important;
  line-height: 1;
}

.social-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  text-decoration: none;
}

.social-avatar-wrap .social-avatar {
  display: block;
}

.social-online-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: .78rem;
  height: .78rem;
  border-radius: 999px;
  background: #16a34a;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, .18);
}

.social-post {
  max-width: 100%;
  overflow: hidden;
}

.social-post .flex-grow-1,
.social-post .min-w-0,
.social-post .post-body-wrap,
.social-post .post-edit-slot,
.social-post .comments-wrap {
  min-width: 0;
  max-width: 100%;
}

.social-post p,
.social-post .post-body-wrap,
.social-post .comment-row {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.social-post .comment-row.comment-hidden-for-owner {
  opacity: .58;
  border-style: dashed;
  background: #f8fafc;
}

.social-post .comment-reply-note,
.social-post .comment-reply-context {
  margin-top: .2rem;
  color: #64748b;
  font-size: .78rem;
}

.social-post .comment-reply-note {
  padding-left: .55rem;
  border-left: 2px solid #cbd5e1;
}

.social-post .comment-reply-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem .5rem;
  border: 1px solid #dbeafe;
  border-radius: .45rem;
  background: #eff6ff;
  color: #1e3a8a;
}

.social-post .comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .35rem;
}

.social-post .comment-actions button,
.social-post .btn-comment-cancel-reply,
.social-post .comment-reported-label {
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 0;
  font-size: .78rem;
  line-height: 1.2;
}

.social-post .comment-reported-label {
  color: #b45309;
}

.social-post .comment-actions button:hover,
.social-post .btn-comment-cancel-reply:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.social-post .btn-comment-delete:hover,
.social-post .btn-comment-hide:hover,
.social-post .btn-comment-report:hover {
  color: #dc2626;
}

.social-link-previews {
  display: grid;
  gap: .55rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.social-link-preview-card {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: .65rem;
  padding: .55rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.social-link-preview-card > span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.social-link-preview-card strong,
.social-link-preview-card span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.social-link-preview-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.social-link-preview-card img {
  width: 86px;
  height: 70px;
  border-radius: .55rem;
  object-fit: cover;
  background: #e5e7eb;
  flex: 0 0 auto;
}

.social-link-preview-icon {
  width: 52px;
  height: 52px;
  border-radius: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: #0369a1;
  flex: 0 0 auto;
}

.social-link-preview-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

.social-stories-strip {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .65rem;
  background: #fff;
  box-sizing: border-box;
  max-width: 100%;
  padding: .85rem .9rem .75rem;
  overflow: hidden;
}

.social-stories-scroll {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  max-width: 100%;
  padding: .25rem .2rem .35rem;
  margin: -.15rem -.2rem 0;
}

.social-story-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .7rem;
}

.social-story-toolbar .btn-group {
  flex: 0 0 auto;
}

.social-story-toolbar .btn {
  border-radius: 999px !important;
  padding-inline: .7rem;
}

.social-story-toolbar .btn.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.social-story-tile {
  width: 78px;
  flex: 0 0 78px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: center;
}

.social-story-ring {
  display: block;
  width: 68px;
  min-width: 68px;
  height: 136px;
  min-height: 136px;
  aspect-ratio: 1 / 2;
  margin: 0 auto .35rem;
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(#f97316, #ec4899, #2563eb, #f97316);
  position: relative;
  box-sizing: border-box;
  line-height: 0;
  overflow: visible;
}

.social-story-ring img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  border-radius: inherit;
  border: 3px solid #fff;
  object-fit: cover;
  background: #e5e7eb;
  display: block;
  box-sizing: border-box;
}

.social-story-create .social-story-ring {
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px dashed rgba(37, 99, 235, .48);
  background: linear-gradient(180deg, rgba(37, 99, 235, .13), rgba(236, 72, 153, .1));
  color: #2563eb;
}

.social-story-plus {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: inherit;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
  font-size: 1.2rem;
  line-height: 1;
}

.social-story-create:hover .social-story-ring,
.social-story-create:focus-visible .social-story-ring {
  border-color: rgba(37, 99, 235, .78);
  color: #1d4ed8;
}

.social-story-tile.is-seen .social-story-ring {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, .35);
  padding: 0;
}

.social-story-tile.is-seen .social-story-ring img {
  border: 0;
  opacity: .72;
}

.social-story-count {
  position: absolute;
  right: -1px;
  bottom: 0;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  display: inline-grid;
  place-items: center;
  border: 2px solid #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}

.social-story-name {
  display: block;
  font-size: .78rem;
  line-height: 1.15;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-story-tile:focus-visible .social-story-ring {
  outline: 3px solid rgba(37, 99, 235, .45);
  outline-offset: 3px;
}

.btn-reaction-summary {
  border: 0;
  background: transparent;
  padding: .1rem .15rem;
  color: #64748b;
  cursor: pointer;
}

.btn-reaction-summary:hover,
.btn-reaction-summary:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.reaction-filter-tabs {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding-bottom: .35rem;
}

.reaction-filter-tab {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, .35);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.reaction-filter-tab.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.reaction-filter-tab:disabled {
  opacity: .45;
}

.reaction-person-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.reaction-person-row:last-child {
  border-bottom: 0;
}

.reaction-person-row img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
  flex: 0 0 auto;
}

.story-position-tools,
.profile-position-tools {
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: .65rem;
  padding: .75rem;
  background: #f8fafc;
}

.position-drag-frame {
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.position-drag-frame img,
.position-drag-frame video {
  pointer-events: none;
}

.position-drag-frame.is-dragging {
  cursor: grabbing;
}

.position-drag-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(37, 99, 235, .68);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.position-drag-frame:hover::after,
.position-drag-frame:focus-visible::after,
.position-drag-frame.is-dragging::after {
  opacity: 1;
}

.position-drag-frame:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

.position-drag-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: .55rem;
}

.position-drag-actions .btn {
  width: 40px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.social-upload-status {
  position: sticky;
  bottom: .75rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .25rem;
  border: 1px solid rgba(37, 99, 235, .28);
  border-radius: .65rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, .1), rgba(14, 165, 233, .08));
  color: #1e3a8a;
  padding: .85rem .95rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
}

.social-upload-status .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: .16rem;
}

.profile-avatar-preview {
  width: 118px;
  height: 118px;
  border-radius: 999px;
  border: 4px solid #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  background: #e5e7eb center / cover no-repeat;
  margin: 0 auto;
}

.social-crop-stage {
  min-height: min(62vh, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border-radius: .65rem;
  overflow: hidden;
}

.social-crop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-bottom: .75rem;
}

.social-crop-toolbar .btn {
  width: 42px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.social-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: min(62vh, 560px);
}

.social-theme-toggle .fa-sun {
  display: none;
}

.story-viewer-card img,
.story-viewer-card video {
  object-position: center var(--story-position-y, 0%);
}

html[data-social-theme="dark"] body {
  background: #0f172a !important;
  color: #e5e7eb;
}

html[data-social-theme="dark"] .social-theme-toggle .fa-moon {
  display: none;
}

html[data-social-theme="dark"] .social-theme-toggle .fa-sun {
  display: inline-block;
}

html[data-social-theme="dark"] .social-profile-card,
html[data-social-theme="dark"] .social-post,
html[data-social-theme="dark"] .social-card,
html[data-social-theme="dark"] .person-card,
html[data-social-theme="dark"] .social-stories-strip,
html[data-social-theme="dark"] .modal-content,
html[data-social-theme="dark"] .story-archive-card {
  background: #111827 !important;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, .24) !important;
}

html[data-social-theme="dark"] .text-muted,
html[data-social-theme="dark"] .form-text,
html[data-social-theme="dark"] .social-story-name {
  color: #94a3b8 !important;
}

html[data-social-theme="dark"] .form-control,
html[data-social-theme="dark"] .form-select,
html[data-social-theme="dark"] .input-group-text,
html[data-social-theme="dark"] .reaction-filter-tab,
html[data-social-theme="dark"] .comment-row,
html[data-social-theme="dark"] .profile-position-tools,
html[data-social-theme="dark"] .story-position-tools,
html[data-social-theme="dark"] .social-link-preview-card,
html[data-social-theme="dark"] .list-group-item,
html[data-social-theme="dark"] .alert-light,
html[data-social-theme="dark"] .notification-item {
  background-color: #0f172a !important;
  color: #e5e7eb !important;
  border-color: rgba(148, 163, 184, .3) !important;
}

html[data-social-theme="dark"] .notification-item.unread {
  background: #1f1723 !important;
  border-color: rgba(248, 113, 113, .45) !important;
}

html[data-social-theme="dark"] .notification-item:hover,
html[data-social-theme="dark"] .list-group-item-action:hover,
html[data-social-theme="dark"] .list-group-item-action:focus {
  background: #172033 !important;
  color: #f8fafc !important;
}

html[data-social-theme="dark"] .form-control::placeholder {
  color: #64748b;
}

html[data-social-theme="dark"] .btn-close:not(.btn-close-white) {
  filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-social-theme="dark"] .badge.text-bg-light {
  background: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: rgba(148, 163, 184, .24) !important;
}

html[data-social-theme="dark"] .reaction-picker {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, .28) !important;
}

html[data-social-theme="dark"] .reaction-option:hover,
html[data-social-theme="dark"] .reaction-option:focus-visible,
html[data-social-theme="dark"] .reaction-option.active {
  background: #1f2937 !important;
}

html[data-social-theme="dark"] .reaction-filter-tab.active {
  background: #e5e7eb !important;
  border-color: #e5e7eb !important;
  color: #111827 !important;
}

html[data-social-theme="dark"] .btn-outline-secondary,
html[data-social-theme="dark"] .btn-outline-primary,
html[data-social-theme="dark"] .btn-outline-danger,
html[data-social-theme="dark"] .btn-outline-warning,
html[data-social-theme="dark"] .btn-outline-info {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, .35);
}

html[data-social-theme="dark"] .dropdown-menu {
  background: #111827;
  border-color: rgba(148, 163, 184, .24);
}

html[data-social-theme="dark"] .dropdown-item {
  color: #e5e7eb;
}

html[data-social-theme="dark"] .dropdown-item:hover,
html[data-social-theme="dark"] .dropdown-item:focus {
  background: #1f2937;
}

html[data-social-theme="dark"] .social-story-create .social-story-ring {
  border-color: rgba(147, 197, 253, .5);
  background: linear-gradient(180deg, rgba(59, 130, 246, .18), rgba(236, 72, 153, .12));
  color: #bfdbfe;
}

html[data-social-theme="dark"] .social-story-plus {
  background: #111827;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

html[data-social-theme="dark"] .social-story-tile.is-seen .social-story-ring {
  border-color: rgba(148, 163, 184, .32);
}

html[data-social-theme="dark"] .social-upload-status {
  background: linear-gradient(135deg, rgba(59, 130, 246, .2), rgba(14, 165, 233, .12));
  border-color: rgba(147, 197, 253, .3);
  color: #dbeafe;
}

.social-filtered-word {
  display: inline-block;
  border-bottom: 1px dotted currentColor;
  border-radius: .2rem;
  cursor: pointer;
  font-weight: 700;
  padding-inline: .06rem;
}

.social-filtered-word.is-revealed {
  background: #fef3c7;
  color: #7c2d12;
}

html[data-social-theme="dark"] .social-filtered-word.is-revealed {
  background: rgba(245, 158, 11, .28);
  color: #fde68a;
}

@media (max-width: 575.98px) {
  .social-post {
    font-size: 1rem;
  }

  .social-post .post-body-wrap,
  .social-post .post-body-wrap p,
  .social-post .comment-row {
    font-size: 1rem;
    line-height: 1.55;
  }

  .social-post .small,
  .social-post small {
    font-size: .88rem;
  }

  .social-link-preview-card {
    gap: .55rem;
  }

  .social-link-preview-card img {
    width: 64px;
    height: 56px;
  }

  .social-stories-strip {
    margin-left: 0;
    margin-right: 0;
    padding: .8rem .7rem .65rem;
  }

  .social-story-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: .55rem;
    min-width: 0;
  }

  .social-story-toolbar .btn-group {
    max-width: 100%;
    overflow-x: auto;
  }

  .social-story-tile {
    width: 72px;
    flex-basis: 72px;
  }

  .social-story-ring {
    width: 62px;
    min-width: 62px;
    height: 124px;
    min-height: 124px;
  }
}

@media (max-width: 991.98px) {
  .students-titlebar {
    align-items: stretch;
    flex-direction: column !important;
  }

  .students-toolbar-actions .students-desktop-bulk-action.touch-icon-btn {
    display: none !important;
  }

  .students-compact-actions {
    display: block;
  }

  .students-toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
  }

  .students-toolbar-actions > .btn,
  .students-toolbar-actions > .dropdown > .btn {
    width: 100%;
  }

  .students-compact-actions {
    order: 1;
  }

  #btnNewStudent {
    order: 2;
  }

  #btnBulkAttendance {
    order: 3;
  }
}

@media (max-width: 767.98px) {
  .student-action-bar,
  .social-page-actions {
    width: 100%;
    gap: .5rem;
  }

  .social-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    gap: .35rem;
  }

  .social-page-actions > *,
  .social-page-actions > form {
    min-width: 0;
    width: auto;
    flex: 0 0 auto;
  }

  .social-page-actions > form {
    display: flex;
    margin-bottom: 0 !important;
  }

  .students-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .student-action-bar > *,
  .social-page-actions > * {
    flex: 0 1 auto;
  }

  .student-action-bar .touch-icon-btn,
  .social-page-actions .touch-icon-btn {
    width: auto !important;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: .5rem .7rem;
    font-size: .88rem;
  }

  .social-page-actions .touch-icon-btn {
    width: 2.85rem !important;
    min-width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #374151 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 1.15rem;
  }

  .student-action-bar .touch-icon-btn.with-mobile-label,
  .social-page-actions .touch-icon-btn.with-mobile-label {
    flex: 1 1 calc(50% - .5rem);
  }

  .social-page-actions .touch-icon-btn.with-mobile-label {
    flex: none;
  }

  .student-action-bar .mobile-action-label {
    display: inline;
  }

  .social-page-actions .mobile-action-label {
    display: none !important;
  }

  .panel-header-responsive .student-action-bar.no-print > * {
    flex: 0 1 auto;
  }
}
