:root {
  --raspberry: #ef0d33;
  --raspberry-2: #ff3155;
  --coal: #111517;
  --coal-2: #182026;
  --panel: rgba(17, 21, 23, 0.72);
  --panel-strong: rgba(12, 16, 18, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --muted: #a8b3bd;
  --text: #f8fafc;
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.4);
  --warning: #f7b955;
  --danger: #ff5a70;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--coal);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at 15% 10%,
      rgba(239, 13, 51, 0.16),
      transparent 28%
    ),
    radial-gradient(
      circle at 85% 85%,
      rgba(25, 122, 185, 0.15),
      transparent 32%
    );
  pointer-events: none;
  z-index: -1;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
h4,
.display,
.brand,
.nav-label,
.eyebrow,
.btn,
.badge,
.table th {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0.06em;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
.app-shell {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(17, 21, 23, 0.94), rgba(17, 21, 23, 0.68)),
    url("../user/assets/space_hero_bg.png") center/cover fixed no-repeat;
}
.admin-shell {
  background-image:
    linear-gradient(120deg, rgba(17, 21, 23, 0.96), rgba(17, 21, 23, 0.72)),
    url("../admin/assets/space_hero_bg1.png");
}
.app-shell:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    transparent 0 48%,
    rgba(239, 13, 51, 0.08) 48.3% 49%,
    transparent 49.3% 100%
  );
  mix-blend-mode: screen;
}
.orb {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(239, 13, 51, 0.23);
  box-shadow:
    0 0 80px rgba(239, 13, 51, 0.18),
    inset 0 0 50px rgba(239, 13, 51, 0.08);
  right: -90px;
  top: 15%;
  transform: rotate(22deg);
  pointer-events: none;
  z-index: 0;
}
.orb:before,
.orb:after {
  content: "";
  position: absolute;
  inset: 35px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: rotate(62deg) scaleX(1.65);
}
.orb:after {
  inset: -24px;
  transform: rotate(-24deg) scaleX(2.2);
  border-color: rgba(255, 255, 255, 0.07);
}
.site-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(10, 13, 15, 0.76);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(24px);
  z-index: 20;
}
.sidebar-brand {
  padding: 28px 24px 22px;
  border-bottom: 1px solid var(--line);
}
.sidebar-brand img {
  width: 170px;
  max-width: 100%;
  display: block;
}
.brand-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-scroll {
  flex: 1;
  overflow: auto;
  padding: 18px 14px;
}
.nav-section {
  margin: 18px 10px 8px;
  color: #6d7d87;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--muted);
  transition: 0.25s var(--ease);
  font-size: 1rem;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(239, 13, 51, 0.2),
    rgba(239, 13, 51, 0.04)
  );
  box-shadow:
    inset 3px 0 var(--raspberry),
    0 8px 28px rgba(0, 0, 0, 0.18);
  transform: translateX(3px);
}
.nav-icon {
  width: 26px;
  text-align: center;
  color: var(--raspberry);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1.35rem;
}
.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 14, 0.68);
  backdrop-filter: blur(18px);
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-title {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border-radius: 12px;
  padding: 8px 12px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px var(--success);
}
.clock {
  color: var(--muted);
  font-size: 0.8rem;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--raspberry), #7c081d);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1.25rem;
  box-shadow: 0 0 0 3px rgba(239, 13, 51, 0.17);
}
.page {
  padding: clamp(22px, 3.2vw, 48px);
  animation: pageIn 0.65s var(--ease) both;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}
.page-head h1 {
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  line-height: 0.92;
  text-transform: uppercase;
}
.page-head p {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 10px;
}
.eyebrow {
  color: var(--raspberry);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(110deg, rgba(10, 14, 16, 0.82), rgba(10, 14, 16, 0.38)),
    url("../user/assets/space_hero_bg.png") center/cover;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 5vw, 68px);
  isolation: isolate;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 21, 23, 0.92), transparent 70%);
  z-index: -1;
}
.hero-copy {
  max-width: 700px;
}
.hero h1 {
  font-size: clamp(3.6rem, 8vw, 8.6rem);
  line-height: 0.82;
  text-transform: uppercase;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}
.hero p {
  max-width: 580px;
  color: #e9edf0;
  margin: 22px 0 28px;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.6;
}
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 13px;
  border: 1px solid transparent;
  text-transform: uppercase;
  font-size: 1rem;
  transition: 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.btn:after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transition: 0.45s;
}
.btn:hover:after {
  transform: translateX(110%);
}
.btn:hover {
  transform: translateY(-3px);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: linear-gradient(135deg, var(--raspberry), #a80825);
  color: white;
  box-shadow: 0 12px 28px rgba(239, 13, 51, 0.28);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: #fff;
}
.btn-outline {
  border-color: var(--raspberry);
  color: #fff;
  background: rgba(239, 13, 51, 0.05);
}
.btn-danger {
  border-color: rgba(255, 90, 112, 0.45);
  background: rgba(255, 90, 112, 0.08);
  color: #ff9aa9;
}
.btn-sm {
  min-height: 36px;
  padding: 8px 13px;
  font-size: 0.82rem;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.panel {
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(24, 31, 35, 0.82),
    rgba(12, 16, 18, 0.72)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s,
    box-shadow 0.35s;
}
.panel:hover {
  border-color: rgba(239, 13, 51, 0.45);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px);
}
.panel:before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--raspberry), transparent);
  opacity: 0.85;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-title {
  font-size: 1.3rem;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.82rem;
}
.stat-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.stat-card .count {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 4rem;
  line-height: 0.8;
}
.stat-card .meta {
  color: var(--muted);
  font-size: 0.82rem;
}
.stat-card .accent {
  color: var(--raspberry);
}
.stat-card:after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  right: -56px;
  bottom: -70px;
  border: 1px solid rgba(239, 13, 51, 0.35);
  box-shadow: 0 0 42px rgba(239, 13, 51, 0.1);
}
.course-card {
  overflow: hidden;
  padding: 0;
}
.course-art {
  height: 150px;
  background:
    linear-gradient(145deg, rgba(17, 21, 23, 0.25), rgba(17, 21, 23, 0.76)),
    url("../user/assets/space_hero_bg.png") center/cover;
  position: relative;
}
.course-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 42%,
    rgba(239, 13, 51, 0.28) 42.4% 45%,
    transparent 45.4%
  );
}
.course-body {
  padding: 22px;
}
.course-body h3 {
  font-size: 1.55rem;
  line-height: 0.95;
  text-transform: uppercase;
}
.course-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 12px 0 16px;
}
.course-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: #d9e0e5;
}
.badge.raspberry {
  color: #ff7890;
  border-color: rgba(239, 13, 51, 0.4);
  background: rgba(239, 13, 51, 0.1);
}
.badge.success {
  color: #8af3bd;
  border-color: rgba(73, 210, 142, 0.38);
  background: rgba(73, 210, 142, 0.08);
}
.badge.warning {
  color: #ffd27d;
  border-color: rgba(247, 185, 85, 0.38);
  background: rgba(247, 185, 85, 0.08);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.table th,
.table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.table th {
  font-size: 1rem;
  color: var(--raspberry);
  text-transform: uppercase;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr {
  transition: 0.25s;
}
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  color: #d8e0e5;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  transition: 0.25s;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(3, 6, 8, 0.68);
  color: #fff;
  padding: 13px 14px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(239, 13, 51, 0.3);
  background: rgba(10, 14, 16, 0.8);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--success);
  box-shadow:
    0 0 0 4px var(--success-glow),
    inset 0 2px 6px rgba(0, 0, 0, 0.2);
  background: rgba(3, 6, 8, 0.95);
}
.field small {
  color: var(--muted);
  font-size: 0.78rem;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 22px;
}
.notice {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.notice.success {
  border-color: rgba(73, 210, 142, 0.34);
  background: rgba(73, 210, 142, 0.08);
  color: #b7fbd6;
}
.notice.error {
  border-color: rgba(255, 90, 112, 0.34);
  background: rgba(255, 90, 112, 0.08);
  color: #ffc1ca;
}
.notice.info {
  border-color: rgba(86, 182, 255, 0.32);
  background: rgba(86, 182, 255, 0.08);
  color: #c8ebff;
}
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--raspberry), #ff7b91);
  box-shadow: 0 0 18px rgba(239, 13, 51, 0.55);
}
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.skeleton:after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  animation: shimmer 1.4s infinite;
}
.skeleton-line {
  height: 14px;
  width: 100%;
  margin: 8px 0;
}
.skeleton-line.short {
  width: 48%;
}
.skeleton-box {
  height: 130px;
  width: 100%;
}
.skeleton-card {
  min-height: 220px;
}
.loading-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 9, 0.72);
  backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
}
.loading-mask.active {
  opacity: 1;
  visibility: visible;
}
.loader-orbit {
  width: 58px;
  height: 58px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--raspberry);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 28px rgba(239, 13, 51, 0.32);
}
.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  gap: 10px;
}
.toast {
  min-width: 260px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(12, 16, 18, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: toastIn 0.4s var(--ease);
}
.toast.success {
  border-color: rgba(73, 210, 142, 0.4);
}
.toast.error {
  border-color: rgba(255, 90, 112, 0.4);
}
.footer {
  padding: 22px clamp(22px, 3.2vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
@keyframes authPulse {
  0% {
    box-shadow:
      0 30px 100px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(239, 13, 51, 0.32);
  }
  50% {
    box-shadow:
      0 35px 120px rgba(0, 0, 0, 0.75),
      0 0 0 1px rgba(239, 13, 51, 0.5);
  }
  100% {
    box-shadow:
      0 30px 100px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(239, 13, 51, 0.32);
  }
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(130deg, rgba(7, 10, 12, 0.92), rgba(7, 10, 12, 0.6)),
    url("../user/assets/space_hero_bg.png") center/cover;
}
.auth-card {
  width: min(100%, 470px);
  padding: 34px;
  background: rgba(10, 14, 16, 0.82);
  border-radius: 28px;
  backdrop-filter: blur(22px);
  transform: perspective(1200px) rotateX(2deg);
  animation: authPulse 4s infinite ease-in-out;
}
.auth-logo {
  width: 190px;
  margin: 0 auto 24px;
  display: block;
}
.auth-card h1 {
  text-align: center;
  font-size: 3rem;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.auth-card .sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 26px;
  line-height: 1.5;
}
.auth-foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 20px;
}
.auth-foot a {
  color: var(--raspberry);
  font-weight: 500;
  transition: 0.2s ease;
}
.auth-foot a:hover {
  text-decoration: none;
  text-shadow: 0 0 8px rgba(239, 13, 51, 0.5);
}
.empty {
  text-align: center;
  padding: 48px 22px;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: #fff;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-transform: uppercase;
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kpi strong {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1.2rem;
}
.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.timeline {
  display: grid;
  gap: 0;
}
.timeline-item {
  position: relative;
  padding: 0 0 24px 32px;
  border-left: 1px solid rgba(239, 13, 51, 0.45);
}
.timeline-item:last-child {
  border-left-color: transparent;
}
.timeline-item:before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--raspberry);
  box-shadow: 0 0 14px rgba(239, 13, 51, 0.7);
}
.timeline-item h4 {
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.timeline-item p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sidebar-backdrop {
  display: none;
}
@media (max-width: 1100px) {
  .site-grid {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero h1 {
    font-size: clamp(3rem, 7vw, 6.5rem);
  }
}
@media (max-width: 820px) {
  .site-grid {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: 0.35s var(--ease);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    transform: none;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 19;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
  }
  .sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .topbar {
    padding: 14px 18px;
  }
  .clock {
    display: none;
  }
  .page {
    padding: 22px 18px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero {
    min-height: 520px;
    padding: 28px 22px;
    background-position: 62% center;
  }
  .hero:before {
    background: linear-gradient(
      0deg,
      rgba(17, 21, 23, 0.96),
      rgba(17, 21, 23, 0.25) 75%
    );
  }
  .hero h1 {
    font-size: clamp(3.4rem, 16vw, 6rem);
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .footer {
    padding: 18px;
  }
  .panel {
    padding: 20px;
  }
  .grid-3 > [style*="grid-column: span 2"],
  .grid-3 > [style*="grid-column:span 2"],
  .grid-2 > [style*="grid-column: span 2"],
  .grid-2 > [style*="grid-column:span 2"] {
    grid-column: 1 / -1 !important;
  }
}
@media (max-width: 560px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  [style*="grid-column: span 2"],
  [style*="grid-column:span 2"],
  [style*="grid-column: span 3"],
  [style*="grid-column:span 3"] {
    grid-column: 1 / -1 !important;
  }
  .topbar-title {
    font-size: 1rem;
  }
  .topbar-right .btn {
    display: none;
  }
  .page-head h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.1;
    word-break: break-word;
  }
  .hero {
    min-height: auto;
    padding: 24px 18px;
    border-radius: 20px;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .cta-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .cta-row .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .panel {
    border-radius: 16px;
    padding: 16px 14px;
  }
  .stat-card .count {
    font-size: 2.8rem;
  }
  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .auth-card {
    padding: 26px 20px;
  }
  .auth-card h1 {
    font-size: 2.2rem;
  }
  .footer {
    font-size: 0.74rem;
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}
@media (max-width: 380px) {
  .page {
    padding: 16px 10px;
  }
  .panel {
    padding: 14px 10px;
  }
  .topbar {
    padding: 12px 14px;
  }
  .field input,
  .field select,
  .field textarea {
    padding: 10px 10px;
    font-size: 0.88rem;
  }
}

/* Production 3D depth layer: desktop cards remain readable and mobile remains lightweight. */
.panel,
.hero {
  isolation: isolate;
}
.panel:after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.07),
    transparent 24% 72%,
    rgba(239, 13, 51, 0.08)
  );
  opacity: 0.5;
  mix-blend-mode: screen;
}

/* Bank Style Success Animations */
@keyframes scalePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes fadeInUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes checkmarkDraw {
  0% {
    stroke-dashoffset: 48;
  }
  100% {
    stroke-dashoffset: 0;
  }
}
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.success-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: scalePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.success-icon-wrapper svg {
  width: 40px;
  height: 40px;
  color: #22c55e;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmarkDraw 0.6s ease-out 0.4s forwards;
}
.success-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.2s;
}
.success-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 32px 0;
  line-height: 1.5;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.3s;
}
.success-redirect {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card, rgba(12, 16, 18, 0.94));
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards 0.5s;
}

@media (min-width: 821px) {
  .page {
    perspective: 1500px;
  }
  .hero {
    transform: perspective(1500px) rotateX(0.55deg);
    transform-style: preserve-3d;
  }
  .hero-copy {
    transform: translateZ(24px);
  }
  .panel {
    transform: perspective(1200px) translateZ(0);
    transform-style: preserve-3d;
  }
  .panel:hover {
    transform: perspective(1200px) rotateX(0.8deg) rotateY(-0.8deg)
      translateY(-6px) translateZ(10px);
  }
  .stat-card:after {
    transform: translateZ(18px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .panel,
  .hero,
  .hero-copy {
    transform: none !important;
    transition: none !important;
  }
}

/* Interactive 3D product layer */
:root {
  --pointer-x: 50%;
  --pointer-y: 28%;
  --mag-x: 0px;
  --mag-y: 0px;
}
body.app-shell {
  background-image:
    radial-gradient(
      circle at var(--pointer-x) var(--pointer-y),
      rgba(239, 13, 51, 0.11),
      transparent 24%
    ),
    linear-gradient(120deg, rgba(17, 21, 23, 0.96), rgba(17, 21, 23, 0.72)),
    url("../user/assets/space_hero_bg.png");
  background-position: center, center, center;
  background-size: auto, auto, cover;
  background-attachment: fixed;
}
body.admin-shell {
  background-image:
    radial-gradient(
      circle at var(--pointer-x) var(--pointer-y),
      rgba(239, 13, 51, 0.1),
      transparent 24%
    ),
    linear-gradient(120deg, rgba(17, 21, 23, 0.97), rgba(17, 21, 23, 0.76)),
    url("../admin/assets/space_hero_bg1.png");
}
.scene-orbit {
  position: fixed;
  right: clamp(-150px, 4vw, -40px);
  top: clamp(80px, 18vh, 220px);
  width: clamp(220px, 30vw, 520px);
  height: clamp(220px, 30vw, 520px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.48;
  transform: translate3d(
      calc((var(--pointer-x) - 50%) * -0.08),
      calc((var(--pointer-y) - 50%) * -0.08),
      0
    )
    rotateX(58deg) rotateZ(-12deg);
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}
.scene-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(239, 13, 51, 0.35);
  border-radius: 50%;
  box-shadow:
    0 0 42px rgba(239, 13, 51, 0.12),
    inset 0 0 42px rgba(239, 13, 51, 0.07);
}
.scene-ring-a {
  transform: rotateY(66deg) scaleX(0.68);
}
.scene-ring-b {
  transform: rotateY(-66deg) scaleX(0.68);
}
.scene-ring-c {
  inset: 14%;
  border-color: rgba(255, 255, 255, 0.18);
  transform: rotateX(70deg) scaleY(0.6);
}
.scene-core {
  position: absolute;
  left: 45%;
  top: 45%;
  width: 10%;
  height: 10%;
  border-radius: 50%;
  background: var(--raspberry);
  box-shadow:
    0 0 24px var(--raspberry),
    0 0 70px rgba(239, 13, 51, 0.8);
  transform: translateZ(22px);
}
.scene-gridline {
  position: absolute;
  left: 50%;
  top: -4%;
  width: 1px;
  height: 108%;
  background: linear-gradient(
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform-origin: center;
}
.scene-gridline-a {
  transform: rotate(90deg);
}
.scene-gridline-b {
  transform: rotate(32deg);
  opacity: 0.45;
}
.page-ready .page,
.page-ready .topbar {
  animation: pageIn 0.65s var(--ease) both;
}
.page-leaving .page,
.page-leaving .topbar {
  animation: pageOut 0.22s ease forwards;
}
.reveal-ready {
  opacity: 0;
  transform: translateY(18px) translateZ(0);
  transition:
    opacity 0.55s var(--ease) var(--reveal-delay),
    transform 0.55s var(--ease) var(--reveal-delay);
}
.reveal-ready.is-visible {
  opacity: 1;
  transform: none;
}
.panel.is-tilting {
  transform: perspective(1000px) rotateX(var(--tilt-y)) rotateY(var(--tilt-x))
    translateY(-6px) translateZ(10px);
  border-color: rgba(239, 13, 51, 0.55);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.54);
}
.btn {
  transform: translate3d(var(--mag-x), var(--mag-y), 0);
}
.btn:hover {
  transform: translate3d(var(--mag-x), calc(var(--mag-y) - 3px), 0);
}
.stat-card .count {
  font-variant-numeric: tabular-nums;
}
@keyframes pageOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@media (max-width: 820px) {
  .scene-orbit {
    right: -100px;
    top: 160px;
    opacity: 0.22;
    transform: scale(0.72) rotateX(58deg) rotateZ(-12deg);
  }
  body.app-shell {
    background-attachment: scroll;
  }
  .reveal-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn {
    transform: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-orbit {
    transform: none;
    transition: none;
  }
  .page-ready .page,
  .page-ready .topbar,
  .page-leaving .page,
  .page-leaving .topbar {
    animation: none;
  }
  .reveal-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn {
    transform: none !important;
  }
}

.mission-hero {
  isolation: isolate;
}
.mission-radar {
  position: absolute;
  right: clamp(28px, 7vw, 110px);
  top: 50%;
  width: clamp(200px, 24vw, 340px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  perspective: 1000px;
  transform-style: preserve-3d;
  user-select: none;
  pointer-events: auto;
}
.command-deck {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 230px;
  padding: 28px;
  border: 1px solid rgba(239, 13, 51, 0.28);
  border-radius: 24px;
  background: linear-gradient(
    120deg,
    rgba(239, 13, 51, 0.14),
    rgba(7, 11, 13, 0.82) 42%,
    rgba(17, 21, 23, 0.65)
  );
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  isolation: isolate;
}
.command-deck:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0 42%,
    rgba(255, 255, 255, 0.05) 42.4% 43%,
    transparent 43.4%
  );
  pointer-events: none;
}
.command-orbit {
  position: relative;
  width: 210px;
  height: 210px;
  aspect-ratio: 1;
  margin: auto;
  display: grid;
  place-items: center;
  perspective: 1000px;
  transform-style: preserve-3d;
  user-select: none;
}
.command-orbit-stage,
.mission-radar-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}
.orbit-3d-canvas {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  pointer-events: none;
  z-index: 2;
}
.command-core,
.radar-core {
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  z-index: 4;
  transform: translateZ(26px);
  background: radial-gradient(
    circle at 35% 30%,
    #ff4568 0%,
    var(--raspberry) 50%,
    #6f0012 100%
  );
  box-shadow:
    0 0 35px rgba(239, 13, 51, 0.85),
    0 0 75px rgba(239, 13, 51, 0.4),
    inset -3px -3px 10px rgba(0, 0, 0, 0.6),
    inset 3px 3px 10px rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 140, 160, 0.4);
  transform-style: preserve-3d;
  animation: coreFloat 4s ease-in-out infinite alternate;
}
.command-core:before,
.radar-core:before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(239, 13, 51, 0.35) 0%,
    transparent 70%
  );
  animation: coreHalo 2.6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}
.command-core:after,
.radar-core:after {
  content: "";
  position: absolute;
  top: 6px;
  left: 14px;
  width: 24px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent);
  transform: rotate(-25deg);
  pointer-events: none;
}
.command-core strong,
.radar-core strong {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 800;
  color: #fff;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.7),
    0 0 18px rgba(255, 255, 255, 0.5);
  transform: translateZ(10px);
  letter-spacing: -0.02em;
}
.command-core small,
.radar-core small {
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffd7dd;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  transform: translateZ(10px);
  margin-top: 2px;
}
.radar-core strong {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}
.radar-core {
  width: clamp(80px, 10vw, 100px);
  height: clamp(80px, 10vw, 100px);
}
@keyframes coreFloat {
  0% {
    transform: translateZ(24px) scale(0.98);
  }
  100% {
    transform: translateZ(30px) scale(1.03);
  }
}
@keyframes coreHalo {
  0% {
    transform: scale(0.92);
    opacity: 0.45;
  }
  100% {
    transform: scale(1.28);
    opacity: 0.9;
  }
}
.command-copy h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  margin-bottom: 8px;
}
.command-copy p {
  max-width: 540px;
  color: var(--muted);
  line-height: 1.65;
}
.command-copy .chip-row {
  margin-top: 16px;
}
.command-actions {
  display: grid;
  gap: 10px;
  min-width: 160px;
}
.status-live {
  color: var(--success);
  text-shadow: 0 0 20px rgba(73, 210, 142, 0.65);
}
.course-mission {
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s;
}
.course-mission:hover {
  border-color: rgba(239, 13, 51, 0.5);
}
@media (max-width: 900px) {
  .command-deck {
    grid-template-columns: 180px 1fr;
  }
  .command-actions {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
  }
  .command-actions .btn {
    flex: 1 1 160px;
  }
}
@media (max-width: 820px) {
  .mission-radar {
    right: -30px;
    top: 25%;
    width: 180px;
    opacity: 0.85;
    transform: translateY(-50%);
  }
  .mission-hero .hero-copy {
    position: relative;
    z-index: 2;
  }
  .mission-hero {
    min-height: 560px;
  }
}
@media (max-width: 560px) {
  .command-deck {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .command-orbit {
    width: 180px;
    height: 180px;
  }
  .command-copy .chip-row {
    justify-content: center;
  }
  .command-actions {
    justify-content: center;
  }
  .command-actions .btn {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .command-core,
  .radar-core,
  .command-core:before,
  .radar-core:before {
    animation: none;
  }
}

/* Modal Standardization (c-modal) */
.c-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 9, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.c-modal.active {
  opacity: 1;
  visibility: visible;
}
.c-modal-content {
  background: linear-gradient(
    145deg,
    rgba(24, 31, 35, 0.95),
    rgba(12, 16, 18, 0.95)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
}
.c-modal.active .c-modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.c-modal-title {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 1.55rem;
  margin-bottom: 14px;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.c-modal-body {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
}
.c-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
