:root {
  --bg: #08111f;
  --bg-elevated: #0c1728;
  --surface: rgba(10, 20, 36, 0.72);
  --surface-strong: rgba(14, 27, 46, 0.92);
  --surface-soft: rgba(18, 34, 56, 0.54);
  --text: #edf4ff;
  --muted: #95a7c4;
  --line: rgba(132, 182, 255, 0.14);
  --accent: #4ecdc4;
  --accent-strong: #00b4d8;
  --accent-warm: #ff8a5b;
  --success: #30d38a;
  --danger: #ff6b7c;
  --warning: #ffc857;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 180, 216, 0.18), transparent 28%),
    radial-gradient(circle at 100% 12%, rgba(78, 205, 196, 0.18), transparent 24%),
    radial-gradient(circle at 20% 100%, rgba(255, 138, 91, 0.12), transparent 26%),
    linear-gradient(180deg, #050c16 0%, #08111f 42%, #0b1422 100%);
}

body.no-scroll {
  overflow: hidden;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(68px);
  opacity: 0.7;
  pointer-events: none;
}

.ambient-a {
  width: 26rem;
  height: 26rem;
  top: 2rem;
  right: -5rem;
  background: rgba(0, 180, 216, 0.16);
}

.ambient-b {
  width: 22rem;
  height: 22rem;
  bottom: -2rem;
  left: -4rem;
  background: rgba(255, 138, 91, 0.12);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 90%);
}

.site-header,
.page-shell {
  width: min(1240px, calc(100vw - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.7rem 0 1.2rem;
}

.brand-lockup,
.header-cluster,
.top-nav,
.hero-actions,
.stacked-cell {
  display: flex;
}

.brand-lockup {
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 11px);
  grid-template-rows: repeat(2, 11px);
  gap: 5px;
  padding: 0.65rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.18), rgba(0, 180, 216, 0.24));
  border: 1px solid rgba(78, 205, 196, 0.22);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.05);
}

.brand-mark span {
  border-radius: 4px;
  background: linear-gradient(180deg, #b4f4ff, #3bc9db);
}

.brand-mark span:last-child {
  grid-column: 1 / -1;
}

.site-header h1,
.hero-panel h2,
.auth-card h2,
.panel h3,
.pay-card h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.site-header h1 {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.hero-title-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.hero-account-meta {
  color: rgba(149, 167, 196, 0.82);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.page-shell {
  padding-bottom: 3rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted,
.helper,
.stacked-cell span {
  color: var(--muted);
}

.panel-shell,
.auth-card,
.panel,
.hero-panel,
.stat-card {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(560px, 100%);
  margin: 7vh auto 0;
  border-radius: 30px;
  padding: 2.2rem;
  display: grid;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.auth-card::before,
.hero-panel::before,
.panel::before,
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 34%);
  pointer-events: none;
}

.hero-panel {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 30px;
  padding: 1.75rem;
  margin-bottom: 1.1rem;
  overflow: hidden;
}

.admin-hero {
  background:
    linear-gradient(135deg, rgba(0, 180, 216, 0.12), rgba(78, 205, 196, 0.08)),
    var(--surface);
}

.hero-actions {
  align-items: flex-start;
  gap: 0.75rem;
}

.stacked-actions {
  flex-direction: column;
  align-items: stretch;
}

.hero-chip,
.inline-metric,
.nav-pill,
.ghost-button,
.status-tag {
  border: 1px solid rgba(132, 182, 255, 0.16);
}

.hero-chip,
.inline-metric {
  padding: 0.62rem 0.82rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.hero-chip span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-chip strong,
.inline-metric {
  font-size: 0.94rem;
  word-break: break-all;
}

.header-cluster,
.top-nav {
  align-items: center;
  gap: 0.75rem;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  transition: all 160ms ease;
}

.nav-pill.active,
.nav-pill:hover {
  color: var(--text);
  background: rgba(78, 205, 196, 0.12);
  box-shadow: inset 0 0 24px rgba(78, 205, 196, 0.08);
}

.stats-grid,
.content-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

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

.stat-card,
.panel {
  position: relative;
  border-radius: 24px;
  padding: 1.2rem;
  overflow: hidden;
}

.stat-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0.55rem 0;
}

.accent-a {
  border-top: 3px solid #4ecdc4;
}

.accent-b {
  border-top: 3px solid #00b4d8;
}

.accent-c {
  border-top: 3px solid #30d38a;
}

.accent-d {
  border-top: 3px solid #ff8a5b;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.with-inline-metric {
  align-items: flex-end;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.form-grid.compact,
.admin-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-filter-grid {
  align-items: end;
}

.form-grid label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.form-grid label span {
  color: var(--muted);
}

.field-stack {
  display: grid;
  gap: 0.45rem;
}

.field-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.fixed-type-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(132, 182, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.fixed-type-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: #03131c;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #7af5ea 0%, #34d6ff 100%);
}

.fixed-type-helper {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.client-connection-panel {
  display: grid;
  gap: 1rem;
}

.client-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.client-setup-card {
  display: grid;
  gap: 0.6rem;
}

.client-config-panel {
  align-items: center;
}

.client-empty-card {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px dashed rgba(132, 182, 255, 0.22);
  background: rgba(7, 16, 30, 0.44);
}

.client-empty-card strong,
.client-empty-card p {
  margin: 0;
}

.client-empty-card p {
  color: var(--muted);
}

.client-models-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.model-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  max-height: 280px;
  overflow: auto;
  padding-right: 0.2rem;
}

.model-chip-button {
  min-height: 38px;
  padding: 0.56rem 0.88rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 182, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.model-chip-button:hover {
  transform: translateY(-1px);
  border-color: rgba(78, 205, 196, 0.34);
  background: rgba(78, 205, 196, 0.12);
}

.model-chip-button.is-copied {
  color: #8ff7c3;
  border-color: rgba(48, 211, 138, 0.3);
  background: rgba(48, 211, 138, 0.14);
}

.span-two {
  grid-column: 1 / -1;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(132, 182, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.78rem 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #7490b4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(78, 205, 196, 0.55);
  box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

textarea {
  min-height: 116px;
  resize: vertical;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  min-height: 46px;
  padding: 0.88rem 1.2rem;
  border: none;
  color: #03131c;
  font-weight: 600;
  background: linear-gradient(135deg, #7af5ea 0%, #34d6ff 100%);
  box-shadow: 0 14px 36px rgba(52, 214, 255, 0.24);
}

.ghost-button {
  min-height: 40px;
  padding: 0.62rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.alert {
  border-radius: 18px;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
}

.alert.success {
  background: rgba(48, 211, 138, 0.08);
  border: 1px solid rgba(48, 211, 138, 0.2);
  color: #8ff7c3;
}

.alert.error {
  background: rgba(255, 107, 124, 0.08);
  border: 1px solid rgba(255, 107, 124, 0.2);
  color: #ffb2bd;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.button-link {
  min-width: 126px;
}

.email-verify-placeholder {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px dashed rgba(132, 182, 255, 0.22);
  background: rgba(7, 16, 30, 0.44);
}

.email-verify-placeholder strong,
.email-verify-placeholder p {
  margin: 0;
}

.password-field-group {
  gap: 0.55rem;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 4.8rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  min-width: 3.4rem;
  height: 2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 182, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(78, 205, 196, 0.12);
}

.password-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(132, 182, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.password-card strong,
.password-card p {
  margin: 0;
}

.password-strength {
  width: 100%;
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.password-strength-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 140ms ease, background 140ms ease;
}

.password-strength-bar[data-level="empty"] {
  background: transparent;
}

.password-strength-bar[data-level="weak"] {
  background: linear-gradient(90deg, #ff6b7c, #ff8a5b);
}

.password-strength-bar[data-level="medium"] {
  background: linear-gradient(90deg, #ffc857, #ffb347);
}

.password-strength-bar[data-level="strong"] {
  background: linear-gradient(90deg, #4ecdc4, #30d38a);
}

.password-strength-text {
  margin-top: 0.1rem;
}

.password-rule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.password-rule {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 182, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.84rem;
}

.password-rule.is-passed {
  border-color: rgba(48, 211, 138, 0.24);
  background: rgba(48, 211, 138, 0.12);
  color: #8ff7c3;
}

.toast-stack {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 1200;
  display: grid;
  gap: 0.7rem;
  width: min(420px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(132, 182, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  animation: toast-in 180ms ease;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: 0.05rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.toast-icon svg {
  width: 16px;
  height: 16px;
}

.toast.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-success {
  background: rgba(15, 43, 36, 0.92);
  border-color: rgba(48, 211, 138, 0.26);
  color: #8ff7c3;
}

.toast-success .toast-icon {
  background: rgba(48, 211, 138, 0.12);
}

.toast-error {
  background: rgba(49, 18, 28, 0.94);
  border-color: rgba(255, 107, 124, 0.26);
  color: #ffb2bd;
}

.toast-error .toast-icon {
  background: rgba(255, 107, 124, 0.12);
}

.toast-copy {
  flex: 1;
  min-width: 0;
  line-height: 1.55;
}

.toast-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: currentColor;
  cursor: pointer;
  opacity: 0.84;
}

.toast-close:hover {
  opacity: 1;
  transform: translateY(-1px);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

.pay-card,
.secret-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: var(--surface-soft);
  border: 1px solid rgba(132, 182, 255, 0.12);
}

.premium-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.pay-meta {
  display: grid;
  gap: 0.35rem;
}

.qr-stack {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.qr-image {
  width: 220px;
  max-width: 100%;
  border-radius: 18px;
  background: white;
  padding: 0.8rem;
  margin: 0;
}

.secret-box textarea {
  background: rgba(0, 0, 0, 0.16);
}

.metric-emphasis {
  color: #89efff;
  font-weight: 600;
}

.modal-inline-actions {
  display: grid;
  justify-items: end;
  gap: 0.75rem;
}

.inline-action-form {
  display: inline-flex;
}

.recharge-modal-section {
  display: grid;
  gap: 1rem;
}

.recharge-form-grid {
  gap: 1rem;
}

.recharge-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.recharge-preset-option {
  display: grid;
  gap: 0.35rem;
  align-content: space-between;
  min-height: 92px;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(132, 182, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(78, 205, 196, 0.14), transparent 55%),
    rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.recharge-preset-option:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 205, 196, 0.34);
  box-shadow: 0 18px 32px rgba(13, 33, 61, 0.22);
}

.recharge-preset-option.is-active {
  border-color: rgba(78, 205, 196, 0.4);
  background:
    radial-gradient(circle at top right, rgba(122, 245, 234, 0.24), transparent 58%),
    linear-gradient(180deg, rgba(21, 42, 63, 0.94) 0%, rgba(9, 22, 38, 0.94) 100%);
  box-shadow: 0 18px 36px rgba(52, 214, 255, 0.16);
}

.recharge-preset-option.is-custom {
  background:
    radial-gradient(circle at top right, rgba(255, 138, 91, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.04);
}

.recharge-preset-amount {
  color: #f4fbff;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.recharge-preset-credit {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.recharge-preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(132, 182, 255, 0.14);
  background:
    radial-gradient(circle at bottom left, rgba(52, 214, 255, 0.14), transparent 52%),
    rgba(7, 16, 30, 0.72);
}

.recharge-preview-copy {
  display: grid;
  gap: 0.28rem;
}

.recharge-preview-copy strong {
  font-size: 1.3rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.recharge-preview-helper,
.recharge-preview-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.recharge-preview-meta {
  text-align: right;
}

.recharge-detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1rem;
}

.table-action-button {
  min-width: 88px;
}

.key-alias-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  color: #dff4ff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color 140ms ease, opacity 140ms ease;
}

.key-alias-trigger:hover {
  color: #7be7ff;
}

.key-alias-trigger.is-deleted {
  color: #a8b5c9;
}

.key-alias-trigger.is-deleted:hover {
  color: #d3dbe8;
}

.inline-key-badge {
  margin-left: 0.55rem;
}

.key-row-muted {
  opacity: 0.56;
}

.key-row-muted .key-alias-trigger,
.key-row-muted td,
.key-row-muted .metric-emphasis {
  color: #90a1bb;
}

.key-row-muted .metric-emphasis {
  font-weight: 600;
}

.key-availability-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.key-availability-badge.is-active {
  color: #8ff7c3;
  background: rgba(48, 211, 138, 0.12);
  border: 1px solid rgba(48, 211, 138, 0.2);
}

.key-availability-badge.is-deleted {
  color: #b5c0d3;
  background: rgba(133, 146, 166, 0.14);
  border: 1px solid rgba(133, 146, 166, 0.22);
}

.order-no-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  color: #dff4ff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color 140ms ease, opacity 140ms ease;
}

.order-no-trigger:hover {
  color: #7be7ff;
}

.ui-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.ui-modal.hidden {
  display: none;
}

.ui-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 14, 0.72);
  backdrop-filter: blur(10px);
}

.ui-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 28px;
  padding: 1.35rem;
}

.ui-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-close-button {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(132, 182, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.56rem 0.92rem;
  cursor: pointer;
}

.modal-card-stack {
  margin-top: 1rem;
}

.copy-button {
  margin-top: 0.85rem;
}

.secret-inline-panel {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(132, 182, 255, 0.14);
  background: rgba(7, 16, 30, 0.72);
}

.secret-inline-value {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  word-break: break-all;
}

.copy-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(132, 182, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #bfeaff;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.copy-icon-button:hover {
  transform: translateY(-1px);
  background: rgba(78, 205, 196, 0.12);
  border-color: rgba(78, 205, 196, 0.34);
}

.copy-icon-button.is-copied {
  color: #8ff7c3;
  background: rgba(48, 211, 138, 0.14);
  border-color: rgba(48, 211, 138, 0.3);
}

.copy-icon-button svg {
  width: 16px;
  height: 16px;
}

.visibility-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(132, 182, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #b8cae7;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.visibility-toggle-button:hover {
  transform: translateY(-1px);
  background: rgba(78, 205, 196, 0.1);
  border-color: rgba(78, 205, 196, 0.28);
  color: #dff8ff;
}

.visibility-toggle-button svg {
  width: 16px;
  height: 16px;
}

.visibility-toggle-button .eye-slash {
  opacity: 1;
  transition: opacity 140ms ease;
}

.visibility-toggle-button.is-visible .eye-slash {
  opacity: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.key-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.key-summary-card > div {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(132, 182, 255, 0.12);
}

.key-summary-card strong {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.key-summary-label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.order-detail-summary-card {
  margin-bottom: 0.9rem;
}

.order-detail-order-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  letter-spacing: 0;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.order-detail-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(132, 182, 255, 0.12);
}

.order-detail-value {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.6;
  word-break: break-all;
}

.slim-button {
  min-height: 34px;
  padding: 0.48rem 0.82rem;
  white-space: nowrap;
}

.hero-mini-button {
  min-height: 34px;
  padding: 0.42rem 0.82rem;
  font-size: 0.84rem;
  border-radius: 14px;
  color: #d6e7ff;
}

.danger-button {
  color: #ffb2bd;
  border-color: rgba(255, 107, 124, 0.24);
  background: rgba(255, 107, 124, 0.08);
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.danger-zone {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 107, 124, 0.18);
  background: rgba(255, 107, 124, 0.05);
}

.order-filter-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) repeat(2, minmax(150px, 168px)) auto;
  gap: 0.72rem;
  align-items: end;
  margin-bottom: 1rem;
}

.order-filter-grid label {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.status-filter-field {
  min-width: 0;
}

.status-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.status-filter-button {
  min-height: 34px;
  padding: 0.44rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(132, 182, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.order-date-field {
  max-width: 168px;
}

.order-date-field input {
  min-width: 0;
  min-height: 34px;
  padding-inline: 0.82rem;
}

.status-filter-button:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(78, 205, 196, 0.24);
}

.status-filter-button.is-active {
  color: #03131c;
  border-color: transparent;
  background: linear-gradient(135deg, #7af5ea 0%, #34d6ff 100%);
  box-shadow: 0 12px 28px rgba(52, 214, 255, 0.22);
}

.filter-actions {
  display: flex;
  gap: 0.55rem;
  align-items: end;
  justify-self: start;
}

.reset-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.table-pagination-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.table-pagination-actions {
  display: flex;
  gap: 0.45rem;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.04);
}

.status-tag.paid {
  color: #8ff7c3;
  background: rgba(48, 211, 138, 0.12);
}

.status-tag.pending {
  color: #ffe6a0;
  background: rgba(255, 200, 87, 0.12);
}

.status-tag.closed {
  color: #c4d0e6;
  background: rgba(148, 163, 184, 0.14);
}

.status-tag.expired {
  color: #ffb2bd;
  background: rgba(255, 107, 124, 0.12);
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(132, 182, 255, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(4, 11, 20, 0.22);
}

th,
td {
  padding: 0.95rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid rgba(132, 182, 255, 0.08);
  white-space: nowrap;
}

td {
  color: #d7e6ff;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(14, 27, 46, 0.96);
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stacked-cell {
  flex-direction: column;
  gap: 0.18rem;
}

.wide {
  grid-column: 1 / -1;
}

a {
  color: #7be7ff;
}

@media (max-width: 1080px) {
  .stats-grid,
  .content-grid,
  .dashboard-grid,
  .admin-filter-grid,
  .form-grid.compact {
    grid-template-columns: 1fr 1fr;
  }

  .order-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .status-filter-field {
    grid-column: 1 / -1;
  }

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

@media (max-width: 860px) {
  .site-header,
  .hero-panel,
  .header-cluster,
  .top-nav,
  .premium-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .premium-card {
    display: flex;
  }

  .site-header,
  .page-shell {
    width: min(1240px, calc(100vw - 1rem));
  }
}

@media (max-width: 720px) {
  .toast-stack {
    top: 0.8rem;
    right: 0.75rem;
    width: calc(100vw - 1rem);
  }

  .stats-grid,
  .content-grid,
  .dashboard-grid,
  .admin-filter-grid,
  .form-grid.compact {
    grid-template-columns: 1fr;
  }

  .order-filter-grid {
    grid-template-columns: 1fr;
  }

  .recharge-preset-grid {
    grid-template-columns: 1fr;
  }

  .recharge-preview-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .recharge-preview-meta {
    text-align: left;
  }

  .order-date-field {
    max-width: none;
  }

  .status-filter-field {
    max-width: none;
  }

  .status-filter-group {
    width: 100%;
  }

  .auth-card {
    margin-top: 2.2rem;
    padding: 1.4rem;
  }

  .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button-link {
    width: 100%;
  }

  .hero-panel,
  .panel,
  .stat-card {
    padding: 1rem;
  }

  .qr-image {
    width: 180px;
  }

  .ui-modal-dialog,
  .ui-modal {
    padding: 0.75rem;
  }

  .key-summary-card {
    grid-template-columns: 1fr;
    display: grid;
  }
}
