@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Thai:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg: #06000f;
  --bg-deep: #020006;
  --panel: rgba(27, 10, 52, 0.06);
  --panel-strong: rgba(17, 6, 36, 0.18);
  --panel-soft: rgba(255, 255, 255, 0.035);
  --card-panel: rgba(255, 255, 255, 0.012);
  --ink: #f7f1ff;
  --muted: #c5b4de;
  --muted-2: #8f7cac;
  --line: rgba(226, 205, 255, 0.18);
  --line-strong: rgba(245, 231, 255, 0.46);
  --accent: #b36dff;
  --accent-2: #7657ff;
  --accent-3: #e9c7ff;
  --danger: #ff6b91;
  --success: #6dffc2;
  --warning: #ffe39a;
  --shadow: 0 24px 70px rgba(4, 0, 18, 0.24);
  --glow: 0 0 36px rgba(179, 109, 255, 0.28);
  --radius: 28px;
  --radius-sm: 16px;
  --blur: blur(18px) saturate(150%);
  --card-blur: blur(6px) saturate(160%);
  --dropdown-blur: blur(18px) saturate(175%);
  --spring: cubic-bezier(0.2, 1, 0.2, 1);
  --spring-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --starfield-sky: radial-gradient(ellipse at bottom, #432173 0%, #1b1237 48%, #090a0f 100%);
  --starfield-dots:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 109, 194, 0.86) 0 1.2px, transparent 2px),
    radial-gradient(circle, rgba(111, 236, 255, 0.76) 0 1px, transparent 1.9px),
    radial-gradient(circle, rgba(255, 227, 154, 0.8) 0 1.35px, transparent 2.15px),
    radial-gradient(circle, rgba(138, 255, 209, 0.76) 0 1px, transparent 1.95px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

body {
  margin: 0;
  background: var(--starfield-sky);
  color: var(--ink);
  font-family: "Inter", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Arial, Helvetica, sans-serif;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

body::before {
  background-image: var(--starfield-dots);
  background-position: 12px 26px, 73px 41px, 35px 91px, 119px 12px, 166px 74px;
  background-size: 97px 97px, 131px 131px, 173px 173px, 223px 223px, 287px 287px;
  content: "";
  filter: drop-shadow(0 0 6px rgba(196, 142, 255, 0.38));
  inset: 0;
  opacity: 0.92;
  position: fixed;
  transform: scale(1.04);
  transform-origin: center;
  z-index: -2;
}

body::after {
  background:
    radial-gradient(ellipse 82% 34% at 12% 86%, rgba(109, 255, 194, 0.3), transparent 62%),
    radial-gradient(ellipse 78% 30% at 82% 16%, rgba(255, 109, 194, 0.22), transparent 64%),
    radial-gradient(ellipse 110% 44% at 50% 62%, rgba(179, 109, 255, 0.36), transparent 66%),
    radial-gradient(ellipse 70% 24% at 18% 22%, rgba(111, 236, 255, 0.16), transparent 60%),
    linear-gradient(120deg, rgba(3, 0, 12, 0.14), transparent 42%, rgba(3, 0, 12, 0.1));
  background-position: 0% 70%, 100% 18%, 50% 58%, 18% 22%, center;
  background-size: 122% 118%, 130% 116%, 138% 130%, 128% 116%, 100% 100%;
  content: "";
  filter: blur(22px) saturate(190%);
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.94;
  pointer-events: none;
  position: fixed;
  will-change: background-position;
  z-index: -1;
}

body.is-transitioning {
  cursor: progress;
}

body.has-admin-modal {
  overflow: hidden;
}

.page-loader {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(6, 0, 15, 0.5), rgba(2, 0, 6, 0.68)),
    var(--starfield-sky);
  color: var(--ink);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 360ms ease, visibility 360ms ease;
  visibility: hidden;
  z-index: 1000;
}

.page-loader::before {
  background-image:
    var(--starfield-dots),
    var(--starfield-sky);
  background-position: 12px 26px, 73px 41px, 35px 91px, 119px 12px, 166px 74px, center;
  background-size: 97px 97px, 131px 131px, 173px 173px, 223px 223px, 287px 287px, cover;
  content: "";
  filter: blur(12px) saturate(128%);
  inset: -34px;
  opacity: 0.82;
  position: absolute;
  transform: scale(1.03);
}

.page-loader::after {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(10, 3, 26, 0.34), rgba(2, 0, 8, 0.72));
  content: "";
  inset: 0;
  position: absolute;
}

.page-loader.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.page-loader-panel {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.055) 48%, rgba(161, 121, 255, 0.09)),
    rgba(20, 10, 42, 0.38);
  -webkit-backdrop-filter: blur(34px) saturate(185%);
  backdrop-filter: blur(34px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 34px;
  box-shadow:
    0 34px 110px rgba(2, 0, 10, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -18px 48px rgba(118, 87, 255, 0.1);
  display: flex;
  flex-direction: column;
  min-width: min(280px, calc(100vw - 48px));
  padding: 34px;
  position: relative;
  z-index: 1;
}

.page-loader-panel p {
  color: var(--accent-3);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.lang-en {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button {
  --button-lift: 0px;
  --drag-x: 0px;
  --drag-y: 0px;
  --press-scale: 1;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 40px rgba(100, 48, 210, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  min-height: 46px;
  outline: none;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
  transform: translateY(var(--button-lift)) scale(var(--press-scale));
  translate: var(--drag-x) var(--drag-y);
  transition: translate 420ms var(--spring), transform 420ms var(--spring), box-shadow 260ms ease, border-color 260ms ease, background 260ms ease;
}

button::before {
  background:
    radial-gradient(
      180px 120px at var(--shine-x, 50%) var(--shine-y, 50%),
      rgba(255, 255, 255, 0.42) 0%,
      rgba(240, 220, 255, 0.24) 24%,
      rgba(179, 109, 255, 0.12) 52%,
      transparent 82%
    );
  content: "";
  filter: blur(8px);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translate3d(calc((var(--shine-x, 50%) - 50%) * 0.025), calc((var(--shine-y, 50%) - 50%) * 0.018), 0);
  transition: opacity 220ms ease;
}

button > * {
  position: relative;
}

button:focus-visible {
  box-shadow: 0 0 0 4px rgba(179, 109, 255, 0.2), 0 20px 54px rgba(156, 86, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

button:hover {
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow: 0 20px 54px rgba(156, 86, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.56);
  --button-lift: -1px;
}

button:hover::before,
button.is-hovering::before,
button.is-pressing::before {
  opacity: 0.72;
}

button:active {
  --button-lift: 1px;
  --press-scale: 0.985;
}

.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #ff6b91, #b83cff);
}

.customer-page,
.admin-login,
.loading-page,
.admin-page {
  background: var(--starfield-sky);
  min-height: 100vh;
}

.access-shell,
.loader-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
}

.access-panel,
.loader-card,
.modal-panel,
.admin-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006) 46%, rgba(255, 255, 255, 0.014)),
    var(--card-panel);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  contain: paint;
  isolation: isolate;
  position: relative;
  transform-style: preserve-3d;
}

.access-panel::before,
.loader-card::before,
.modal-panel::before,
.admin-card::before {
  content: "";
  display: none;
  pointer-events: none;
  position: absolute;
}

.access-panel::after,
.loader-card::after,
.modal-panel::after,
.admin-card::after {
  background:
    radial-gradient(
      520px 360px at var(--shine-x, 50%) var(--shine-y, 50%),
      rgba(255, 255, 255, 0.28) 0%,
      rgba(244, 225, 255, 0.2) 18%,
      rgba(190, 132, 255, 0.11) 43%,
      rgba(126, 88, 255, 0.045) 68%,
      transparent 100%
    ),
    radial-gradient(
      760px 480px at calc(var(--shine-x, 50%) + 10%) calc(var(--shine-y, 50%) - 8%),
      rgba(255, 255, 255, 0.08) 0%,
      rgba(220, 190, 255, 0.04) 42%,
      transparent 82%
    );
  filter: blur(18px);
  border-radius: inherit;
  content: "";
  inset: 0;
  mix-blend-mode: screen;
  opacity: var(--shine-opacity, 0);
  pointer-events: none;
  position: absolute;
  transform: translate3d(calc((var(--shine-x, 50%) - 50%) * 0.025), calc((var(--shine-y, 50%) - 50%) * 0.018), 0);
  transition: opacity 260ms ease, transform 260ms ease;
  z-index: 0;
}

.access-panel > *,
.loader-card > *,
.modal-panel > *,
.admin-card > * {
  position: relative;
  z-index: 1;
}

.liquid-reactive {
  --drag-x: 0px;
  --drag-y: 0px;
  --lift-y: 0px;
  --press-scale: 1;
  --shine-x: 50%;
  --shine-y: 35%;
  --shine-opacity: 0;
  transform: translateY(var(--lift-y)) scale(var(--press-scale));
  translate: var(--drag-x) var(--drag-y);
  transition: translate 360ms var(--spring), transform 360ms var(--spring), box-shadow 260ms ease, border-color 260ms ease;
  will-change: translate, transform;
  -webkit-user-drag: none;
}

@supports not (translate: 0 0) {
  button {
    transform: translate(var(--drag-x), var(--drag-y)) translateY(var(--button-lift)) scale(var(--press-scale));
  }

  .liquid-reactive {
    transform: translate(var(--drag-x), var(--drag-y)) translateY(var(--lift-y)) scale(var(--press-scale));
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .alert,
  .page-loader-panel,
  .custom-select-menu,
  .modal-backdrop,
  .admin-modal-backdrop,
  .admin-header {
    background-color: rgba(17, 6, 36, 0.86);
  }
}

.access-panel.liquid-reactive,
.loader-card.liquid-reactive,
.modal-panel.liquid-reactive,
.admin-card.liquid-reactive {
  cursor: grab;
  touch-action: none;
}

.liquid-reactive.is-dragging {
  cursor: grabbing;
  transition: box-shadow 260ms ease, border-color 260ms ease;
}

.liquid-reactive.is-hovering {
  --shine-opacity: 0.7;
  border-color: rgba(245, 231, 255, 0.38);
  box-shadow: var(--shadow), 0 0 46px rgba(179, 109, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.liquid-reactive.is-pressing {
  --shine-opacity: 0.84;
  --press-scale: 0.996;
}

.access-panel.liquid-reactive.is-hovering,
.loader-card.liquid-reactive.is-hovering,
.modal-panel.liquid-reactive.is-hovering,
.admin-card.liquid-reactive.is-hovering {
  --lift-y: -2px;
}

.access-panel {
  animation: panelIn 720ms var(--spring-soft) both;
  max-width: 470px;
  overflow: hidden;
  padding: 38px;
  width: 100%;
}

.access-panel.compact {
  max-width: 390px;
}

.customer-card {
  text-align: center;
}

.customer-card > p {
  margin-left: auto;
  margin-right: auto;
  max-width: 34rem;
}

.customer-card .access-form {
  text-align: left;
}

.customer-card .small-note {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.brand-mark {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.05)),
    rgba(108, 62, 212, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--glow);
  color: #fff;
  display: flex;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.brand-mark.mini {
  border-radius: 12px;
  display: inline-flex;
  font-size: 12px;
  height: 34px;
  margin-right: 10px;
  vertical-align: middle;
  width: 34px;
}

h1 {
  color: var(--ink);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 850;
  line-height: 1.08;
  margin: 20px 0 10px;
}

p {
  color: var(--muted);
  line-height: 1.62;
  font-weight: 500;
}

.access-form,
.stack-form {
  display: grid;
  gap: 14px;
}

.access-form {
  margin-top: 22px;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

label:has(select) {
  position: relative;
}

label:has(select:not(.native-select))::after {
  border-bottom: 2px solid rgba(255, 255, 255, 0.78);
  border-right: 2px solid rgba(255, 255, 255, 0.78);
  bottom: 20px;
  content: "";
  height: 8px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  transform: rotate(45deg);
  transition: transform 420ms var(--spring), border-color 260ms ease, opacity 260ms ease;
  width: 8px;
}

label:has(select:not(.native-select):focus)::after {
  border-color: #fff;
  opacity: 1;
  transform: rotate(45deg) translate(2px, 2px);
}

input,
select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(7, 2, 22, 0.48);
  border: 1px solid rgba(238, 220, 255, 0.25);
  border-radius: 16px;
  color: var(--ink);
  min-height: 48px;
  outline: none;
  padding: 0 14px;
  transition: border-color 320ms var(--spring-soft), box-shadow 320ms var(--spring-soft), background 320ms var(--spring-soft), transform 420ms var(--spring);
  width: 100%;
}

input,
select,
textarea,
td,
.latest-code,
.previous-item,
.mono {
  cursor: auto;
  user-select: text;
}

select {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(7, 2, 22, 0.48);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border-color: rgba(238, 220, 255, 0.3);
  color-scheme: dark;
  cursor: pointer;
  padding-right: 48px;
}

select::-ms-expand {
  display: none;
}

select option {
  background: #130722;
  color: var(--ink);
}

.native-select {
  block-size: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  inline-size: 1px;
  margin: -1px;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}

.custom-select {
  position: relative;
  width: 100%;
  z-index: 2;
}

.custom-select-trigger {
  align-items: center;
  background:
    radial-gradient(180px 120px at 18% 0%, rgba(255, 255, 255, 0.095), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.016)),
    rgba(255, 255, 255, 0.018);
  -webkit-backdrop-filter: var(--dropdown-blur);
  backdrop-filter: var(--dropdown-blur);
  border: 1px solid rgba(238, 220, 255, 0.28);
  border-radius: 16px;
  box-shadow:
    0 12px 30px rgba(4, 0, 18, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: var(--ink);
  display: flex;
  font-weight: 750;
  justify-content: flex-start;
  min-height: 50px;
  padding: 0 48px 0 15px;
  text-align: left;
  width: 100%;
}

.custom-select-trigger::after {
  border-bottom: 2px solid rgba(255, 255, 255, 0.82);
  border-right: 2px solid rgba(255, 255, 255, 0.82);
  content: "";
  height: 8px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-62%) rotate(45deg);
  transition: transform 360ms var(--spring), border-color 220ms ease;
  width: 8px;
}

.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus-visible {
  background:
    radial-gradient(220px 140px at 18% 0%, rgba(255, 255, 255, 0.14), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.024)),
    rgba(255, 255, 255, 0.032);
  border-color: rgba(231, 202, 255, 0.7);
  box-shadow:
    0 0 0 4px rgba(179, 109, 255, 0.12),
    0 18px 42px rgba(67, 28, 145, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.custom-select.is-open .custom-select-trigger::after {
  border-color: #fff;
  transform: translateY(-28%) rotate(225deg);
}

.custom-select-menu {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.018);
  -webkit-backdrop-filter: var(--dropdown-blur);
  backdrop-filter: var(--dropdown-blur);
  border: 1px solid rgba(238, 220, 255, 0.24);
  border-radius: 16px;
  box-shadow:
    0 22px 54px rgba(3, 0, 14, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 5px;
  left: 0;
  margin-top: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 7px;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 30;
}

.custom-select-menu[hidden] {
  display: none;
}

.custom-select-option {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
  color: rgba(247, 241, 255, 0.88);
  font-weight: 750;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
  width: 100%;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.custom-select-option[aria-selected="true"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(179, 109, 255, 0.07)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(233, 199, 255, 0.38);
  color: #fff;
}

.app-logo {
  align-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.42), transparent 36%),
    linear-gradient(145deg, #8c5cff, #2a0e56);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(8, 0, 25, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  line-height: 1;
  text-transform: uppercase;
  width: 34px;
}

.app-logo--netflix {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.36), transparent 34%),
    linear-gradient(145deg, #ff3358, #7c0618 72%);
}

.app-logo--chatgpt {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(145deg, #31e6b4, #205f74 72%);
}

.app-logo-img {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: block;
  object-fit: cover;
  object-position: center;
  padding: 0;
}

.selected-app-preview .app-logo {
  height: 40px;
  width: 40px;
}

.logo-change-button {
  background: transparent;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  flex: 0 0 auto;
  min-height: 52px;
  overflow: hidden;
  padding: 0;
  width: 52px;
}

.logo-change-button::before {
  display: none;
}

.logo-change-button .app-logo {
  border-radius: 16px;
  height: 52px;
  width: 52px;
}

.logo-change-button:hover,
.logo-change-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(179, 109, 255, 0.16), 0 16px 32px rgba(8, 0, 25, 0.26);
  outline: none;
  transform: translateY(-1px) scale(1.02);
}

.selected-app-preview {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.032)),
    rgba(7, 2, 22, 0.38);
  border: 1px solid rgba(238, 220, 255, 0.2);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  margin-top: -2px;
  min-height: 62px;
  padding: 10px 12px;
}

.selected-app-preview strong,
.selected-app-preview small {
  display: block;
  line-height: 1.25;
}

.selected-app-preview strong {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.selected-app-preview small {
  color: var(--muted-2);
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input::placeholder {
  color: rgba(220, 203, 240, 0.48);
}

input:focus,
select:focus {
  background: rgba(14, 5, 34, 0.66);
  border-color: rgba(231, 202, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(179, 109, 255, 0.16), 0 0 34px rgba(179, 109, 255, 0.18);
  transform: translateY(-1px);
}

.small-note {
  color: var(--muted-2);
  font-size: 13px;
  margin-bottom: 0;
}

.toast-viewport {
  align-items: center;
  display: grid;
  gap: 10px;
  left: 50%;
  max-width: min(520px, calc(100vw - 28px));
  pointer-events: none;
  position: fixed;
  top: clamp(14px, 3.5vh, 30px);
  transform: translateX(-50%);
  width: max-content;
  z-index: 1100;
}

.alert {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.028) 48%, rgba(122, 71, 255, 0.055)),
    var(--panel);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  margin: 0;
  overflow: hidden;
  padding: 13px 48px 13px 44px;
  position: relative;
}

.alert::before {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.72), transparent 42%),
    linear-gradient(135deg, var(--accent-3), var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(179, 109, 255, 0.24);
  content: "";
  height: 14px;
  left: 18px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
}

.alert.toast {
  animation: toastIn 680ms var(--spring-soft) both;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  min-width: min(360px, calc(100vw - 28px));
  pointer-events: auto;
  transform-origin: top center;
  width: 100%;
}

.alert.toast.is-leaving {
  animation: toastOut 260ms ease both;
  pointer-events: none;
}

.toast-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: rgba(247, 241, 255, 0.86);
  font-size: 18px;
  font-weight: 800;
  height: 28px;
  line-height: 1;
  min-height: 28px;
  padding: 0;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) scale(var(--press-scale));
  width: 28px;
}

.toast-close::before {
  display: none;
}

.toast-close:hover,
.toast-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    0 0 0 4px rgba(179, 109, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.alert.error {
  border-color: rgba(255, 107, 145, 0.42);
  color: #ffc0d0;
}

.alert.error::before {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(135deg, var(--danger), #b83cff);
  box-shadow: 0 0 24px rgba(255, 107, 145, 0.26);
}

.alert.success {
  border-color: rgba(109, 255, 194, 0.38);
  color: #b9ffe4;
}

.alert.success::before {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.72), transparent 42%),
    linear-gradient(135deg, var(--success), var(--accent-2));
  box-shadow: 0 0 24px rgba(109, 255, 194, 0.22);
}

.alert.muted {
  border-color: rgba(226, 205, 255, 0.2);
  color: var(--muted);
}

.loader-card {
  animation: loaderGlassIn 760ms var(--spring-soft) both;
  max-width: 540px;
  overflow: hidden;
  padding: 46px;
  text-align: center;
  width: 100%;
}

.loading-page::before {
  filter: blur(18px) saturate(120%);
  transform: scale(1.08);
}

.loading-page::after {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(6, 0, 15, 0.2), rgba(2, 0, 8, 0.72));
}

.loading-page .loader-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045) 42%, rgba(118, 87, 255, 0.08)),
    rgba(20, 10, 42, 0.36);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  backdrop-filter: blur(36px) saturate(180%);
  border-color: rgba(255, 255, 255, 0.27);
  border-radius: 34px;
  box-shadow:
    0 36px 120px rgba(2, 0, 10, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -24px 54px rgba(118, 87, 255, 0.09);
}

.loading-page .loader-card .spinner {
  height: 86px;
  margin-bottom: 26px;
  width: 86px;
}

.spinner {
  animation: orbit 1.05s linear infinite;
  display: grid;
  filter: drop-shadow(0 0 18px rgba(233, 199, 255, 0.28));
  height: 72px;
  margin: 0 auto 22px;
  place-items: center;
  width: 72px;
}

.spinner svg {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.spinner-track,
.spinner-arc {
  fill: none;
  stroke-width: 4.2;
}

.spinner-track {
  stroke: rgba(255, 255, 255, 0.16);
}

.spinner-arc {
  stroke: var(--accent-3);
  stroke-dasharray: 78 114;
  stroke-linecap: round;
  stroke-width: 4.8;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.modal[hidden],
.admin-modal[hidden] {
  display: none;
}

.modal,
.admin-modal {
  inset: 0;
  position: fixed;
  z-index: 20;
}

.admin-modal {
  z-index: 50;
}

.modal-backdrop,
.admin-modal-backdrop {
  animation: fadeIn 220ms ease both;
  background: rgba(2, 0, 8, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  inset: 0;
  position: absolute;
}

.modal-panel {
  animation: modalIn 560ms var(--spring) both;
  left: 50%;
  max-width: 540px;
  overflow: hidden;
  padding: 34px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
}

.modal-panel.liquid-reactive {
  transform: translate(-50%, -50%) translateY(var(--lift-y)) scale(var(--press-scale));
}

.icon-close {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  min-height: 38px;
  padding: 0;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 38px;
  z-index: 3;
}

.modal-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
}

.latest-code {
  color: #fff;
  font-size: clamp(46px, 12vw, 68px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  margin: 14px 0 8px;
  text-shadow: 0 0 30px rgba(179, 109, 255, 0.42);
  word-break: break-word;
}

.source-pill {
  align-items: center;
  align-self: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0;
  margin: 12px 0 0;
  padding: 6px 10px;
}

.app-source-pill {
  padding: 6px 12px 6px 6px;
}

.app-source-pill .app-logo {
  border-radius: 999px;
  height: 28px;
  width: 28px;
}

.quota-summary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(7, 2, 22, 0.42);
  border: 1px solid rgba(238, 220, 255, 0.2);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 18px 48px rgba(5, 0, 22, 0.22);
  display: grid;
  gap: 10px;
  margin: 22px 0 8px;
  padding: 15px;
  width: 100%;
}

.quota-summary-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.quota-eyebrow {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
}

.quota-ratio {
  color: #fff;
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.95;
  text-shadow: 0 0 28px rgba(109, 255, 194, 0.2);
}

.quota-summary p,
.quota-summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.quota-summary small {
  color: var(--muted-2);
}

.quota-meter {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  width: 100%;
}

.quota-meter span {
  background:
    linear-gradient(90deg, #6dffc2, #e9c7ff);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 520ms var(--spring-soft), background 260ms ease;
  width: var(--quota-progress, 0%);
}

.quota-summary.compact {
  margin: 16px 0;
}

.quota-summary.is-empty {
  border-color: rgba(255, 107, 145, 0.42);
}

.quota-summary.is-empty .quota-meter span {
  background: linear-gradient(90deg, rgba(255, 107, 145, 0.9), rgba(255, 227, 154, 0.82));
}

.quota-panel {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0 8px;
  width: 100%;
}

.quota-panel div {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(7, 2, 22, 0.38);
  border: 1px solid rgba(238, 220, 255, 0.18);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 10px;
  transition: border-color 220ms ease, background 220ms ease, transform 260ms var(--spring-soft);
}

.quota-panel span {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.quota-panel strong {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.quota-panel.compact {
  margin: 16px 0;
}

.quota-panel.compact div {
  padding: 10px;
}

.quota-panel.is-empty div:last-child {
  border-color: rgba(255, 107, 145, 0.52);
}

.received-time {
  margin-top: 0;
}

.copy-button {
  width: 100%;
}

.previous-wrap h2 {
  color: var(--ink);
  font-size: 16px;
  margin: 26px 0 10px;
}

.previous-list {
  display: grid;
  gap: 9px;
}

.previous-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 11px 13px;
}

.previous-item span,
.mono {
  color: #fff;
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, Monaco, monospace;
  font-weight: 900;
}

.previous-item time {
  color: var(--muted);
  font-size: 12px;
}

.previous-source {
  color: var(--muted);
  flex: 1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.admin-header {
  align-items: center;
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  background: rgba(10, 3, 26, 0.46);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header strong {
  align-items: center;
  display: inline-flex;
  font-size: 18px;
}

.admin-header nav {
  align-items: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-header .inline-form {
  margin-top: 0;
}

.header-link-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  text-decoration: none;
  transition: background 260ms ease, border-color 260ms ease, box-shadow 260ms ease, transform 420ms var(--spring);
}

.header-link-button:hover,
.header-link-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow: 0 20px 54px rgba(156, 86, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  outline: none;
  transform: translateY(-1px);
}

.admin-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1240px;
  padding: 28px;
}

.admin-card {
  animation: panelIn 720ms var(--spring-soft) both;
  grid-column: span 6;
  overflow: hidden;
  padding: 22px;
}

.admin-command-card {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.admin-command-card h1 {
  margin-bottom: 6px;
}

.admin-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-actions .inline-form {
  margin: 0;
}

.admin-action-toggle {
  display: none;
}

.admin-card h1 {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.18;
  margin-top: 0;
}

.full {
  grid-column: 1 / -1;
}

.table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--muted);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

td {
  color: rgba(247, 241, 255, 0.86);
}

tr:last-child td {
  border-bottom: 0;
}

.service-name-cell,
.entitlement-app-cell {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.service-name-cell input {
  min-width: 160px;
}

.entitlement-app-cell {
  color: #fff;
  font-weight: 850;
}

.quota-ratio-chip {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(109, 255, 194, 0.16), rgba(233, 199, 255, 0.11)),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(109, 255, 194, 0.28);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.quota-ratio-chip + .small-note {
  display: block;
  margin-top: 6px;
}

th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form,
.inline-form {
  margin: 0;
}

.inline-form {
  margin-top: 12px;
}

.actions button,
.mini-form button {
  font-size: 13px;
  min-height: 38px;
  padding: 0 13px;
}

.mini-form {
  display: flex;
  gap: 8px;
}

.mini-form input {
  max-width: 170px;
  min-height: 38px;
}

.admin-modal-panel {
  max-height: calc(100vh - 40px);
  overflow-y: visible;
}

.admin-modal-panel h1 {
  font-size: 22px;
  margin: 0 52px 18px 0;
}

.logo-modal-panel {
  max-width: 500px;
}

.logo-modal-preview {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(238, 220, 255, 0.16);
  border-radius: 18px;
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  min-height: 96px;
  padding: 12px;
}

.logo-modal-preview .app-logo {
  border-radius: 18px;
  height: 72px;
  width: 72px;
}

.logo-modal-preview span,
.logo-modal-preview strong {
  display: block;
  line-height: 1.3;
}

.logo-modal-preview span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
}

.logo-modal-preview strong {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.modal-actions button {
  min-width: 112px;
}

.admin-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 14px;
}

.admin-pagination a,
.admin-pagination span {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
}

.admin-pagination span {
  color: var(--muted);
}

.admin-pagination a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.admin-pagination a.is-disabled {
  color: var(--muted-2);
  opacity: 0.5;
  pointer-events: none;
}

@keyframes panelIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.965);
  }
  68% {
    opacity: 1;
    transform: translateY(-2px) scale(1.008);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loaderGlassIn {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.94);
  }
  64% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.9);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -51%) scale(1.018);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes toastIn {
  0% {
    filter: blur(12px);
    opacity: 0;
    transform: translateY(-22px) scale(0.94);
  }
  58% {
    filter: blur(0);
    opacity: 1;
    transform: translateY(3px) scale(1.012);
  }
  100% {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    filter: blur(8px);
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: starfieldDrift 90s linear infinite;
  }

  body::after {
    animation: auroraFlow 12s ease-in-out infinite alternate;
  }
}

@keyframes starfieldDrift {
  from {
    background-position: 12px 26px, 73px 41px, 35px 91px, 119px 12px, 166px 74px;
  }
  to {
    background-position: 12px -420px, 73px -620px, 35px -810px, 119px -980px, 166px -1220px;
  }
}

@keyframes auroraFlow {
  0% {
    background-position: 0% 70%, 100% 18%, 50% 58%, 18% 22%, center;
  }
  50% {
    background-position: 72% 42%, 32% 8%, 88% 72%, 64% 18%, center;
  }
  100% {
    background-position: 100% 62%, 0% 28%, 22% 40%, 92% 34%, center;
  }
}

@media (max-width: 900px) {
  .admin-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .admin-actions {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 320ms var(--spring-soft), opacity 220ms ease, transform 320ms var(--spring-soft);
  }

  .admin-command-card.is-action-nav-open .admin-actions {
    max-height: 360px;
    opacity: 1;
    transform: translateY(0);
  }

  .access-shell,
  .loader-shell {
    padding: 18px;
  }

  .access-panel,
  .loader-card,
  .modal-panel {
    border-radius: 24px;
    padding: 24px;
  }

  .latest-code {
    font-size: 42px;
  }

  .admin-grid {
    gap: 14px;
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .admin-card {
    grid-column: 1;
    padding: 18px;
  }

  .admin-command-card {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-action-toggle {
    display: inline-flex;
    width: 100%;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-actions button,
  .admin-actions .inline-form {
    width: 100%;
  }

  .admin-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-header {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
    padding: 14px 16px;
  }

  .mini-form {
    align-items: stretch;
    flex-direction: column;
  }

  .mini-form input {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
