.level-card,
.resource-card,
.block-card,
.module-card,
.tool-card,
.empty-state,
.search-panel,
.module-controls,
.link-manager-card,
.link-list-card,
.teacher-student-link-card,
.class-launcher-card,
.recent-module-card {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.card-link,
.block-card,
.class-launcher-card,
.recent-module-card {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.card-link:hover,
.block-card:hover,
.class-launcher-card:hover,
.recent-module-card:hover {
  border-color: rgba(24, 184, 216, 0.42);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.level-card {
  position: relative;
  display: grid;
  min-height: 270px;
  overflow: hidden;
  padding: 20px;
}

.level-card-accent,
.block-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--brand-cyan);
}

.level-card::after {
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 126px;
  height: 126px;
  border: 20px solid rgba(24, 184, 216, 0.12);
  border-radius: 32px;
  transform: rotate(18deg);
  content: "";
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.level-icon,
.resource-icon,
.block-icon,
.tool-icon,
.empty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand-navy);
  font-weight: 1000;
}

.level-icon .ui-icon,
.resource-icon .ui-icon,
.block-icon .ui-icon,
.tool-icon .ui-icon,
.empty-icon .ui-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

.level-icon {
  width: 60px;
  height: 60px;
  border-radius: 22px;
  background: var(--accent-blue-soft);
  font-size: 1rem;
}

.level-cebollitas {
  --level-main: #ffd04d;
  --level-soft: #fff6d9;
  --level-text: #6f5500;
}

.level-patatas {
  --level-main: #f59e0b;
  --level-soft: #fff4dc;
  --level-text: #7a4300;
}

.level-tortillas {
  --level-main: #18b8d8;
  --level-soft: #e8f6ff;
  --level-text: #0b6678;
}

.level-card-accent,
.level-card .level-icon {
  background: var(--level-main, var(--brand-cyan));
  color: var(--brand-navy);
}

.level-card .status-badge {
  background: var(--level-soft, var(--accent-blue-soft));
  color: var(--level-text, var(--brand-cyan-strong));
}

.card-body {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 8px;
  min-width: 0;
  margin-top: 24px;
}

.card-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 760;
}

.card-meta {
  color: var(--level-text, var(--brand-cyan-strong));
  font-size: 0.9rem;
  font-weight: 1000;
}

.status-badge,
.block-number,
.block-stats span,
.module-number,
.review-badge,
.student-sync-badge,
.tool-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 1000;
  white-space: nowrap;
}

.status-badge {
  background: var(--accent-green-soft);
  color: #16764a;
}

.status-badge.soon {
  background: #eef2f7;
  color: #6b7685;
}

.disabled-card {
  color: #7c8796;
}

.disabled-card::before {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.36);
  content: "";
}

.resource-card,
.tool-card {
  display: grid;
  gap: 14px;
  min-height: 178px;
  padding: 20px;
}

.tool-card {
  align-content: start;
  min-height: 248px;
}

.tool-card.has-link {
  border-color: rgba(24, 184, 216, 0.2);
}

.tool-card.is-pending {
  border-style: dashed;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.78), rgba(255, 255, 255, 0.96)),
    #fff;
}

.class-launcher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.class-launcher-card {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 218px;
  overflow: hidden;
  padding: 18px;
}

.class-launcher-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--launcher-accent, var(--brand-cyan));
  content: "";
}

.class-launcher-card::after {
  position: absolute;
  right: -32px;
  bottom: -32px;
  width: 104px;
  height: 104px;
  border: 18px solid var(--launcher-soft, var(--brand-cyan-soft));
  border-radius: 30px;
  transform: rotate(16deg);
  content: "";
}

.class-launcher-card > * {
  position: relative;
  z-index: 1;
}

.class-launcher-card h3,
.class-launcher-card p {
  margin: 0;
}

.class-launcher-card h3 {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 1.1rem;
}

.class-launcher-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 780;
}

.class-launcher-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 18px;
  margin-bottom: 18px;
  color: var(--launcher-text, var(--brand-navy));
  background: var(--launcher-soft, var(--brand-cyan-soft));
}

.class-launcher-icon .ui-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

.class-launcher-action {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  border-radius: 999px;
  margin-top: 16px;
  padding: 0 12px;
  color: var(--launcher-text, var(--brand-cyan-strong));
  background: var(--launcher-soft, var(--brand-cyan-soft));
  font-size: 0.82rem;
  font-weight: 1000;
}

.class-launcher-action .ui-icon {
  width: 15px;
  height: 15px;
}

.tone-cyan {
  --launcher-accent: var(--brand-cyan);
  --launcher-soft: var(--brand-cyan-soft);
  --launcher-text: var(--brand-cyan-strong);
}

.tone-yellow {
  --launcher-accent: var(--brand-yellow);
  --launcher-soft: var(--brand-yellow-soft);
  --launcher-text: #7a5a00;
}

.tone-green {
  --launcher-accent: var(--accent-green);
  --launcher-soft: var(--accent-green-soft);
  --launcher-text: #16764a;
}

.tone-purple {
  --launcher-accent: var(--accent-purple);
  --launcher-soft: var(--accent-purple-soft);
  --launcher-text: #4b37a8;
}

.recent-module-card {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
}

.recent-module-card > div:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
}

.recent-module-card h3,
.recent-module-card p {
  margin: 0;
}

.recent-module-card h3 {
  margin-bottom: 4px;
}

.recent-module-card p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 800;
}

.recent-module-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 20px;
  color: var(--brand-navy);
  background: linear-gradient(135deg, var(--brand-yellow-soft), var(--brand-cyan-soft));
}

.recent-module-icon .ui-icon {
  width: 26px;
  height: 26px;
}

.link-manager-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.staff-manager-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.student-manager-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.student-manager-layout + .link-list-card {
  margin-top: 18px;
}

.student-manager-layout .link-manager-card {
  position: static;
  height: 100%;
}

.link-manager-layout.is-links-collapsed {
  grid-template-columns: minmax(0, 1fr);
  max-width: 920px;
}

.link-manager-layout.is-links-collapsed .link-manager-card {
  position: static;
}

.link-manager-card,
.link-list-card {
  padding: 20px;
}

.link-manager-card {
  position: sticky;
  top: 28px;
}

.link-manager-card-header,
.link-list-heading,
.link-card-main,
.link-card-footer,
.link-person {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.link-manager-card-header,
.link-list-heading,
.link-card-footer {
  align-items: center;
  justify-content: space-between;
}

.link-list-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.link-manager-card-header {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.link-manager-card-header h2,
.link-list-heading h2,
.link-person p,
.link-person strong,
.link-person span,
.link-manager-card-header p {
  margin: 0;
}

.link-manager-card-header p:not(.eyebrow),
.link-person span,
.link-manager-note {
  color: var(--muted);
  font-weight: 780;
}

.link-manager-icon,
.link-person-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-navy);
}

.link-manager-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-cyan-soft), var(--brand-yellow-soft));
}

.link-manager-icon .ui-icon {
  width: 26px;
  height: 26px;
}

.link-manager-form {
  display: grid;
  gap: 14px;
}

.link-manager-layout.is-links-collapsed .link-manager-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-manager-layout.is-links-collapsed .link-manager-note,
.link-manager-layout.is-links-collapsed .link-manager-form .button,
.link-manager-layout.is-links-collapsed .link-manager-status {
  grid-column: 1 / -1;
}

.link-manager-form label {
  display: grid;
  gap: 7px;
  color: #394553;
  font-size: 0.9rem;
  font-weight: 900;
}

.link-manager-form input,
.link-manager-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--text);
  background: #fff;
}

.link-manager-form input:focus-visible,
.link-manager-form select:focus-visible {
  outline: 3px solid rgba(24, 184, 216, 0.32);
  outline-offset: 3px;
}

.link-manager-form .button {
  width: 100%;
}

.link-manager-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(24, 184, 216, 0.18);
  border-radius: 18px;
  padding: 12px;
  background: var(--brand-cyan-soft);
  font-size: 0.9rem;
}

.link-manager-note .ui-icon {
  margin-top: 2px;
  color: var(--brand-cyan-strong);
}

.link-manager-status {
  min-height: 24px;
  margin: 0;
}

.link-manager-status .link-manager-view-links {
  width: fit-content;
  margin-top: 10px;
}

.staff-setup-link {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 780;
}

.staff-setup-link a {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--brand-cyan-strong);
}

.student-invite-result {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 780;
}

.student-invite-result a {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--brand-cyan-strong);
}

.student-invite-result-warning {
  color: #8e2c24;
}

.student-identity-editor-shell {
  flex: 1 1 100%;
  width: 100%;
  display: grid;
  gap: 8px;
}

.student-identity-editor {
  width: 100%;
  margin-top: 4px;
  border: 1px solid rgba(28, 77, 120, 0.14);
  border-radius: 18px;
  background: rgba(248, 252, 255, 0.92);
}

.student-identity-editor > summary {
  width: fit-content;
  margin: 12px;
  list-style: none;
  cursor: pointer;
}

.student-identity-editor > summary::-webkit-details-marker {
  display: none;
}

.student-identity-editor[open] > summary {
  margin-bottom: 0;
}

.student-identity-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.student-identity-form label {
  display: grid;
  gap: 6px;
  color: #394553;
  font-size: 0.82rem;
  font-weight: 900;
}

.student-identity-form input {
  min-width: 0;
}

.student-identity-warning,
.student-identity-status {
  grid-column: 1 / -1;
}

.student-identity-warning {
  margin: 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff7dc;
  color: #785b13;
  font-size: 0.82rem;
  font-weight: 780;
}

.student-identity-result {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 780;
}

.student-identity-result a {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--brand-cyan-strong);
}

.student-identity-result-warning {
  color: #8e2c24;
}

.student-identity-feedback:empty {
  display: none;
}

.student-identity-feedback:not(:empty) {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(31, 164, 110, 0.22);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(236, 253, 245, 0.92);
}

.staff-list,
.staff-member-controls {
  display: grid;
  gap: 12px;
}

.staff-list-actions {
  display: flex;
  justify-content: flex-end;
}

.staff-member-controls {
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto auto;
  align-items: end;
}

.staff-member-controls label {
  display: grid;
  gap: 6px;
  color: #394553;
  font-size: 0.82rem;
  font-weight: 900;
}

.staff-member-controls select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0 10px;
  color: var(--text);
  background: #fff;
}

.staff-member-controls select:disabled {
  color: var(--muted);
  background: #f6f8fb;
}

.staff-archive-button {
  color: #7d2d22;
  border-color: rgba(255, 111, 97, 0.34);
  background: var(--accent-coral-soft);
}

.staff-update-status {
  grid-column: 1 / -1;
  min-height: 22px;
  margin: 0;
}

.link-list-card {
  display: grid;
  gap: 16px;
}

.link-list-card-collapsed {
  align-content: start;
  justify-items: start;
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0;
}

.link-list-request-button {
  width: fit-content;
}

.link-count,
.link-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 1000;
  white-space: nowrap;
}

.link-count {
  background: var(--accent-blue-soft);
  color: #255ca8;
}

.link-list-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.link-list-controls .filter-chips {
  justify-content: flex-end;
}

.link-search-panel {
  display: grid;
  gap: 8px;
  max-width: 560px;
  color: var(--text);
  font-weight: 1000;
}

.link-search-panel .search-wrap {
  min-height: 58px;
  border: 2px solid rgba(74, 47, 186, 0.16);
  border-radius: 999px;
  padding-inline: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(53, 36, 148, 0.07);
}

.link-search-panel .search-input {
  min-height: 54px;
  font-size: 1rem;
}

.link-search-panel .search-symbol {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
}

.link-search-panel .search-symbol .ui-icon {
  width: 22px;
  height: 22px;
}

.teacher-student-link-list {
  display: grid;
  gap: 12px;
}

.teacher-student-link-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  box-shadow: none;
}

.teacher-student-link-card.is-active {
  border-color: rgba(47, 189, 116, 0.34);
}

.teacher-student-link-card.is-inactive {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(255, 255, 255, 0.96)),
    #fff;
}

.link-card-main {
  align-items: center;
  justify-content: space-between;
}

.link-person {
  align-items: center;
  flex: 1 1 0;
}

.link-person-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(63, 140, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 48%),
    linear-gradient(135deg, var(--brand-cyan), var(--accent-blue));
  box-shadow: 0 8px 0 rgba(14, 99, 125, 0.14), 0 14px 24px rgba(24, 184, 216, 0.18);
}

.link-person-icon.student {
  border-color: rgba(255, 214, 90, 0.62);
  color: #5c3f00;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 48%),
    linear-gradient(135deg, var(--brand-yellow), #ffb86b);
  box-shadow: 0 8px 0 rgba(132, 92, 0, 0.14), 0 14px 24px rgba(255, 184, 107, 0.2);
}

.link-person-icon .ui-icon {
  display: none;
}

.link-person div {
  min-width: 0;
}

.link-person p {
  color: var(--brand-cyan-strong);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.link-person strong,
.link-person span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-person strong {
  color: var(--text);
}

.link-person span {
  font-size: 0.84rem;
}

.link-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-cyan-strong);
  background: var(--brand-cyan-soft);
}

.link-card-footer {
  flex-wrap: wrap;
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.link-card-footer code {
  overflow: hidden;
  max-width: 100%;
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-status.active {
  background: var(--accent-green-soft);
  color: #16764a;
}

.link-status.inactive {
  background: #eef2f7;
  color: #687483;
}

.student-account-status,
.assignment-student-option .student-account-status {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  margin-top: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  overflow: visible;
  color: #255ca8;
  background: var(--accent-blue-soft);
  font-size: 0.72rem;
  font-weight: 1000;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

.student-account-status.is-invited,
.assignment-student-option .student-account-status.is-invited {
  color: #754400;
  background: var(--accent-orange-soft);
}

.student-account-status.is-active,
.assignment-student-option .student-account-status.is-active {
  color: #16764a;
  background: var(--accent-green-soft);
}

.student-account-status.is-disabled,
.student-account-status.is-archived,
.assignment-student-option .student-account-status.is-disabled,
.assignment-student-option .student-account-status.is-archived {
  color: #687483;
  background: #eef2f7;
}

.tool-card-top,
.tool-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tool-card-top {
  justify-content: space-between;
}

.tool-action-row {
  justify-content: flex-end;
}

.tool-copy {
  display: grid;
  gap: 4px;
}

.tool-copy h3 {
  margin-bottom: 0;
}

.tool-category {
  margin: 0;
  color: var(--brand-cyan-strong);
  font-size: 0.76rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-host {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-launch-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding-inline: 13px;
  font-size: 0.86rem;
}

/* Premium kids learning cards refresh */
.level-card,
.resource-card,
.block-card,
.module-card,
.tool-card,
.empty-state,
.search-panel,
.module-controls,
.link-manager-card,
.link-list-card,
.teacher-student-link-card,
.class-launcher-card,
.recent-module-card {
  border-color: rgba(82, 122, 180, 0.18);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.98)),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.card-link:hover,
.block-card:hover,
.class-launcher-card:hover,
.recent-module-card:hover,
.module-card-link:hover,
.tool-card.has-link:hover,
.teacher-student-link-card:hover {
  border-color: rgba(25, 194, 230, 0.45);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.level-card {
  min-height: 292px;
  border-width: 2px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), var(--level-soft, #eef8ff)),
    #fff;
}

.level-card::after {
  right: -42px;
  bottom: -42px;
  width: 138px;
  height: 138px;
  border-width: 22px;
  border-color: rgba(25, 194, 230, 0.18);
  border-radius: 40px;
}

.level-card-accent,
.block-accent {
  height: 9px;
  background: linear-gradient(90deg, var(--level-main, var(--brand-cyan)), #fff);
}

.level-icon,
.resource-icon,
.block-icon,
.tool-icon,
.empty-icon,
.class-launcher-icon,
.recent-module-icon {
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 9px 0 rgba(20, 33, 61, 0.08), 0 16px 26px rgba(55, 83, 130, 0.12);
}

.level-icon {
  width: 66px;
  height: 66px;
  border-radius: 24px;
}

.card-meta,
.tool-category,
.link-person p {
  letter-spacing: 0.04em;
}

.status-badge,
.block-number,
.block-stats span,
.module-number,
.review-badge,
.student-sync-badge,
.tool-status,
.class-launcher-action,
.link-count,
.link-status {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: 0 6px 14px rgba(55, 83, 130, 0.08);
}

.resource-card,
.tool-card,
.class-launcher-card {
  border-width: 2px;
}

.resource-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(222, 248, 255, 0.62)),
    #fff;
}

.tool-card {
  min-height: 205px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 236, 255, 0.62)),
    #fff;
}

.tool-card::before {
  height: 8px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-yellow), var(--accent-purple));
}

.tool-icon,
.resource-icon,
.block-icon {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand-cyan-soft), #fff);
}

.block-card {
  border-width: 2px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 191, 0.54)),
    #fff;
}

.block-card h3,
.module-card h3,
.tool-card h3 {
  color: var(--text);
}

.module-card {
  border-width: 2px;
  border-color: rgba(82, 122, 180, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(226, 239, 255, 0.5)),
    #fff;
}

.module-card.has-video {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 231, 223, 0.52)),
    #fff;
}

.module-open-button,
.tool-launch-button {
  box-shadow: var(--shadow-button);
}

.empty-state {
  border-width: 2px;
  padding: clamp(28px, 5vw, 54px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 191, 0.46), rgba(222, 248, 255, 0.5)),
    #fff;
}

.empty-icon {
  width: 74px;
  height: 74px;
  border-radius: 28px;
  color: var(--brand-navy);
  background: linear-gradient(135deg, var(--brand-yellow), #8ff0da);
}

.search-panel,
.module-controls {
  border-width: 2px;
  padding: 16px;
}

.search-wrap {
  border-radius: 22px;
}

.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-cyan), var(--accent-blue));
  box-shadow: 0 7px 0 rgba(14, 99, 125, 0.18), 0 14px 26px rgba(24, 184, 216, 0.2);
}

.link-manager-card,
.link-list-card {
  border-width: 2px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(224, 251, 239, 0.44)),
    #fff;
}

.teacher-student-link-card {
  border-width: 2px;
}

.teacher-student-link-card.is-active {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(221, 250, 233, 0.5)),
    #fff;
}

.link-person-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
}

.link-arrow {
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-cyan), var(--accent-blue));
  box-shadow: 0 8px 0 rgba(14, 99, 125, 0.14);
}

.class-launcher-card {
  min-height: 228px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), var(--launcher-soft, var(--brand-cyan-soft))),
    #fff;
}

.class-launcher-card::before {
  height: 9px;
}

.recent-module-card {
  border-width: 2px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(222, 248, 255, 0.54), rgba(255, 244, 191, 0.42)),
    #fff;
}

.tool-launch-button .ui-icon {
  width: 17px;
  height: 17px;
}

.resource-card p,
.tool-card p,
.block-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 760;
}

.resource-icon,
.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--accent-blue-soft);
  color: #2367c7;
}

.resource-card:nth-child(2) .resource-icon,
.tool-card:nth-child(2n) .tool-icon {
  background: var(--brand-yellow-soft);
  color: #8b6400;
}

.resource-card:nth-child(3) .resource-icon,
.tool-card:nth-child(3n) .tool-icon {
  background: var(--accent-green-soft);
  color: #16764a;
}

.block-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 245px;
  overflow: hidden;
  padding: 18px;
  color: var(--text);
}

.block-card:nth-child(6n + 1) {
  --block-main: var(--brand-yellow);
  --block-soft: var(--brand-yellow-soft);
  --block-text: #6f5500;
}

.block-card:nth-child(6n + 2) {
  --block-main: var(--accent-green);
  --block-soft: var(--accent-green-soft);
  --block-text: #16764a;
}

.block-card:nth-child(6n + 3) {
  --block-main: var(--accent-coral);
  --block-soft: var(--accent-coral-soft);
  --block-text: #a73c2f;
}

.block-card:nth-child(6n + 4) {
  --block-main: var(--brand-cyan);
  --block-soft: var(--accent-blue-soft);
  --block-text: #0b6678;
}

.block-card:nth-child(6n + 5) {
  --block-main: var(--accent-purple);
  --block-soft: var(--accent-purple-soft);
  --block-text: #4531a4;
}

.block-card:nth-child(6n + 6) {
  --block-main: var(--accent-orange);
  --block-soft: var(--accent-orange-soft);
  --block-text: #7a4300;
}

.block-accent {
  background: var(--block-main);
}

.block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.block-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--block-soft);
  color: var(--block-text);
}

.block-number {
  background: var(--block-soft);
  color: var(--block-text);
}

.block-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.block-stats span {
  background: #f3f7fb;
  color: var(--muted);
}

.block-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--block-text);
  font-weight: 1000;
}

.arrow {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  background: var(--block-soft);
  color: var(--block-text);
  font-weight: 1000;
}

.module-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
}

.module-search,
.search-label {
  display: grid;
  gap: 7px;
  color: #394553;
  font-size: 0.9rem;
  font-weight: 900;
}

.search-panel {
  margin-bottom: 18px;
  padding: 16px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  padding: 0 12px;
}

.search-symbol {
  color: var(--muted);
  font-weight: 1000;
}

.search-symbol .ui-icon {
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-wrap:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(63, 140, 255, 0.14);
}

.clear-search {
  min-height: 34px;
  padding: 0 10px;
  background: var(--accent-blue-soft);
  color: #2367c7;
  font-size: 0.8rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-chip {
  min-height: 38px;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.9rem;
}

.filter-chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-cyan), var(--accent-blue));
  color: #fff;
  box-shadow: 0 10px 22px rgba(24, 184, 216, 0.2);
}

.module-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 170px;
  padding: 18px;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.module-card:hover {
  border-color: rgba(24, 184, 216, 0.38);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.module-card.is-selected {
  border-color: rgba(24, 184, 216, 0.72);
  box-shadow:
    0 0 0 4px rgba(24, 184, 216, 0.14),
    var(--shadow-hover);
}

.module-card.is-review {
  border-color: rgba(255, 208, 77, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 246, 217, 0.58), rgba(255, 255, 255, 0.96) 34%),
    #fff;
}

.module-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.module-number {
  background: var(--accent-blue-soft);
  color: #2367c7;
}

.review-badge {
  background: var(--brand-yellow-soft);
  color: #7a5900;
}

.student-sync-badge {
  gap: 6px;
  border: 1px solid transparent;
}

.student-sync-badge .ui-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.8;
}

.student-sync-badge.is-synced {
  border-color: rgba(31, 148, 89, 0.16);
  background: var(--accent-green-soft);
  color: #16764a;
}

.student-sync-badge.is-teacher-only {
  border-color: rgba(245, 158, 11, 0.18);
  background: var(--accent-orange-soft);
  color: #7a4300;
}

.module-card h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.resource-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.resource-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 1000;
  text-decoration: none;
}

.chip-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.resource-chip.linked {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.resource-chip.linked:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(41, 69, 112, 0.12);
}

.resource-video {
  background: var(--accent-coral-soft);
  color: #a73c2f;
}

.resource-presentacion {
  background: var(--accent-purple-soft);
  color: #4531a4;
}

.resource-guia {
  background: var(--accent-blue-soft);
  color: #2367c7;
}

.resource-wordwall {
  background: var(--accent-green-soft);
  color: #16764a;
}

.resource-baamboozle {
  background: var(--accent-orange-soft);
  color: #7a4300;
}

.resource-actividad {
  background: var(--brand-cyan-soft, #e6f8fc);
  color: #0b6678;
}

.resource-chip.reference {
  border-color: var(--line);
  background: #f6f8fb;
  color: var(--muted);
}

.resource-chip.missing {
  border-color: var(--line);
  background: #f8fafc;
  color: #97a2b1;
}

.module-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.module-open-button {
  min-height: 40px;
}

.external-button {
  min-height: 38px;
}

/* Novakid-inspired card polish */
.level-card,
.resource-card,
.block-card,
.module-card,
.tool-card,
.empty-state,
.class-launcher-card,
.recent-module-card {
  border-color: rgba(74, 47, 186, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 255, 0.82) 58%, rgba(255, 251, 225, 0.64)),
    #fff;
  box-shadow:
    0 14px 0 rgba(36, 16, 111, 0.055),
    var(--shadow-card);
}

.card-link:hover,
.block-card:hover,
.class-launcher-card:hover,
.recent-module-card:hover,
.module-card-link:hover,
.tool-card.has-link:hover,
.teacher-student-link-card:hover {
  border-color: rgba(106, 54, 216, 0.48);
  box-shadow:
    0 18px 0 rgba(36, 16, 111, 0.06),
    var(--shadow-hover);
  transform: translateY(-4px);
}

.level-cebollitas {
  --level-main: #ffeb3f;
  --level-soft: #fff8c9;
  --level-text: #24106f;
}

.level-patatas {
  --level-main: #95f482;
  --level-soft: #e8ffe2;
  --level-text: #205f25;
}

.level-tortillas {
  --level-main: #7b5cff;
  --level-soft: #efeaff;
  --level-text: #24106f;
}

.level-aventura-start {
  --level-main: #95f482;
  --level-soft: #e8ffe2;
  --level-text: #24106f;
}

.level-aventura-1 {
  --level-main: #7b5cff;
  --level-soft: #efeaff;
  --level-text: #24106f;
}

.level-aventura-2 {
  --level-main: #ffeb3f;
  --level-soft: #fff8c9;
  --level-text: #24106f;
}

.level-aventura-3 {
  --level-main: #ffb63d;
  --level-soft: #fff0cc;
  --level-text: #6a3900;
}

.level-aventura-4 {
  --level-main: #6a36d8;
  --level-soft: #efe8ff;
  --level-text: #24106f;
}

.level-card {
  min-height: 248px;
  padding: 24px;
  background:
    linear-gradient(148deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.94) 48%, var(--level-soft, #efeaff) 100%),
    #fff;
}

.level-card > :not(.level-card-accent),
.block-card > :not(.block-accent),
.module-card > * {
  position: relative;
  z-index: 1;
}

.level-card-accent,
.block-accent {
  height: 10px;
  background: linear-gradient(90deg, var(--level-main, var(--block-main, var(--accent-purple))), var(--brand-yellow), #fff);
}

.level-card::after {
  right: -48px;
  bottom: -50px;
  width: 156px;
  height: 156px;
  border-width: 24px;
  border-color: rgba(106, 54, 216, 0.16);
  border-radius: 46px;
  opacity: 0.85;
  z-index: 0;
}

.level-icon {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(36, 16, 111, 0.08);
  border-radius: 28px;
  background: linear-gradient(135deg, var(--level-main, var(--brand-yellow)), #fffbd6);
  color: var(--brand-navy);
  box-shadow: 0 10px 0 rgba(36, 16, 111, 0.14), 0 20px 30px rgba(53, 36, 148, 0.14);
}

.level-card .level-icon .ui-icon {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

.level-card .status-badge,
.status-badge {
  border-color: rgba(36, 16, 111, 0.08);
  background: linear-gradient(135deg, var(--accent-green-soft), #fffdf0);
  color: var(--brand-navy);
}

.status-badge.soon {
  background: linear-gradient(135deg, #f0eef9, #fff);
  color: var(--muted);
}

.level-card .card-body {
  gap: 12px;
  margin-top: 18px;
}

.level-card .card-meta {
  color: var(--level-text, var(--brand-navy));
}

.level-card h3,
.block-card h3,
.module-card h3 {
  color: var(--text);
  font-weight: 1000;
  letter-spacing: 0;
}

.level-card h3 {
  font-size: clamp(1.32rem, 2.5vw, 1.72rem);
}

.level-card .button {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  box-shadow: var(--shadow-button);
}

.block-card {
  min-height: 210px;
  padding: 22px;
  background:
    linear-gradient(146deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.94) 52%, var(--block-soft, #efe8ff) 100%),
    #fff;
}

.block-card::after {
  position: absolute;
  right: -40px;
  bottom: -46px;
  width: 132px;
  height: 132px;
  border: 20px solid rgba(106, 54, 216, 0.15);
  border-radius: 40px;
  transform: rotate(16deg);
  content: "";
}

.block-icon {
  width: 62px;
  height: 62px;
  border: 2px solid rgba(36, 16, 111, 0.08);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--block-main, var(--accent-purple)), #fffbd6);
  color: var(--brand-navy);
  box-shadow: 0 9px 0 rgba(36, 16, 111, 0.12), 0 18px 28px rgba(53, 36, 148, 0.12);
}

.block-number,
.block-stats span,
.module-number,
.review-badge,
.student-sync-badge,
.tool-status {
  border-color: rgba(74, 47, 186, 0.12);
  background: linear-gradient(135deg, #fff, var(--kid-lilac-soft, #f1ecff));
  color: var(--brand-navy);
  box-shadow: 0 7px 15px rgba(53, 36, 148, 0.08);
}

.block-number {
  background: linear-gradient(135deg, var(--block-soft, #efe8ff), #fff);
  color: var(--block-text, var(--brand-navy));
}

.block-action {
  color: var(--brand-navy);
  margin-top: auto;
}

.arrow,
.block-action .arrow {
  width: 42px;
  height: 42px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--brand-yellow), var(--accent-green));
  color: var(--brand-navy);
  box-shadow: 0 8px 0 rgba(36, 16, 111, 0.14);
}

.module-card {
  position: relative;
  min-height: 196px;
  overflow: hidden;
  padding: 22px;
  border-color: rgba(74, 47, 186, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.95) 54%, rgba(239, 232, 255, 0.8) 100%),
    #fff;
}

.module-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--accent-purple), var(--brand-yellow), var(--accent-green));
  content: "";
}

.module-card::after {
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 116px;
  height: 116px;
  border: 18px solid rgba(106, 54, 216, 0.16);
  border-radius: 36px;
  transform: rotate(15deg);
  content: "";
}

.module-card.has-video {
  border-color: rgba(149, 244, 130, 0.48);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.95) 52%, rgba(232, 255, 226, 0.82) 100%),
    #fff;
}

.module-card.has-video::before {
  background: linear-gradient(90deg, var(--accent-green), var(--brand-yellow), var(--accent-purple));
}

.module-card.is-review {
  border-color: rgba(255, 235, 63, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 247, 190, 0.88) 100%),
    #fff;
}

.module-card:hover {
  border-color: rgba(106, 54, 216, 0.48);
  box-shadow:
    0 18px 0 rgba(36, 16, 111, 0.06),
    var(--shadow-hover);
  transform: translateY(-4px);
}

.module-top {
  gap: 9px;
}

.module-number {
  background: linear-gradient(135deg, var(--brand-cyan-soft), #fff);
  color: var(--brand-navy);
}

.review-badge {
  background: linear-gradient(135deg, var(--brand-yellow), #fff8c9);
  color: var(--brand-navy);
}

.student-sync-badge.is-synced {
  border-color: rgba(149, 244, 130, 0.5);
  background: linear-gradient(135deg, var(--accent-green), #e8ffe2);
  color: var(--brand-navy);
}

.student-sync-badge.is-teacher-only {
  border-color: rgba(255, 182, 61, 0.4);
  background: linear-gradient(135deg, var(--accent-orange-soft), #fff);
  color: #6a3900;
}

.module-card h3 {
  font-size: clamp(1.12rem, 2.2vw, 1.42rem);
  line-height: 1.08;
}

.module-open-button {
  min-height: 46px;
  padding-inline: 18px;
}

.filter-chip.is-active {
  border-color: rgba(149, 244, 130, 0.62);
  background: linear-gradient(135deg, var(--brand-yellow), var(--accent-green));
  color: var(--brand-navy);
  box-shadow: 0 9px 0 rgba(36, 16, 111, 0.14), 0 16px 26px rgba(53, 36, 148, 0.14);
}

/* Cleaner Novakid-style cards */
.level-card,
.resource-card,
.block-card,
.module-card,
.tool-card,
.empty-state,
.class-launcher-card,
.recent-module-card {
  border-color: rgba(74, 47, 186, 0.16);
  background: #fff;
  box-shadow: 0 12px 30px rgba(36, 16, 111, 0.08);
}

.level-card::after,
.block-card::after,
.module-card::after,
.class-launcher-card::after,
.resource-card::after,
.recent-module-card::after {
  display: none;
}

.level-card-accent,
.block-accent,
.module-card::before,
.tool-card::before {
  opacity: 0.88;
}

.module-card.has-video {
  border-color: rgba(149, 244, 130, 0.42);
  background: #fff;
}

.module-card.is-review {
  border-color: rgba(255, 235, 63, 0.58);
  background: #fff;
}

.card-link:hover,
.block-card:hover,
.class-launcher-card:hover,
.recent-module-card:hover,
.module-card-link:hover,
.tool-card.has-link:hover,
.teacher-student-link-card:hover {
  box-shadow: 0 16px 36px rgba(36, 16, 111, 0.12);
}
[data-student-portal-link][hidden] {
  display: none !important;
}

[data-student-setup-email][hidden] {
  display: none !important;
}
