:root {
  color-scheme: dark;
  --bg: #070b14;
  --bg-soft: #0b1020;
  --panel: rgba(15, 22, 39, 0.78);
  --panel-strong: rgba(19, 27, 49, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.035);
  --stroke: rgba(164, 174, 205, 0.16);
  --stroke-strong: rgba(196, 177, 255, 0.32);
  --text: #f6f7fb;
  --muted: #a8b0c5;
  --faint: #727b94;
  --accent: #7c3aed;
  --accent-2: #9333ea;
  --accent-3: #c084fc;
  --danger: #ff454f;
  --danger-soft: rgba(255, 69, 79, 0.14);
  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.14);
  --warn: #f59e0b;
  --blue: #3b82f6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --radius-lg: 14px;
  --sidebar-width: 236px;
  --topbar-height: 88px;
  --focus: 0 0 0 3px rgba(147, 51, 234, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.beta-application-page {
  display: grid;
  gap: 18px;
}

.beta-application-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.beta-application-main,
.beta-application-sidebar {
  display: grid;
  gap: 18px;
}

.beta-application-sidebar {
  position: sticky;
  top: 22px;
}

.beta-application-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  padding: 30px 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(11, 18, 36, 0.98), rgba(14, 20, 38, 0.95));
}

.beta-application-hero-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 18px;
}

.beta-application-hero-copy h2 {
  margin: 0;
  display: grid;
  gap: 6px;
  max-width: 430px;
  line-height: 1;
}

.beta-hero-kicker {
  display: block;
  color: #f2f5ff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.beta-hero-title-glow {
  display: inline-block;
  color: transparent;
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.94;
  background: linear-gradient(180deg, #f2d7ff 0%, #c084fc 34%, #9333ea 100%);
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: 0 0 24px rgba(124, 58, 237, 0.18);
  animation: betaTitleGlow 3.4s ease-in-out infinite;
}

.beta-application-hero-copy p {
  margin: 0;
  max-width: 500px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.beta-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
}

.beta-hero-actions .btn {
  min-height: 48px;
  padding-inline: 18px;
}

.beta-owner-button {
  border-color: rgba(255, 69, 79, 0.34);
  background: linear-gradient(180deg, rgba(77, 15, 28, 0.96), rgba(53, 12, 20, 0.96));
  color: #ffd7db;
  box-shadow: 0 10px 24px rgba(255, 69, 79, 0.12);
}

.beta-owner-button:hover {
  border-color: rgba(255, 69, 79, 0.48);
  background: linear-gradient(180deg, rgba(96, 19, 35, 0.98), rgba(66, 13, 24, 0.98));
  transform: translateY(-1px);
}

.beta-application-hero .btn.primary,
.beta-application-footer-actions .btn.primary,
.beta-application-sidebar .btn.primary {
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.beta-application-hero .btn.primary:hover,
.beta-application-footer-actions .btn.primary:hover,
.beta-application-sidebar .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(124, 58, 237, 0.32);
  filter: saturate(1.06);
}

.beta-application-hero-preview {
  position: relative;
  min-height: 282px;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.beta-application-hero-preview .beta-application-preview-card {
  position: absolute;
  width: min(100%, 248px);
}

.beta-application-hero-preview .beta-card-front {
  z-index: 2;
  left: 18px;
  top: 18px;
  transform: rotate(-8deg) translateZ(0);
}

.beta-application-hero-preview .beta-card-back {
  right: 14px;
  top: 10px;
  transform: rotate(8deg) translateZ(0);
}

.beta-application-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 0;
  padding: 18px 18px 14px;
  align-items: start;
  overflow: hidden;
}

.beta-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  align-content: start;
  padding: 0 8px;
  min-height: 84px;
  border: 0;
  background: transparent;
  transition: transform 160ms ease;
}

.beta-step:hover {
  transform: translateY(-1px);
}

.beta-step-track {
  position: absolute;
  top: 18px;
  left: calc(50% + 19px);
  right: -2px;
  height: 2px;
  background: transparent;
}

.beta-step-track.has-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(120, 134, 170, 0.18);
}

.beta-step.done .beta-step-track,
.beta-step.done .beta-step-track.has-line::after {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.8), rgba(192, 132, 252, 0.72));
}

.beta-step-index,
.beta-sidebar-status-index {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(120, 134, 170, 0.3);
  background: linear-gradient(180deg, rgba(13, 18, 33, 0.98), rgba(18, 22, 36, 0.96));
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(10, 14, 24, 0.95);
}

.beta-step.active .beta-step-index,
.beta-step.done .beta-step-index {
  border-color: rgba(192, 132, 252, 0.54);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.92), rgba(147, 51, 234, 0.82));
}

.beta-step.error .beta-step-index {
  border-color: rgba(248, 113, 113, 0.46);
}

.beta-step-copy,
.beta-sidebar-status-item span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.beta-step-copy strong,
.beta-sidebar-status-item strong {
  font-size: 12px;
  line-height: 1.3;
}

.beta-step-copy small,
.beta-sidebar-status-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.beta-application-form,
.beta-application-section,
.beta-application-grid {
  display: grid;
  gap: 18px;
}

.beta-application-grid {
  align-items: start;
}

.beta-application-section {
  padding: 22px 20px 20px;
}

.beta-application-section .panel-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.beta-application-section .pill {
  min-width: 26px;
  justify-content: center;
}

.beta-photo-upload {
  align-items: start;
}

.beta-photo-drop {
  display: grid;
  min-height: 164px;
  border-radius: 18px;
  border: 1px dashed rgba(167, 139, 250, 0.34);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.beta-photo-drop:hover {
  border-color: rgba(192, 132, 252, 0.52);
  background: rgba(124, 58, 237, 0.06);
  transform: translateY(-1px);
}

.beta-photo-upload.compact {
  align-items: start;
}

.beta-photo-drop.compact {
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 10px;
}

.beta-photo-drop.compact .beta-photo-drop-preview {
  min-height: 56px;
  width: 56px;
  min-width: 56px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.beta-photo-drop.compact.has-image img {
  min-height: 56px;
  height: 56px;
  width: 56px;
}

.beta-photo-drop-copy {
  display: grid;
  gap: 3px;
  align-content: center;
}

.beta-photo-drop-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.beta-photo-drop-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.beta-photo-drop input {
  display: none;
}

.beta-photo-drop-preview {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 164px;
  text-align: center;
  color: var(--muted);
  padding: 18px;
}

.beta-photo-drop-preview svg {
  width: 24px;
  height: 24px;
  color: var(--accent-3);
}

.beta-photo-drop.has-image .beta-photo-drop-preview {
  padding: 0;
}

.beta-photo-drop.has-image img {
  width: 100%;
  height: 100%;
  min-height: 164px;
  object-fit: cover;
}

.beta-radio-group,
.beta-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.beta-radio-pill,
.beta-check-pill,
.beta-radio-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(120, 134, 170, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.beta-radio-pill:hover,
.beta-check-pill:hover,
.beta-radio-item:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 132, 252, 0.36);
  background: rgba(124, 58, 237, 0.06);
}

.beta-radio-pill input,
.beta-check-pill input,
.beta-radio-item input {
  accent-color: var(--accent-3);
  margin: 0;
}

.beta-interest-layout,
.beta-consent-list {
  display: grid;
  gap: 16px;
}

.beta-interest-layout.split {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: start;
}

.beta-radio-column {
  display: grid;
  gap: 10px;
}

.beta-consent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 16px;
}

.beta-consent-copy {
  min-width: 0;
  color: #eef2ff;
  line-height: 1.45;
}

.beta-consent-error {
  grid-column: 1 / -1;
  margin-top: -4px;
}

.beta-application-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.beta-preview-column {
  display: grid;
  gap: 10px;
}

.beta-preview-label {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.beta-application-preview-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 248px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  background:
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.2), transparent 30%),
    linear-gradient(160deg, rgba(20, 21, 31, 0.99), rgba(16, 18, 28, 0.98));
  box-shadow: inset 0 0 32px rgba(124, 58, 237, 0.06);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.beta-application-preview-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.38);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.28), inset 0 0 32px rgba(124, 58, 237, 0.12);
}

.hero-tilt {
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.34), inset 0 0 32px rgba(124, 58, 237, 0.12);
}

.beta-card-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

.beta-card-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beta-card-brand strong {
  color: var(--accent-3);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.beta-card-front-body {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 76px;
  gap: 12px;
  align-items: stretch;
}

.beta-card-front-photo {
  min-height: 118px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(9, 12, 22, 0.9);
  display: grid;
  place-items: center;
}

.beta-card-front-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.beta-card-front-copy {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.beta-card-front-kicker {
  color: rgba(219, 226, 244, 0.56);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.beta-card-front-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.08;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.beta-card-front-meta {
  display: grid;
  gap: 6px;
}

.beta-card-front-meta div,
.beta-card-back-grid div {
  display: grid;
  gap: 2px;
}

.beta-card-front-meta span,
.beta-card-back-grid span,
.beta-card-front-code small,
.beta-card-front-footer,
.beta-card-motto {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.beta-card-front-meta strong,
.beta-card-back-grid strong {
  font-size: 12px;
  line-height: 1.3;
  color: #f7f7fc;
}

.beta-card-front-code {
  display: grid;
  align-content: end;
  gap: 6px;
  min-width: 0;
}

.beta-card-front-qr,
.beta-card-barcode,
.generated-barcode {
  align-self: end;
}

.beta-card-front-qr {
  width: 72px;
  height: 72px;
}

.beta-card-front-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.beta-card-front-footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beta-card-back {
  align-content: space-between;
}

.beta-card-back-mark {
  position: absolute;
  inset: 44px 18px auto auto;
  width: 140px;
  height: 140px;
  opacity: 0.08;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(167, 139, 250, 0.42), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
}

.beta-card-back-copy {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.beta-card-back-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.beta-card-back-note {
  margin: 0;
  max-width: 320px;
  color: #c8d0e5;
  font-size: 12px;
  line-height: 1.5;
}

.beta-card-back-footer {
  display: grid;
  gap: 10px;
}

.beta-card-barcode {
  width: 100%;
  height: 42px;
}

.generated-barcode {
  width: 100%;
  height: 100%;
  display: block;
}

.beta-card-mrz {
  display: grid;
  gap: 4px;
  color: rgba(235, 238, 247, 0.76);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.beta-verified-seal {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 2px solid rgba(167, 139, 250, 0.54);
  color: rgba(192, 132, 252, 0.92);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.22), transparent 62%);
  box-shadow: inset 0 0 20px rgba(167, 139, 250, 0.28), 0 0 22px rgba(124, 58, 237, 0.16);
  animation: betaSealPulse 2.8s ease-in-out infinite;
}

.beta-verified-seal.inline {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 78px;
  height: 78px;
  font-size: 9px;
}

.application-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 134, 170, 0.18);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 700;
}

.application-status-pill.ok { color: #86efac; border-color: rgba(134, 239, 172, 0.28); }
.application-status-pill.warn { color: #fcd34d; border-color: rgba(252, 211, 77, 0.28); }
.application-status-pill.danger { color: #fca5a5; border-color: rgba(252, 165, 165, 0.28); }
.application-status-pill.blue { color: #93c5fd; border-color: rgba(147, 197, 253, 0.28); }

.beta-sidebar-status-list {
  display: grid;
  gap: 10px;
}

.beta-sidebar-status-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(120, 134, 170, 0.18);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 160ms ease, background 160ms ease;
}

.beta-sidebar-status-item:hover {
  border-color: rgba(167, 139, 250, 0.34);
  background: rgba(124, 58, 237, 0.06);
}

.beta-sidebar-status-item.active {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.18), rgba(124, 58, 237, 0.08));
}

.beta-sidebar-status-item.done {
  border-color: rgba(52, 211, 153, 0.32);
}

.beta-sidebar-status-item.error {
  border-color: rgba(248, 113, 113, 0.36);
}

.beta-application-benefits {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.beta-application-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 0;
}

.beta-application-save-note {
  white-space: nowrap;
}

.beta-application-footer-status {
  padding-inline: 4px;
}

.beta-application-submit-note {
  display: inline-block;
  min-height: 18px;
}

.application-error {
  color: #fca5a5;
  font-size: 12px;
}

.beta-inline-error[hidden],
.beta-inline-note[hidden] {
  display: none !important;
}

.application-success {
  border-color: rgba(167, 139, 250, 0.24);
  background: linear-gradient(180deg, rgba(18, 24, 42, 0.98), rgba(12, 18, 30, 0.94));
}

.beta-owner-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
  margin-top: 12px;
}

.beta-owner-review-form {
  align-content: start;
}

.beta-application-section .field > span,
.beta-owner-review-form .field > span {
  margin-bottom: 7px;
  color: #eef2ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.beta-application-section .field input,
.beta-application-section .field select,
.beta-application-section .field textarea,
.beta-owner-review-form .field input,
.beta-owner-review-form .field select,
.beta-owner-review-form .field textarea {
  display: block;
  box-sizing: border-box;
  min-height: 50px;
  height: 50px;
  padding: 12px 14px;
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(6, 11, 23, 0.86);
  line-height: 1.2;
}

.beta-application-section .field.is-invalid input,
.beta-application-section .field.is-invalid select,
.beta-application-section .field.is-invalid textarea,
.beta-owner-review-form .field.is-invalid input,
.beta-owner-review-form .field.is-invalid select,
.beta-owner-review-form .field.is-invalid textarea {
  border-color: rgba(255, 69, 79, 0.78);
  box-shadow: 0 0 0 3px rgba(255, 69, 79, 0.14);
}

.beta-application-section .field textarea,
.beta-owner-review-form .field textarea {
  min-height: 136px;
  height: auto;
  line-height: 1.55;
}

.beta-application-section .field small,
.beta-owner-review-form .field small {
  margin-top: 6px;
  line-height: 1.45;
}

.beta-relations-field,
.beta-interest-field,
.beta-experience-field {
  min-width: 0;
}

.beta-relations-field .beta-radio-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.beta-experience-field .beta-radio-item {
  min-height: 42px;
}

.beta-relations-field.is-invalid .beta-radio-pill,
.beta-experience-field.is-invalid .beta-radio-item {
  border-color: rgba(255, 69, 79, 0.56);
  background: rgba(255, 69, 79, 0.08);
}

.beta-interest-field .beta-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.beta-application-section .field select {
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
}

.beta-application-section .check-row,
.beta-owner-review-form .check-row {
  padding: 14px 16px;
  border-radius: 14px;
}

.beta-photo-upload.is-invalid .beta-photo-drop,
.beta-consent-row.is-invalid {
  border-color: rgba(255, 69, 79, 0.56);
  background: rgba(255, 69, 79, 0.06);
}

.beta-step-copy strong,
.beta-sidebar-status-item strong,
.beta-card-front-copy h3,
.beta-id-data strong,
.beta-issued-copy h2,
.beta-application-hero-copy h2 {
  white-space: normal;
  word-break: break-word;
}

.beta-sidebar-status-item {
  min-height: 72px;
}

.beta-application-sidebar .card,
.beta-application-main .card {
  border-radius: 18px;
}

.beta-issued-page {
  display: grid;
  gap: 18px;
}

.beta-issued-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 20px;
  padding: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.24), transparent 30%),
    linear-gradient(180deg, rgba(10, 16, 31, 0.98), rgba(18, 12, 34, 0.96));
}

.beta-issued-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.beta-issued-copy h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.04;
}

.beta-issued-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  max-width: 650px;
}

.beta-issued-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.beta-issued-hero-card {
  display: grid;
  align-items: center;
}

.beta-issued-hero-card .beta-id-document {
  transform: rotate(-2.5deg);
}

.beta-issued-document-card,
.beta-issued-status-card {
  min-height: 100%;
}

.beta-issued-document-shell {
  padding: 12px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top center, rgba(167, 139, 250, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(192, 132, 252, 0.14);
}

.beta-issued-metrics {
  display: grid;
  gap: 12px;
}

.beta-issued-metric {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(120, 134, 170, 0.16);
  background: rgba(255, 255, 255, 0.025);
}

.beta-issued-metric span {
  color: var(--muted);
  font-size: 12px;
}

.beta-issued-metric strong {
  font-size: 15px;
}

.beta-issued-accent-band {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(192, 132, 252, 0.24);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.12), rgba(124, 58, 237, 0.05));
}

.beta-issued-accent-band > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--accent-3);
  background: rgba(124, 58, 237, 0.14);
}

.beta-issued-accent-band strong,
.beta-issued-accent-band p {
  margin: 0;
}

.beta-issued-accent-band p {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.55;
}

@keyframes betaSealPulse {
  0%, 100% { transform: scale(1); opacity: 0.94; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes betaTitleGlow {
  0%, 100% {
    filter: saturate(1);
    text-shadow: 0 0 18px rgba(124, 58, 237, 0.16);
  }
  50% {
    filter: saturate(1.12);
    text-shadow: 0 0 26px rgba(124, 58, 237, 0.28);
  }
}

@media (max-width: 1180px) {
  .beta-application-layout,
  .beta-owner-review-layout,
  .beta-application-hero,
  .beta-issued-hero {
    grid-template-columns: 1fr;
  }

  .beta-application-sidebar {
    position: static;
  }

  .beta-application-preview-grid,
  .beta-application-stepper {
    grid-template-columns: 1fr;
  }

  .beta-step-track {
    display: none;
  }

  .beta-id-body {
    grid-template-columns: 1fr;
  }

  .beta-id-preview-grid {
    grid-template-columns: 1fr;
  }

  .beta-interest-layout.split,
  .beta-radio-group,
  .beta-check-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .beta-application-hero-copy h2 {
    gap: 4px;
  }

  .beta-hero-kicker {
    font-size: 18px;
  }

  .beta-hero-title-glow {
    font-size: 52px;
  }

  .beta-card-front-body {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .beta-card-front-qr {
    display: none;
  }

  .beta-photo-drop.compact {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .beta-photo-drop.compact .beta-photo-drop-preview {
    width: 56px;
    min-width: 56px;
  }

  .beta-interest-layout.split,
  .beta-relations-field .beta-radio-group,
  .beta-radio-group,
  .beta-check-grid {
    grid-template-columns: 1fr;
  }

  .beta-card-front-footer,
  .beta-card-back-grid {
    grid-template-columns: 1fr;
    white-space: normal;
  }

  .beta-application-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .beta-application-footer-actions .row-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .beta-application-save-note,
  .beta-application-submit-note {
    white-space: normal;
  }

  .beta-issued-copy h2 {
    font-size: 30px;
  }

  .beta-id-head h3 {
    font-size: 28px;
  }

  .beta-id-watermark {
    position: static;
    transform: none;
    justify-self: start;
    margin-top: 4px;
  }
}

* {
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 4%, rgba(124, 58, 237, 0.18), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(59, 130, 246, 0.12), transparent 32%),
    linear-gradient(135deg, #050814 0%, #0b1223 48%, #060916 100%);
  font-size: 14px;
  overflow-x: hidden;
}

body.light {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-soft: #eef2ff;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --panel-soft: rgba(17, 24, 39, 0.035);
  --stroke: rgba(17, 24, 39, 0.12);
  --stroke-strong: rgba(124, 58, 237, 0.32);
  --text: #111827;
  --muted: #4b5563;
  --faint: #6b7280;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 55%, #fff 100%);
}

button,
input,
select,
textarea {
  max-width: 100%;
  font: inherit;
  line-height: 1.25;
}

button {
  color: inherit;
}

a {
  color: var(--accent-3);
}

img {
  display: block;
  max-width: 100%;
}

.app-shell > *,
.main-shell,
.content,
.page,
.grid > *,
.card,
.stat-card,
.module-card,
.toolbar > *,
.panel-header > *,
.section-header > *,
.tabs > *,
.row-actions > *,
.list-row > *,
.quick-action > *,
.owner-summary-metric > *,
.ranking-row > *,
.field {
  min-width: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 20px;
  border-right: 1px solid var(--stroke);
  background: rgba(5, 9, 18, 0.82);
  backdrop-filter: blur(22px);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.16);
}

body.light .sidebar {
  background: rgba(255, 255, 255, 0.78);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px solid rgba(192, 132, 252, 0.72);
  border-radius: 16px;
  color: var(--accent-3);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 24px rgba(124, 58, 237, 0.24), 0 0 28px rgba(124, 58, 237, 0.2);
}

.brand strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.brand span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-list {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #d8dced;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--stroke);
  transform: translateX(2px);
}

.nav-button:focus-visible,
.icon-button:focus-visible,
.btn:focus-visible,
.profile-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.tab:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.nav-button.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.82), rgba(88, 28, 135, 0.42));
  border-color: rgba(192, 132, 252, 0.3);
  color: #fff;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.18);
}

.nav-icon,
.inline-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex: 0 0 auto;
}

.nav-icon svg,
.inline-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.sidebar-score {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.78), rgba(20, 15, 39, 0.68));
}

.score-label,
.card-kicker {
  color: var(--muted);
  font-size: 14px;
}

.score-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 10px;
}

.score-value span {
  font-size: 44px;
  line-height: 1;
  color: var(--accent-3);
  font-weight: 700;
}

.score-value small {
  color: var(--muted);
  font-size: 20px;
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-3));
  transition: width 0.28s ease;
}

.score-level {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px -20px -24px;
  padding: 14px 20px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 13px;
}

.main-shell {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(24px);
}

body.light .topbar {
  background: rgba(255, 255, 255, 0.72);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.topbar-left {
  flex: 1 1 auto;
}

.topbar-left > div {
  min-width: 0;
}

.topbar-actions {
  flex: 0 1 auto;
  justify-content: flex-end;
}

.topbar-left h1 {
  max-width: 100%;
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.topbar-left p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.icon-button:hover {
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateY(-1px);
}

.icon-button em {
  position: absolute;
  top: 4px;
  right: 3px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.menu-button {
  font-size: 22px;
}

.search-box {
  display: flex;
  width: min(310px, 24vw);
  min-width: min(190px, 100%);
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(10, 16, 30, 0.76);
  color: var(--muted);
}

body.light .search-box {
  background: rgba(255, 255, 255, 0.75);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(170px, 100%);
  max-width: 220px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.profile-avatar,
.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.8), rgba(192, 132, 252, 0.35));
  color: #fff;
  font-weight: 700;
}

.profile-avatar img,
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-button strong,
.profile-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-button small {
  margin-top: 3px;
  color: var(--muted);
}

.content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 28px 42px;
}

.content:focus {
  outline: none;
}

.loading-screen {
  display: grid;
  min-height: 55vh;
  place-items: center;
  color: var(--muted);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(192, 132, 252, 0.18);
  border-top-color: var(--accent-3);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.page {
  display: grid;
  gap: 18px;
  animation: pageIn 0.24s ease;
}

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

.toolbar,
.tabs,
.panel-header,
.section-header,
.form-actions,
.row-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.toolbar > .grid {
  min-width: min(100%, 320px);
  flex: 1 1 auto;
}

.row-actions {
  flex: 0 1 auto;
  flex-wrap: wrap;
  min-width: 0;
  justify-content: flex-end;
}

.tabs {
  min-width: 0;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stroke);
}

.tab {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  overflow-wrap: anywhere;
  text-align: center;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tab:hover {
  color: var(--text);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.045);
}

.tab.active {
  color: #fff;
  border-color: rgba(192, 132, 252, 0.35);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.72), rgba(88, 28, 135, 0.38));
  box-shadow: inset 0 -2px 0 var(--accent-3);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

.layout-2-1 {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.layout-1-2 {
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 2fr);
}

.layout-3 {
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.55fr) minmax(300px, 0.9fr);
}

.lover-layout {
  align-items: start;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.8fr);
}

.card,
.stat-card,
.empty-state,
.module-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.card,
.module-card {
  padding: 18px;
}

.card.compact {
  padding: 14px;
}

.card.stretch {
  min-height: 100%;
}

.card:hover,
.module-card:hover,
.stat-card:hover {
  border-color: rgba(192, 132, 252, 0.24);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

.owner-dashboard {
  gap: 16px;
}

.owner-dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 2px;
}

.active-beta-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.active-beta-line > span {
  color: var(--muted);
  white-space: nowrap;
}

.active-beta-select {
  display: grid;
  grid-template-columns: 30px minmax(160px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 230px;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid rgba(164, 174, 205, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.active-beta-select .mini-avatar {
  width: 30px;
  height: 30px;
}

.active-beta-select select {
  min-height: 32px;
  padding: 0 30px 0 0;
  border: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--text);
}

.accent-text {
  color: var(--accent-3);
}

.owner-dash-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-field {
  min-width: 240px;
}

.control-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(192, 132, 252, 0.28);
  border-radius: var(--radius);
  background: rgba(124, 58, 237, 0.12);
}

.control-mode span {
  color: var(--muted);
  font-size: 12px;
}

.control-mode strong {
  color: var(--accent-3);
  font-size: 14px;
}

.owner-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(340px, 0.82fr);
  gap: 16px;
  align-items: start;
}

.owner-main-stack,
.owner-side-stack {
  display: grid;
  gap: 16px;
}

.owner-card {
  padding: 18px;
}

.owner-card .panel-header {
  min-height: 38px;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.owner-card .panel-header h2 {
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0;
}

.owner-card .panel-header .btn,
.owner-card .panel-header .pill {
  flex: 0 0 auto;
}

.beta-lock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.beta-lock-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas:
    "avatar info"
    "time time"
    "progress progress";
  gap: 10px 12px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.beta-lock-card:hover,
.beta-lock-card.active {
  border-color: rgba(192, 132, 252, 0.36);
  background: rgba(124, 58, 237, 0.14);
}

.beta-avatar,
.mini-avatar {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.18);
  color: var(--accent-3);
  font-weight: 700;
}

.beta-avatar {
  grid-area: avatar;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.08);
}

.beta-avatar img,
.mini-avatar img,
.active-beta-select .mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.beta-avatar em {
  position: absolute;
  right: -2px;
  top: -2px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--ok);
  color: #04130a;
}

.beta-avatar em svg {
  width: 13px;
  height: 13px;
}

.beta-lock-info {
  grid-area: info;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.beta-lock-time {
  grid-area: time;
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
  padding-top: 2px;
}

.beta-lock-time b {
  flex: 0 0 auto;
  font-size: 21px;
  line-height: 1;
  white-space: nowrap;
}

.beta-lock-time small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beta-lock-progress {
  grid-area: progress;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.beta-lock-info strong,
.owner-list-row strong,
.submission-row strong {
  min-width: 0;
  overflow-wrap: break-word;
}

.beta-lock-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beta-lock-info small,
.beta-lock-progress small,
.ranking-row small,
.owner-list-row small,
.submission-excerpt {
  color: var(--muted);
}

.progress.slim {
  height: 5px;
}

.progress.slim.ok span {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.progress.slim.warn span {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.owner-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid rgba(164, 174, 205, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
}

.owner-summary-metric {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 10px;
  padding: 14px;
  border-right: 1px solid rgba(164, 174, 205, 0.1);
  background: rgba(255, 255, 255, 0.026);
}

.owner-summary-metric:last-child {
  border-right: 0;
}

.owner-summary-metric > span {
  grid-row: span 2;
  color: var(--accent-3);
}

.owner-summary-metric small {
  color: var(--muted);
}

.owner-summary-metric strong {
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.12;
  overflow-wrap: break-word;
}

.ranking-list,
.owner-list,
.submission-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 28px 34px minmax(0, 1fr) auto;
  grid-template-areas:
    "rank avatar name value"
    "rank avatar meta meta"
    "rank avatar bar bar";
  gap: 4px 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(164, 174, 205, 0.08);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.rank-number {
  grid-area: rank;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: rgba(124, 58, 237, 0.2);
  color: var(--accent-3);
}

.ranking-row .mini-avatar {
  grid-area: avatar;
}

.mini-avatar {
  width: 34px;
  height: 34px;
}

.ranking-row strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row small {
  grid-area: meta;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-bar {
  grid-area: bar;
  width: 100%;
  min-width: 0;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.ranking-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.ranking-bar.penalty span {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
}

.ranking-bar.xp span {
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.ranking-row em {
  grid-area: value;
  align-self: start;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.submission-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 1px solid transparent;
  border-bottom-color: rgba(164, 174, 205, 0.08);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.submission-row.full {
  padding: 14px;
  border: 1px solid rgba(164, 174, 205, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
}

.submission-row:hover,
.submission-row:focus-visible,
.submission-row.active {
  border-color: rgba(192, 132, 252, 0.38);
  background: rgba(124, 58, 237, 0.12);
  outline: 0;
}

.submission-row:hover {
  transform: translateY(-1px);
}

.submission-row:last-child {
  border-bottom-color: transparent;
}

.submission-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.submission-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.submission-title-line strong {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-title-line small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.submission-title-line .pill {
  flex: 0 1 auto;
}

.submission-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.full-list {
  gap: 10px;
}

.full-list .submission-excerpt {
  -webkit-line-clamp: 3;
}

.owner-submissions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.58fr);
  gap: 16px;
  align-items: start;
}

.submission-detail-card {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 16px;
}

.submission-detail-profile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(164, 174, 205, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.submission-detail-profile div,
.submission-detail-content,
.submission-history {
  min-width: 0;
}

.submission-detail-profile strong,
.submission-detail-content h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-detail-profile span:last-child,
.submission-detail-content p {
  color: var(--muted);
}

.submission-detail-content {
  display: grid;
  gap: 8px;
}

.submission-detail-content h3,
.submission-history h3 {
  margin: 0;
  font-size: 16px;
}

.submission-detail-content p {
  margin: 0;
  line-height: 1.55;
}

.submission-explanation-note,
.submission-waiting-state {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.08);
}

.submission-explanation-note p,
.submission-waiting-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.submission-explanation-note span {
  color: var(--muted);
  font-size: 12px;
}

.submission-waiting-state {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
}

.submission-waiting-state .inline-icon {
  color: var(--warn);
}

.submission-response-field textarea {
  min-height: 116px;
}

.submission-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.submission-action-grid .btn {
  justify-content: center;
  min-height: 42px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.submission-action-grid .btn:last-child {
  grid-column: 1 / -1;
}

.submission-detail-meta {
  padding-top: 2px;
}

.submission-history-card {
  margin-top: 16px;
}

.submission-history-list {
  display: grid;
  gap: 10px;
}

.submission-history-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(164, 174, 205, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
}

.submission-history-row strong,
.submission-history-row p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-history-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.submission-history-row time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.submission-beta-explanations {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  margin-bottom: 16px;
}

.submission-beta-explanations h3 {
  margin: 0;
  font-size: 16px;
}

.submission-explanation-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.08);
}

.submission-explanation-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.submission-explanation-context {
  display: grid;
  gap: 12px;
}

.submission-explanation-context small,
.submission-explanation-context dt {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.submission-explanation-context dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.submission-explanation-context dd {
  margin: 2px 0 0;
  color: var(--text);
  font-weight: 700;
}

.submission-owner-request {
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.08);
}

.betas-module {
  gap: 16px;
}

.assigned-beta-list {
  display: grid;
  gap: 12px;
}

.assigned-beta-row {
  display: grid;
  grid-template-columns: 70px minmax(210px, 1fr) minmax(420px, 1.25fr) auto;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(124, 58, 237, 0.055));
  box-shadow: var(--shadow);
}

.assigned-beta-row:hover {
  border-color: rgba(192, 132, 252, 0.36);
  background: rgba(124, 58, 237, 0.12);
}

.assigned-beta-avatar {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 18px;
  background: rgba(124, 58, 237, 0.16);
  color: var(--accent-3);
  font-weight: 800;
}

.assigned-beta-avatar.large {
  width: 92px;
  height: 92px;
  border-radius: 22px;
}

.assigned-beta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assigned-beta-avatar em {
  position: absolute;
  right: 5px;
  top: 5px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--ok);
  color: #04130a;
}

.assigned-beta-avatar em svg {
  width: 13px;
  height: 13px;
}

.assigned-beta-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.assigned-beta-main > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.assigned-beta-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assigned-beta-main span,
.assigned-beta-main p {
  color: var(--muted);
  font-size: 12px;
}

.assigned-beta-main p {
  margin: 0;
}

.assigned-beta-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.beta-metric {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(164, 174, 205, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.beta-metric .inline-icon {
  grid-row: span 2;
  color: var(--accent-3);
}

.beta-metric small,
.beta-metric strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beta-metric small {
  color: var(--muted);
  font-size: 11px;
}

.beta-metric strong {
  font-size: 13px;
}

.beta-metric.danger .inline-icon,
.beta-metric.danger strong {
  color: var(--danger);
}

.beta-metric.warn .inline-icon,
.beta-metric.warn strong {
  color: var(--warn);
}

.assigned-beta-actions {
  display: flex;
  justify-content: flex-end;
}

.beta-detail-view {
  gap: 16px;
}

.beta-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.beta-detail-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.beta-detail-profile h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.beta-detail-profile p {
  margin: 0 0 10px;
  color: var(--muted);
}

.beta-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.beta-detail-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.beta-detail-card-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(164, 174, 205, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.026);
}

.beta-detail-card-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-list-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(164, 174, 205, 0.08);
}

.owner-list-row:last-child {
  border-bottom: 0;
}

.status-dot,
.calendar-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: rgba(124, 58, 237, 0.18);
  color: var(--accent-3);
}

.status-dot.ok {
  background: var(--ok-soft);
}

.status-dot.warn {
  background: rgba(245, 158, 11, 0.15);
}

.status-dot.danger {
  background: var(--danger-soft);
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 10px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.quick-action.primary {
  border-color: rgba(192, 132, 252, 0.3);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.34), rgba(124, 58, 237, 0.12));
}

.quick-action > span {
  grid-row: span 2;
  color: var(--accent-3);
}

.quick-action small {
  color: var(--muted);
}

.owner-note-box {
  position: relative;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
}

.owner-note-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.owner-note-box span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}

.owner-note-box .btn {
  position: absolute;
  right: 14px;
  bottom: 12px;
}

.panel-header,
.section-header {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header h2,
.section-header h2,
.card h2 {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.panel-header p,
.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.stat-card {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 20px;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22), transparent 68%);
  pointer-events: none;
}

.stat-title {
  color: var(--muted);
  font-size: 14px;
}

.stat-value {
  margin-top: 12px;
  font-size: clamp(24px, 2.2vw, 36px);
  line-height: 1;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.stat-value.accent { color: var(--accent-3); }
.stat-value.danger { color: var(--danger); }
.stat-value.ok { color: var(--ok); }
.stat-value.blue { color: var(--blue); }

.stat-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.hero-panel {
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(192, 132, 252, 0.24);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.24), rgba(59, 130, 246, 0.08)),
    var(--panel);
}

.btn {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  line-height: 1.2;
  white-space: normal;
  text-decoration: none;
  overflow-wrap: anywhere;
  text-align: center;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--stroke-strong);
  background: rgba(255, 255, 255, 0.07);
}

.btn.primary {
  border-color: rgba(192, 132, 252, 0.35);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.btn.danger {
  border-color: rgba(255, 69, 79, 0.28);
  background: var(--danger-soft);
  color: #ff8b91;
}

.btn.ok {
  border-color: rgba(34, 197, 94, 0.28);
  background: var(--ok-soft);
  color: #8ce9ae;
}

.btn.ghost {
  background: transparent;
}

.btn.small,
.icon-small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.btn.full {
  width: 100%;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field > span,
.check-row span {
  color: var(--muted);
  font-size: 13px;
}

.field small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.4;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 46px;
  min-height: 46px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(9, 14, 26, 0.76);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(192, 132, 252, 0.24);
}

.field select,
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

body.light .field input,
body.light .field select,
body.light .field textarea {
  background-color: rgba(255, 255, 255, 0.82);
}

.field textarea {
  height: auto;
  min-height: 128px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-3);
  box-shadow: var(--focus);
}

.hint,
.muted {
  color: var(--muted);
}

.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }
.accent-text { color: var(--accent-3); }

.form-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
}

.check-row,
.toggle-row,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(164, 174, 205, 0.1);
  border-radius: 14px;
  min-width: 0;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.check-row:last-child,
.toggle-row:last-child,
.list-row:last-child {
  border-bottom: 0;
}

.list-row > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.list-row > div:first-child strong,
.list-row > div:first-child .muted {
  overflow-wrap: break-word;
}

.list-row:hover,
.toggle-row:hover,
.check-row:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(192, 132, 252, 0.16);
}

.betaid-owner-row {
  align-items: flex-start;
}

.betaid-owner-row-actions {
  margin-top: 10px;
  justify-content: flex-start;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}

.switch input {
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.34);
  cursor: pointer;
  transition: background 0.18s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}

.switch input:checked + span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.image-drop {
  display: grid;
  min-height: 168px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(192, 132, 252, 0.42);
  border-radius: var(--radius-lg);
  background: rgba(124, 58, 237, 0.06);
  color: var(--muted);
  text-align: center;
}

.image-drop img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.image-drop.small {
  min-height: 112px;
}

.empty-state {
  display: grid;
  min-height: 170px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(164, 174, 205, 0.1);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

tbody tr:hover {
  background: rgba(124, 58, 237, 0.08);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.pill,
.badge {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.16);
  color: var(--accent-3);
  font-size: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
}

.pill.ok { border-color: rgba(34, 197, 94, 0.22); background: var(--ok-soft); color: #86efac; }
.pill.danger { border-color: rgba(255, 69, 79, 0.22); background: var(--danger-soft); color: #ff8b91; }
.pill.warn { border-color: rgba(245, 158, 11, 0.22); background: rgba(245, 158, 11, 0.12); color: #facc15; }
.pill.blue { border-color: rgba(59, 130, 246, 0.22); background: rgba(59, 130, 246, 0.14); color: #93c5fd; }

.timeline {
  position: relative;
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(164, 174, 205, 0.1);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.14);
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
}

.toast {
  padding: 14px 16px;
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius);
  background: rgba(12, 17, 31, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  color: var(--text);
  animation: toastIn 0.22s ease;
}

.toast.ok { border-color: rgba(34, 197, 94, 0.34); }
.toast.error { border-color: rgba(255, 69, 79, 0.38); }

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

.beta-preview {
  position: relative;
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 22px;
  min-height: 280px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(192, 132, 252, 0.5);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(9, 14, 26, 0.2), rgba(124, 58, 237, 0.18)),
    var(--card-bg, rgba(10, 16, 30, 0.72));
  box-shadow: inset 0 0 34px rgba(124, 58, 237, 0.12);
}

.beta-preview.light-card {
  --card-bg: rgba(238, 238, 240, 0.92);
  color: #141824;
}

.beta-preview.dark-card {
  --card-bg: rgba(10, 16, 30, 0.92);
}

.beta-id-document {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(192, 132, 252, 0.38);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 16%, rgba(192, 132, 252, 0.18), transparent 32%),
    linear-gradient(150deg, rgba(8, 12, 24, 0.98), rgba(18, 12, 34, 0.98));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28), inset 0 0 28px rgba(124, 58, 237, 0.12);
  overflow: hidden;
}

.beta-id-document-unified {
  gap: 18px;
}

.beta-id-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.beta-id-glow {
  position: absolute;
  inset: auto -60px -60px auto;
  width: 200px;
  height: 200px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.16), transparent 68%);
  pointer-events: none;
}

.beta-id-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.beta-id-head small {
  color: var(--muted);
}

.beta-id-head h3 {
  margin: 3px 0 0;
  color: var(--accent-3);
  letter-spacing: 0;
  font-size: 34px;
}

.beta-id-body {
  display: grid;
  grid-template-columns: minmax(172px, 0.54fr) minmax(0, 1fr);
  gap: 18px;
}

.beta-id-photo {
  overflow: hidden;
  border: 1px solid rgba(192, 132, 252, 0.38);
  border-radius: 18px;
  min-height: 220px;
  background: rgba(255, 255, 255, 0.03);
}

.beta-id-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.beta-id-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.beta-id-data div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.beta-id-data span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.beta-id-data strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.beta-id-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(164, 174, 205, 0.28);
}

.beta-id-foot-copy {
  display: grid;
  gap: 4px;
}

.beta-id-foot p,
.beta-id-foot small {
  margin: 0;
  color: var(--muted);
}

.beta-id-qr {
  width: 82px;
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.94) 0 8%, transparent 8% 12%, rgba(255,255,255,0.94) 12% 18%, transparent 18% 22%, rgba(255,255,255,0.94) 22% 28%, transparent 28% 34%, rgba(255,255,255,0.94) 34% 42%, transparent 42% 48%, rgba(255,255,255,0.94) 48% 54%, transparent 54% 60%, rgba(255,255,255,0.94) 60% 69%, transparent 69% 74%, rgba(255,255,255,0.94) 74% 80%, transparent 80% 86%, rgba(255,255,255,0.94) 86% 100%),
    rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.beta-id-codebox {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.beta-id-barcode {
  width: 126px;
  height: 52px;
}

.beta-id-qr span,
.beta-id-qr strong {
  color: rgba(12, 15, 26, 0.9);
  font-size: 11px;
  font-weight: 800;
}

.beta-id-watermark {
  position: absolute;
  right: -12px;
  bottom: 18px;
  transform: rotate(-14deg);
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid rgba(167, 139, 250, 0.36);
  color: rgba(192, 132, 252, 0.84);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.08);
  box-shadow: inset 0 0 14px rgba(167, 139, 250, 0.16);
}

.betaid-document-wide {
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.024), rgba(255,255,255,0.01));
}

.betaid-document-wide .beta-id-document {
  min-height: 408px;
}

.beta-photo {
  overflow: hidden;
  border: 1px solid rgba(192, 132, 252, 0.44);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.beta-photo img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.beta-title {
  color: var(--accent-3);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}

.beta-number {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.beta-data {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.beta-data div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.stamp {
  position: absolute;
  right: 24px;
  bottom: 18px;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  border: 4px solid rgba(192, 132, 252, 0.82);
  border-radius: 50%;
  color: var(--accent-3);
  font-size: 30px;
  font-weight: 900;
  transform: rotate(-12deg);
  box-shadow: 0 0 30px rgba(192, 132, 252, 0.34), inset 0 0 18px rgba(192, 132, 252, 0.22);
  animation: stampPulse 2.2s ease-in-out infinite;
}

@keyframes stampPulse {
  0%, 100% { transform: rotate(-12deg) scale(1); }
  50% { transform: rotate(-12deg) scale(1.05); }
}

.card-back {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 24px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(3, 7, 18, 0.72)),
    rgba(9, 14, 26, 0.9);
  text-align: center;
}

.card-back img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
}

.owner-photo {
  aspect-ratio: 1 / 1.08;
}

.quick-preview {
  display: grid;
  gap: 12px;
}

.quick-preview div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1fr);
  gap: 14px;
}

.lover-list {
  display: grid;
  gap: 10px;
}

.attach-account {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
}

.lover-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(70px, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.lover-card:hover,
.lover-card.active {
  border-color: rgba(192, 132, 252, 0.36);
  background: rgba(124, 58, 237, 0.18);
}

.thumb {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(124, 58, 237, 0.18);
  color: var(--accent-3);
  font-weight: 700;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.76fr) minmax(0, 1fr);
  gap: 18px;
}

.profile-photo {
  aspect-ratio: 3 / 4;
}

.summary-metric {
  display: grid;
  min-width: 0;
  min-height: 118px;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.summary-metric strong {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.lover-task-form {
  margin-top: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(164, 174, 205, 0.1);
}

.compact-table table {
  min-width: 680px;
}

.device-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.device-photo {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(192, 132, 252, 0.28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.24), rgba(10, 16, 30, 0.1) 60%);
}

.device-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ok-soft);
  color: #86efac;
  font-weight: 700;
}

.device-status.open {
  background: var(--danger-soft);
  color: #ff9aa0;
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
}

.bar-row span:nth-child(2) {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.bar-row span:nth-child(2)::before {
  content: "";
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--accent-3));
}

.donut {
  --p: 55%;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--p), rgba(148, 163, 184, 0.16) 0);
}

.donut > span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-soft);
  font-size: 22px;
  font-weight: 800;
}

.settings-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(170px, auto);
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(164, 174, 205, 0.1);
}

.settings-row input,
.settings-row select {
  min-height: 42px;
  height: 42px;
  min-width: 170px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background-color: rgba(9, 14, 26, 0.76);
  color: var(--text);
  padding: 10px 34px 10px 12px;
  outline: none;
}

body.light .settings-row input,
body.light .settings-row select {
  background-color: rgba(255, 255, 255, 0.82);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.18);
  color: var(--accent-3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.gallery-item {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item div {
  padding: 10px;
}

.auth-page {
  min-height: calc(100vh - var(--topbar-height) - 64px);
  place-items: center;
}

.auth-card {
  width: min(520px, 100%);
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-error {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 69, 79, 0.34);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: #ffb3b7;
  line-height: 1.45;
}

.permission-grid {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(164, 174, 205, 0.1);
}

.permission-row:last-child {
  border-bottom: 0;
}

.permission-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.preset-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.compact-permissions {
  max-height: 300px;
}

.profile-switcher {
  flex-wrap: wrap;
}

.profile-switcher select {
  height: 40px;
  min-width: 220px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background-color: rgba(9, 14, 26, 0.76);
  color: var(--text);
  padding: 9px 34px 9px 12px;
  outline: none;
}

.profile-switcher select:focus-visible {
  box-shadow: var(--focus);
  border-color: var(--accent-3);
}

.community-page {
  gap: 14px;
}

.community-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.community-topline h2 {
  margin: 0;
  font-size: 22px;
}

.community-topline p {
  margin: 4px 0 0;
  color: var(--muted);
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(320px, 380px);
  gap: 16px;
  align-items: start;
}

.community-main,
.community-sidebar,
.community-post-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.community-sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
}

.community-composer {
  display: grid;
  gap: 14px;
  border-color: rgba(192, 132, 252, 0.18);
  background:
    radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.16), transparent 34%),
    var(--panel);
}

.community-composer-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.community-composer textarea {
  min-height: 84px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--stroke);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 12px 0;
}

.community-composer textarea:focus {
  border-color: var(--accent-3);
}

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

.community-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
}

.community-upload:hover {
  color: var(--text);
  border-color: var(--stroke-strong);
}

.community-upload input {
  display: none;
}

.community-post {
  display: grid;
  gap: 14px;
  border-color: rgba(164, 174, 205, 0.13);
  background:
    radial-gradient(circle at 100% 0, rgba(124, 58, 237, 0.08), transparent 28%),
    var(--panel);
}

.community-post-head,
.community-user-row,
.community-search-row,
.community-request-row,
.community-popular-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.community-post-head strong,
.community-user-row strong,
.community-search-row strong,
.community-request-row strong,
.community-popular-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-post-head span,
.community-user-row small,
.community-search-row small,
.community-request-row small,
.community-popular-row small {
  color: var(--muted);
  font-size: 12px;
}

.community-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--stroke-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.24), rgba(15, 23, 42, 0.86));
  color: var(--accent-3);
  font-weight: 800;
}

.community-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.community-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-avatar i {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #080d18;
  border-radius: 50%;
  background: var(--ok);
}

.community-post-content p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.community-tagline,
.community-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.community-tagline span,
.community-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: var(--radius);
  background: rgba(124, 58, 237, 0.13);
  color: var(--accent-3);
  font-size: 12px;
}

.community-post-image {
  width: 100%;
  max-height: 420px;
  margin-top: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.community-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--stroke);
  padding-top: 10px;
}

.community-actions button,
.community-friend-chips button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.community-actions button:hover,
.community-actions button.active,
.community-friend-chips button:hover,
.community-friend-chips button.active {
  background: rgba(124, 58, 237, 0.16);
  color: var(--accent-3);
}

.community-comments {
  display: grid;
  gap: 8px;
}

.community-comment,
.community-comment-form,
.community-message-form {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.community-comment {
  grid-template-columns: 32px minmax(0, 1fr);
}

.community-message-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.community-comment > div {
  padding: 9px 11px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.community-comment p {
  margin: 3px 0 0;
  color: var(--muted);
}

.community-comment-form input,
.community-message-form input,
.community-message-form textarea {
  height: 38px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(9, 14, 26, 0.72);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

.community-message-form input,
.community-message-form textarea {
  height: 50px;
  padding: 12px 14px;
  font-size: 15px;
}

.community-message-form textarea {
  min-height: 56px;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-message-form .btn {
  min-height: 50px;
}

.community-comment-form input:focus,
.community-message-form input:focus,
.community-message-form textarea:focus {
  border-color: var(--accent-3);
  box-shadow: var(--focus);
}

.community-side-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(124, 58, 237, 0.08), transparent 34%),
    var(--panel);
}

.community-side-card .panel-header h2 {
  font-size: 15px;
}

.community-user-row,
.community-search-row,
.community-request-row,
.community-popular-row {
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.community-search-row,
.community-request-row {
  grid-template-columns: 32px minmax(0, 1fr) auto;
}

.community-user-row:hover,
.community-search-row:hover,
.community-request-row:hover,
.community-popular-row:hover {
  border-color: var(--stroke-strong);
  background: rgba(124, 58, 237, 0.08);
}

.community-user-list,
.community-request-list,
.community-popular-list {
  display: grid;
  gap: 6px;
}

.community-messenger {
  gap: 12px;
}

.community-messages-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.community-messages-list,
.community-messages-chat {
  display: grid;
  gap: 12px;
  align-content: start;
}

.community-message-user {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(14, 20, 38, 0.78);
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.community-message-user:hover,
.community-message-user.active {
  border-color: var(--accent-2);
  box-shadow: var(--ring);
}

.community-message-user-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.community-message-user-meta strong,
.community-message-user-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-friend-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.community-friend-chips button {
  flex: 0 0 auto;
  min-width: 96px;
  border: 1px solid var(--stroke);
  padding: 6px 8px;
}

.community-friend-chips img,
.community-friend-chips > button > span:first-child {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.community-chat {
  display: grid;
  gap: 10px;
}

.community-chat-messages {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.community-message {
  justify-self: start;
  max-width: 86%;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.community-message.mine {
  justify-self: end;
  border-color: rgba(192, 132, 252, 0.32);
  background: rgba(124, 58, 237, 0.18);
}

.community-message p {
  margin: 0;
}

.community-message small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.community-popular-row {
  grid-template-columns: 54px minmax(0, 1fr);
}

.community-popular-row img {
  width: 54px;
  height: 46px;
  border-radius: var(--radius);
  object-fit: cover;
}

.community-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.community-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.community-group-list {
  display: grid;
  gap: 10px;
}

.community-group-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.community-group-row > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(192, 132, 252, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(15, 23, 42, 0.9));
  color: var(--accent-3);
  font-weight: 800;
}

.community-group-row strong,
.community-group-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-group-row small {
  color: var(--muted);
}

.notification-panel {
  position: fixed;
  top: 76px;
  right: 214px;
  z-index: 60;
  width: min(420px, calc(100vw - 28px));
  max-height: min(72vh, 620px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, rgba(124, 58, 237, 0.2), transparent 34%),
    rgba(8, 13, 24, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.notification-head,
.notification-list {
  display: grid;
  gap: 10px;
}

.notification-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(164, 174, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.notification-item.as-button {
  cursor: pointer;
}

.notification-item:hover {
  border-color: var(--stroke-strong);
  background: rgba(124, 58, 237, 0.12);
  transform: translateY(-1px);
}

.notification-item strong,
.notification-item p {
  margin: 0;
  min-width: 0;
}

.notification-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.notification-item time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.overlay {
  display: none;
}

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

  .layout-3,
  .lover-layout,
  .owner-dashboard-grid,
  .layout-2-1,
  .layout-1-2 {
    grid-template-columns: 1fr;
  }

  .assigned-beta-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .assigned-beta-metrics,
  .assigned-beta-actions {
    grid-column: 1 / -1;
  }

  .assigned-beta-actions {
    justify-content: stretch;
  }

  .assigned-beta-actions .btn {
    width: 100%;
  }

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

.tasks-page {
  display: grid;
  gap: 14px;
}

.task-main-page {
  align-content: start;
}

.task-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-list-head h2 {
  margin: 0;
  font-size: clamp(34px, 2.2vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.task-list-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.task-open-create-btn {
  min-height: 50px;
  padding: 0 20px;
  font-weight: 600;
}

.task-top-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.task-top-stat {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 96px;
  width: 100%;
  border: 1px solid rgba(164, 174, 205, 0.16);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(9, 14, 27, 0.94), rgba(19, 15, 35, 0.58));
  color: var(--text);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.task-top-stat:hover,
.task-top-stat.active {
  border-color: rgba(192, 132, 252, 0.42);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.2);
  transform: translateY(-1px);
}

.task-top-stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(192, 132, 252, 0.42);
  border-radius: 12px;
  color: var(--accent-3);
  background: rgba(124, 58, 237, 0.16);
}

.task-top-stat.warn .task-top-stat-icon {
  border-color: rgba(245, 158, 11, 0.45);
  color: #f7c36b;
  background: rgba(245, 158, 11, 0.16);
}

.task-top-stat.blue .task-top-stat-icon {
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.16);
}

.task-top-stat.danger .task-top-stat-icon {
  border-color: rgba(255, 69, 79, 0.45);
  color: #ff8f98;
  background: rgba(255, 69, 79, 0.16);
}

.task-top-stat small {
  display: block;
  color: #c5cce1;
  font-size: 15px;
}

.task-top-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 42px;
  line-height: 1;
}

.task-top-stat em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.task-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(9, 14, 27, 0.9), rgba(12, 20, 38, 0.66));
  overflow: hidden;
}

.task-strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 12px 16px;
}

.task-strip-item + .task-strip-item {
  border-left: 1px solid var(--stroke);
}

.task-strip-item > span:first-child {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(192, 132, 252, 0.32);
  border-radius: 11px;
  background: rgba(124, 58, 237, 0.16);
  color: var(--accent-3);
}

.task-strip-item strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
}

.task-strip-item small {
  color: var(--muted);
  font-size: 13px;
}

.task-success-ring {
  --task-pct: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: conic-gradient(var(--accent-3) calc(var(--task-pct) * 1%), rgba(148, 163, 184, 0.25) 0);
  position: relative;
}

.task-success-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #070d1a;
  z-index: 0;
}

.task-success-ring {
  z-index: 0;
  color: #f4edff;
}

.task-success-ring > span {
  position: relative;
  z-index: 1;
}

.task-success-ring > * {
  position: relative;
  z-index: 1;
}

.task-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 14px;
  align-items: start;
}

.task-main-left,
.task-main-right {
  display: grid;
  gap: 14px;
  align-content: start;
}

.task-main-list-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.task-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-filter-tab {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.task-filter-tab:hover {
  border-color: var(--stroke);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.task-filter-tab.active {
  border-color: rgba(192, 132, 252, 0.34);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.75), rgba(88, 28, 135, 0.38));
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--accent-3);
}

.task-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-list-count {
  color: var(--muted);
  font-size: 13px;
}

.task-sort-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.task-sort-select select {
  min-height: 36px;
  border-radius: 9px;
  padding-top: 0;
  padding-bottom: 0;
  min-width: 190px;
}

.task-main-list-scroll {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.task-list-item {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(164, 174, 205, 0.2);
  border-left-width: 2px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(9, 14, 27, 0.88), rgba(18, 13, 34, 0.62));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.task-list-item.blue {
  border-left-color: rgba(59, 130, 246, 0.85);
}

.task-list-item.warn {
  border-left-color: rgba(245, 158, 11, 0.85);
}

.task-list-item.danger {
  border-left-color: rgba(255, 69, 79, 0.88);
}

.task-list-item:hover {
  border-color: rgba(192, 132, 252, 0.46);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(11, 18, 34, 0.55);
}

.task-list-item.active {
  border-color: rgba(192, 132, 252, 0.6);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.26);
}

.task-list-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.task-list-priority {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 9px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.task-list-priority.warn {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.14);
  color: #f7c36b;
}

.task-list-priority.danger {
  border-color: rgba(255, 69, 79, 0.42);
  background: rgba(255, 69, 79, 0.14);
  color: #ff9ca4;
}

.task-list-priority.blue {
  border-color: rgba(59, 130, 246, 0.42);
  background: rgba(59, 130, 246, 0.14);
  color: #99c4ff;
}

.task-list-points {
  display: grid;
  gap: 3px;
  text-align: right;
}

.task-list-points strong {
  font-size: 14px;
  line-height: 1.2;
}

.task-list-item h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: 0;
}

.task-list-item-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.task-list-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe2fa;
  font-size: 12px;
  font-weight: 600;
}

.task-status-chip.ok {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.task-status-chip.warn {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.14);
  color: #facc15;
}

.task-status-chip.blue,
.task-status-chip.accent {
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

.task-status-chip.danger {
  border-color: rgba(255, 69, 79, 0.38);
  background: rgba(255, 69, 79, 0.14);
  color: #ff8f98;
}

.task-progress-value {
  color: #cbb8ff;
  font-size: 12px;
  font-weight: 600;
}

.task-archive-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(192, 132, 252, 0.34);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(47, 20, 79, 0.2));
  color: var(--accent-3);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.task-history-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.task-history-card .panel-header h2 {
  font-size: 15px;
}

.task-history-compact {
  display: grid;
  gap: 8px;
}

.task-history-compact-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1.5fr) auto auto auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(164, 174, 205, 0.16);
  border-radius: 10px;
  background: rgba(12, 18, 34, 0.64);
  color: var(--text);
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
}

.task-history-compact-row:hover {
  border-color: rgba(192, 132, 252, 0.38);
  background: rgba(124, 58, 237, 0.12);
}

.task-history-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  color: #c9d2ee;
  background: rgba(255, 255, 255, 0.04);
}

.task-history-icon.ok {
  border-color: rgba(34, 197, 94, 0.34);
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.task-history-icon.warn,
.task-history-icon.accent,
.task-history-icon.blue {
  border-color: rgba(59, 130, 246, 0.34);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

.task-history-icon.danger {
  border-color: rgba(255, 69, 79, 0.34);
  color: #ff9ca4;
  background: rgba(255, 69, 79, 0.12);
}

.task-history-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.task-history-meta strong,
.task-history-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-history-meta small {
  color: var(--muted);
}

.task-history-state {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  font-size: 11px;
  white-space: nowrap;
}

.task-history-state.ok { border-color: rgba(34, 197, 94, 0.34); color: #86efac; }
.task-history-state.warn,
.task-history-state.accent,
.task-history-state.blue { border-color: rgba(59, 130, 246, 0.34); color: #93c5fd; }
.task-history-state.danger { border-color: rgba(255, 69, 79, 0.34); color: #ff9ca4; }

.task-history-xp {
  font-size: 12px;
  white-space: nowrap;
}

.task-history-compact-row time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.task-history-arrow {
  color: var(--faint);
}

.task-main-right {
  min-width: 0;
}

.task-right-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.task-right-title {
  color: #e7dbff;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

.task-right-priority {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(192, 132, 252, 0.38);
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.14);
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 700;
}

.task-right-priority.warn {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.14);
  color: #f7c36b;
}

.task-right-priority.danger {
  border-color: rgba(255, 69, 79, 0.42);
  background: rgba(255, 69, 79, 0.14);
  color: #ff9ca4;
}

.task-right-priority.blue {
  border-color: rgba(59, 130, 246, 0.42);
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
}

.task-right-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.task-right-heading h3 {
  margin: 0;
  font-size: clamp(26px, 1.75vw, 34px);
  line-height: 1.12;
}

.task-right-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
}

.task-right-avatar img,
.task-right-avatar span {
  width: 100%;
  height: 100%;
}

.task-right-avatar span {
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

.task-right-subline {
  color: var(--muted);
  margin-top: -6px;
  font-size: 13px;
}

.task-right-deadline,
.task-right-reward {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.88fr);
  gap: 10px;
}

.task-right-term,
.task-right-countdown,
.task-right-reward > div {
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(8, 13, 24, 0.78);
}

.task-right-term strong {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-right-countdown {
  text-align: center;
}

.task-right-countdown strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 25px;
  color: var(--accent-3);
}

.task-right-countdown span {
  color: var(--muted);
  font-size: 12px;
}

.task-right-countdown.danger strong {
  color: #ff8f98;
}

.task-right-card small {
  color: var(--muted);
}

.task-right-section,
.task-right-requirements {
  display: grid;
  gap: 8px;
}

.task-right-section h4,
.task-right-requirements h4 {
  margin: 0;
  font-size: 14px;
  color: #d9e0ff;
  letter-spacing: 0;
}

.task-right-section p {
  margin: 0;
}

.task-right-section ul,
.task-right-requirements ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.task-right-attachments {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.task-right-attachments img {
  width: 100%;
  max-height: 78px;
  border-radius: 10px;
  object-fit: cover;
}

.task-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px dashed var(--stroke);
  border-radius: 10px;
  padding: 0 10px;
  color: var(--muted);
}

.task-right-work p {
  margin: 0;
  line-height: 1.5;
}

.task-right-submission-media {
  display: grid;
  gap: 8px;
}

.task-right-submission-media a,
.task-work-attachments span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  padding: 0 10px;
  font-size: 12px;
}

.task-work-form {
  display: grid;
  gap: 10px;
}

.task-work-files {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.task-work-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.task-work-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.task-work-submit .btn {
  width: 100%;
  min-height: 46px;
}

.task-right-summary .panel-header h2 {
  font-size: 15px;
}

.task-summary-grid {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.task-summary-ring {
  --task-pct: 0;
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-3) calc(var(--task-pct) * 1%), rgba(148, 163, 184, 0.25) 0);
  position: relative;
}

.task-summary-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: rgba(6, 11, 22, 0.98);
}

.task-summary-ring > div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.task-summary-ring strong {
  display: block;
  font-size: 25px;
  line-height: 1.1;
}

.task-summary-ring small {
  color: var(--muted);
  font-size: 12px;
}

.task-summary-list {
  display: grid;
  gap: 8px;
}

.task-summary-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.task-summary-list i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.task-summary-list i.ok { background: #22c55e; }
.task-summary-list i.blue { background: #3b82f6; }
.task-summary-list i.warn { background: #f59e0b; }
.task-summary-list i.danger { background: #ff454f; }

.task-summary-list b {
  margin-left: auto;
  font-weight: 650;
}

.task-summary-foot {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--stroke);
  padding-top: 10px;
}

.task-summary-foot span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.task-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.task-attachment-list a,
.task-attachment-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
}

.task-create-page {
  gap: 14px;
}

.task-create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.task-create-head h2 {
  margin: 0;
  font-size: 42px;
}

.task-create-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.task-create-main-submit {
  min-width: 184px;
}

.task-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.task-create-form-card {
  display: grid;
  gap: 14px;
}

.task-create-section-title {
  color: var(--accent-3);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
}

.task-create-form {
  display: grid;
  gap: 14px;
}

.task-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.task-editor-box {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(9, 14, 26, 0.7);
  overflow: hidden;
}

.task-editor-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--stroke);
}

.task-editor-toolbar .btn.small {
  min-width: 30px;
  min-height: 30px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  color: #c9d2ee;
}

.task-editor-box textarea {
  border: 0;
  border-radius: 0;
  min-height: 160px;
  resize: vertical;
  background: transparent;
}

.task-editor-count {
  display: flex;
  justify-content: flex-end;
  padding: 6px 10px 9px;
  color: var(--faint);
  font-size: 12px;
}

.task-priority-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.task-priority-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.task-priority-btn input {
  display: none;
}

.task-priority-btn .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9ca3af;
}

.task-priority-btn.blue .dot { background: var(--blue); }
.task-priority-btn.warn .dot { background: var(--warn); }
.task-priority-btn.danger .dot { background: var(--danger); }

.task-priority-btn.active {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.2);
}

.task-priority-btn.active.blue { border-color: rgba(59, 130, 246, 0.46); }
.task-priority-btn.active.warn { border-color: rgba(245, 158, 11, 0.46); }
.task-priority-btn.active.danger { border-color: rgba(255, 69, 79, 0.46); }

.task-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-options-grid .check-row {
  min-height: 54px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.task-upload-box {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 132px;
  padding: 18px;
  border: 1px dashed rgba(192, 132, 252, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(12, 18, 34, 0.32));
  text-align: center;
  cursor: pointer;
}

.task-upload-box input {
  display: none;
}

.task-upload-box span {
  color: var(--text);
  font-weight: 500;
}

.task-upload-box small {
  color: var(--muted);
}

.task-create-side {
  display: grid;
  gap: 12px;
}

.task-create-preview-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--panel);
}

.task-preview-head h3 {
  margin: 10px 0 6px;
  font-size: 30px;
}

.task-preview-head p {
  margin: 0;
  color: var(--muted);
}

.task-preview-deadline,
.task-preview-reward {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-preview-deadline > div,
.task-preview-reward > div {
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.task-preview-timer strong {
  color: var(--accent-3);
}

.task-preview-block {
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
}

.task-preview-block p {
  margin: 6px 0 0;
  color: var(--muted);
}

.task-preview-block ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.task-preview-assignees {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.task-preview-assignees > span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.task-preview-assignees > span > span,
.task-preview-assignees > span > img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
}

.task-preview-assignees > span > span {
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  font-size: 12px;
  font-weight: 700;
}

.task-create-page .req {
  color: #ff5f74;
  font-style: normal;
}

.task-create-head h2 {
  font-size: clamp(38px, 3.1vw, 52px);
  line-height: 1.05;
}

.task-create-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}

.task-create-form-card {
  padding: 18px;
}

.task-create-form .field > span {
  color: #e6eaff;
  font-size: 14px;
}

.task-create-form input,
.task-create-form select,
.task-create-form textarea {
  min-height: 48px;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(6, 11, 23, 0.84);
}

.task-owner-display {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(6, 11, 23, 0.84);
}

.task-owner-avatar,
.task-owner-avatar img,
.task-owner-avatar span {
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.task-owner-avatar img {
  object-fit: cover;
}

.task-owner-avatar span {
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 700;
}

.task-owner-display strong {
  font-size: 16px;
}

.task-owner-display small {
  display: block;
  color: var(--muted);
}

.task-owner-caret {
  color: var(--muted);
  font-size: 18px;
}

.task-assignee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.task-assignee-row .task-group-toggle {
  min-height: 48px;
  padding: 0 14px;
}

.task-assign-grid {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.22s ease, opacity 0.22s ease, margin-top 0.22s ease;
}

.task-assign-grid.open {
  max-height: 420px;
  margin-top: 10px;
  opacity: 1;
}

.task-assign-item {
  min-height: 50px;
}

.task-priority-btn {
  min-height: 46px;
}

.task-priority-btn strong {
  font-size: 14px;
  font-weight: 550;
}

.task-input-icon,
.task-number-input {
  position: relative;
}

.task-input-icon .inline-icon,
.task-number-input .task-prefix {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--muted);
}

.task-input-icon input,
.task-number-input input {
  padding-left: 38px;
}

.task-number-input .task-suffix {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
}

.task-number-input input {
  padding-right: 42px;
}

.task-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: rgba(6, 11, 23, 0.64);
}

.task-option-card strong {
  display: block;
  font-size: 15px;
}

.task-option-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.task-option-card.active {
  border-color: rgba(192, 132, 252, 0.42);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(24, 14, 44, 0.72));
}

.task-upload-box {
  min-height: 146px;
}

.task-create-side {
  gap: 14px;
}

.task-create-actions-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}

.task-create-actions-card .btn {
  min-height: 50px;
  font-size: 16px;
}

.task-create-actions-card .btn.primary {
  border-color: rgba(192, 132, 252, 0.45);
}

.task-create-actions-card .btn:first-child {
  background: rgba(8, 13, 25, 0.9);
}

.task-create-preview-card {
  gap: 14px;
  padding: 14px;
}

.task-preview-title {
  color: var(--accent-3);
  font-size: 22px;
  font-weight: 650;
}

.task-preview-shell {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(6, 11, 23, 0.72);
}

.task-priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.task-priority-pill.blue {
  border-color: rgba(59, 130, 246, 0.45);
  color: #7eb0ff;
}

.task-priority-pill.warn {
  border-color: rgba(245, 158, 11, 0.45);
  color: #f7c36b;
}

.task-priority-pill.danger {
  border-color: rgba(255, 69, 79, 0.45);
  color: #ff8f98;
}

.task-preview-head h3 {
  margin-top: 6px;
  margin-bottom: 6px;
  font-size: 33px;
}

.task-preview-head p {
  font-size: 14px;
}

.task-preview-deadline strong,
.task-preview-reward strong {
  font-size: 16px;
}

.task-preview-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
}

.task-preview-block {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.task-preview-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.08);
  color: var(--muted);
}

.task-assign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.task-assign-item {
  display: grid;
  grid-template-columns: 16px 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
  background: rgba(6, 11, 23, 0.6);
}

.task-assign-item strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-assign-item > span {
  display: grid;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.task-assign-item > span > span {
  font-weight: 700;
  font-size: 12px;
}

.task-review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-history-table {
  display: grid;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  overflow: hidden;
}

.task-history-head,
.task-history-row {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 1.25fr 1fr 0.6fr 0.65fr 0.95fr 0.45fr;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
}

.task-history-head {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.task-history-row {
  border-top: 1px solid var(--stroke);
}

.task-history-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-history-row .btn.small {
  justify-self: end;
}

@media (max-width: 1280px) {
  .task-main-grid {
    grid-template-columns: 1fr;
  }

  .task-main-list-scroll {
    max-height: 640px;
  }

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

  .task-summary-strip {
    grid-template-columns: 1fr;
  }

  .task-strip-item + .task-strip-item {
    border-left: 0;
    border-top: 1px solid var(--stroke);
  }

  .task-create-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    width: min(var(--sidebar-width), 86vw);
    transition: transform 0.22s ease;
  }

  .app-shell.drawer-open .sidebar {
    transform: translateX(0);
  }

  .overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.52);
  }

  .app-shell.drawer-open .overlay {
    display: block;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .owner-dash-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .owner-dash-tools {
    width: 100%;
    justify-content: flex-start;
  }

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

  .topbar-actions {
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-messages-layout {
    grid-template-columns: 1fr;
  }

  .community-sidebar {
    position: static;
  }

  .task-create-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .task-open-create-btn {
    width: 100%;
  }

  .task-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .task-sort-select {
    justify-content: space-between;
  }

  .task-work-files,
  .task-right-deadline,
  .task-right-reward,
  .task-summary-grid {
    grid-template-columns: 1fr;
  }

  .task-history-compact-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon meta state"
      "icon xp time"
      "icon arrow arrow";
  }

  .task-history-compact-row .task-history-icon {
    grid-area: icon;
  }

  .task-history-compact-row .task-history-meta {
    grid-area: meta;
  }

  .task-history-compact-row .task-history-state {
    grid-area: state;
    justify-self: end;
  }

  .task-history-compact-row .task-history-xp {
    grid-area: xp;
  }

  .task-history-compact-row time {
    grid-area: time;
    justify-self: end;
  }

  .task-history-compact-row .task-history-arrow {
    grid-area: arrow;
    justify-self: end;
  }

  .task-history-head,
  .task-history-row {
    grid-template-columns: 1fr 0.85fr 1fr 0.95fr 0.6fr 0.65fr 0.85fr 0.4fr;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 18px 14px 32px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .topbar-actions {
    gap: 8px;
    flex-wrap: wrap;
  }

  .profile-button {
    min-width: auto;
  }

  .profile-button span:last-child {
    display: none;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .beta-lock-grid,
  .owner-summary-strip,
  .quick-action-grid,
  .owner-submissions-layout,
  .submission-action-grid,
  .community-actions,
  .assigned-beta-metrics,
  .beta-detail-card-grid,
  .field-grid,
  .profile-grid,
  .device-panel,
  .beta-preview,
  .beta-id-body,
  .beta-id-data {
    grid-template-columns: 1fr;
  }

  .submission-detail-card {
    position: static;
  }

  .beta-detail-hero,
  .beta-detail-profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .beta-detail-actions,
  .beta-detail-actions .btn {
    width: 100%;
  }

  .ranking-row {
    grid-template-columns: 28px 34px minmax(0, 1fr);
    grid-template-areas:
      "rank avatar name"
      "rank avatar value"
      "rank avatar meta"
      "bar bar bar";
  }

  .ranking-row em {
    justify-self: start;
  }

  .submission-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .submission-history-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .submission-history-row .pill,
  .submission-history-row time {
    grid-column: 2;
    justify-self: start;
  }

  .assigned-beta-row {
    grid-template-columns: 1fr;
  }

  .assigned-beta-avatar {
    width: 58px;
    height: 58px;
  }

  .submission-title-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .submission-title-line strong {
    flex-basis: 100%;
  }

  .owner-list-row {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .owner-list-row small {
    grid-column: 2;
  }

  .settings-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .settings-row > :last-child {
    grid-column: 2;
    justify-self: start;
  }

  .permission-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stamp {
    width: 86px;
    height: 86px;
    font-size: 22px;
  }

  .beta-data div,
  .quick-preview div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .timeline-item {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .timeline-item > time {
    grid-column: 2;
  }

  .community-topline,
  .community-composer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .community-composer-actions .btn,
  .community-upload {
    width: 100%;
    justify-content: center;
  }

  .community-composer-head,
  .community-post-head {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .community-post-head .icon-button {
    grid-column: 2;
    justify-self: start;
  }

  .submission-explanation-context dl {
    grid-template-columns: 1fr;
  }

  .task-review-actions,
  .task-create-grid,
  .task-priority-grid,
  .task-options-grid,
  .task-preview-deadline,
  .task-preview-reward {
    grid-template-columns: 1fr;
  }

  .task-assignee-row,
  .task-create-actions-card {
    grid-template-columns: 1fr;
  }

  .task-create-head h2 {
    font-size: 34px;
  }

  .task-preview-head h3 {
    font-size: 24px;
  }

  .task-create-actions-card .btn {
    width: 100%;
  }

  .task-top-stats,
  .task-summary-strip {
    grid-template-columns: 1fr;
  }

  .task-top-stat {
    min-height: 88px;
  }

  .task-top-stat small {
    font-size: 13px;
  }

  .task-top-stat strong {
    font-size: 34px;
  }

  .task-top-stat em {
    font-size: 12px;
  }

  .task-strip-item strong {
    font-size: 24px;
  }

  .task-strip-item small {
    font-size: 13px;
  }

  .task-list-item h3 {
    font-size: 21px;
  }

  .task-list-item-meta {
    font-size: 13px;
  }

  .task-right-heading h3 {
    font-size: 22px;
  }

  .task-summary-ring {
    width: 86px;
    height: 86px;
  }

  .task-work-form .btn {
    width: 100%;
  }

  .task-history-compact-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "state"
      "xp"
      "time"
      "arrow";
    padding-left: 44px;
    position: relative;
  }

  .task-history-compact-row .task-history-icon {
    position: absolute;
    left: 10px;
    top: 10px;
  }

  .task-history-compact-row .task-history-state,
  .task-history-compact-row .task-history-xp,
  .task-history-compact-row time,
  .task-history-compact-row .task-history-arrow {
    justify-self: start;
  }

  .task-history-head {
    display: none;
  }

  .task-history-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px;
  }

  .task-history-row > span {
    white-space: normal;
  }

  .task-history-row .btn.small {
    justify-self: start;
  }
}
