:root {
  --primary: #d93025;
  --primary-dark: #b9231b;
  --text: #111827;
  --muted: #6b7280;
  --bg: #fafafa;
  --card: #ffffff;
  --border: #e5e7eb;
  --active: #fdecec;
  --shadow: 0 16px 40px rgba(17, 24, 39, 0.06);
  --sidebar-width: 240px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Roboto", "Manrope", Arial, sans-serif;
}

body.video-fullscreen-active {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a,
button,
summary,
input,
select,
textarea,
[role="button"],
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

img,
video,
[data-protected-media] {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(55, 65, 81, 0.28), transparent 34%),
    linear-gradient(145deg, #171a20, #0b0d11 72%);
}

.login-screen.is-hidden {
  display: none;
}

body.auth-pending .login-screen,
body.auth-pending .app-shell {
  display: none;
}

.login-panel {
  width: min(100%, 440px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
  padding: 28px;
}

.login-panel__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.login-panel__brand .brand-logo {
  width: 142px;
  height: 58px;
  object-fit: cover;
  object-position: center;
}

.login-copy {
  margin-bottom: 26px;
}

.login-copy h1 {
  margin-bottom: 10px;
}

.login-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form.is-hidden {
  display: none;
}

.login-form label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 0 13px;
  outline: none;
}

.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.13);
}

.login-error {
  min-height: 20px;
  margin: 2px 0 0;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.login-error.is-success {
  color: #18794e;
}

.login-button {
  width: 100%;
  margin-top: 4px;
}

.login-button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.login-link-button {
  width: fit-content;
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 8px;
}

.login-link-button:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(217, 48, 37, 0.18);
  outline-offset: 2px;
}

.legal-consent-panel {
  width: min(100%, 680px);
}

.legal-consent-user {
  margin: -10px 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.legal-consent-content {
  display: grid;
  max-height: min(38vh, 360px);
  gap: 18px;
  margin-bottom: 18px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 18px;
}

.legal-consent-content:focus {
  outline: 3px solid rgba(217, 48, 37, 0.14);
  outline-offset: 2px;
}

.legal-consent-section {
  display: grid;
  gap: 12px;
}

.legal-consent-section h2 {
  margin: 0;
  font-size: 18px;
}

.legal-consent-section h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.legal-consent-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.legal-consent-form {
  display: grid;
  gap: 12px;
}

.legal-consent-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.legal-consent-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell.is-locked {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: #fff;
  padding: 24px 20px;
  z-index: 40;
  overflow: hidden;
}

.sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
  border-radius: 12px;
  text-align: center;
}

.sidebar__brand:focus-visible,
.topbar__logo-link:focus-visible {
  outline: 3px solid rgba(217, 48, 37, 0.18);
  outline-offset: 3px;
}

.brand-logo {
  display: block;
  width: 58px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
}

.sidebar__brand .brand-logo {
  width: min(178px, 100%);
  height: auto;
}

.brand-name,
.brand-subtitle {
  margin: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
}

.sidebar__brand .brand-name {
  font-size: 17px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 6px;
  min-height: 0;
  margin-right: -6px;
  padding-right: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.nav__item,
.nav__course {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.nav__item {
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.nav__item:hover,
.nav__course:hover {
  background: #f4f4f5;
}

.nav__icon {
  position: relative;
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: 0 0 20px;
}

/* CSS icons keep the interface sharp without adding an icon dependency. */
.nav__icon--grid::before {
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 4px;
  box-shadow: inset 7px 0 0 -5px currentColor, inset 0 7px 0 -5px currentColor;
  content: "";
}

.nav__icon--wrench {
  background: url("assets/Formacion_Icono.png") center / contain no-repeat;
}

.nav__chevron {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--muted);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.nav__item--button.is-open .nav__chevron {
  transform: rotate(225deg);
}

.nav__submenu {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 4px;
  max-height: 0;
  margin-left: 30px;
  overflow: hidden;
  transition: max-height 200ms ease;
}

.nav__submenu.is-open {
  max-height: clamp(180px, calc(100vh - 300px), 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.nav__course {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: normal;
}

.nav__course.is-active {
  background: var(--active);
  color: var(--primary-dark);
}

.nav__course--locked {
  color: #9ca3af;
  cursor: not-allowed;
}

.nav__course--locked::after {
  color: var(--muted);
  content: attr(data-coming-soon);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.role-nav {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switcher--sidebar {
  justify-content: center;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.language-switcher--login {
  justify-content: center;
  margin: -16px 0 24px;
}

.language-switcher--topbar {
  display: none;
}

.language-switcher__button {
  display: grid;
  width: 38px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.language-switcher__button:hover,
.language-switcher__button:focus-visible {
  border-color: rgba(217, 48, 37, 0.38);
  box-shadow: 0 10px 22px rgba(217, 48, 37, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.language-switcher__button.is-active {
  border-color: var(--primary);
  background: var(--active);
  box-shadow: inset 0 0 0 1px rgba(217, 48, 37, 0.12);
}

.language-switcher__flag {
  position: relative;
  display: block;
  width: 24px;
  height: 16px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.12);
}

.language-switcher__flag--es {
  background: linear-gradient(
    to bottom,
    #aa151b 0 25%,
    #f1bf00 25% 75%,
    #aa151b 75% 100%
  );
}

.language-switcher__flag--pt {
  background: linear-gradient(to right, #046a38 0 40%, #da291c 40% 100%);
}

.language-switcher__flag--pt::after {
  position: absolute;
  top: 50%;
  left: 40%;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #ffcd00;
  content: "";
  transform: translate(-50%, -50%);
}

.nav__item--role {
  min-height: 40px;
}

.nav__item--role.is-active {
  background: var(--active);
  color: var(--primary-dark);
}

.sidebar__footer {
  display: grid;
  flex: 0 0 auto;
  grid-template-areas:
    "status logout"
    "profile profile";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.platform-status {
  grid-area: status;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.user-profile {
  grid-area: profile;
  position: relative;
}

.user-profile__button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  width: 100%;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.user-profile__button:hover,
.user-profile__button:focus-visible,
.user-profile.is-open .user-profile__button {
  border-color: rgba(217, 48, 37, 0.22);
  background: var(--active);
  outline: none;
  transform: translateY(-1px);
}

.user-profile__avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-profile__summary {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-profile__email {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile__role {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: lowercase;
}

.user-profile__popover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 60;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.16);
  padding: 12px;
}

.user-profile__popover-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.user-profile__details {
  display: grid;
  gap: 9px;
  margin: 0;
}

.user-profile__details div {
  display: grid;
  gap: 2px;
}

.user-profile__details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-profile__details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.logout-button {
  grid-area: logout;
  justify-self: end;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
}

.logout-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.main {
  min-width: 0;
}

.topbar {
  display: none;
}

.content-wrap {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 40px 48px 28px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.page-header--hero {
  position: relative;
  min-height: clamp(320px, 42vw, 470px);
  align-items: flex-end;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(91, 16, 12, 0.9)),
    var(--primary-dark);
  padding: clamp(32px, 6vw, 64px);
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.18);
  isolation: isolate;
}

.page-header--course {
  position: relative;
  min-height: clamp(260px, 30vw, 380px);
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.74) 44%, rgba(17, 24, 39, 0.22) 100%),
    linear-gradient(0deg, rgba(91, 16, 12, 0.54), rgba(91, 16, 12, 0.1)),
    var(--course-hero-image) center / cover,
    var(--primary-dark);
  padding: clamp(28px, 5vw, 54px);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.14);
  isolation: isolate;
}

.page-header__video,
.page-header__overlay {
  position: absolute;
  inset: 0;
}

.page-header__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.page-header__overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.62) 46%, rgba(17, 24, 39, 0.22) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.58), rgba(17, 24, 39, 0.08));
}

.page-header__content {
  width: min(100%, 760px);
}

.page-header--course .page-header__content {
  display: grid;
  gap: clamp(14px, 1.8vw, 22px);
  width: min(100%, 820px);
}

.page-header__subtitle {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  line-height: 1.2;
}

.page-header:not(.page-header--hero) .page-header__video,
.page-header:not(.page-header--hero) .page-header__overlay {
  display: none;
}

.page-header:not(.page-header--hero):not(.page-header--course) .page-header__subtitle {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 32px);
  line-height: 1.15;
}

.page-header--hero h1 {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 900;
  line-height: 0.95;
}

.page-header--course h1 {
  max-width: 780px;
  margin-bottom: 0;
  color: #fff;
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 900;
  line-height: 1.08;
}

h2 {
  margin-bottom: 6px;
  font-size: 21px;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.page-header p,
.section-heading p,
.card p,
.lesson-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.page-header p {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 15px;
  white-space: pre-line;
}

.page-header--hero .eyebrow {
  color: #fff;
}

.page-header--course .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.page-header--hero .page-header__subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.page-header--course .page-header__subtitle {
  margin-bottom: 0;
  color: #fff;
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.45;
  text-transform: uppercase;
}

.page-header--hero #pageIntro {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 600;
  line-height: 1.6;
}

.page-header--course #pageIntro {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(14px, 1.3vw, 16px);
  font-weight: 600;
  line-height: 1.75;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}

.dashboard-summary article {
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
}

.section-block {
  margin-bottom: 48px;
}

.content-warning {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(217, 48, 37, 0.28);
  border-left: 5px solid var(--primary);
  border-radius: 14px;
  background: rgba(253, 236, 236, 0.86);
  box-shadow: 0 14px 34px rgba(217, 48, 37, 0.08);
  padding: 18px 20px;
}

.content-warning--course {
  margin-bottom: 24px;
}

.content-warning__icon {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background: url("assets/Warning_Icono.png") center / contain no-repeat;
}

.content-warning h2 {
  margin-bottom: 6px;
  color: var(--primary-dark);
  font-size: 16px;
}

.content-warning p {
  margin-bottom: 0;
  color: #4b1f1b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.is-hidden {
  display: none !important;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading p {
  margin-bottom: 0;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card,
.lesson-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.card__media {
  position: relative;
  overflow: hidden;
}

.card__image {
  display: block;
  width: 100%;
  border-radius: inherit;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 180ms ease;
}

.card__media-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.56);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  opacity: 0;
  text-transform: uppercase;
  transition: opacity 180ms ease;
}

.card__media-link span {
  border-bottom: 2px solid currentColor;
  padding-bottom: 3px;
}

.card__media:hover .card__media-link,
.card__media-link:focus-visible {
  opacity: 1;
}

.card__media:hover .card__image,
.card__media:focus-within .card__image {
  transform: scale(1.03);
}

.card__media-link:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.76);
  outline-offset: -6px;
}

.card--locked .card__image {
  filter: grayscale(0.25);
}

.card--locked .card__media::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(17, 24, 39, 0.42);
  content: "";
}

.lock-badge {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.card--locked {
  box-shadow: none;
}

.card p,
.lesson-card p {
  margin-bottom: 18px;
}

.card__description {
  flex: 1;
}

.card__action {
  margin-top: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

.meta-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid rgba(217, 48, 37, 0.18);
  border-radius: 999px;
  background: var(--active);
  padding: 6px 11px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.secondary-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.secondary-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.is-disabled,
.is-disabled:hover {
  border-color: var(--border);
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.lesson-list {
  display: grid;
  gap: 24px;
}

.lesson-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.25fr);
  gap: 18px 28px;
  align-items: start;
  padding: 24px;
}

.lesson-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lesson-content h3 {
  margin: 0 0 10px;
}

.lesson-content p {
  margin-bottom: 0;
}

.lesson-meta {
  display: inline-flex;
  grid-column: 1 / -1;
  width: fit-content;
  border-radius: 999px;
  background: var(--active);
  padding: 7px 11px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.video-player {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 88%;
  max-width: none;
  overflow: hidden;
  background: transparent;
  padding: 0;
  color: rgba(255, 255, 255, 0.15);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.video-watermark-corner {
  position: absolute;
  top: 62.5%;
  left: 2%;
  z-index: 2;
  max-width: min(54%, 420px);
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  pointer-events: none;
}

.video-bunny-fullscreen-blocker {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 96px;
  height: 72px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.video-fullscreen-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(188, 29, 20, 0.68);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.video-fullscreen-button:hover,
.video-fullscreen-button:focus-visible {
  background: rgba(188, 29, 20, 0.86);
  transform: translateY(-1px);
}

.video-shell:fullscreen,
.video-shell:-webkit-full-screen,
.video-shell.is-pseudo-fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: auto;
  border-radius: 0;
}

.video-shell.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  max-width: none;
  margin: 0;
  transform: none;
}

.video-shell-placeholder {
  width: 100%;
  min-height: 1px;
  aspect-ratio: 16 / 9;
}

.video-shell:fullscreen .video-player,
.video-shell:-webkit-full-screen .video-player,
.video-shell.is-pseudo-fullscreen .video-player {
  border-radius: 0;
}

.video-shell:fullscreen .video-watermark,
.video-shell:-webkit-full-screen .video-watermark,
.video-shell.is-pseudo-fullscreen .video-watermark {
  width: 90vw;
  font-size: clamp(34px, 5vw, 84px);
}

.video-shell:fullscreen .video-watermark-corner,
.video-shell:-webkit-full-screen .video-watermark-corner,
.video-shell.is-pseudo-fullscreen .video-watermark-corner {
  top: 62.5%;
  left: 2%;
  max-width: min(52vw, 620px);
  font-size: 22px;
}

.video-shell:fullscreen .video-fullscreen-button,
.video-shell:-webkit-full-screen .video-fullscreen-button,
.video-shell.is-pseudo-fullscreen .video-fullscreen-button {
  right: 20px;
  bottom: 20px;
}

.video-shell:fullscreen .video-bunny-fullscreen-blocker,
.video-shell:-webkit-full-screen .video-bunny-fullscreen-blocker,
.video-shell.is-pseudo-fullscreen .video-bunny-fullscreen-blocker {
  right: 0;
  bottom: 0;
  width: 132px;
  height: 96px;
}

.video-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 24px;
  text-align: center;
}

.video-placeholder span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
}

.video-placeholder p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.legal-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
}

.legal-section h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.legal-section p,
.legal-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.legal-note {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  font-weight: 600;
}

.role-panel {
  display: grid;
  gap: 22px;
}

.panel-notice {
  margin: 0;
  border: 1px solid rgba(217, 48, 37, 0.22);
  border-radius: 8px;
  background: var(--active);
  padding: 12px 14px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

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

.panel-summary article {
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel-card--wide {
  grid-column: 1 / -1;
}

.panel-card__header {
  margin-bottom: 16px;
}

.panel-card__header--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-card__header h2,
.panel-card__header h3 {
  margin-bottom: 5px;
}

.panel-card__header p,
.empty-text {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.invitation-guide {
  display: grid;
  align-content: start;
  gap: 4px;
}

.invitation-guide__steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.invitation-guide__steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.invitation-guide__steps span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(217, 34, 27, 0.18);
  border-radius: 999px;
  background: rgba(217, 34, 27, 0.1);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
}

.invitation-guide__steps p {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.admin-user-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(180px, 0.9fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-user-filters label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.admin-user-filters input,
.admin-user-filters select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 8px 10px;
  outline: none;
}

.admin-user-filters input:focus,
.admin-user-filters select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12);
}

.admin-user-filters__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-user-filters__meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.panel-form {
  display: grid;
  gap: 13px;
  align-content: start;
}

.panel-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.panel-form input,
.panel-form textarea,
.panel-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 9px 11px;
  outline: none;
}

.panel-form textarea {
  min-height: 88px;
  resize: vertical;
}

.panel-form input:focus,
.panel-form textarea:focus,
.panel-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lesson-builder {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.lesson-builder__rows {
  display: grid;
  gap: 12px;
}

.lesson-editor-row {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  padding: 14px;
}

.lesson-editor-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 14px;
}

.ghost-button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 0;
}

.panel-table-wrap {
  overflow-x: auto;
}

.panel-table-wrap--tall {
  max-height: 68vh;
  overflow: auto;
}

.panel-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.panel-table--compact {
  min-width: 560px;
  margin-top: 10px;
}

.panel-table th,
.panel-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.panel-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-table td {
  color: var(--text);
}

.table-subtext {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.legacy-user-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border: 1px solid #f5c542;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  margin-top: 6px;
  padding: 5px 9px;
  white-space: nowrap;
}

.panel-table tr:last-child td {
  border-bottom: 0;
}

.panel-table-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warning-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f59e0b;
  border-radius: 9px;
  background: #f59e0b;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 0 15px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.warning-button:hover {
  border-color: #d97706;
  background: #d97706;
  transform: translateY(-1px);
}

.warning-button.panel-table-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.danger-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #dc2626;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 0 15px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.danger-button:hover {
  border-color: #b91c1c;
  background: #b91c1c;
  transform: translateY(-1px);
}

.danger-button.panel-table-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.role-select {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 6px 9px;
}

.role-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12);
  outline: none;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill--activo {
  background: #ecfdf3;
  color: #067647;
}

.status-pill--activa,
.status-pill--aceptada {
  background: #ecfdf3;
  color: #067647;
}

.status-pill--enviada {
  background: #eef4ff;
  color: #3538cd;
}

.status-pill--disponible {
  background: #ecfdf3;
  color: #067647;
}

.status-pill--en-preparacion {
  background: #fff7ed;
  color: #b45309;
}

.status-pill--pendiente-de-confirmar {
  background: #fff7ed;
  color: #b45309;
}

.status-pill--confirmar-dispositivo {
  background: #eef4ff;
  color: #3538cd;
}

.status-pill--caducado {
  background: #f3f4f6;
  color: #6b7280;
}

.status-pill--caducada {
  background: #fef3f2;
  color: #b42318;
}

.status-pill--pausado {
  background: #fff7ed;
  color: #c2410c;
}

.company-list {
  display: grid;
  gap: 10px;
}

.company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  padding: 14px;
}

.company-row:hover {
  border-color: rgba(217, 48, 37, 0.28);
  background: #fff;
}

.company-row__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.company-row h3 {
  margin-bottom: 4px;
}

.company-row p,
.company-row span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.invitation-detail-row td {
  background: #fafafa;
  padding-top: 0;
}

.invitation-users {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.invitation-users summary {
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.footer__brand {
  display: grid;
  gap: 4px;
}

.footer__name {
  color: var(--text);
  font-weight: 800;
}

.footer__ownership {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.footer__ownership-logo {
  display: block;
  width: auto;
  height: 20px;
  max-width: 92px;
  object-fit: contain;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.footer__links a {
  color: var(--muted);
  font-weight: 700;
}

.footer__links a:hover {
  color: var(--primary-dark);
}

.mobile-backdrop {
  display: none;
}

@media (max-width: 1024px) {
  .content-wrap {
    padding: 34px 32px 26px;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-card {
    grid-template-columns: 1fr;
  }

  .panel-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-grid,
  .form-grid--two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .video-watermark-corner {
    top: 61%;
    left: 4%;
    max-width: min(52%, 260px);
    padding: 4px 7px;
    font-size: 10px;
  }

  .video-shell:fullscreen .video-watermark-corner,
  .video-shell:-webkit-full-screen .video-watermark-corner,
  .video-shell.is-pseudo-fullscreen .video-watermark-corner {
    top: 61%;
    left: 4%;
    max-width: min(56vw, 320px);
    font-size: 14px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    width: var(--sidebar-width);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(17, 24, 39, 0.36);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    backdrop-filter: blur(12px);
  }

  .topbar__logo {
    display: block;
    width: 142px;
    height: 54px;
    object-fit: cover;
    object-position: center;
  }

  .topbar__logo-link {
    display: block;
    border-radius: 12px;
  }

  .language-switcher--sidebar {
    display: none;
  }

  .language-switcher--topbar {
    display: flex;
  }

  .topbar .language-switcher__button {
    width: 36px;
    height: 34px;
    box-shadow: none;
  }

  .menu-button {
    display: grid;
    gap: 4px;
    width: 42px;
    height: 42px;
    place-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
  }

  .menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
  }

  .content-wrap {
    padding: 28px 20px 24px;
  }

  .page-header,
  .section-heading,
  .footer {
    display: grid;
  }

  .page-header--hero {
    min-height: 390px;
    align-items: end;
    border-radius: 0 0 14px 14px;
    padding: 32px 24px;
  }

  .page-header--course {
    min-height: 340px;
    align-items: end;
    border-radius: 14px;
    padding: 30px 24px;
    background:
      linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.62)),
      linear-gradient(0deg, rgba(91, 16, 12, 0.58), rgba(91, 16, 12, 0.08)),
      var(--course-hero-image) center / cover,
      var(--primary-dark);
  }

  .page-header--course .page-header__content {
    gap: 14px;
  }

  .page-header--hero h1 {
    font-size: clamp(40px, 14vw, 58px);
  }

  .page-header--course h1 {
    font-size: clamp(28px, 9vw, 42px);
  }

  .page-header--hero .page-header__overlay {
    background:
      linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.58)),
      linear-gradient(0deg, rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.12));
  }

  .footer__links {
    justify-content: flex-start;
  }

  .dashboard-summary,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-summary {
    margin-bottom: 36px;
  }

  .secondary-button,
  .primary-button {
    width: fit-content;
  }

  .panel-summary {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 16px;
  }

  .panel-card__header--inline,
  .company-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Liquid Glass redesign */
:root {
  --primary: #d9221b;
  --primary-dark: #a91612;
  --text: #101828;
  --muted: #667085;
  --bg: #eef2f7;
  --card: rgba(255, 255, 255, 0.66);
  --border: rgba(255, 255, 255, 0.58);
  --active: rgba(217, 34, 27, 0.12);
  --glass: rgba(255, 255, 255, 0.54);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --glass-dark: rgba(16, 24, 40, 0.54);
  --hairline: rgba(16, 24, 40, 0.08);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow: 0 24px 70px rgba(16, 24, 40, 0.12);
  --shadow-tight: 0 12px 34px rgba(16, 24, 40, 0.1);
  --ring: 0 0 0 4px rgba(217, 34, 27, 0.14);
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(232, 239, 248, 0.72) 38%, rgba(244, 246, 250, 0.96)),
    linear-gradient(180deg, rgba(217, 34, 27, 0.08), rgba(24, 34, 52, 0.02) 42%, rgba(15, 23, 42, 0.07));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.46) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 76%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.34), transparent 34%, rgba(217, 34, 27, 0.08) 100%);
  content: "";
  pointer-events: none;
}

.login-screen {
  background:
    radial-gradient(circle at 50% 0%, rgba(55, 65, 81, 0.3), transparent 34%),
    linear-gradient(145deg, #171a20, #0b0d11 72%);
}

.login-panel,
.card,
.lesson-card,
.legal-card,
.panel-card,
.panel-summary article,
.dashboard-summary article,
.content-warning,
.user-profile__popover,
.video-placeholder,
.company-row,
.invitation-users,
.lesson-editor-row {
  position: relative;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow), var(--inner-light);
  backdrop-filter: blur(26px) saturate(1.28);
  -webkit-backdrop-filter: blur(26px) saturate(1.28);
}

.login-panel::before,
.card::before,
.lesson-card::before,
.legal-card::before,
.panel-card::before,
.panel-summary article::before,
.dashboard-summary article::before,
.content-warning::before,
.user-profile__popover::before,
.video-placeholder::before,
.company-row::before,
.invitation-users::before,
.lesson-editor-row::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.52), transparent 38%, rgba(255, 255, 255, 0.16));
  content: "";
  pointer-events: none;
}

.login-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  padding: 30px;
}

.login-panel__brand .brand-logo,
.topbar__logo {
  filter: drop-shadow(0 8px 18px rgba(16, 24, 40, 0.12));
}

.login-copy h1,
h1,
h2,
h3 {
  letter-spacing: 0;
}

.eyebrow {
  color: var(--primary-dark);
  letter-spacing: 0.04em;
}

.login-form input,
.panel-form input,
.panel-form textarea,
.panel-form select,
.admin-user-filters input,
.admin-user-filters select,
.role-select {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 8px 22px rgba(16, 24, 40, 0.06);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.login-form input:focus,
.panel-form input:focus,
.panel-form textarea:focus,
.panel-form select:focus,
.admin-user-filters input:focus,
.admin-user-filters select:focus,
.role-select:focus {
  border-color: rgba(217, 34, 27, 0.42);
  box-shadow: var(--ring), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
  max-width: 100%;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  width: 264px;
  border-right: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 18px 0 44px rgba(16, 24, 40, 0.08), inset -1px 0 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(34px) saturate(1.34);
  -webkit-backdrop-filter: blur(34px) saturate(1.34);
}

.sidebar__brand {
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.06);
  padding-bottom: 22px;
}

.brand-name {
  color: #0f172a;
  letter-spacing: 0.02em;
}

.brand-subtitle,
.nav__course,
.user-profile__role,
.footer,
.footer__links a,
.section-heading p,
.card p,
.lesson-card p,
.page-header p,
.legal-section p,
.legal-note,
.panel-card__header p,
.empty-text,
.table-subtext,
.company-row p,
.company-row span {
  color: var(--muted);
}

.nav {
  gap: 8px;
}

.nav__item,
.nav__course,
.user-profile__button,
.logout-button,
.menu-button,
.primary-button,
.secondary-button,
.warning-button,
.danger-button,
.login-link-button,
.ghost-button,
.panel-table-button {
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.nav__item,
.nav__course {
  border: 1px solid transparent;
  border-radius: 16px;
}

.nav__item:hover,
.nav__course:hover,
.user-profile__button:hover,
.user-profile__button:focus-visible,
.user-profile.is-open .user-profile__button {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.nav__course.is-active,
.nav__item--role.is-active,
.nav__item--button.is-open {
  border-color: rgba(217, 34, 27, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(217, 34, 27, 0.12));
  color: var(--primary-dark);
  box-shadow: 0 14px 30px rgba(217, 34, 27, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.nav__course--locked,
.nav__course--locked:hover,
.nav__course--locked:focus-visible,
.nav__course--locked.is-active {
  border-color: rgba(16, 24, 40, 0.2);
  background: rgba(47, 55, 66, 0.42);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: none;
  cursor: not-allowed;
  backdrop-filter: blur(12px) saturate(1.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  transform: none;
  transition: none;
}

.nav__course--locked::after,
.nav__course--locked:hover::after,
.nav__course--locked:focus-visible::after {
  color: rgba(255, 255, 255, 0.66);
}

.role-nav,
.sidebar__footer {
  border-top-color: rgba(16, 24, 40, 0.07);
}

.user-profile__button,
.logout-button,
.menu-button {
  border-color: rgba(255, 255, 255, 0.68);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.user-profile__avatar,
.status-dot {
  background: linear-gradient(135deg, #f04438, #b42318);
  box-shadow: 0 10px 20px rgba(217, 34, 27, 0.24);
}

.user-profile__popover {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
}

.logout-button:hover,
.footer__links a:hover,
.login-link-button:hover,
.ghost-button:hover {
  color: var(--primary-dark);
}

@media (hover: none), (pointer: coarse) {
  .nav__item:active,
  .nav__course:active,
  .user-profile__button:active,
  .menu-button:active,
  .logout-button:active,
  .secondary-button:active,
  .login-link-button:active,
  .ghost-button:active,
  .panel-table-button:active,
  .card__media-link:active {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transform: translateY(-1px);
  }

  .primary-button:active,
  .warning-button:active,
  .danger-button:active,
  .video-fullscreen-button:active {
    box-shadow: 0 18px 36px rgba(16, 24, 40, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.46);
    transform: translateY(-1px);
  }

  .nav__course--locked:active,
  .is-disabled:active,
  .secondary-button:disabled:active {
    box-shadow: none;
    transform: none;
  }
}

.topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(24px) saturate(1.32);
  -webkit-backdrop-filter: blur(24px) saturate(1.32);
}

.content-wrap {
  width: min(100%, 1220px);
  max-width: 100%;
  overflow-x: clip;
  padding: 34px 46px 30px;
}

.page-header--hero,
.page-header--course {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 34px;
  box-shadow: 0 34px 86px rgba(16, 24, 40, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.page-header--hero {
  background:
    linear-gradient(115deg, rgba(11, 18, 32, 0.76), rgba(83, 21, 22, 0.46) 58%, rgba(255, 255, 255, 0.08)),
    url("assets/Pintado WEB.png") center / cover,
    var(--primary-dark);
}

.page-header__overlay {
  background:
    linear-gradient(105deg, rgba(10, 15, 26, 0.78) 0%, rgba(10, 15, 26, 0.38) 52%, rgba(255, 255, 255, 0.08) 100%),
    linear-gradient(0deg, rgba(8, 13, 23, 0.46), rgba(8, 13, 23, 0.02));
}

.page-header__content {
  border-radius: 26px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.2);
}

.page-header--hero h1,
.page-header--course h1 {
  text-wrap: balance;
}

.page-header--hero .eyebrow,
.page-header--course .eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

.page-header--hero #pageIntro,
.page-header--course #pageIntro,
.page-header--hero .page-header__subtitle,
.page-header--course .page-header__subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-summary,
.course-grid,
.lesson-list,
.panel-grid,
.panel-summary {
  min-width: 0;
  gap: 18px;
}

.dashboard-summary article,
.panel-summary article {
  min-height: 96px;
  border-radius: 24px;
  padding: 20px;
}

.dashboard-summary span,
.panel-summary span {
  color: #101828;
}

.section-heading {
  align-items: end;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 24px;
}

.content-warning {
  border-left: 1px solid rgba(217, 34, 27, 0.26);
  border-radius: 24px;
  background: rgba(255, 246, 245, 0.66);
  box-shadow: 0 20px 48px rgba(217, 34, 27, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.content-warning h2 {
  color: var(--primary-dark);
}

.content-warning p {
  color: #5f231f;
}

.card,
.lesson-card {
  border-radius: 26px;
  overflow: hidden;
}

.card {
  transform: translateZ(0);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 32px 86px rgba(16, 24, 40, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transform: translateY(-3px);
}

.card__media {
  border-radius: 24px 24px 16px 16px;
  margin: 8px 8px 0;
}

.card__image {
  aspect-ratio: 16 / 10;
}

.card__media-link {
  background: rgba(16, 24, 40, 0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lock-badge,
.meta-chip,
.pill,
.lesson-meta,
.status-pill {
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64), 0 8px 18px rgba(16, 24, 40, 0.06);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.lock-badge {
  background: rgba(16, 24, 40, 0.56);
}

.meta-chip,
.lesson-meta {
  background: rgba(255, 237, 235, 0.7);
  color: var(--primary-dark);
}

.pill {
  background: rgba(255, 255, 255, 0.56);
}

.primary-button,
.secondary-button,
.warning-button,
.danger-button {
  min-height: 42px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 12px 24px rgba(16, 24, 40, 0.08);
}

.primary-button {
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(135deg, #ff4a3d, #c81e18 62%, #9f1713);
}

.primary-button:hover {
  border-color: rgba(255, 255, 255, 0.46);
  background: linear-gradient(135deg, #ff665b, #d9221b 58%, #a91612);
  box-shadow: 0 18px 36px rgba(217, 34, 27, 0.22);
}

.secondary-button {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.58);
}

.secondary-button:hover {
  border-color: rgba(217, 34, 27, 0.24);
  color: var(--primary-dark);
  box-shadow: 0 16px 30px rgba(16, 24, 40, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.is-disabled,
.is-disabled:hover,
.secondary-button:disabled,
.secondary-button:disabled:hover {
  border-color: rgba(16, 24, 40, 0.06);
  background: rgba(255, 255, 255, 0.42);
  color: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.card--locked .card__action .secondary-button.is-disabled,
.card--locked .card__action .secondary-button.is-disabled:hover,
.card--locked .card__action .secondary-button:disabled,
.card--locked .card__action .secondary-button:disabled:hover {
  border-color: rgba(16, 24, 40, 0.48);
  background: #2f3742;
  color: rgba(255, 255, 255, 0.84);
  box-shadow: none;
  transform: none;
  transition: none;
}

.lesson-card {
  grid-template-columns: minmax(250px, 0.78fr) minmax(320px, 1.22fr);
  padding: 10px;
}

.lesson-meta,
.lesson-content {
  margin: 14px;
}

.video-shell {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: #0b1220;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.video-fullscreen-button {
  border-radius: 999px;
  background: rgba(217, 34, 27, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.video-fullscreen-button:hover,
.video-fullscreen-button:focus-visible {
  background: rgba(217, 34, 27, 0.84);
}

@media (max-width: 920px), (hover: none), (pointer: coarse) {
  .video-shell:not(:fullscreen):not(.is-pseudo-fullscreen) .video-bunny-fullscreen-blocker {
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: manipulation;
  }
}

.video-placeholder {
  border-style: solid;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
}

.legal-card,
.panel-card {
  min-width: 0;
  max-width: 100%;
  border-radius: 24px;
}

.role-panel,
.panel-card__header,
.panel-card__header > *,
.company-row,
.company-row > *,
.admin-user-filters,
.admin-user-filters > *,
.panel-form,
.panel-form > * {
  min-width: 0;
}

.panel-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  contain: inline-size;
}

.panel-table-scroll-top {
  position: relative;
  display: none;
  height: 22px;
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 10px 24px rgba(16, 24, 40, 0.07);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.panel-table-scroll-top::-webkit-scrollbar {
  display: none;
}

.panel-table-scroll-top__track {
  position: sticky;
  top: 6px;
  left: 6px;
  width: calc(100% - 12px);
  height: 8px;
  border-radius: 999px;
  background: rgba(217, 34, 27, 0.12);
  box-shadow: inset 0 1px 2px rgba(80, 16, 12, 0.12);
  pointer-events: none;
}

.panel-table-scroll-top__thumb {
  display: block;
  width: var(--scroll-thumb-width, 44px);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #ff665b, #d9221b 60%, #a91612);
  box-shadow: 0 5px 14px rgba(217, 34, 27, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateX(var(--scroll-thumb-offset, 0px));
}

.panel-table-scroll-top__spacer {
  height: 1px;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .panel-table-scroll-top.is-visible {
    display: block;
  }
}

.panel-notice {
  border-color: rgba(217, 34, 27, 0.18);
  border-radius: 18px;
  background: rgba(255, 237, 235, 0.66);
  box-shadow: var(--inner-light);
}

.panel-form input,
.panel-form textarea,
.panel-form select {
  border-radius: 16px;
}

.lesson-builder {
  border-top-color: rgba(16, 24, 40, 0.07);
}

.lesson-editor-row {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
}

.panel-table {
  border-collapse: separate;
  border-spacing: 0;
}

.panel-table th,
.panel-table td {
  border-bottom-color: rgba(16, 24, 40, 0.07);
}

.panel-table th {
  color: #667085;
}

.panel-table tr:hover td {
  background: rgba(255, 255, 255, 0.34);
}

.warning-button {
  border-color: rgba(255, 255, 255, 0.36);
  background: linear-gradient(135deg, #fdb022, #f79009);
}

.warning-button:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: linear-gradient(135deg, #fec84b, #f79009);
}

.danger-button {
  border-color: rgba(255, 255, 255, 0.36);
  background: linear-gradient(135deg, #f04438, #d92d20);
}

.danger-button:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: linear-gradient(135deg, #f97066, #d92d20);
}

.status-pill--activo,
.status-pill--activa,
.status-pill--aceptada,
.status-pill--disponible {
  background: rgba(220, 250, 230, 0.72);
  color: #067647;
}

.status-pill--enviada,
.status-pill--confirmar-dispositivo {
  background: rgba(232, 240, 255, 0.74);
  color: #3538cd;
}

.status-pill--en-preparacion,
.status-pill--pendiente-de-confirmar,
.status-pill--pausado {
  background: rgba(255, 243, 221, 0.78);
  color: #b45309;
}

.status-pill--caducado {
  background: rgba(242, 244, 247, 0.82);
  color: #667085;
}

.status-pill--caducada {
  background: rgba(254, 228, 226, 0.82);
  color: #b42318;
}

.company-row {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
}

.company-row:hover {
  border-color: rgba(217, 34, 27, 0.2);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.1);
}

.invitation-detail-row td {
  background: rgba(255, 255, 255, 0.34);
}

.invitation-users {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.footer {
  border-top-color: rgba(16, 24, 40, 0.08);
}

.mobile-backdrop.is-open {
  background: rgba(16, 24, 40, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-panel,
  .card,
  .lesson-card,
  .legal-card,
  .panel-card,
  .panel-summary article,
  .dashboard-summary article,
  .content-warning,
  .user-profile__popover,
  .video-placeholder,
  .company-row,
  .invitation-users,
  .lesson-editor-row,
  .sidebar,
  .topbar {
    background: rgba(255, 255, 255, 0.9);
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .sidebar {
    width: 244px;
  }

  .content-wrap {
    padding: 30px 28px 26px;
  }

  .admin-user-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-user-filters__meta {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    height: 100vh;
    height: 100dvh;
    width: min(86vw, 320px);
    border-right: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 0 28px 28px 0;
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 74px;
  }

  .menu-button {
    width: 44px;
    height: 44px;
  }

  .content-wrap {
    padding: 22px 16px 24px;
  }

  .page-header--hero,
  .page-header--course {
    border-radius: 28px;
    padding: 30px 22px;
  }

  .page-header--hero {
    min-height: 390px;
  }

  .page-header--course {
    min-height: 330px;
  }

  .dashboard-summary article,
  .panel-summary article,
  .card,
  .lesson-card,
  .legal-card,
  .panel-card,
  .content-warning {
    border-radius: 22px;
  }

  .lesson-card {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .lesson-meta,
  .lesson-content {
    margin: 12px;
  }

  .card__body,
  .panel-card {
    padding: 18px;
  }

  .primary-button,
  .secondary-button,
  .warning-button,
  .danger-button {
    width: fit-content;
    max-width: 100%;
  }

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

  .admin-user-filters__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-button {
    justify-self: center;
    width: min(100%, 260px);
  }
}

/* Registration keeps its layout and inherits the translucent login surface. */
.login-panel.registration-panel {
  width: min(100%, 620px);
  padding: 36px 44px;
}
.registration-panel .login-panel__brand { margin-bottom: 24px; }
.registration-panel .login-copy h1 { font-size: clamp(25px, 4vw, 32px); line-height: 1.2; }
.registration-steps { display: flex; gap: 24px; list-style: none; padding: 18px 0; margin: 0 0 26px; border-block: 1px solid rgba(255, 255, 255, 0.45); }
.registration-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.registration-steps span { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }
.registration-steps [aria-current] { color: var(--primary-dark); font-weight: 700; }
.registration-steps [aria-current] span { color: white; background: var(--primary-dark); }
.registration-hint { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.registration-password { position: relative; margin-bottom: 8px; }
.registration-password input { padding-right: 52px; }
.registration-eye { position: absolute; top: 0; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.registration-eye svg { width: 22px; height: 22px; }
.registration-eye-slash { display: none; }
.registration-eye[aria-pressed="true"] .registration-eye-slash { display: block; }
.registration-eye:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: -3px; }
.registration-password input[aria-invalid="true"] { border-color: #b42318; }
.registration-login { text-align: center; margin: 24px 0 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.45); font-size: 14px; color: var(--muted); }
.registration-login button { border: 0; padding: 4px; background: transparent; color: var(--primary-dark); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
@media (max-width: 600px) {
  .login-panel.registration-panel { padding: 26px 22px; }
  .registration-steps { gap: 12px; }
  .registration-steps li { font-size: 12px; }
}
