:root {
  color-scheme: dark;
  --bg: #05070c;
  --panel: rgba(13, 18, 29, 0.88);
  --panel-strong: rgba(19, 27, 42, 0.96);
  --line: rgba(125, 216, 255, 0.2);
  --line-strong: rgba(125, 216, 255, 0.52);
  --text: #edf8ff;
  --muted: #9bb0c2;
  --cyan: #61e4ff;
  --gold: #ffd166;
  --red: #ff5e7a;
  --green: #66f2a5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(97, 228, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(255, 209, 102, 0.1), transparent 22rem),
    linear-gradient(135deg, #03050a 0%, #0b1020 48%, #05070c 100%);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

button,
input,
select {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 80px 1fr;
  min-height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 12px;
  border-right: 1px solid var(--line);
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(97, 228, 255, 0.12);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-brand-text {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.rail-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(125, 216, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
}

.rail-button.active,
.rail-button:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(97, 228, 255, 0.22);
}

.workspace {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.topbar,
.section-title,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 6vw, 76px);
  line-height: 0.92;
  text-transform: uppercase;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-brand img {
  width: clamp(58px, 8vw, 92px);
  height: clamp(58px, 8vw, 92px);
  border: 1px solid var(--line-strong);
  object-fit: cover;
  box-shadow: 0 0 28px rgba(97, 228, 255, 0.22);
}

.hero-logo-lockup {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.hero-logo-lockup span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-subtitle {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.status-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(7, 13, 23, 0.78);
  color: var(--green);
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

.command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px 330px;
  gap: 18px;
  margin-bottom: 18px;
}

.scanner-panel,
.visual-panel,
.score-panel,
.imei-panel,
.license-panel,
.admin-panel,
.diagnostics,
.report-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel), rgba(6, 9, 16, 0.9));
  box-shadow: var(--shadow);
}

.scanner-panel,
.visual-panel,
.imei-panel,
.license-panel,
.admin-panel,
.diagnostics,
.report-panel {
  padding: 22px;
}

.score-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 380px;
  padding: 22px;
}

.visual-panel {
  display: grid;
  align-content: space-between;
  min-height: 380px;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  border: 1px solid var(--cyan);
  padding: 0 16px;
  cursor: pointer;
}

.primary-button {
  background: var(--cyan);
  color: #041018;
  font-weight: 800;
}

.ghost-button {
  background: rgba(97, 228, 255, 0.06);
  color: var(--cyan);
}

.scan-orb {
  position: relative;
  display: grid;
  place-items: center;
  height: 220px;
  margin: 18px 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(97, 228, 255, 0.12) 50%, transparent 52% 100%),
    repeating-linear-gradient(0deg, rgba(125, 216, 255, 0.04) 0 1px, transparent 1px 18px);
}

.orb-ring,
.orb-core {
  position: absolute;
  border-radius: 50%;
}

.orb-ring {
  border: 1px solid var(--line-strong);
}

.ring-a {
  width: 180px;
  height: 180px;
  animation: spin 8s linear infinite;
}

.ring-b {
  width: 112px;
  height: 112px;
  border-color: rgba(255, 209, 102, 0.7);
  animation: spin 5s linear reverse infinite;
}

.orb-core {
  width: 38px;
  height: 38px;
  background: var(--cyan);
  box-shadow: 0 0 44px var(--cyan);
}

.device-render {
  display: grid;
  place-items: center;
  min-height: 250px;
  margin: 16px 0;
  border: 1px solid rgba(125, 216, 255, 0.14);
  background:
    radial-gradient(circle at 50% 42%, rgba(97, 228, 255, 0.18), transparent 9rem),
    repeating-linear-gradient(90deg, rgba(125, 216, 255, 0.05) 0 1px, transparent 1px 28px),
    rgba(4, 9, 17, 0.72);
}

.device-render.status-good {
  border-color: rgba(102, 242, 165, 0.74);
  box-shadow: inset 0 0 34px rgba(102, 242, 165, 0.12), 0 0 28px rgba(102, 242, 165, 0.16);
}

.device-render.status-pending {
  border-color: rgba(97, 228, 255, 0.74);
  box-shadow: inset 0 0 34px rgba(97, 228, 255, 0.12), 0 0 28px rgba(97, 228, 255, 0.16);
}

.device-render.status-fail {
  border-color: rgba(255, 94, 122, 0.82);
  box-shadow: inset 0 0 34px rgba(255, 94, 122, 0.14), 0 0 30px rgba(255, 94, 122, 0.2);
}

.phone-body {
  position: relative;
  width: 126px;
  height: 226px;
  border: 2px solid rgba(237, 248, 255, 0.82);
  border-radius: 24px;
  background: linear-gradient(145deg, #1b2434, #05070c);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42), inset 0 0 18px rgba(255, 255, 255, 0.06);
}

.status-good .phone-body {
  border-color: var(--green);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42), 0 0 30px rgba(102, 242, 165, 0.22);
}

.status-pending .phone-body {
  border-color: var(--cyan);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42), 0 0 30px rgba(97, 228, 255, 0.22);
}

.status-fail .phone-body {
  border-color: var(--red);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42), 0 0 32px rgba(255, 94, 122, 0.26);
}

.phone-screen {
  position: absolute;
  inset: 11px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(97, 228, 255, 0.18), transparent 40%),
    linear-gradient(180deg, #101827, #05070c);
}

.status-good .phone-screen {
  background:
    linear-gradient(135deg, rgba(102, 242, 165, 0.24), transparent 42%),
    linear-gradient(180deg, #0c2018, #05070c);
}

.status-pending .phone-screen {
  background:
    linear-gradient(135deg, rgba(97, 228, 255, 0.24), transparent 42%),
    linear-gradient(180deg, #101827, #05070c);
}

.status-fail .phone-screen {
  background:
    linear-gradient(135deg, rgba(255, 94, 122, 0.26), transparent 42%),
    linear-gradient(180deg, #241018, #05070c);
}

.camera-stack {
  position: absolute;
  display: grid;
  gap: 11px;
}

.camera-stack span {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(237, 248, 255, 0.72);
  border-radius: 50%;
  background: radial-gradient(circle, #101827 0 35%, #61e4ff 38% 44%, #04070d 48%);
  box-shadow: 0 0 18px rgba(97, 228, 255, 0.18);
}

.device-render.samsung .phone-body {
  border-radius: 22px;
}

.device-render.samsung .camera-stack {
  top: 24px;
  right: -34px;
}

.device-render.pixel .phone-body {
  border-radius: 26px;
}

.device-render.pixel .camera-stack {
  top: 36px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid rgba(237, 248, 255, 0.48);
  border-radius: 18px;
  background: linear-gradient(90deg, #05070c, #243044);
}

.device-render.pixel .camera-stack span:nth-child(3) {
  display: none;
}

.device-render.iphone .phone-body {
  border-radius: 30px;
  background: linear-gradient(145deg, #263244, #080b12);
}

.device-render.iphone .camera-stack {
  top: 22px;
  left: 18px;
  grid-template-columns: repeat(2, 22px);
  gap: 9px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(237, 248, 255, 0.1);
}

.device-render.iphone .camera-stack span:nth-child(3) {
  grid-column: 1 / 2;
  transform: translateX(15px);
}

.device-render.ipad .phone-body,
.device-render.galaxy-tab .phone-body,
.device-render.android-tablet .phone-body {
  width: 214px;
  height: 154px;
  border-radius: 22px;
}

.device-render.ipad .phone-screen,
.device-render.galaxy-tab .phone-screen,
.device-render.android-tablet .phone-screen {
  inset: 13px;
  border-radius: 14px;
}

.device-render.ipad .camera-stack {
  top: 18px;
  left: 18px;
  display: block;
}

.device-render.ipad .camera-stack span {
  display: block;
}

.device-render.ipad .camera-stack span:nth-child(2),
.device-render.ipad .camera-stack span:nth-child(3) {
  display: none;
}

.device-render.galaxy-tab .phone-body {
  background: linear-gradient(145deg, #202a37, #05070c);
}

.device-render.galaxy-tab .camera-stack {
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
}

.device-render.galaxy-tab .camera-stack span:nth-child(3) {
  display: none;
}

.device-render.android-tablet .phone-body {
  border-radius: 18px;
}

.device-render.android-tablet .camera-stack {
  top: 18px;
  right: 20px;
  display: block;
}

.device-render.android-tablet .camera-stack span:nth-child(2),
.device-render.android-tablet .camera-stack span:nth-child(3) {
  display: none;
}

.visual-meta {
  display: grid;
  gap: 10px;
}

.visual-meta p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(125, 216, 255, 0.22);
  background: rgba(3, 7, 14, 0.78);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--cyan);
}

.score-ring {
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: 210px;
  height: 210px;
  margin: 12px auto 20px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background:
    radial-gradient(circle, rgba(97, 228, 255, 0.18), transparent 62%),
    conic-gradient(var(--cyan) 0deg, var(--cyan) 310deg, rgba(255, 255, 255, 0.08) 310deg);
  box-shadow: inset 0 0 28px rgba(97, 228, 255, 0.22), 0 0 36px rgba(97, 228, 255, 0.24);
}

.score-ring span {
  align-self: center;
  font-size: 70px;
  font-weight: 900;
}

.score-ring small {
  align-self: center;
  color: var(--muted);
}

.score-panel h2,
.score-panel p {
  text-align: center;
}

.score-panel p {
  color: var(--muted);
}

.checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.imei-panel {
  margin-bottom: 18px;
}

.license-panel {
  margin-bottom: 18px;
}

.admin-panel {
  margin-bottom: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.admin-login-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.admin-auth-status {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, 0.34);
  background: rgba(4, 9, 17, 0.58);
  color: var(--gold);
}

.admin-auth-status.active {
  border-color: rgba(102, 242, 165, 0.5);
  color: var(--green);
}

.generated-license {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(102, 242, 165, 0.34);
  background:
    linear-gradient(90deg, rgba(102, 242, 165, 0.08), transparent),
    rgba(4, 9, 17, 0.72);
  color: var(--green);
  line-height: 1.45;
}

.license-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.license-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--text);
}

.license-table th,
.license-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(125, 216, 255, 0.12);
  text-align: left;
}

.license-table th {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
}

.license-table td {
  color: var(--muted);
}

.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(125, 216, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(97, 228, 255, 0.1), transparent),
    rgba(4, 9, 17, 0.72);
}

.trial-banner strong {
  display: block;
  margin-top: 4px;
}

.trial-banner.expired {
  border-color: rgba(255, 94, 122, 0.72);
  background:
    linear-gradient(90deg, rgba(255, 94, 122, 0.12), transparent),
    rgba(4, 9, 17, 0.72);
}

.trial-banner.active {
  border-color: rgba(102, 242, 165, 0.72);
  background:
    linear-gradient(90deg, rgba(102, 242, 165, 0.1), transparent),
    rgba(4, 9, 17, 0.72);
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.plan-card {
  display: grid;
  gap: 12px;
  min-height: 236px;
  padding: 16px;
  border: 1px solid rgba(125, 216, 255, 0.16);
  background: rgba(4, 9, 17, 0.72);
}

.plan-card.featured {
  border-color: rgba(255, 209, 102, 0.72);
  box-shadow: 0 0 28px rgba(255, 209, 102, 0.12);
}

.plan-kicker {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 0;
  font-size: 18px;
}

.plan-card p {
  color: var(--muted);
  line-height: 1.45;
}

.plan-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.price {
  margin-bottom: 0;
  color: var(--text) !important;
  font-size: 34px;
  font-weight: 900;
}

.price span {
  color: var(--muted);
  font-size: 14px;
}

.activation-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.license-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--green);
}

.email-receipt {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(125, 216, 255, 0.14);
  background: rgba(4, 9, 17, 0.58);
  color: var(--muted);
  line-height: 1.45;
}

.email-receipt a {
  color: var(--cyan);
  font-weight: 800;
}

.email-receipt.sent {
  border-color: rgba(102, 242, 165, 0.5);
  color: var(--green);
}

.imei-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.imei-result {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.intel-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(125, 216, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(97, 228, 255, 0.08), transparent),
    rgba(4, 9, 17, 0.72);
}

.intel-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.intel-card strong {
  color: var(--text);
  font-size: 20px;
}

.check {
  display: grid;
  gap: 12px;
  min-height: 154px;
  padding: 16px;
  border: 1px solid rgba(125, 216, 255, 0.16);
  background: rgba(4, 9, 17, 0.72);
}

.check-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.check h3 {
  margin: 0;
  font-size: 16px;
}

.chip {
  align-self: start;
  min-width: 72px;
  padding: 5px 8px;
  border: 1px solid currentColor;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.pass {
  color: var(--green);
}

.review {
  color: var(--gold);
}

.fail {
  color: var(--red);
}

.check p,
.report-body {
  color: var(--muted);
  line-height: 1.5;
}

.check-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.check-actions button {
  min-height: 34px;
  border: 1px solid rgba(125, 216, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.report-panel {
  margin-top: 18px;
}

.report-body {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(125, 216, 255, 0.1);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: row;
    justify-content: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .command-grid,
  .checks,
  .license-grid,
  .activation-box,
  .admin-grid,
  .admin-login-box,
  .imei-grid,
  .imei-result {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .workspace {
    padding: 18px;
  }

  .topbar,
  .section-title,
  .panel-heading,
  .trial-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-brand {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rail-button {
    width: 42px;
    height: 42px;
  }
}

@media print {
  #starfield,
  .rail,
  .topbar,
  .scanner-panel,
  .diagnostics,
  .score-panel button,
  .ghost-button {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .shell,
  .workspace,
  .command-grid {
    display: block;
    padding: 0;
  }

  .report-panel {
    border: 0;
    box-shadow: none;
    color: #000;
  }
}
