:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #edf6f5;
  --ink: #16202a;
  --muted: #657286;
  --line: #dce3ea;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #c2410c;
  --danger: #b42318;
  --shadow: 0 20px 55px rgba(22, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.link-button {
  color: var(--ink);
  font-weight: 700;
}

.nav-cta {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff !important;
}

.logout-form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 56px;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.home-hero,
.dashboard-hero,
.auth-panel,
.content-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-hero {
  min-height: 430px;
  padding: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 36px;
  align-items: center;
}

.dashboard-hero {
  padding: 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.hero-copy h1,
.dashboard-hero h1,
.auth-copy h1,
.content-panel h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 680px;
  font-size: clamp(2.1rem, 6vw, 4.6rem);
}

.dashboard-hero h1,
.auth-copy h1,
.content-panel h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.hero-copy p,
.dashboard-hero p,
.auth-copy p,
.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  min-height: 44px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.35);
}

.full-width {
  width: 100%;
}

.hero-visual {
  min-height: 320px;
  padding: 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fef3c7, #dff3ef 48%, #ffffff);
  border: 1px solid var(--line);
}

.visual-topbar,
.visual-grid {
  display: grid;
  gap: 12px;
}

.visual-topbar {
  grid-template-columns: repeat(3, 12px);
}

.visual-topbar span,
.visual-row,
.visual-grid div,
.visual-progress {
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(22, 32, 42, 0.08);
}

.visual-topbar span {
  width: 12px;
  height: 12px;
}

.visual-row {
  height: 74px;
  margin: 34px 0 18px;
}

.visual-row.strong {
  background: #0f766e;
}

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

.visual-grid div {
  height: 78px;
}

.visual-progress {
  height: 16px;
  margin-top: 20px;
  overflow: hidden;
}

.visual-progress span {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--accent);
}

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

.module-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.module-card span {
  color: var(--accent);
  font-weight: 800;
}

.module-card h2 {
  margin: 18px 0 10px;
  font-size: 1.15rem;
}

.module-card p {
  margin: 0;
  color: var(--muted);
}

.auth-page {
  min-height: calc(100vh - 220px);
  display: grid;
  align-items: center;
}

.auth-page.compact .auth-panel {
  max-width: 760px;
}

.auth-panel {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
}

.auth-panel-modern {
  width: min(1080px, 100%);
  padding: 0;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 0;
  overflow: hidden;
}

.auth-register-panel {
  grid-template-columns: minmax(340px, 0.85fr) minmax(420px, 1.15fr);
}

.auth-visual-panel {
  min-height: 580px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 22% 18%, rgba(15, 118, 110, 0.22), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(194, 65, 12, 0.16), transparent 26%),
    linear-gradient(145deg, #0f172a 0%, #153533 58%, #f8fafc 58.3%, #ffffff 100%);
  color: #fff;
}

.auth-visual-panel h1 {
  max-width: 520px;
  color: #fff;
}

.auth-visual-panel p:not(.eyebrow) {
  max-width: 440px;
  color: rgba(255, 255, 255, 0.78);
}

.auth-visual-panel .eyebrow {
  color: #fbbf24;
}

.auth-back-link {
  width: fit-content;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.auth-back-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.auth-card {
  padding: 38px;
  align-content: center;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.auth-form-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.auth-form-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.1;
}

.auth-preview {
  padding: 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.26);
}

.auth-preview-top {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
}

.auth-preview-line {
  height: 44px;
  margin-top: 12px;
  border-radius: 8px;
  background: #e2e8f0;
}

.auth-preview-line.strong {
  height: 72px;
  margin-top: 0;
  background: linear-gradient(135deg, var(--primary), #0f172a);
}

.auth-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.auth-preview-grid span {
  min-height: 58px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.auth-points,
.auth-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-points span,
.auth-timeline span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-timeline span.is-active {
  background: #fff;
  color: var(--primary-dark);
}

.register-preview {
  margin-top: 22px;
}

.auth-form,
.form-grid {
  display: grid;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 82px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.password-toggle:hover {
  background: #eef7f6;
  border-color: rgba(15, 118, 110, 0.35);
}

.password-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.password-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  transition: width 180ms ease, background-color 180ms ease;
}

.password-meter span.is-medium {
  background: #d97706;
}

.password-meter span.is-strong {
  background: var(--primary);
}

.password-hint {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.field textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.checkbox-field input:focus,
.password-toggle:focus,
.btn:focus,
.link-button:focus,
a:focus {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.field-error,
.validation-summary {
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 700;
}

.validation-summary ul {
  margin: 0;
  padding-left: 18px;
}

.form-footer {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.content-panel {
  padding: 34px;
}

.admin-panel,
.admin-form {
  display: grid;
  gap: 24px;
}

.admin-actions,
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notice {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--primary-dark);
  border: 1px solid rgba(15, 118, 110, 0.22);
  font-weight: 800;
}

.stats-grid,
.admin-grid,
.package-admin-grid,
.package-grid,
.video-grid {
  display: grid;
  gap: 18px;
}

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

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

.admin-section,
.public-section,
.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.public-section {
  margin-top: 24px;
  box-shadow: var(--shadow);
}

.full-section {
  margin-top: 0;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading h2,
.package-card h2,
.package-card h3,
.video-card h3,
.lesson-admin-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-list article {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.compact-list strong,
.compact-list span {
  display: block;
}

.compact-list span,
.meta-line,
.video-card small {
  color: var(--muted);
}

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

.playlist-list {
  display: grid;
  gap: 22px;
}

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

.lesson-admin-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lesson-admin-card video,
.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 8px;
  background: #111827;
  object-fit: cover;
}

.card-title-row,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.card-title-row {
  justify-content: space-between;
}

.meta-line {
  margin: 12px 0 16px;
  font-weight: 800;
}

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

.package-card,
.video-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.package-card {
  display: grid;
  gap: 12px;
}

.package-card p,
.video-card p {
  margin: 0;
  color: var(--muted);
}

.price {
  font-size: 2rem;
  line-height: 1;
}

.benefit-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

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

.video-card {
  display: grid;
  gap: 14px;
}

.rating-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rating-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.rating-button:hover,
.rating-button.is-selected {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #854d0e;
}

.video-card h3 {
  margin-top: 12px;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.choice-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.choice-panel legend {
  padding: 0 8px;
  font-weight: 800;
}

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

.choice-group {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.choice-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.choice-group h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0;
}

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

.inline-actions form {
  margin: 0;
}

.inline-form {
  margin: 12px 0 0;
}

.profile-panel {
  display: grid;
  gap: 28px;
}

.detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-list div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 6px 0 0;
  font-weight: 800;
  word-break: break-word;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #854d0e;
  font-weight: 800;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.metric-box {
  min-width: 118px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  text-align: center;
}

.metric-box span {
  display: block;
  font-size: 2rem;
  font-weight: 900;
}

.metric-box small {
  color: var(--muted);
  font-weight: 800;
}

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

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nex-auth-page {
  --nex-bg: #080b14;
  --nex-surface: rgba(255, 255, 255, 0.04);
  --nex-surface-hover: rgba(255, 255, 255, 0.07);
  --nex-border: rgba(255, 255, 255, 0.08);
  --nex-border-active: rgba(120, 180, 255, 0.5);
  --nex-accent: #4f9eff;
  --nex-accent-2: #a78bfa;
  --nex-text: #e8edf5;
  --nex-muted: #7b88a5;
  --nex-error: #f87171;
  --nex-card: rgba(12, 18, 35, 0.88);
  position: relative;
  min-height: calc(100vh - 220px);
  margin: -44px calc(50% - 50vw) -56px;
  padding: 64px 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(79, 158, 255, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(167, 139, 250, 0.16), transparent 38%),
    var(--nex-bg);
  color: var(--nex-text);
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
}

.nex-bg-grid,
.nex-bg-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nex-bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}

.nex-bg-wash {
  background:
    radial-gradient(ellipse at top left, rgba(79, 158, 255, 0.18), transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(167, 139, 250, 0.18), transparent 42%);
}

.nex-card-wrap {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  animation: nexFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.nex-card {
  padding: 40px;
  border: 1px solid var(--nex-border);
  border-radius: 8px;
  background: var(--nex-card);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.nex-logo {
  width: fit-content;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--nex-text);
}

.nex-logo:hover {
  color: #fff;
}

.nex-logo-image {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.nex-logo-text {
  font-weight: 900;
  font-size: 1.2rem;
}

.nex-tab-bar {
  position: relative;
  margin-bottom: 28px;
  padding: 4px;
  display: flex;
  border: 1px solid var(--nex-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.nex-tab-bg {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--nex-accent), var(--nex-accent-2));
  box-shadow: 0 4px 16px rgba(79, 158, 255, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nex-tab-bar.register-active .nex-tab-bg {
  transform: translateX(100%);
}

.nex-tab-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--nex-muted);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0;
}

.nex-tab-btn.active {
  color: #fff;
}

.nex-panel {
  display: none;
}

.nex-panel.active {
  display: block;
  animation: nexPanelIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nexPanelIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.nex-heading {
  margin-bottom: 22px;
}

.nex-heading h1 {
  margin: 0;
  color: var(--nex-text);
  font-size: 1.55rem;
  line-height: 1.15;
}

.nex-heading p {
  margin: 6px 0 0;
  color: var(--nex-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.nex-fields {
  display: grid;
  gap: 14px;
}

.nex-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.nex-field {
  display: grid;
  gap: 6px;
}

.nex-field > span:first-child {
  color: var(--nex-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nex-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nex-input-wrap svg {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--nex-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.nex-input-wrap input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--nex-border);
  border-radius: 8px;
  outline: none;
  background: var(--nex-surface);
  color: var(--nex-text);
  font-size: 0.95rem;
  font-weight: 700;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nex-input-wrap.has-eye input {
  padding-right: 78px;
}

.nex-input-wrap:focus-within svg {
  color: var(--nex-accent);
}

.nex-input-wrap input:focus {
  border-color: var(--nex-border-active);
  background: var(--nex-surface-hover);
  box-shadow: 0 0 0 3px rgba(79, 158, 255, 0.12);
}

.nex-input-wrap input::placeholder {
  color: rgba(123, 136, 165, 0.72);
}

.nex-eye-btn {
  position: absolute;
  right: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--nex-muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
}

.nex-eye-btn:hover,
.nex-eye-btn:focus {
  color: var(--nex-accent);
}

.nex-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--nex-muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.nex-check {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nex-check input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 18px;
  height: 18px;
  opacity: 0;
  cursor: pointer;
}

.nex-check > span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--nex-border);
  border-radius: 6px;
  background: var(--nex-surface);
  color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nex-check svg {
  opacity: 0;
}

.nex-check input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, var(--nex-accent), var(--nex-accent-2));
}

.nex-check input:checked + span svg {
  opacity: 1;
}

.nex-submit {
  position: relative;
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--nex-accent), var(--nex-accent-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 158, 255, 0.25);
  cursor: pointer;
  font-weight: 900;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.nex-submit:hover,
.nex-submit:focus {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(79, 158, 255, 0.35);
}

.nex-footer-note {
  margin: 18px 0 0;
  color: var(--nex-muted);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.nex-footer-note button {
  border: 0;
  background: transparent;
  color: var(--nex-accent);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.nex-validation,
.nex-error {
  color: var(--nex-error);
  font-size: 0.82rem;
  font-weight: 800;
}

.nex-validation {
  margin-bottom: 14px;
}

.nex-validation ul {
  margin: 0;
  padding-left: 18px;
}

.nex-meter {
  background: rgba(255, 255, 255, 0.09);
}

.nex-hint {
  color: var(--nex-muted);
}

.clean-auth-page {
  min-height: calc(100vh - 220px);
  display: grid;
  align-items: center;
}

.clean-auth-shell {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(380px, 1.1fr);
  overflow: hidden;
  border: 1px solid rgba(22, 32, 42, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.clean-auth-register {
  grid-template-columns: minmax(300px, 0.82fr) minmax(460px, 1.18fr);
}

.clean-auth-side {
  min-height: 610px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  background:
    linear-gradient(rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.78)),
    url("https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=1000&q=80") center / cover;
  color: #fff;
}

.clean-auth-login .clean-auth-side {
  background:
    linear-gradient(rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.78)),
    url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1000&q=80") center / cover;
}

.clean-auth-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
}

.clean-auth-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffeba7;
  color: #102770;
}

.clean-auth-brand:hover {
  color: #fff;
}

.clean-auth-kicker {
  margin: 0;
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clean-auth-side h1 {
  max-width: 520px;
  margin: 10px 0 14px;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
}

.clean-auth-side p:not(.clean-auth-kicker) {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.clean-auth-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.clean-auth-stats span {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.86rem;
  font-weight: 900;
}

.clean-auth-card {
  padding: 42px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.clean-auth-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.clean-auth-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.08;
}

.clean-auth-heading p:not(.clean-auth-kicker) {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.clean-grid {
  display: grid;
  gap: 14px;
}

.clean-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 900;
}

.clean-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 700;
}

.clean-field input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 1px;
  border-color: rgba(15, 118, 110, 0.42);
  background: #fff;
}

.clean-password-field {
  position: relative;
  display: block;
}

.clean-password-field input {
  padding-right: 86px;
}

.clean-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.clean-password-toggle:hover,
.clean-password-toggle:focus {
  border-color: rgba(15, 118, 110, 0.35);
  background: #eef7f6;
}

.clean-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.clean-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 900;
}

.clean-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.clean-submit {
  min-height: 50px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  transition: background-color 180ms ease, transform 180ms ease;
}

.clean-submit:hover,
.clean-submit:focus {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.clean-auth-footer {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.clean-validation,
.clean-error {
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 800;
}

.clean-validation ul {
  margin: 0;
  padding-left: 18px;
}

.clean-meter {
  background: #e2e8f0;
}

.clean-hint {
  color: var(--muted);
}

.flip-auth-page {
  position: relative;
  min-height: calc(100vh - 220px);
  margin: -44px calc(50% - 50vw) -56px;
  padding: 88px 24px 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 235, 167, 0.11), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(15, 118, 110, 0.18), transparent 30%),
    #1f2029;
  color: #c4c3ca;
  font-family: Arial, Helvetica, sans-serif;
}

.flip-auth-logo {
  position: absolute;
  top: 28px;
  right: 30px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 900;
}

.flip-auth-logo span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffeba7;
  color: #102770;
}

.flip-auth-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1fr);
  gap: 42px;
  align-items: center;
}

.flip-auth-intro {
  display: grid;
  gap: 16px;
}

.flip-auth-intro h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem, 6vw, 4.9rem);
  line-height: 1.02;
}

.flip-auth-intro p:not(.eyebrow) {
  max-width: 520px;
  margin: 0;
  color: rgba(196, 195, 202, 0.86);
  font-weight: 700;
}

.flip-auth-toggle {
  text-align: center;
}

.flip-auth-toggle h6 {
  margin: 0;
  padding-bottom: 18px;
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.flip-auth-toggle h6 span {
  padding: 0 20px;
  text-transform: uppercase;
  font-weight: 900;
}

.flip-checkbox {
  position: absolute;
  left: -9999px;
}

.flip-checkbox + label {
  position: relative;
  display: block;
  width: 60px;
  height: 16px;
  margin: 0 auto;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  background-color: #ffeba7;
}

.flip-checkbox + label::before {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  content: "↻";
  z-index: 2;
  background-color: #102770;
  color: #ffeba7;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.5s ease;
}

.flip-checkbox:checked + label::before {
  transform: translateX(44px) rotate(-270deg);
}

.flip-card-wrap {
  position: relative;
  width: 520px;
  max-width: 100%;
  height: 570px;
  margin: 54px auto 0;
  perspective: 900px;
  transform-style: preserve-3d;
}

.flip-card-wrapper {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 600ms ease-out;
}

.flip-card-face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 100%, rgba(255, 235, 167, 0.12), transparent 28%),
    linear-gradient(145deg, #2a2b38, #242532);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.flip-checkbox:checked ~ .flip-card-wrap .flip-card-wrapper {
  transform: rotateY(180deg);
}

.flip-center-wrap {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  padding: 0 34px;
  transform: translate3d(0, -50%, 38px) perspective(100px);
  z-index: 2;
}

.flip-form {
  display: grid;
  gap: 14px;
  text-align: center;
}

.flip-form-register {
  gap: 11px;
}

.flip-form h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.65rem;
  font-weight: 900;
}

.flip-form-group {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
}

.flip-form-style {
  width: 100%;
  height: 48px;
  padding: 13px 84px 13px 54px;
  border: 0;
  border-radius: 8px;
  outline: none;
  background-color: #1f2029;
  color: #c4c3ca;
  box-shadow: 0 4px 8px rgba(21, 21, 21, 0.2);
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  transition: box-shadow 200ms linear, background-color 200ms linear;
}

.flip-form-style:focus {
  box-shadow: 0 0 0 3px rgba(255, 235, 167, 0.17), 0 4px 8px rgba(21, 21, 21, 0.2);
}

.flip-form-style::placeholder {
  color: rgba(196, 195, 202, 0.7);
  transition: opacity 200ms linear;
}

.flip-form-style:focus::placeholder {
  opacity: 0;
}

.flip-input-icon {
  position: absolute;
  top: 0;
  left: 18px;
  z-index: 1;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffeba7;
  font-size: 18px;
  font-weight: 900;
}

.flip-password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 235, 167, 0.12);
  color: #ffeba7;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.flip-submit {
  min-height: 44px;
  width: fit-content;
  margin: 10px auto 0;
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background-color: #ffeba7;
  color: #102770;
  box-shadow: 0 8px 24px rgba(255, 235, 167, 0.2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background-color 200ms linear, color 200ms linear, box-shadow 200ms linear;
}

.flip-submit:hover,
.flip-submit:focus {
  background-color: #102770;
  color: #ffeba7;
  box-shadow: 0 8px 24px rgba(16, 39, 112, 0.3);
}

.flip-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #c4c3ca;
  font-size: 0.86rem;
  font-weight: 800;
}

.flip-remember input {
  accent-color: #ffeba7;
}

.flip-helper {
  margin: 8px 0 0;
  color: #c4c3ca;
  font-size: 0.88rem;
  font-weight: 800;
}

.flip-helper label {
  color: #ffeba7;
  cursor: pointer;
}

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

.flip-validation,
.flip-field-error {
  color: #ffb4a8;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.flip-validation ul {
  margin: 0;
  padding-left: 18px;
}

.flip-meter {
  background: rgba(255, 255, 255, 0.1);
}

.flip-hint {
  color: rgba(196, 195, 202, 0.85);
  text-align: left;
}

@media (max-width: 820px) {
  .site-nav,
  .site-footer,
  .dashboard-hero,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .home-hero,
  .auth-panel,
  .clean-auth-shell,
  .module-grid,
  .detail-list,
  .stats-grid,
  .admin-grid,
  .package-admin-grid,
  .package-grid,
  .video-grid,
  .lesson-admin-card {
    grid-template-columns: 1fr;
  }

  .nex-auth-page {
    margin-top: -24px;
  }

  .clean-auth-side {
    min-height: 360px;
    padding: 28px;
  }

  .clean-auth-card {
    padding: 28px;
  }

  .auth-panel-modern,
  .auth-register-panel {
    grid-template-columns: 1fr;
  }

  .auth-visual-panel {
    min-height: auto;
    gap: 24px;
    background: linear-gradient(145deg, #0f172a, #153533);
  }

  .home-hero,
  .dashboard-hero,
  .auth-panel,
  .content-panel {
    padding: 24px;
  }

  .hero-visual {
    min-height: 260px;
  }

  .auth-card {
    padding: 24px;
  }

  .flip-auth-page {
    margin-top: -24px;
  }

  .flip-auth-shell {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .flip-auth-intro {
    text-align: center;
    justify-items: center;
  }

  .flip-card-wrap {
    margin-top: 44px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 24px;
  }

  .site-nav,
  .site-footer {
    width: min(100% - 22px, 1120px);
  }

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

  .clean-auth-page {
    min-height: auto;
  }

  .nex-auth-page {
    min-height: auto;
    padding: 28px 12px;
  }

  .nex-card {
    padding: 28px 24px;
  }

  .nex-field-row {
    grid-template-columns: 1fr;
  }

  .clean-auth-side,
  .clean-auth-card {
    padding: 22px;
  }

  .hero-copy h1 {
    font-size: 2.2rem;
  }

  .flip-auth-page {
    padding: 82px 12px 48px;
  }

  .flip-auth-logo {
    top: 20px;
    right: 18px;
  }

  .flip-card-wrap {
    height: 660px;
  }

  .flip-center-wrap {
    padding: 0 18px;
  }

  .flip-two {
    grid-template-columns: 1fr;
  }

  .flip-form-style {
    padding-right: 78px;
  }
}
