* { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #060a14;
  --panel: rgba(15, 23, 42, .82);
  --panel-strong: #111a2e;
  --border: rgba(255, 255, 255, .11);
  --text: #f7f9ff;
  --muted: #aab5d2;
  --cyan: #72e7ff;
  --purple: #a78bfa;
  --green: #48d7a1;
  --yellow: #f8c75c;
  --red: #fb7185;
  --shadow: 0 22px 70px rgba(0, 0, 0, .35);
}

html { color-scheme: dark; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  isolation: isolate;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(114, 231, 255, .13), transparent 28%),
    radial-gradient(circle at 90% 8%, rgba(167, 139, 250, .16), transparent 25%),
    linear-gradient(180deg, #060a14 0%, #0a1020 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: repeat;
}

body::before {
  background-image:
    radial-gradient(2px 2px at 34px 42px, rgba(255,255,255,.78), transparent),
    radial-gradient(1.5px 1.5px at 118px 168px, rgba(114,231,255,.62), transparent),
    radial-gradient(1.5px 1.5px at 246px 76px, rgba(255,255,255,.58), transparent),
    radial-gradient(2px 2px at 374px 252px, rgba(167,139,250,.52), transparent),
    radial-gradient(1.5px 1.5px at 512px 136px, rgba(255,255,255,.68), transparent),
    radial-gradient(1.5px 1.5px at 648px 318px, rgba(114,231,255,.52), transparent),
    radial-gradient(2px 2px at 756px 84px, rgba(255,255,255,.62), transparent);
  background-size: 820px 390px;
  opacity: .38;
}

body::after {
  background-image:
    radial-gradient(1.5px 1.5px at 72px 214px, rgba(255,255,255,.55), transparent),
    radial-gradient(2px 2px at 284px 44px, rgba(114,231,255,.48), transparent),
    radial-gradient(1.5px 1.5px at 456px 286px, rgba(255,255,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 692px 154px, rgba(167,139,250,.5), transparent),
    radial-gradient(2px 2px at 928px 346px, rgba(255,255,255,.44), transparent);
  background-size: 1040px 470px;
  opacity: .22;
}

a { color: var(--cyan); }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(114, 231, 255, .72);
  outline-offset: 3px;
}

.portal-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.portal-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.portal-brand { display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.portal-logo {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  flex: 0 0 auto; color: transparent; font-size: 0; line-height: 1; margin-top: 0;
  background: url("favicon.svg?v=orbit-s-1") center / cover no-repeat;
  box-shadow: 0 0 30px rgba(114, 231, 255, .18);
}
.portal-brand strong { display: block; font-size: 17px; }
.portal-brand > span:not(.portal-logo) > span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.header-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.header-links a { color: #dfe7fa; text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.header-links a:hover { background: rgba(255,255,255,.06); }

.shooting-star {
  --shoot-x: 540px;
  --shoot-y: 250px;
  --shoot-angle: 25deg;
  --shoot-duration: 1.8s;
  --star-opacity: .92;
  position: fixed;
  width: 2px;
  height: 2px;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255,255,255,.9), 0 0 14px #6ee7ff;
  animation: shootStar var(--shoot-duration) cubic-bezier(.22,.62,.35,1) forwards;
}

.shooting-star::before,
.shooting-star::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 2px;
  transform: translateX(-4px);
  transform-origin: right center;
}

.shooting-star::before {
  width: 54px;
  filter: blur(2px);
  background: linear-gradient(90deg, transparent, rgba(114,231,255,.28));
}

.shooting-star::after {
  width: 140px;
  background: linear-gradient(90deg, transparent 0%, rgba(114,231,255,.08) 36%, rgba(210,249,255,.74) 100%);
}

@keyframes shootStar {
  0% { transform: translate(0, 0) rotate(var(--shoot-angle)); opacity: 0; }
  10% { opacity: var(--star-opacity); }
  72% { opacity: var(--star-opacity); }
  100% { transform: translate(var(--shoot-x), var(--shoot-y)) rotate(var(--shoot-angle)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .shooting-star { display: none; }
}

.auth-layout { min-height: calc(100vh - 84px); display: grid; place-items: center; padding: 46px 0 70px; }
.auth-grid { width: min(980px, 100%); display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: stretch; }
.welcome-panel, .form-panel, .portal-card {
  border: 1px solid var(--border); background: var(--panel); border-radius: 26px; box-shadow: var(--shadow);
}
.welcome-panel { padding: 42px; display: flex; flex-direction: column; justify-content: space-between; min-height: 520px; }
.welcome-panel h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.02; margin: 18px 0; letter-spacing: -.04em; }
.welcome-panel p { color: var(--muted); line-height: 1.75; margin: 0; }
.form-panel { padding: 34px; }
.form-panel h1, .form-panel h2 { margin: 0 0 8px; }
.form-panel > p { color: var(--muted); margin: 0 0 26px; line-height: 1.6; }

.eyebrow {
  display: inline-flex; width: fit-content; padding: 8px 11px; border-radius: 999px;
  color: #c9f8ff; border: 1px solid rgba(114,231,255,.22); background: rgba(114,231,255,.08);
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.trust-list { display: grid; gap: 12px; margin-top: 32px; }
.trust-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: #dbe5fb; line-height: 1.5; font-size: 14px; }
.trust-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #072018; background: var(--green); font-weight: 900; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #dce6fb; font-size: 13px; font-weight: 750; }
.field input, .field select, .field textarea {
  width: 100%; color: white; border: 1px solid rgba(255,255,255,.13); border-radius: 13px;
  background: rgba(255,255,255,.055); padding: 13px 14px; outline: none;
}
.field textarea { min-height: 118px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(114,231,255,.1);
}
.field small { color: var(--muted); line-height: 1.45; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: #cad5ec; font-size: 13px; line-height: 1.55; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cyan); flex: 0 0 auto; }

.btn {
  min-height: 46px; border: 0; border-radius: 13px; padding: 12px 18px; cursor: pointer;
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; font-weight: 800;
}
.btn-primary { color: #07111c; background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.btn-secondary { color: white; background: rgba(255,255,255,.07); border: 1px solid var(--border); }
.btn-danger { color: #ffe5ea; background: rgba(251,113,133,.12); border: 1px solid rgba(251,113,133,.28); }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn-block { width: 100%; }

.status-box { display: none; margin-top: 16px; padding: 13px 14px; border-radius: 12px; line-height: 1.55; font-size: 14px; }
.status-box.show { display: block; }
.status-box.error { color: #ffe2e8; background: rgba(251,113,133,.11); border: 1px solid rgba(251,113,133,.28); }
.status-box.success { color: #dffdf2; background: rgba(72,215,161,.1); border: 1px solid rgba(72,215,161,.26); }
.status-box.info { color: #dffaff; background: rgba(114,231,255,.08); border: 1px solid rgba(114,231,255,.2); }
.email-verification-card {
  margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border-color: rgba(248,199,92,.3); background: rgba(248,199,92,.07);
}
.email-verification-card strong { display: block; margin-bottom: 5px; }
.email-verification-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.form-foot { color: var(--muted); text-align: center; margin: 20px 0 0; font-size: 14px; }

.checkout-main { padding: 48px 0 80px; }
.checkout-hero { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.checkout-hero h1 { margin: 15px 0 12px; font-size: clamp(36px, 6vw, 58px); letter-spacing: -.04em; }
.checkout-hero p { margin: 0; color: var(--muted); line-height: 1.7; }
.stepbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0; }
.step { border: 1px solid var(--border); border-radius: 14px; padding: 13px; color: var(--muted); background: rgba(255,255,255,.035); text-align: center; font-size: 13px; }
.step strong { color: white; margin-right: 5px; }
.checkout-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 22px; align-items: start; }
.summary-card { position: sticky; top: 20px; padding: 26px; }
.summary-card h2 { margin: 0 0 18px; }
.plan-options { display: grid; gap: 10px; }
.plan-option { position: relative; }
.plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.plan-option label { display: block; padding: 15px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; background: rgba(255,255,255,.035); }
.plan-option input:checked + label { border-color: var(--cyan); background: rgba(114,231,255,.08); box-shadow: 0 0 0 2px rgba(114,231,255,.08); }
.plan-line { display: flex; justify-content: space-between; gap: 10px; }
.plan-line strong { color: white; }
.plan-line span, .plan-option small { color: var(--muted); }
.billing-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px; border: 1px solid var(--border); border-radius: 14px; margin: 16px 0; background: rgba(255,255,255,.03); }
.billing-switch button { border: 0; border-radius: 10px; padding: 10px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 750; }
.billing-switch button.active { color: #07111c; background: var(--cyan); }
.summary-note { color: var(--muted); line-height: 1.6; font-size: 13px; margin: 18px 0 0; }
.checkout-form { padding: 30px; }
.checkout-section + .checkout-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.section-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(114,231,255,.1); color: var(--cyan); font-weight: 900; }
.section-heading h2 { margin: 0; font-size: 19px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.hidden { display: none !important; }

.dashboard-body { padding: 32px 0 70px; }
.dashboard-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 26px; }
.dashboard-top h1 { margin: 8px 0 5px; font-size: clamp(30px, 5vw, 46px); letter-spacing: -.03em; }
.dashboard-top p { margin: 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.portal-card { padding: 24px; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }
.card-label { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 11px; font-weight: 850; }
.metric { font-size: 34px; font-weight: 850; margin: 9px 0 5px; }
.metric-sub { color: var(--muted); font-size: 13px; line-height: 1.5; }
.card-head { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; margin-bottom: 18px; }
.card-head h2 { margin: 0; font-size: 20px; }
.card-head p { color: var(--muted); margin: 5px 0 0; font-size: 13px; line-height: 1.5; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 850; text-transform: capitalize; }
.badge.green { color: #dffdf2; background: rgba(72,215,161,.12); border: 1px solid rgba(72,215,161,.25); }
.badge.yellow { color: #fff4ce; background: rgba(248,199,92,.12); border: 1px solid rgba(248,199,92,.25); }
.badge.red { color: #ffe2e8; background: rgba(251,113,133,.12); border: 1px solid rgba(251,113,133,.25); }
.usage-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.usage-summary strong { font-size: 26px; }
.usage-summary span { color: var(--muted); }
.progress { height: 12px; margin: 16px 0 12px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress > div { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--purple)); transition: width .4s ease; }
.usage-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.usage-breakdown div { padding: 11px; border-radius: 12px; background: rgba(255,255,255,.035); }
.usage-breakdown strong, .usage-breakdown span { display: block; }
.usage-breakdown span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.topup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.topup { padding: 16px; border-radius: 15px; border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.topup strong, .topup span { display: block; }
.topup strong { font-size: 18px; }
.topup span { color: var(--muted); margin: 5px 0 13px; font-size: 13px; }
.topup .btn { width: 100%; min-height: 40px; padding: 9px; font-size: 13px; }
.notice-list { display: grid; gap: 10px; }
.notice { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.notice.unread { border-color: rgba(114,231,255,.26); background: rgba(114,231,255,.05); }
.notice strong { display: block; margin-bottom: 4px; }
.notice p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.notice time { display: block; color: #7f8ba9; font-size: 11px; margin-top: 8px; }
.empty-state { color: var(--muted); padding: 18px 0; line-height: 1.6; }
.code-value { display: flex; gap: 8px; margin-top: 12px; }
.code-value code { flex: 1; overflow: auto; padding: 12px; border: 1px solid var(--border); background: rgba(0,0,0,.2); border-radius: 11px; color: #dffaff; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-box { padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.025); }
.settings-box h3 { margin: 0 0 15px; }
.inquiry-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.inquiry-details div { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.035); }
.inquiry-details span, .inquiry-details strong { display: block; }
.inquiry-details span { color: var(--muted); font-size: 11px; margin-bottom: 4px; }

.admin-list { display: grid; gap: 14px; }
.admin-inquiry { padding: 20px; border: 1px solid var(--border); border-radius: 17px; background: rgba(255,255,255,.035); }
.admin-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.admin-meta div { padding: 10px; border-radius: 10px; background: rgba(0,0,0,.16); }
.admin-meta span, .admin-meta strong { display: block; }
.admin-meta span { color: var(--muted); font-size: 10px; margin-bottom: 4px; }

@media (max-width: 900px) {
  .auth-grid, .checkout-grid { grid-template-columns: 1fr; }
  .welcome-panel { min-height: auto; }
  .summary-card { position: static; }
  .span-4, .span-5, .span-7, .span-8 { grid-column: 1 / -1; }
  .topup-grid { grid-template-columns: 1fr; }
  .admin-meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .portal-shell { width: min(100% - 22px, 1180px); }
  .portal-header { align-items: flex-start; padding: 16px 0; }
  .header-links { justify-content: flex-end; }
  .header-links a:not(.keep-mobile) { display: none; }
  .auth-layout, .checkout-main { padding-top: 26px; }
  .welcome-panel, .form-panel, .checkout-form, .portal-card { padding: 20px; border-radius: 20px; }
  .welcome-panel h1 { font-size: 38px; }
  .field-grid, .settings-grid, .usage-breakdown, .inquiry-details { grid-template-columns: 1fr; }
  .stepbar { grid-template-columns: 1fr; }
  .dashboard-top { align-items: flex-start; flex-direction: column; }
  .email-verification-card { align-items: stretch; flex-direction: column; }
  .dashboard-grid { display: block; }
  .dashboard-grid > * + * { margin-top: 14px; }
  .admin-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
