:root {
  --bg: #050505;
  --text: #f1f5f9;
  --text-strong: #ffffff;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --muted-3: #64748b;
  --muted-4: #475569;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --panel: rgba(0, 0, 0, 0.6);
  --panel-strong: rgba(0, 0, 0, 0.8);
  --primary: #60a5fa;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --green: #44bd32;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --gold: #facc15;
  --orange: #fb923c;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-glass: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --font-pixel: "Press Start 2P", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--border);
}

html,
body,
#app {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(96, 165, 250, 0.03), transparent),
    radial-gradient(800px 400px at 80% 20%, rgba(250, 204, 21, 0.02), transparent),
    var(--bg);
  color: var(--text);
  font-family: var(--font-pixel);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

p {
  margin: 0;
}

a {
  color: var(--primary-400);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-300);
}

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

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1rem;
}

.app--admin {
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

.app-main {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  flex: 1 1 0%;
  display: flex;
}

.app--admin .app-main {
  max-width: none;
  margin: 0;
  min-height: 0;
}

.site-header {
  max-width: 56rem;
  margin: 0 auto 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.site-title {
  font-family: var(--font-pixel);
  font-size: clamp(2.25rem, 7vw, 3rem);
  color: var(--text-strong);
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 0.75rem;
}

.site-subtitle {
  font-size: 0.875rem;
  color: var(--primary-300);
  letter-spacing: 0.05em;
}

.site-footer {
  max-width: 56rem;
  margin: 2.5rem auto 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.view-root {
  width: 100%;
  height: 100%;
}

.mc-container {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: var(--radius-2xl);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glass);
}

.mc-panel {
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
}

.mc-title {
  font-family: var(--font-pixel);
  font-size: 1.875rem;
  color: var(--primary-300);
  margin: 0 0 1.5rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.mc-label {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.mc-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border);
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mc-input::placeholder {
  color: var(--muted-2);
}

.mc-input:focus {
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}

textarea.mc-input {
  resize: vertical;
}

.mc-radio {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 0.125rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.mc-radio:checked {
  background: var(--green);
  border-color: var(--green);
}

.mc-radio:checked::after {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.13rem;
  width: 0.25rem;
  height: 0.5rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.mc-radio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.4);
}

.mc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: rgba(59, 130, 246, 0.9);
  border: 1px solid transparent;
  color: #fff;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}

.mc-button:hover {
  background: var(--primary-500);
}

.mc-button:active {
  transform: scale(0.98);
}

.mc-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mc-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.4);
}

.mc-button.secondary {
  background: rgba(0, 0, 0, 0.3);
  border-color: var(--border-strong);
}

.mc-button.secondary:hover {
  background: rgba(0, 0, 0, 0.45);
}

.mc-button.danger {
  background: var(--red-600);
}

.mc-button.danger:hover {
  background: var(--red-500);
}

.mc-button.small {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
}

.mc-button.refresh-button {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  padding: 0;
}

.mc-button.refresh-button:active {
  transform: none;
}

.refresh-icon.spin {
  animation: spin 0.7s linear infinite;
}

.refresh-icon {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  transform-origin: center;
}

.form-group {
  margin-bottom: 1rem;
}

.form-error {
  background: rgba(220, 38, 38, 0.4);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fff;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

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

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

.muted-2 {
  color: var(--muted-3);
}

.hidden {
  display: none !important;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

.spin {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulseStar {
  0% { opacity: 0.7; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.7; transform: scale(0.95); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.application-view {
  width: 100%;
}

.application-form > * + * {
  margin-top: 1.5rem;
}

.application-intro {
  color: var(--muted);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.form-hint {
  color: rgba(147, 197, 253, 0.8);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.age-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.age-slider-wrap {
  flex: 1;
  min-width: 0;
}

.age-range-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: 0.75rem;
}

.age-slider-holder {
  position: relative;
}

.age-slider {
  appearance: none;
  width: 100%;
  height: 0.5rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.age-slider::-webkit-slider-thumb {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: var(--primary-500);
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s ease;
}

.age-slider::-webkit-slider-thumb:hover {
  background: var(--primary-400);
}

.age-slider::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: var(--primary-500);
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.age-tooltip {
  position: absolute;
  top: -2.75rem;
  left: 0;
  transform: translateX(-50%);
  background: rgba(59, 130, 246, 0.9);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease;
  pointer-events: none;
  opacity: 0;
}

.age-tooltip.visible {
  opacity: 1;
}

.age-number-wrap {
  width: 6rem;
  flex-shrink: 0;
}

.age-number {
  text-align: center;
}

.radio-list > * + * {
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #fff;
  font-size: 0.875rem;
}

.thankyou-content {
  text-align: center;
}

.thankyou-icon {
  font-size: 2.25rem;
  display: inline-block;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

.thankyou-lead {
  color: var(--primary-300);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.thankyou-text {
  color: #e2e8f0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.thankyou-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.admin-view {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-login {
  width: 100%;
  max-width: 28rem;
}

.admin-login form > * + * {
  margin-top: 1.5rem;
}

.login-shake {
  animation: shake 0.45s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.admin-dashboard {
  position: absolute;
  inset: 0;
  padding: 1rem;
  display: flex;
}

.admin-dashboard--flush {
  padding: 0;
}

.admin-panel--flush {
  border-radius: 0;
  border: 0;
  background: #000;
  box-shadow: none;
}

.admin-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.7);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.navbar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.navbar-link.active {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.4);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile {
  position: relative;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.25rem 0.65rem 0.25rem 0.375rem;
  color: #fff;
  transition: background 0.15s ease;
}

.profile-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.profile-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.8);
  border: 1px solid rgba(147, 197, 253, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.profile-name {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

.profile-chevron {
  width: 0.7rem;
  height: 0.7rem;
  color: var(--muted-2);
  transition: transform 0.15s ease;
}

.profile.open .profile-chevron {
  transform: rotate(180deg);
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 13rem;
  background: rgba(23, 23, 23, 0.97);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 10000;
  transform-origin: top right;
  animation: scaleIn 0.15s ease-out;
}

.profile-menu-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.profile-menu-head small {
  display: block;
  font-size: 0.6rem;
  color: var(--muted-3);
  margin-bottom: 0.25rem;
}

.profile-menu-head strong {
  display: block;
  font-size: 0.75rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-body {
  padding: 0.25rem 0;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0.7rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.profile-menu-item.danger {
  color: var(--red-400);
}

.profile-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.admin-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.admin-content--scroll {
  overflow: auto;
  display: block;
}

.admin-error {
  background: rgba(220, 38, 38, 0.4);
  color: #fff;
  padding: 0.75rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  margin: 0 0 1rem;
  font-size: 0.75rem;
}

.admin-notice {
  background: rgba(22, 163, 74, 0.3);
  color: #fff;
  padding: 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: var(--radius);
  margin: 0 0 1rem;
  font-size: 0.75rem;
}

.empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1rem;
}

.empty-state-inner {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}

.empty-state-inner p:first-child {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.empty-state-inner p:last-child {
  color: var(--muted);
  font-size: 0.75rem;
}

.table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.table-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: clip;
}

table.app-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.app-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-table thead tr {
  background: rgba(0, 0, 0, 0.7);
}

.app-table th {
  padding: 0.75rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 500;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

.app-table th:last-child {
  border-right: 0;
}

.app-table th.center,
.app-table td.center {
  text-align: center;
}

.app-table td {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.app-table tbody tr {
  transition: background 0.15s ease;
}

.app-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.app-table tbody tr:hover {
  background: rgba(96, 165, 250, 0.12);
}

.app-table tbody tr.row-unreviewed {
  background: rgba(239, 68, 68, 0.1);
}

.app-table tbody tr.row-unreviewed:hover {
  background: rgba(239, 68, 68, 0.16);
}

.cell-unreviewed {
  color: var(--red-400) !important;
}

.cell-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.review-star {
  color: #ff5252;
  text-shadow: 0 0 5px rgba(255, 82, 82, 0.7);
  animation: pulseStar 1.5s infinite;
  flex-shrink: 0;
}

.age-under-13 { color: var(--red-500); }
.age-13-15 { color: #facc15; }
.age-16-17 { color: var(--green-400); }
.age-adult { color: #fff; }

.status-pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  text-transform: capitalize;
}

.status-pill.accepted { background: var(--green-600); color: #fff; }
.status-pill.rejected { background: var(--red-600); color: #fff; }
.status-pill.pending { background: var(--gold); color: #000; }

.date-cell .reviewed {
  margin-top: 0.25rem;
  color: var(--green-400);
  font-size: 0.6rem;
}

.date-cell .status-pill {
  margin-top: 0.25rem;
}

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

.actions-grid.single-col {
  grid-template-columns: 1fr;
}

.actions-grid .span-2 {
  grid-column: span 2;
}

.action-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: #fff;
  background: var(--primary-500);
  transition: filter 0.15s ease, background 0.15s ease;
}

.action-btn:hover { filter: brightness(1.1); }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.action-btn.accept { background: var(--green-600); border-color: rgba(74, 222, 128, 0.3); }
.action-btn.pending { background: #ca8a04; border-color: rgba(250, 204, 21, 0.3); }
.action-btn.reject { background: var(--red-600); border-color: rgba(248, 113, 113, 0.3); }
.action-btn.remove { background: var(--red-600); border-color: var(--border-strong); }
.action-btn.neutral { background: rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.3); }

.copyable {
  cursor: pointer;
  transition: color 0.15s ease;
}

.copyable:hover {
  color: var(--primary-300);
}

.copyable.copied {
  color: #ffd700 !important;
  animation: copyPulse 0.5s ease-out;
}

@keyframes copyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.list-end {
  text-align: center;
  padding: 1rem 0;
  color: var(--muted-3);
  font-size: 0.7rem;
}

.list-loading {
  text-align: center;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.search-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 0 1rem 1.5rem;
  pointer-events: none;
  display: none;
}

.search-panel.open {
  display: block;
  animation: slideUp 0.15s ease;
}

.search-panel-inner {
  max-width: 48rem;
  margin: 0 auto;
  pointer-events: auto;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.search-head h3 {
  font-size: 1rem;
  margin: 0;
}

.search-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 1rem;
}

.search-close:hover {
  color: var(--red-400);
}

.search-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.65rem;
  color: #e2e8f0;
}

.search-fields label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid #888;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 99999;
  max-width: 300px;
  font-size: 0.7rem;
  line-height: 1.4;
  word-break: break-word;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.15s ease;
}

.modal {
  width: 100%;
  max-width: 32rem;
  border-radius: var(--radius-lg);
  background: rgba(28, 25, 23, 0.98);
  border: 1px solid #57534e;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: scaleIn 0.18s ease;
}

.modal--confirm {
  max-width: 28rem;
  background: rgba(31, 41, 55, 0.98);
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body > * + * {
  margin-top: 1rem;
}

.modal-title {
  font-size: 1.25rem;
  color: #f5f5f4;
  margin: 0;
}

.modal-text {
  color: #a8a29e;
  font-size: 0.8rem;
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(12, 10, 9, 0.5);
  border-top: 1px solid #44403c;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-meta {
  font-size: 0.7rem;
  color: #a8a29e;
}

.modal-meta strong {
  color: #e7e5e4;
}

.modal-status-row {
  display: flex;
  gap: 0.5rem;
}

.modal-status-row button {
  flex: 1;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.modal-status-row button.accept {
  background: rgba(22, 163, 74, 0.2);
  color: var(--green-400);
}

.modal-status-row button.accept.selected {
  background: var(--green-600);
  color: #fff;
}

.modal-status-row button.pending {
  background: rgba(202, 138, 4, 0.2);
  color: var(--gold);
}

.modal-status-row button.pending.selected {
  background: #ca8a04;
  color: #fff;
}

.modal-status-row button.reject {
  background: rgba(220, 38, 38, 0.2);
  color: var(--red-400);
}

.modal-status-row button.reject.selected {
  background: var(--red-600);
  color: #fff;
}

.modal textarea {
  width: 100%;
  min-height: 6rem;
  padding: 0.75rem;
  background: rgba(12, 10, 9, 0.5);
  border: 1px solid #57534e;
  border-radius: var(--radius);
  color: #f5f5f4;
  resize: vertical;
  outline: none;
}

.modal textarea:focus {
  border-color: #a8a29e;
}

.modal-btn {
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
}

.modal-btn.cancel {
  background: transparent;
  color: #d6d3d1;
}

.modal-btn.cancel:hover {
  background: #44403c;
  color: #fff;
}

.modal-btn.save {
  background: #57534e;
  color: #fff;
}

.modal-btn.save:hover {
  background: #78716c;
}

.modal-btn.confirm {
  background: var(--green);
  color: #fff;
}

.modal-btn.confirm:hover {
  filter: brightness(1.08);
}

.notes-view {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #7f8c8d;
  border-radius: var(--radius);
  padding: 1rem;
  white-space: pre-line;
  color: #fff;
  font-size: 0.75rem;
}

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 99998;
  min-width: 20rem;
  max-width: 28rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: toastIn 0.25s ease;
}

.toast.success {
  background: rgba(20, 83, 45, 0.92);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #dcfce7;
}

.toast.error {
  background: rgba(127, 29, 29, 0.92);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fee2e2;
}

.toast-icon {
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

.toast-message {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 500;
}

.toast-undo {
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.toast-undo:hover {
  background: rgba(255, 255, 255, 0.2);
}

.toast-close {
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.7;
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.toast-close:hover {
  opacity: 1;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-view {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  overflow: hidden;
}

.mobile-login {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.mobile-login .mc-container {
  max-width: 24rem;
}

.mobile-login form > * + * {
  margin-top: 1.25rem;
}

.mobile-header {
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 30;
}

.mobile-header-side {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-count {
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted-2);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.icon-btn {
  padding: 0.5rem;
  border-radius: 9999px;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mobile-menu-wrap {
  position: relative;
}

.mobile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 12rem;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 50;
  transform-origin: top right;
  animation: scaleIn 0.15s ease-out;
}

.mobile-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  background: none;
  border: 0;
  font-size: 0.7rem;
  color: #fff;
}

.mobile-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.mobile-search {
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  flex-shrink: 0;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.search-input-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted-3);
}

.mobile-search input {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.5rem 2.5rem;
  font-size: 0.7rem;
  outline: none;
}

.mobile-search input:focus {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--muted-3);
}

.search-chips {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.search-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  font-size: 0.6rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted-2);
  cursor: pointer;
  user-select: none;
}

.chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #bfdbfe;
}

.chip input {
  display: none;
}

.mobile-error {
  background: rgba(127, 29, 29, 0.5);
  border-left: 4px solid var(--red-500);
  color: #fff;
  padding: 0.75rem;
  margin: 0.5rem 1rem;
  font-size: 0.7rem;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.mobile-error button {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
}

.mobile-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--primary-500);
  border-top-color: transparent;
  border-radius: 9999px;
  animation: spin 0.9s linear infinite;
  margin-bottom: 0.75rem;
}

.mobile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  text-align: center;
  color: var(--muted-2);
}

.mobile-empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.mobile-empty-icon svg {
  width: 2rem;
  height: 2rem;
}

.mobile-empty p:first-of-type {
  font-size: 0.8rem;
  color: #fff;
}

.mobile-empty p:last-of-type {
  font-size: 0.65rem;
  margin-top: 0.25rem;
  opacity: 0.6;
}

.app-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease;
  border-left: 4px solid transparent;
}

.app-card:active {
  background: rgba(0, 0, 0, 0.8);
}

.app-card.unreviewed { border-left-color: #eab308; }
.app-card.accepted { border-left-color: var(--green-500); }
.app-card.rejected { border-left-color: var(--red-500); }
.app-card.pending { border-left-color: var(--orange); }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.card-id-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-id {
  font-size: 0.65rem;
  font-family: monospace;
  color: var(--muted-2);
}

.badge {
  font-size: 0.55rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.badge.new { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.badge.accepted { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.badge.rejected { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge.pending { background: rgba(249, 115, 22, 0.2); color: #fdba74; }

.card-date {
  color: var(--muted-3);
  font-size: 0.6rem;
}

.card-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.player-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.player-info {
  min-width: 0;
  overflow: hidden;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}

.player-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-2);
  font-size: 0.65rem;
  margin-top: 0.15rem;
}

.card-qa {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.67rem;
  color: var(--muted);
}

.card-qa > * + * {
  margin-top: 0.5rem;
}

.card-qa-label {
  display: block;
  color: var(--primary-400);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.55rem;
  margin-bottom: 0.15rem;
}

.card-qa-text {
  line-height: 1.5;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-qa-text.expanded {
  display: block;
  color: #f3f4f6;
}

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

.card-actions .span-2 {
  grid-column: span 2;
}

.card-btn {
  padding: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid transparent;
  color: #fff;
}

.card-btn.accept { background: var(--green-600); border-color: rgba(74, 222, 128, 0.3); }
.card-btn.pending { background: #ca8a04; border-color: rgba(250, 204, 21, 0.3); }
.card-btn.reject { background: var(--red-600); border-color: rgba(248, 113, 113, 0.3); }
.card-btn.delete { background: rgba(239, 68, 68, 0.1); color: var(--red-400); border-color: rgba(239, 68, 68, 0.2); }
.card-btn.neutral { background: rgba(0, 0, 0, 0.3); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.card-btn:disabled { opacity: 0.5; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.stat-card p:first-child {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.25rem;
}

.stat-card p:last-child {
  font-size: 1.9rem;
  font-weight: 700;
}

.stat-card.green p:last-child { color: var(--green-400); }
.stat-card.yellow p:last-child { color: var(--gold); }
.stat-card.primary p:last-child { color: var(--primary-300); }

.stats-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.stats-box {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.stats-box h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.bar-row {
  margin-bottom: 0.75rem;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 0.25rem;
}

.bar-track {
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 0.25rem;
}

.bar-fill.green { background: var(--green-500); }
.bar-fill.yellow { background: #eab308; }
.bar-fill.red { background: var(--red-500); }
.bar-fill.primary { background: var(--primary-500); }

.recent-row {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.recent-row .date {
  color: var(--muted);
}

.recent-row .count {
  text-align: right;
  color: #e2e8f0;
}

.stats-footer {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
}

.accounts-wrap {
  max-width: 42rem;
  margin: 0 auto;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.account-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.account-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.8);
  border: 1px solid rgba(147, 197, 253, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.account-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.account-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.account-meta {
  color: var(--muted-2);
  font-size: 0.62rem;
  margin-top: 0.2rem;
}

.account-badge {
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.account-badge.seed {
  background: rgba(250, 204, 21, 0.2);
  color: var(--gold);
  border-color: rgba(250, 204, 21, 0.4);
}

.account-badge.you {
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-300);
  border-color: rgba(96, 165, 250, 0.4);
}

.account-badge.disabled {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.permission-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.65rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.permission-label.disabled,
.permission-label.waiting {
  opacity: 0.5;
  cursor: not-allowed;
}

.create-admin {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.create-admin h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.create-admin .hint {
  color: var(--muted-2);
  font-size: 0.65rem;
  margin-bottom: 1rem;
}

.create-admin form > * + * {
  margin-top: 1rem;
}

.create-admin .actions {
  display: flex;
  justify-content: flex-end;
}

.route-fade {
  animation: fadeIn 0.25s ease;
}

@media (min-width: 640px) {
  .mc-container {
    padding: 2rem;
  }

  .site-subtitle {
    font-size: 1rem;
  }

  .thankyou-actions {
    flex-direction: row;
  }

  .navbar-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .admin-navbar {
    padding: 1rem 1.5rem;
  }

  .admin-dashboard--flush {
    padding: 1rem;
  }

  .admin-panel--flush {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
  }

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

  .app-main {
    min-height: 0;
  }
}

@media (min-width: 1024px) {
  .stats-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .admin-dashboard {
    padding: 0;
  }

  .admin-content {
    padding: 1rem;
  }

  .app-table th,
  .app-table td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .account-row {
    flex-wrap: wrap;
  }

  .account-actions {
    flex-wrap: wrap;
  }
}
