/* ================================================================
   Sistema de Control de Cuotas Semanales · 3E2
   CSS puro (sin frameworks) — glassmorphism oscuro
   ================================================================ */

:root {
  color-scheme: dark;

  /* Paleta base */
  --bg: #030712;
  --bg-soft: #0f172a;
  --card: rgba(30, 41, 59, 0.55);
  --card-hover: rgba(30, 41, 59, 0.85);
  --panel: rgba(15, 23, 42, 0.75);
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.05);

  /* Textos */
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --text-4: #64748b;
  --text-5: #475569;

  /* Acentos */
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --violet-300: #c4b5fd;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --rose-300: #fda4af;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius: 1rem;
  --radius-lg: 1.25rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--emerald-500);
  color: #fff;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

input {
  font-family: inherit;
}

/* ---------------- Scrollbars ---------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.6);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.5);
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---------------- Animaciones ---------------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.anim-fadeUp {
  animation: fadeUp 0.35s ease-out both;
}
.anim-slideUp {
  animation: slideUp 0.35s ease-out both;
}

/* ---------------- Layout general ---------------- */
.app-root {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg);
}

.container {
  margin-inline: auto;
  max-width: 80rem; /* max-w-7xl */
  padding-inline: 1rem;
}

/* Fondo decorativo */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-decor .blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(120px);
}
.bg-decor .blob-1 {
  top: -8rem;
  right: -8rem;
  width: 24rem;
  height: 24rem;
  background: rgba(16, 185, 129, 0.1);
}
.bg-decor .blob-2 {
  bottom: -8rem;
  left: -8rem;
  width: 24rem;
  height: 24rem;
  background: rgba(20, 184, 166, 0.1);
}

/* ---------------- Utilidades ---------------- */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.flex-1 {
  flex: 1;
  min-width: 0;
}
.shrink-0 {
  flex-shrink: 0;
}
.grow-0 {
  flex-grow: 0;
}
.min-w-0 {
  min-width: 0;
}
.relative {
  position: relative;
}
.w-full {
  width: 100%;
}
.hidden {
  display: none;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spacer {
  flex: 1;
}

/* ---------------- Tipografía ---------------- */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}
.font-extrabold {
  font-weight: 800;
}
.tracking-tight {
  letter-spacing: -0.025em;
}
.tracking-wider {
  letter-spacing: 0.05em;
}
.uppercase {
  text-transform: uppercase;
}
.normal-case {
  text-transform: none;
}

.text-white {
  color: #fff;
}
.text-slate-200 {
  color: #e2e8f0;
}
.text-slate-300 {
  color: var(--text-2);
}
.text-slate-400 {
  color: var(--text-3);
}
.text-slate-500 {
  color: var(--text-4);
}
.text-slate-600 {
  color: var(--text-5);
}

.text-emerald-300 {
  color: var(--emerald-300);
}
.text-emerald-400 {
  color: var(--emerald-400);
}
.text-teal-300 {
  color: var(--teal-400);
}
.text-teal-400 {
  color: var(--teal-400);
}
.text-amber-300 {
  color: var(--amber-300);
}
.text-amber-400 {
  color: var(--amber-400);
}
.text-rose-300 {
  color: var(--rose-300);
}
.text-rose-400 {
  color: var(--rose-400);
}
.text-violet-300 {
  color: var(--violet-300);
}
.text-sky-300 {
  color: var(--sky-300);
}

/* ---------------- Espaciado ---------------- */
.gap-1 {
  gap: 0.25rem;
}
.gap-1\\.5 {
  gap: 0.375rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-2\\.5 {
  gap: 0.625rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-5 {
  gap: 1.25rem;
}
.mt-0\\.5 {
  margin-top: 0.125rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-1\\.5 {
  margin-top: 0.375rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-5 {
  margin-top: 1.25rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-1\\.5 {
  margin-bottom: 0.375rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-5 {
  margin-bottom: 1.25rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.mx-auto {
  margin-inline: auto;
}
.p-0 {
  padding: 0;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-3\\.5 {
  padding: 0.875rem;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 1.25rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-7 {
  padding: 1.75rem;
}
.p-8 {
  padding: 2rem;
}
.px-2 {
  padding-inline: 0.5rem;
}
.px-3 {
  padding-inline: 0.75rem;
}
.px-3\\.5 {
  padding-inline: 0.875rem;
}
.px-4 {
  padding-inline: 1rem;
}
.px-5 {
  padding-inline: 1.25rem;
}
.px-6 {
  padding-inline: 1.5rem;
}
.py-1 {
  padding-block: 0.25rem;
}
.py-1\\.5 {
  padding-block: 0.375rem;
}
.py-2 {
  padding-block: 0.5rem;
}
.py-2\\.5 {
  padding-block: 0.625rem;
}
.py-3 {
  padding-block: 0.75rem;
}
.py-3\\.5 {
  padding-block: 0.875rem;
}
.py-4 {
  padding-block: 1rem;
}
.py-5 {
  padding-block: 1.25rem;
}
.py-6 {
  padding-block: 1.5rem;
}
.py-24 {
  padding-block: 6rem;
}
.pb-28 {
  padding-bottom: 7rem;
}
.pt-3 {
  padding-top: 0.75rem;
}

/* ---------------- Glassmorphism ---------------- */
.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

.glass-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.glass-card-hover {
  transition: all 0.25s ease-in-out;
}
.glass-card-hover:hover {
  background: var(--card-hover);
  border-color: rgba(52, 211, 153, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.rounded-xl {
  border-radius: 0.75rem;
}
.rounded-2xl {
  border-radius: 1rem;
}
.rounded-3xl {
  border-radius: 1.5rem;
}
.rounded-full {
  border-radius: 9999px;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-x-auto {
  overflow-x: auto;
}
.overflow-auto {
  overflow: auto;
}
.border {
  border: 1px solid var(--border);
}
.border-t {
  border-top: 1px solid var(--border-soft);
}
.border-b {
  border-bottom: 1px solid var(--border-soft);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ================================================================
   HEADER
   ================================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.logo-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-align: left;
}
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  color: #fff;
}
.logo-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.logo-sub {
  font-size: 0.625rem;
  line-height: 1.25;
  color: var(--text-3);
  margin: 0;
}

.role-badge {
  display: none;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid;
  font-size: 0.75rem;
  font-weight: 500;
}
.role-badge .dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
}
.role-tutor {
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet-300);
  border-color: rgba(139, 92, 246, 0.3);
}
.role-tutor .dot {
  background: #a78bfa;
}
.role-presidente {
  background: rgba(14, 165, 233, 0.15);
  color: var(--sky-300);
  border-color: rgba(14, 165, 233, 0.3);
}
.role-presidente .dot {
  background: #38bdf8;
}
.role-tesorero {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-300);
  border-color: rgba(16, 185, 129, 0.3);
}
.role-tesorero .dot {
  background: #34d399;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-logout:hover {
  border-color: rgba(251, 113, 133, 0.4);
  color: var(--rose-300);
}

/* ================================================================
   TABS
   ================================================================ */
.tabbar {
  position: sticky;
  top: 58px;
  z-index: 30;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.tabbar-inner {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding-block: 0.5rem;
}
.tab {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  transition: all 0.2s;
  white-space: nowrap;
}
.tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.tab-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-300);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Bottom nav (móvil) */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  border-top: 1px solid var(--border);
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.bottomnav-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.bottomnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-4);
  transition: color 0.2s;
}
.bottomnav-btn:hover {
  color: var(--text-2);
}
.bottomnav-btn-active {
  color: var(--emerald-400);
}

/* Icono SVG estándar */
.icon {
  width: 1.2em;
  height: 1.2em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}
.icon-sm {
  font-size: 1rem;
}
.icon-lg {
  font-size: 1.75rem;
}

/* ================================================================
   MAIN
   ================================================================ */
.main {
  padding-block: 1.5rem 7rem;
}

.page-head-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.page-head-sub {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  color: var(--text-3);
}
.space-y-4 > * + * {
  margin-top: 1rem;
}
.space-y-5 > * + * {
  margin-top: 1.25rem;
}
.space-y-6 > * + * {
  margin-top: 1.5rem;
}

/* Spinner */
.spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 2px solid var(--text-5);
  border-top-color: var(--emerald-400);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loader-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 6rem;
}

/* ================================================================
   LOGIN
   ================================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.login-bg .blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(120px);
}
.login-bg .b1 {
  top: -10rem;
  left: -10rem;
  width: 30rem;
  height: 30rem;
  background: rgba(16, 185, 129, 0.2);
  animation: pulse 6s ease-in-out infinite;
}
.login-bg .b2 {
  bottom: -10rem;
  right: -10rem;
  width: 28rem;
  height: 28rem;
  background: rgba(20, 184, 166, 0.2);
  animation: pulse 6s ease-in-out infinite;
  animation-delay: 2s;
}
.login-bg .b3 {
  top: 33%;
  left: 50%;
  width: 18rem;
  height: 18rem;
  transform: translateX(-50%);
  background: rgba(139, 92, 246, 0.1);
}
.login-bg .dots {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 28px 28px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.login-box {
  width: 100%;
  max-width: 28rem;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  color: #fff;
  animation: float 6s ease-in-out infinite;
}
.login-title {
  text-align: center;
  margin: 0;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}
.login-sub {
  text-align: center;
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  color: var(--text-3);
}

.login-card {
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.field-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.input-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}
.input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  pointer-events: none;
}
.input-with-icon {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-with-icon::placeholder {
  color: var(--text-4);
}
.input-with-icon:focus {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}

.input-plain {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-plain::placeholder {
  color: var(--text-4);
}
.input-plain:focus {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
  transition: all 0.2s;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(90deg, var(--emerald-400), var(--teal-400));
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-error {
  margin-bottom: 1rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.1);
  color: var(--rose-300);
  font-size: 0.875rem;
}

.quick-card {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.quick-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-3);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.quick-btn {
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.quick-btn:hover {
  border-color: rgba(52, 211, 153, 0.4);
  color: #fff;
}
.mode-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-4);
}
.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-5);
}

/* ================================================================
   RESULTADOS / DASHBOARD
   ================================================================ */
.grid {
  display: grid;
}
.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.week-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.25rem;
}
.stat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.stat-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.stat-value {
  margin: 0.5rem 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}
.stat-sub {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-3);
}
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
}
.stat-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
}
.stat-rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-400);
}
.stat-teal {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal-400);
}
.stat-violet {
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet-400);
}

.compliance-bar {
  height: 0.75rem;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.8);
  overflow: hidden;
}
.compliance-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--emerald-500), var(--teal-400), var(--emerald-300));
  transition: width 1s ease;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}
.link-emerald {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--emerald-400);
  transition: color 0.2s;
}
.link-emerald:hover {
  color: var(--emerald-300);
}

.week-card {
  padding: 1rem;
  border-radius: 1rem;
  text-align: left;
}
.week-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.week-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}
.week-card-title .icon {
  color: var(--emerald-400);
}
.week-fee {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.week-card-progress {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-3);
}
.week-card-progress .count {
  font-weight: 600;
  color: var(--text-2);
}
.week-bars {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.5rem;
}
.week-bars span {
  flex: 1;
  height: 4px;
  border-radius: 9999px;
}
.bar-emerald {
  background: rgba(16, 185, 129, 0.8);
}
.bar-amber {
  background: rgba(245, 158, 11, 0.8);
}
.bar-rose {
  background: rgba(244, 63, 94, 0.8);
}
.week-counts {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.625rem;
}
.week-counts .chip {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}
.chip-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-300);
}
.chip-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-300);
}
.chip-rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-300);
}

/* ================================================================
   PLANILLA
   ================================================================ */
.week-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sel-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  transition: color 0.2s;
}
.sel-arrow:hover {
  color: #fff;
}
.week-pills {
  flex: 1;
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
}
.week-pill {
  flex: 0 0 auto;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}
.week-pill:hover {
  color: #fff;
}
.week-pill-active {
  background: var(--emerald-500);
  color: #fff;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.25);
}

.week-head {
  border-radius: 1rem;
  padding: 1.25rem;
}
.week-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.week-title .icon {
  color: var(--emerald-400);
}
.week-desc {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--text-3);
}
.legend-grid {
  display: flex;
  gap: 0.75rem;
}
.legend-box {
  padding: 0.375rem 0.75rem;
  border-radius: 0.75rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}
.legend-box-lg {
  line-height: 1;
  font-size: 1.125rem;
  font-weight: 700;
}
.legend-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.lg-emerald {
  color: var(--emerald-400);
}
.lg-amber {
  color: var(--amber-400);
}
.lg-rose {
  color: var(--rose-400);
}
.week-recap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.875rem;
}
.week-recap .label {
  color: var(--text-3);
}
.week-recap .value {
  font-weight: 700;
  color: var(--emerald-400);
}
.week-recap .value small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-4);
}

/* Matriz desktop */
.matrix-wrap {
  display: none;
  overflow: hidden;
  border-radius: 1rem;
}
.matrix-scroll {
  overflow-x: auto;
}
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.matrix-table thead tr {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.matrix-table th {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding: 0.75rem 0.5rem;
  white-space: nowrap;
}
.matrix-table th.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-soft);
  padding-inline: 1rem;
}
.matrix-table th.sticky-col-name {
  left: 2.5rem;
  min-width: 12rem;
  z-index: 3;
}
.matrix-table td {
  padding: 0.625rem 0.375rem;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}
.matrix-table td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(3, 7, 18, 0.95);
  text-align: left;
  font-weight: 600;
  color: var(--text-2);
}
.matrix-table td.sticky-col-name {
  left: 2.5rem;
  z-index: 3;
  text-align: left;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}
.matrix-table tbody tr {
  transition: background 0.15s;
}
.matrix-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.matrix-table .num-cell {
  font-weight: 700;
  color: var(--text-2);
}
.matrix-table .total-cell {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald-400);
}
.th-date {
  font-size: 0.625rem;
  text-transform: none;
  font-weight: 400;
  color: var(--text-5);
  display: block;
}

/* Celda de estado en planilla */
.cell-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cell-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.cell-selected {
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.6) !important;
}
.estado-pagado {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-300);
  border-color: rgba(16, 185, 129, 0.3);
}
.estado-abonado {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-300);
  border-color: rgba(245, 158, 11, 0.3);
}
.estado-deuda {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-300);
  border-color: rgba(244, 63, 94, 0.3);
}

/* Lista móvil */
.mobile-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem;
  border-radius: 1rem;
  text-align: left;
  animation: fadeUp 0.3s ease-out both;
}
.member-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  color: var(--text-2);
}
.member-row-main {
  flex: 1;
  min-width: 0;
}
.member-row-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-row-sub {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-3);
}
.member-row-state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.state-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
}
.dot-pagado {
  background: var(--emerald-500);
}
.dot-abonado {
  background: var(--amber-500);
}
.dot-deuda {
  background: var(--rose-500);
}
.collect-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.collect-btn-solid {
  background: var(--emerald-500);
  color: #fff;
}
.collect-btn-soft {
  background: rgba(255, 255, 255, 0.05);
  color: var(--emerald-300);
}

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0;
}
.modal-sheet {
  width: 100%;
  max-width: 28rem;
  border-radius: 1.5rem 1.5rem 0 0;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}
.modal-head {
  position: relative;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.375rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-3);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.modal-close:hover {
  color: #fff;
}
.modal-eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-400);
}
.modal-title {
  margin: 0.25rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}
.modal-sub {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--text-3);
}
.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.summary-box {
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
}
.summary-box-emerald {
  background: rgba(16, 185, 129, 0.1);
}
.summary-box-rose {
  background: rgba(244, 63, 94, 0.1);
}
.summary-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.summary-value {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
}
.summary-value.v-emerald {
  color: var(--emerald-400);
}
.summary-value.v-rose {
  color: var(--rose-400);
}

.info-cover {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald-300);
  font-size: 0.875rem;
}

.monto-input {
  font-size: 1.125rem;
  font-weight: 700;
  padding-left: 2.5rem;
}

.preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}
.preset-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}
.preset-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
}
.preset-btn-active {
  border-color: rgba(52, 211, 153, 0.6);
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-300);
}

.modal-submit {
  padding: 0.875rem;
  border-radius: 0.75rem;
  background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}
.modal-submit:hover:not(:disabled) {
  background: linear-gradient(90deg, var(--emerald-400), var(--teal-400));
}
.modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.modal-registered-by {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-5);
}

/* ================================================================
   ALUMNOS
   ================================================================ */
.alumno-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
.alumno-card {
  overflow: hidden;
  border-radius: 1rem;
  transition: border-color 0.2s;
}
.alumno-card-open {
  border-color: rgba(52, 211, 153, 0.3);
}
.alumno-row-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  text-align: left;
}
.alumno-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.1));
  font-weight: 700;
  color: var(--emerald-300);
}
.alumno-main {
  flex: 1;
  min-width: 0;
}
.alumno-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alumno-totals {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-3);
}
.alumno-totals .icon {
  font-size: 0.75rem;
  color: var(--emerald-400);
}
.alumno-totals .debt {
  color: var(--rose-400);
}
.alumno-totals .debt .icon {
  color: var(--rose-400);
}
.alumno-bar {
  height: 6px;
  border-radius: 9999px;
  background: var(--bg-soft);
  overflow: hidden;
  margin-top: 0.5rem;
}
.alumno-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--emerald-500), var(--teal-400));
  transition: width 0.5s ease;
}
.alumno-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.alumno-pct {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-2);
}
.alumno-pct-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-4);
}
.chevron {
  width: 1rem;
  height: 1rem;
  color: var(--text-3);
  transition: transform 0.3s;
}
.chevron-open {
  transform: rotate(180deg);
}

.alumno-expand {
  border-top: 1px solid var(--border-soft);
  padding: 0.75rem 1rem 1rem;
}
.expand-headrow {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-4);
}
.expand-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.expand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
}
.expand-row .w {
  color: var(--text-2);
}
.expand-row .right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.expand-row .amount {
  color: var(--text-3);
}

/* Estado pill genérico */
.badge-pill {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid;
  font-size: 0.625rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ================================================================
   EXPORTAR
   ================================================================ */
.export-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.export-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 1rem;
  text-align: left;
  transition: all 0.25s;
}
.export-card:hover {
  transform: translateY(-2px);
}
.export-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  transition: transform 0.2s;
  font-size: 1.5rem;
}
.export-icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
}
.export-icon-rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-400);
}
.export-card:hover .export-icon {
  transform: scale(1.1);
}
.export-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}
.export-sub {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--text-3);
}

.weeks-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.weeks-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}
.weeks-panel-title .icon {
  color: var(--teal-400);
}
.btn-teal {
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal-400);
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-teal:hover {
  background: rgba(20, 184, 166, 0.25);
}

.new-week-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
  grid-template-columns: 1fr;
}
.new-week-form .submit-cell {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.new-week-form .submit-cell .flex-1 {
  flex: 1;
}
.btn-submit-teal {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  height: 38px;
  padding-inline: 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding-block: 0;
}
.btn-submit-teal:disabled {
  opacity: 0.5;
}

.weeks-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.week-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 0.75rem;
}

.preview-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-soft);
}
.preview-head h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}
.preview-scroll {
  max-height: 24rem;
  overflow: auto;
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.preview-table thead tr {
  position: sticky;
  top: 0;
  background: rgba(3, 7, 18, 0.95);
  text-align: left;
}
.preview-table th {
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.preview-table td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.preview-table td.num {
  color: var(--text-3);
}
.preview-table td.name {
  font-weight: 500;
  color: #fff;
}
.preview-table td.r {
  text-align: right;
}

/* ================================================================
   TOAST
   ================================================================ */
.toast-wrap {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: calc(100% - 2rem);
  max-width: 24rem;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 1px solid;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideUp 0.3s ease-out both;
}
.toast-success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(6, 78, 59, 0.8);
  color: #a7f3d0;
}
.toast-error {
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(76, 5, 25, 0.8);
  color: #fecdd3;
}
.toast-close {
  display: flex;
  align-items: center;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.toast-close:hover {
  opacity: 1;
}
.toast-msg {
  flex: 1;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (min-width: 640px) {
  .role-badge {
    display: flex;
  }
  .toast-wrap {
    bottom: 1.5rem;
  }
  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }
  .modal-sheet {
    border-radius: 1.5rem;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .alumno-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .new-week-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .week-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .matrix-wrap {
    display: block;
  }
  .mobile-list {
    display: none;
  }
  .bottomnav {
    display: none;
  }
  .alumno-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .export-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .new-week-form {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .alumno-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ajuste top del tabbar según header contenido en móvil */
@media (max-width: 639px) {
  .tabbar {
    top: 52px;
  }
}