:root {
  --bg-deep: #090a0f;
  --glass-bg: rgba(24, 26, 36, 0.62);
  --glass-bg-hover: rgba(32, 35, 48, 0.75);
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-highlight: rgba(255, 255, 255, 0.18);
  --text-primary: #f5f7ff;
  --text-secondary: rgba(235, 238, 255, 0.64);
  --text-muted: rgba(235, 238, 255, 0.42);
  --accent-primary: #f0524c;
  --accent-secondary: #ff2d55;
  --accent-blue: #0a84ff;
  --accent-green: #30d158;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-glass: 0 20px 50px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.is-splashing {
  overflow: hidden;
}

/* ================================
   iOS Premium Launch Splash Screen
   ================================ */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #07080d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition:
    opacity 0.55s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.55s cubic-bezier(0.32, 0.72, 0, 1),
    filter 0.55s cubic-bezier(0.32, 0.72, 0, 1);
}

.splash-overlay.is-leaving {
  opacity: 0;
  transform: scale(1.06);
  filter: blur(12px);
  pointer-events: none;
}

.splash-overlay.is-done {
  display: none;
}

.splash-aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  pointer-events: none;
}

.splash-aura-coral {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(240, 82, 76, 0.48) 0%, transparent 70%);
  animation: auraPulse 2.4s ease-in-out infinite alternate;
}

.splash-aura-indigo {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(94, 92, 230, 0.28) 0%, transparent 70%);
  transform: translate(110px, 110px);
}

.splash-ring {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1.5px solid rgba(240, 82, 76, 0.42);
  pointer-events: none;
  opacity: 0;
}

.splash-ring-1 {
  animation: sonarPulse 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.12s infinite;
}

.splash-ring-2 {
  border-color: rgba(255, 255, 255, 0.16);
  animation: sonarPulse 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.62s infinite;
}

.splash-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.splash-squircle {
  width: 146px;
  height: 146px;
  border-radius: 36px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.04) 55%,
    rgba(240, 82, 76, 0.12) 100%
  );
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.72),
    0 0 55px rgba(240, 82, 76, 0.28),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: splashEnter 0.78s cubic-bezier(0.22, 1.32, 0.36, 1) both;
}

.splash-shine {
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: shimmerSweep 1.3s ease-in-out 0.32s forwards;
  pointer-events: none;
}

.splash-logo {
  width: 84px;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 20px rgba(240, 82, 76, 0.42));
  animation: logoPop 0.8s cubic-bezier(0.22, 1.25, 0.36, 1) 0.08s both;
}

.splash-eq {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  animation: fadeUpSoft 0.5s ease 0.22s both;
}

.splash-eq span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7f7a, #f0524c);
  box-shadow: 0 0 10px rgba(240, 82, 76, 0.45);
  animation: eqBounce 0.9s ease-in-out infinite alternate;
}

.splash-eq span:nth-child(1) { animation-delay: 0s; }
.splash-eq span:nth-child(2) { animation-delay: 0.16s; }
.splash-eq span:nth-child(3) { animation-delay: 0.32s; }
.splash-eq span:nth-child(4) { animation-delay: 0.18s; }
.splash-eq span:nth-child(5) { animation-delay: 0.05s; }

@keyframes splashEnter {
  0% {
    opacity: 0;
    transform: scale(0.68) translateY(16px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes logoPop {
  0% {
    opacity: 0;
    transform: scale(0.84);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes sonarPulse {
  0% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(2.85);
  }
}

@keyframes shimmerSweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

@keyframes eqBounce {
  0% { height: 6px; opacity: 0.45; }
  100% { height: 22px; opacity: 1; }
}

@keyframes auraPulse {
  0% { transform: scale(0.95); opacity: 0.75; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes fadeUpSoft {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Smooth App Reveal after Splash */
body.is-splashing .app-shell {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
}

.app-shell {
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .splash-overlay,
  .splash-squircle,
  .splash-ring,
  .splash-shine,
  .splash-eq span,
  .app-shell {
    animation: none !important;
    transition: opacity 0.15s ease !important;
  }
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  color: #ffb399;
}

/* Ambient iOS Mesh Orbs */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.42;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #ff5e3a 0%, transparent 70%);
  top: -120px;
  left: -80px;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #5e5ce6 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -6s;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #ff2a68 0%, transparent 70%);
  top: 40%;
  left: 55%;
  opacity: 0.25;
  animation-delay: -11s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(28px, -24px) scale(1.07); }
}

.app-shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 110px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Glass Header */
.glass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
}

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

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(240, 82, 76, 0.32);
}

.brand-icon-logo {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(240, 82, 76, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 22px rgba(240, 82, 76, 0.22);
  padding: 7px;
}

.brand-icon-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(240, 82, 76, 0.35));
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-pill {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 94, 58, 0.18);
  border: 1px solid rgba(255, 94, 58, 0.4);
  color: #ff9f88;
}

.subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

/* Glass Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-glass);
  transition: border-color 0.25s ease;
}

.glass-card:hover {
  border-color: var(--glass-highlight);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.card-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-header p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.input-wrapper textarea {
  width: 100%;
  background: rgba(10, 12, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
}

.input-wrapper textarea:focus {
  border-color: rgba(255, 94, 58, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 94, 58, 0.16);
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.hint-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

button:active {
  transform: scale(0.96);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(255, 65, 80, 0.32);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 26px rgba(255, 65, 80, 0.45);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.86rem;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.btn-ghost-sm {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.btn-ghost-sm:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.notice-banner {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 12px;
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.35);
  color: #ffd599;
  font-size: 0.84rem;
}

.hidden {
  display: none !important;
}

/* Results List */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.results-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-title h3 {
  font-size: 1rem;
  font-weight: 600;
}

.count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.16);
  color: #66e887;
  border: 1px solid rgba(48, 209, 88, 0.3);
}

.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.track-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.track-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  flex: 1;
}

.track-cover {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.track-info {
  min-width: 0;
  flex: 1;
}

.track-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 3px;
}

.track-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-play:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
}

.btn-play:disabled,
.btn-dl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-dl.is-loading {
  opacity: 0.8;
  cursor: wait;
}

.meta-ok {
  color: #66e887;
}

.meta-warn {
  color: #ffb366;
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(10, 132, 255, 0.22);
  color: #70b7ff;
  border: 1px solid rgba(10, 132, 255, 0.45);
  transition: all 0.2s ease;
}

.btn-dl:hover:not(:disabled) {
  background: var(--accent-blue);
  color: #fff;
}

/* Helper Section for /create?wid=default */
.tag-highlight {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #70b7ff;
  background: rgba(10, 132, 255, 0.16);
  border: 1px solid rgba(10, 132, 255, 0.32);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.helper-top h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.helper-top p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.method-box {
  background: rgba(10, 12, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
}

.method-num {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #ff9f88;
  margin-bottom: 4px;
}

.method-box h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.method-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.bookmarklet-zone {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.bookmarklet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5e3a, #ff2a68);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(255, 65, 80, 0.3);
  cursor: grab;
}

.bookmarklet-pill:active {
  cursor: grabbing;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.clean-steps {
  padding-left: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Floating Mini Audio Player */
.glass-player {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(740px, calc(100% - 32px));
  background: rgba(20, 22, 32, 0.85);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  z-index: 50;
}

.player-cover {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.player-meta {
  min-width: 120px;
  max-width: 200px;
}

.player-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-uuid {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.glass-player audio {
  flex: 1;
  height: 36px;
}

.btn-icon-close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer Watermark */
.app-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 8px;
}

.zandev-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.zandev-link:hover {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* ================================
   Auth Gate & GPS Admin Glass UI
   ================================ */
body.is-locked .app-shell {
  display: none !important;
}

.ios-toast {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12000;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(24, 26, 38, 0.92);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f5f7ff;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  max-width: calc(100vw - 32px);
  text-align: center;
}

.login-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.gate-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.gate-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.gate-brand h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gate-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.field-label input,
.field-label select {
  width: 100%;
  background: rgba(10, 12, 18, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-label input:focus,
.field-label select:focus {
  border-color: rgba(240, 82, 76, 0.7);
  box-shadow: 0 0 0 3px rgba(240, 82, 76, 0.16);
}

.gate-err {
  min-height: 1em;
  font-size: 0.82rem;
  color: #ff7f7a;
  line-height: 1.4;
}

.gate-err:empty {
  display: none;
}

.gate-submit {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 0.95rem;
}

.gate-note {
  font-size: 0.78rem;
  line-height: 1.48;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  padding: 11px 13px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-user-pill,
.btn-admin-gps {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-admin-gps {
  background: rgba(240, 82, 76, 0.18);
  border-color: rgba(240, 82, 76, 0.42);
  color: #ffb3ae;
}

.btn-user-pill:hover,
.btn-admin-gps:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.pending-badge {
  background: #f0524c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(240, 82, 76, 0.6);
}

/* Modal Sheet */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 5, 10, 0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-sheet {
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.modal-head h2 {
  font-size: 1.08rem;
  font-weight: 700;
}

.modal-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.modal-body {
  padding: 18px 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-section {
  background: rgba(10, 12, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-section h3 {
  font-size: 0.94rem;
  font-weight: 600;
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.user-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.94rem;
}

.role-chip {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.16);
  border: 1px solid rgba(10, 132, 255, 0.35);
  color: #70b7ff;
}

.role-chip.is-admin {
  background: rgba(240, 82, 76, 0.18);
  border-color: rgba(240, 82, 76, 0.42);
  color: #ff9a95;
}

.user-gps-box {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.user-gps-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.user-gps-badge {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.user-gps-badge.is-ok {
  background: rgba(48, 209, 88, 0.16);
  border: 1px solid rgba(48, 209, 88, 0.32);
  color: #66e887;
}

.user-gps-badge.is-warn {
  background: rgba(255, 159, 10, 0.16);
  border: 1px solid rgba(255, 159, 10, 0.35);
  color: #ffd080;
}

.user-gps-badge.is-wait {
  background: rgba(10, 132, 255, 0.16);
  border: 1px solid rgba(10, 132, 255, 0.35);
  color: #70b7ff;
}

.user-gps-items,
.user-gps-pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-gps-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-gps-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(240, 82, 76, 0.12);
  border: 1px solid rgba(240, 82, 76, 0.38);
}

.user-gps-entry-info,
.user-gps-pending-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.user-gps-entry-info strong,
.user-gps-pending-info strong {
  color: var(--text-primary);
  font-size: 0.82rem;
}

.user-gps-link {
  color: #70b7ff;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
}

.user-gps-link:hover {
  text-decoration: underline;
}

.user-gps-entry-btns,
.user-gps-pending-btns,
.user-gps-btns,
.user-item-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-approve {
  background: linear-gradient(135deg, #30d158, #1fa845);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 9px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-sm {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 0.82rem;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
}

.log-row {
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  line-height: 1.45;
}

.log-row strong {
  color: var(--text-primary);
}

.log-row.is-fake-gps {
  background: rgba(240, 82, 76, 0.12);
  border-color: rgba(240, 82, 76, 0.42);
  color: #ffc2be;
}

.fake-gps-backdrop {
  z-index: 9000;
  background: rgba(12, 4, 6, 0.8);
}

.fake-gps-sheet {
  width: 100%;
  max-width: 410px;
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-color: rgba(240, 82, 76, 0.55);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.78),
    0 0 60px rgba(240, 82, 76, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.fake-gps-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(240, 82, 76, 0.2);
  border: 1px solid rgba(240, 82, 76, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 28px rgba(240, 82, 76, 0.35);
}

.fake-gps-sheet h2 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ff9a95;
}

.fake-gps-msg {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.fake-gps-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .methods-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .glass-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .track-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .track-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .glass-player {
    flex-wrap: wrap;
  }
}
