/* Cosmic — Software Client App Shell */

.app-body {
  background: #000;
  overflow: hidden;
}

.app-body.app-ready {
  overflow: auto;
}

/* Loading */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.6s ease;
}

.app-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.app-loader__glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  animation: loaderGlow 2.5s ease-in-out infinite;
}

@keyframes loaderGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.12); opacity: 1; }
}

.app-loader__icon-wrap {
  position: relative;
  margin-bottom: 20px;
}

.app-loader__icon {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
}

.app-loader__brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.app-loader__text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-height: 20px;
  transition: opacity 0.3s ease;
}

.app-loader__progress {
  width: min(180px, 60vw);
  height: 3px;
  margin: 12px 0 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
}

.app-loader__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #a5b4fc);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.45);
}

.app-loader__icon-wrap {
  animation: loaderIconFloat 2s ease-in-out infinite;
}

@keyframes loaderIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* App shell */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.app-shell.visible { opacity: 1; }
.app-shell.hidden { display: none; }

/* Sidebar */
.app-sidebar {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(6, 6, 10, 0.94);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.app-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 28px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border-subtle);
}

.app-sidebar__logo svg {
  width: 26px;
  height: 26px;
}

.app-sidebar__nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-sidebar__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 12px 6px;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.app-sidebar__link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.app-sidebar__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-sidebar__link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(3px);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.12);
}

.app-sidebar__link:hover::after { opacity: 1; }
.app-sidebar__link:hover svg { opacity: 0.9; }

.app-sidebar__link.active {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 0 32px rgba(99, 102, 241, 0.14), inset 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.app-sidebar__link.active svg { opacity: 1; }

.app-sidebar__link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: #818cf8;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.65);
  animation: sidebarIndicator 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes sidebarIndicator {
  from { height: 0; opacity: 0; }
  to { height: 22px; opacity: 1; }
}

.app-sidebar__community {
  margin: 12px;
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.app-sidebar__community h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.app-sidebar__community p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.app-sidebar__community .btn {
  width: 100%;
  font-size: 0.8125rem;
  padding: 10px 16px;
}

.app-sidebar__toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #09090b;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

/* Main */
.app-main {
  flex: 1;
  margin-left: 250px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: var(--glass-blur);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-topbar__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-topbar__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.app-topbar__btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.app-topbar__badge {
  padding: 5px 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 100px;
  color: #a5b4fc;
}

.app-topbar__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.app-topbar__avatar svg {
  width: 18px;
  height: 18px;
}

/* Content */
.app-content {
  flex: 1;
  padding: 48px 40px 64px;
  max-width: 900px;
}

.app-content--wide {
  max-width: 1040px;
}

.app-content__header {
  margin-bottom: 40px;
}

.app-content__heading {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.app-content__sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
}

/* Product card */
.product-card {
  padding: 32px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.06);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  margin-bottom: 32px;
  max-width: none;
}

.product-card:hover {
  transform: scale(1.01) translateY(-3px);
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.1), 0 16px 48px rgba(0, 0, 0, 0.4);
}

.product-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.product-card__name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.product-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #22c55e;
}

.product-card__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.product-card__meta {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.8125rem;
}

.product-card__meta-row {
  display: flex;
  justify-content: space-between;
}

.product-card__meta-row span:first-child { color: var(--text-muted); }
.product-card__meta-row span:last-child { font-weight: 500; }

.product-card__features {
  margin-bottom: 24px;
}

.product-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.product-card__features li svg {
  width: 14px;
  height: 14px;
  color: #818cf8;
  flex-shrink: 0;
}

.product-card__pricing {
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.product-card__price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 8px;
}

.product-card__price-row:last-child { margin-bottom: 0; }
.product-card__price-row span:first-child { color: var(--text-muted); }
.product-card__price-row span:last-child { font-weight: 600; }

.product-card__actions {
  display: flex;
  gap: 12px;
}

.product-card__actions .btn { flex: 1; justify-content: center; }

/* License section */
.license-section {
  max-width: 520px;
  padding: 28px 32px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.license-section__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.license-section__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.license-section__feedback {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  display: none;
  animation: fadeInUp 0.35s ease;
}

.license-section__feedback.visible { display: block; }

.license-section__feedback--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #86efac;
  animation: fadeInUp 0.35s ease, successPulse 0.5s ease 0.1s;
}

@keyframes successPulse {
  0% { box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
  50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.15); }
  100% { box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
}

.license-section__feedback--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

.license-section__feedback--loading {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

/* Page content blocks */
.page-block {
  max-width: 640px;
}

.page-block p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.page-block h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.download-item:hover { border-color: var(--border-hover); }

.download-item__info h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.download-item__info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.status-grid {
  display: grid;
  gap: 12px;
  max-width: 480px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.status-row__label { color: var(--text-muted); }

.status-row__value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

/* Ambient background */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  animation: ambientPulse 8s ease-in-out infinite;
}

.ambient-glow--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: 10%;
  background: rgba(99, 102, 241, 0.07);
}

.ambient-glow--2 {
  width: 360px;
  height: 360px;
  bottom: -80px;
  left: 20%;
  background: rgba(129, 140, 248, 0.05);
  animation-delay: -4s;
}

.ambient-glow--3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(79, 70, 229, 0.04);
  animation: ambientDrift 14s ease-in-out infinite;
}

@keyframes ambientDrift {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50% { transform: translateX(-40%) translateY(-30px); opacity: 0.8; }
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Page transitions */
body.page-exit .app-shell,
body.page-exit .checkout-mor-page,
body.page-exit .public-page,
body.page-exit .public-footer,
body.page-exit .login-portal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

body.page-exit .cosmic-nav {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

body.page-enter .app-shell,
body.page-enter .checkout-mor-page,
body.page-enter .public-page,
body.page-enter .public-footer,
body.page-enter .login-portal {
  animation: pageEnter 0.5s ease forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animate in cards */
.animate-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 28px rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
}

.stat-card__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-card__value {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-card__value--text {
  font-size: 1.125rem;
}

/* Store layout */
.store-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.store-grid__side .license-section {
  max-width: none;
  position: sticky;
  top: 88px;
}

.product-card__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.product-card__meta--grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.product-card__features--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

/* Previews */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.preview-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(17, 17, 24, 0.8));
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  cursor: default;
}

.preview-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 2.5s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.preview-card:hover {
  transform: scale(1.03) translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 0 32px rgba(99, 102, 241, 0.12);
}

/* Info blocks */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.info-block {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.info-block:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.info-block__features {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.info-block__features li {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
}

.info-block__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.5);
}

.info-block__title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.info-block p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.info-block__rows { display: grid; gap: 8px; }

.info-block__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.info-block__row:last-child { border-bottom: none; }
.info-block__row span:first-child { color: var(--text-muted); }
.info-block__row span:last-child { font-weight: 500; }

.info-block__row--highlight span:last-child { color: #a5b4fc; }

/* Loading dots */
.loading-dots span {
  animation: dotPulse 1.2s ease infinite;
  opacity: 0.3;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Tooltip */
.cosmic-tooltip {
  position: fixed;
  z-index: 10001;
  padding: 6px 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(17, 17, 24, 0.95);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.cosmic-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

/* Checkout — MoR */
.checkout-body {
  min-height: 100vh;
  overflow-x: hidden;
}

.checkout-body:not(.app-ready) .checkout-mor-page {
  opacity: 0;
  pointer-events: none;
}

.checkout-body .checkout-mor-page {
  padding-top: 88px;
  padding-bottom: 32px;
}

.checkout-mor-page {
  transition: opacity 0.45s ease;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.checkout-mor {
  width: min(960px, 100%);
  padding: 0;
  background: rgba(10, 10, 16, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(99, 102, 241, 0.08);
  animation: checkoutMorIn 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  overflow: hidden;
}

.checkout-mor--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.checkout-mor__left {
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.checkout-mor__right {
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* PayPal 3D Secure modal */
.threeds-overlay {
  z-index: 10003;
}

.threeds-modal {
  width: min(400px, calc(100% - 32px));
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  color: #2c2e2f;
  transform: scale(0.94) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.threeds-overlay.visible .threeds-modal {
  transform: scale(1) translateY(0);
}

.threeds-modal__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #f5f7fa;
  border-bottom: 1px solid #dde3ea;
}

.threeds-modal__paypal-logo {
  display: block;
  height: 22px;
  width: auto;
  max-width: 92px;
}

.threeds-modal__secure-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #2c2e2f;
  background: #fff;
  border: 1px solid #dde3ea;
  padding: 4px 8px;
  border-radius: 100px;
}

.threeds-modal__secure-tag svg {
  color: #0070ba;
}

.threeds-modal__body {
  padding: 22px 20px 18px;
  text-align: center;
}

.threeds-modal__shield {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef6fc;
  color: #0070ba;
}

.threeds-modal__title {
  font-size: 1rem;
  font-weight: 700;
  color: #2c2e2f;
  margin-bottom: 6px;
}

.threeds-modal__text {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #687173;
  margin-bottom: 16px;
}

.threeds-modal__details {
  text-align: left;
  background: #f5f7fa;
  border: 1px solid #e6ebf1;
  border-radius: 8px;
  padding: 4px 14px;
  margin-bottom: 18px;
}

.threeds-modal__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 0.75rem;
  border-bottom: 1px solid #e6ebf1;
}

.threeds-modal__row:last-child {
  border-bottom: none;
}

.threeds-modal__row span {
  color: #687173;
}

.threeds-modal__row strong {
  color: #2c2e2f;
  font-weight: 600;
}

.threeds-modal__spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.threeds-modal__spinner {
  width: 30px;
  height: 30px;
  border: 2px solid #d9e4ee;
  border-top-color: #0070ba;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.threeds-modal__wait {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0070ba;
}

.threeds-modal__footer {
  font-size: 0.6875rem;
  color: #9aa3a8;
  line-height: 1.5;
}

.checkout-mor__header--left {
  text-align: left;
  margin-bottom: 24px;
}

.checkout-mor__icon--left {
  margin: 0 0 14px;
}

.checkout-mor__meta--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.checkout-mor__meta--stack li + li::before {
  display: none;
}

.checkout-mor__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.checkout-mor__desc {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.checkout-mor__includes-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.checkout-mor__includes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-mor__includes-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.checkout-mor__includes-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
}

.checkout-mor__delivery {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.checkout-mor__delivery-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 5px;
}

.checkout-mor__delivery p {
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.checkout-mor__renewal {
  font-size: 0.6875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

@keyframes checkoutMorIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.checkout-mor__header {
  text-align: center;
  margin-bottom: 4px;
}

.checkout-mor__icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.35));
}

.checkout-mor__title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.checkout-mor__plan {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.checkout-mor__price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.checkout-mor__meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.checkout-mor__meta li {
  position: relative;
}

.checkout-mor__meta li + li::before {
  content: '·';
  position: absolute;
  left: -9px;
  color: rgba(255, 255, 255, 0.2);
}

.checkout-mor__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 22px 0;
}

.checkout-mor__section {
  margin-bottom: 4px;
}

.checkout-mor__section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.checkout-mor .form-group {
  margin-bottom: 12px;
}

.checkout-mor .form-group label {
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.checkout-mor__input {
  padding: 10px 12px;
  font-size: 0.8125rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.checkout-mor__input:focus {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 0 20px rgba(99, 102, 241, 0.08);
  background: rgba(0, 0, 0, 0.45);
}

.checkout-mor__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Custom country dropdown */
.country-select {
  position: relative;
}

.country-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 400;
  appearance: none;
  -webkit-appearance: none;
}

.country-select__trigger.input--valid,
.country-select__trigger.input--error {
  animation: none;
}

.country-select__flag {
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
}

.country-select__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.country-select__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.country-select--open .country-select__chevron {
  transform: rotate(180deg);
}

.country-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(14, 14, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(99, 102, 241, 0.08);
  animation: checkoutMorIn 0.2s ease;
}

.country-select__menu[hidden] {
  display: none;
}

.country-select__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.country-select__option:hover,
.country-select__option--active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
}

.country-select__name {
  flex: 1;
}

.country-select--error .country-select__trigger {
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.country-select--open .country-select__trigger {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 0 20px rgba(99, 102, 241, 0.08);
}

.checkout-mor__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-mor__row--card {
  grid-template-columns: 1fr 0.75fr;
}

.checkout-mor__payments {
  margin-top: 16px;
  margin-bottom: 14px;
}

.checkout-mor__payments-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.checkout-mor__payments-icons {
  display: flex;
  gap: 6px;
}

.checkout-mor__pay-badge {
  padding: 4px 10px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.checkout-mor__pay-badge--paypal {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.2);
}

.checkout-mor__secure-note {
  margin-top: 10px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.checkout-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.checkout-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 7px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  cursor: default;
  transition: gap 0.22s ease, padding 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.checkout-trust__item:hover,
.checkout-trust__item:focus-visible {
  gap: 7px;
  padding: 7px 11px;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.1);
  outline: none;
}

.checkout-trust__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-trust__icon svg {
  color: #22c55e;
  display: block;
}

.checkout-trust__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(134, 239, 172, 0.85);
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: max-width 0.28s ease, opacity 0.2s ease;
}

.checkout-trust__item:hover .checkout-trust__label,
.checkout-trust__item:focus-visible .checkout-trust__label {
  max-width: 160px;
  opacity: 1;
}

.checkout-mor__summary {
  margin-top: auto;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.checkout-mor__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

.checkout-mor__summary-row:first-child {
  font-weight: 500;
  color: var(--text-primary);
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.checkout-mor__summary-row--muted {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.checkout-mor__summary-row--total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  color: var(--text-primary);
}

.checkout-mor__summary-row--total span:last-child {
  font-size: 1rem;
}

.checkout-mor__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.checkout-mor__submit {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.3s ease, color 0.3s ease;
}

.checkout-mor__submit-text,
.checkout-mor__submit-loading {
  display: block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.checkout-mor__submit-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
}

.checkout-mor__submit--processing {
  background: #22c55e !important;
  color: #fff !important;
  border-color: rgba(34, 197, 94, 0.5) !important;
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.35);
  animation: checkoutPayPulse 1.4s ease-in-out infinite;
  pointer-events: none;
}

.checkout-mor__submit--processing::before {
  display: none;
}

.checkout-mor__submit--processing .checkout-mor__submit-text {
  opacity: 0;
  transform: translateY(-6px);
}

.checkout-mor__submit--processing .checkout-mor__submit-loading {
  opacity: 1;
  transform: translateY(0);
}

@keyframes checkoutPayPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.28); }
  50% { box-shadow: 0 0 36px rgba(34, 197, 94, 0.48); }
}

.checkout-mor__submit:not(:disabled):not(.checkout-mor__submit--processing):hover {
  transform: scale(1.015);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.12);
}

.checkout-mor__submit:not(:disabled):not(.checkout-mor__submit--processing):active {
  transform: scale(0.985);
}

.payment-failed {
  width: min(440px, 100%);
  padding: 36px 32px;
  text-align: center;
  background: rgba(10, 10, 16, 0.88);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: checkoutMorIn 0.5s ease forwards;
}

.payment-failed__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.payment-failed__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.payment-failed__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.payment-failed__sub {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.payment-failed__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-failed__actions .btn {
  justify-content: center;
}

.payment-success {
  width: min(440px, 100%);
  padding: 36px 32px;
  text-align: center;
  background: rgba(10, 10, 16, 0.88);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: checkoutMorIn 0.5s ease forwards;
}

.payment-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.payment-success__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.payment-success__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.payment-success__sub {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.payment-success__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-success__actions .btn {
  justify-content: center;
}

.checkout-mor__back {
  font-size: 0.8125rem;
}

.checkout-mor__feedback {
  margin-top: 10px;
  font-size: 0.75rem;
  text-align: center;
  color: #fca5a5;
}

.checkout-mor__legal {
  margin-top: 16px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.checkout-mor__legal a {
  color: #a5b4fc;
}

.checkout-mor-modal {
  width: min(400px, calc(100% - 32px));
}

.checkout-fraud-modal {
  width: min(400px, calc(100% - 32px));
  text-align: center;
}

.checkout-fraud-modal__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #22c55e;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.12);
}

.checkout-fraud-modal__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.checkout-fraud-modal__text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.checkout-fraud-modal .btn {
  justify-content: center;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.75rem;
}

.rate-limit-feedback {
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 820px) {
  .checkout-mor--split {
    grid-template-columns: 1fr;
  }

  .checkout-mor__left {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .checkout-mor__summary {
    margin-top: 20px;
  }
}

@media (max-width: 520px) {
  .checkout-mor {
    border-radius: 18px;
  }

  .checkout-mor__left,
  .checkout-mor__right {
    padding: 24px 18px 20px;
  }

  .checkout-mor__row,
  .checkout-mor__row--card {
    grid-template-columns: 1fr;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: min(420px, calc(100% - 32px));
  padding: 32px;
  background: rgba(17, 17, 24, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.12);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.visible .modal-card {
  transform: scale(1) translateY(0);
}

.modal-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.modal-processing h3 {
  font-size: 1rem;
  font-weight: 600;
}

.modal-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(99, 102, 241, 0.15);
  border-top-color: #818cf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
}

.modal-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 100px;
  transition: width 2.5s ease;
}

.modal-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.modal-result__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.modal-result__icon--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.modal-result__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.modal-result__sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.modal-result__actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.modal-result__actions .btn { flex: 1; justify-content: center; }

/* Micro-interactions */
.form-group--focused label { color: #a5b4fc; }

.form-input.input--error,
.form-textarea.input--error {
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.form-input.input--valid,
.form-textarea.input--valid {
  border-color: rgba(34, 197, 94, 0.35) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.08);
  animation: inputSuccess 0.4s ease;
}

@keyframes inputSuccess {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.2); }
  100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.08); }
}

.shake {
  animation: shake 0.45s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn--loading {
  pointer-events: none;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .app-sidebar__toggle { display: flex; }
  .app-content { padding: 32px 20px 48px; }
  .app-topbar { padding: 0 20px; }
  .product-card__actions { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .store-grid { grid-template-columns: 1fr; }
  .store-grid__side .license-section { position: static; }
  .preview-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .info-block__features { grid-template-columns: 1fr; }
  .product-card__meta--grid,
  .product-card__features--grid { grid-template-columns: 1fr; }
}

/* Login Portal */
.login-body { overflow: hidden; }
.login-body.app-ready { overflow: auto; }

.login-portal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.login-portal.visible {
  opacity: 1;
  pointer-events: auto;
}

.login-portal.visible .login-panel {
  animation: loginPanelIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes loginPanelIn {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-portal__wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(420px, 100%);
}

.login-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 36px 32px;
  background: rgba(12, 12, 18, 0.92);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.1), 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.6s ease forwards;
}

.login-panel__brand {
  text-align: center;
  margin-bottom: 20px;
}

.login-panel__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  display: block;
}

.login-panel__brand h1 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-panel__subtitle {
  font-size: 0.8125rem;
  color: #a5b4fc;
  font-weight: 500;
  margin-top: 4px;
}

.login-panel__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 6px;
}

.login-panel__desc--muted {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.login-panel__notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 12px;
  margin-bottom: 20px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-sm);
}

.login-panel__form { display: grid; gap: 12px; }

.login-panel__options {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.login-panel__actions {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.login-btn {
  padding: 10px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 40px;
}

.login-btn--primary {
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.06);
}

.login-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.login-btn--secondary {
  padding: 9px 18px;
  font-size: 0.75rem;
  font-weight: 500;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
}

.login-btn--secondary:hover {
  color: var(--text-primary);
  border-color: rgba(165, 180, 252, 0.28);
  transform: none;
  box-shadow: none;
}

/* Forgot License */
.login-forgot-btn {
  padding: 0;
  font-family: var(--font);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.18);
}

.login-forgot-btn:hover {
  color: var(--text-secondary);
  background: transparent;
  transform: none;
  box-shadow: none;
  text-decoration-color: rgba(165, 180, 252, 0.45);
}

.login-forgot-btn:active { transform: none; }

/* Auth failure modal */
.auth-failure-card {
  text-align: center;
}

.auth-failure-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

.auth-failure-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.auth-failure-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Recovery modal */
.recovery-card { width: min(400px, calc(100% - 32px)); }
.recovery-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}
.recovery-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
}
.recovery-card__actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.recovery-card__actions .btn { flex: 1; justify-content: center; }

.recovery-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.recovery-success__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.login-panel__feedback {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  display: none;
  text-align: center;
}

.login-panel__feedback.visible { display: block; }
.login-panel__feedback--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}
.login-panel__feedback--loading {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

/* Dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.dash-card {
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.dash-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

.dash-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.dash-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Welcome modal */
.welcome-modal .modal-card { max-width: 480px; }

.license-card {
  max-width: 420px;
  text-align: center;
}

.license-card__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
}

.license-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.license-card__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.license-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.license-card__actions .btn {
  justify-content: center;
}

.welcome-card h2 {
  font-size: 1.375rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.welcome-card__subtitle {
  text-align: center;
  color: #a5b4fc;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.welcome-card__list {
  margin: 0 0 20px 20px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.9;
}
.welcome-card__note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.welcome-card__actions {
  display: flex;
  gap: 10px;
}
.welcome-card__actions .btn { flex: 1; justify-content: center; }

/* Live chat */
#cosmic-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  pointer-events: none;
}

.chat-fab {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #09090b;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 32px rgba(99, 102, 241, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 2;
}

.chat-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 32px rgba(99, 102, 241, 0.25);
}

.chat-fab.open {
  background: rgba(12, 12, 18, 0.95);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-fab__icon {
  display: block;
  flex-shrink: 0;
}

.chat-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(360px, calc(100vw - 48px));
  height: min(460px, calc(100vh - 120px));
  background: rgba(12, 12, 18, 0.96);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 1;
}

.chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.chat-panel__head strong { display: block; font-size: 0.875rem; }
.chat-panel__head span { font-size: 0.6875rem; color: #86efac; }

.chat-panel__close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chat-panel__close:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.5;
  animation: fadeInUp 0.3s ease;
}

.chat-bubble--bot {
  align-self: flex-start;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--text-secondary);
}

.chat-bubble--user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.chat-bubble--typing {
  display: flex;
  gap: 4px;
  padding: 14px 16px;
}

.chat-bubble--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a5b4fc;
  animation: dotPulse 1.2s ease infinite;
}

.chat-panel__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
}

.chat-panel__suggestions button {
  padding: 6px 10px;
  font-size: 0.6875rem;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.chat-panel__suggestions button:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

.chat-panel__input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
}

.chat-panel__input .form-input { flex: 1; padding: 10px 12px; font-size: 0.8125rem; }

/* Community cards */
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.community-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.community-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.08);
}

.community-card h4 { font-size: 0.9375rem; margin-bottom: 6px; }
.community-card p { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

.paypal-option { margin: 16px 0; }
.paypal-btn { border-color: rgba(59, 130, 246, 0.3) !important; color: #93c5fd !important; }

/* Settings */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-row:last-of-type { border-bottom: none; }

.settings-row__info label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.settings-row__info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.settings-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-toggle__track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

.settings-toggle__track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

.settings-toggle input:checked + .settings-toggle__track {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.4);
}

.settings-toggle input:checked + .settings-toggle__track::after {
  transform: translateX(20px);
  background: #a5b4fc;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9375rem;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .dash-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .cosmic-nav__links,
  .cosmic-nav__cta { display: none; }
  .cosmic-nav__toggle { display: inline-flex; }
  .public-footer__links { flex-direction: column; gap: 10px; }
  .login-portal { padding-top: 88px; }
}

/* Public legal & contact pages */
.public-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-body:not(.app-ready) .cosmic-nav,
.public-body:not(.app-ready) .public-page,
.public-body:not(.app-ready) .public-footer,
.login-body:not(.app-ready) .cosmic-nav,
.login-body:not(.app-ready) .login-portal {
  opacity: 0;
  pointer-events: none;
}

/* Floating site navbar */
.cosmic-nav {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  width: min(980px, calc(100% - 28px));
  margin-inline: auto;
  z-index: 500;
  transform: translateY(-16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease, top 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.cosmic-nav.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: cosmicNavIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cosmicNavIn {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

.cosmic-nav.scrolled {
  top: 12px;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.55), 0 0 40px rgba(99, 102, 241, 0.08);
}

.cosmic-nav__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  background: rgba(8, 8, 14, 0.78);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 100px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cosmic-nav.scrolled .cosmic-nav__inner {
  border-color: rgba(129, 140, 248, 0.22);
  background: rgba(8, 8, 14, 0.9);
}

.cosmic-nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 6px;
}

.cosmic-nav__logo-mark {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.25);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

.cosmic-nav__logo-mark svg {
  width: 14px;
  height: 14px;
}

.cosmic-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.cosmic-nav__links a {
  padding: 8px 11px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 100px;
  white-space: nowrap;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.cosmic-nav__links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.cosmic-nav__links a.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.22);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.28);
}

.cosmic-nav__cta {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #09090b;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.08);
}

.cosmic-nav__cta:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.12);
  color: #09090b;
}

.cosmic-nav__toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.cosmic-nav__toggle span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cosmic-nav__toggle.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.cosmic-nav__toggle.open span:nth-child(2) { opacity: 0; }
.cosmic-nav__toggle.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.cosmic-nav__mobile {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 10px;
  background: rgba(10, 10, 16, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.cosmic-nav__mobile.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.cosmic-nav__mobile a {
  display: block;
  padding: 11px 14px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.cosmic-nav__mobile a:hover,
.cosmic-nav__mobile a.active {
  background: rgba(99, 102, 241, 0.12);
  color: #fff;
}

.public-reveal {
  opacity: 0;
  transform: translateY(18px);
}

.public-reveal.is-visible {
  animation: fadeInUp 0.65s ease forwards;
}

.public-nav,
.public-nav__logo,
.public-nav__links {
  display: none;
}

.public-page {
  flex: 1;
  padding: 96px 24px 40px;
}

.public-page__inner {
  width: min(760px, 100%);
  margin: 0 auto;
}

.public-page__inner--wide {
  width: min(960px, 100%);
}

.public-page__card {
  padding: 36px 32px;
  background: rgba(12, 12, 18, 0.92);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.public-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
}

.public-footer__inner {
  width: min(920px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-footer__brand {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.public-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.public-footer__links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.public-footer__links a:hover {
  color: var(--text-secondary);
}

.login-portal__footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.login-portal__footer a {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-portal__footer a:hover {
  color: var(--text-secondary);
}

.contact-form-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}

.contact-form-card .form-group { margin-bottom: 16px; }
.contact-form-card textarea.form-input {
  min-height: 140px;
  resize: vertical;
}
