:root {
  --black: #030303;
  --ink: #101010;
  --panel: #151515;
  --panel-soft: #1d1d1d;
  --white: #ffffff;
  --muted: #c9c9c9;
  --line: #343434;
  --red: #f00013;
  --red-dark: #9d000b;
  --focus: rgba(240, 0, 19, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  background: var(--black);
  font-family: Arial, Helvetica, sans-serif;
}

.admin-shell {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 72px);
  background:
    linear-gradient(145deg, rgba(240, 0, 19, 0.16), transparent 34%),
    #101010;
}

.admin-panel {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.admin-logo {
  width: min(100%, 360px);
  margin-bottom: 28px;
}

.readonly-grid {
  display: grid;
  grid-template-columns: minmax(180px, 320px);
  gap: 12px;
  margin: 24px 0;
}

.readonly-card {
  min-height: 86px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.readonly-card dt {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readonly-card dd {
  margin: 0;
  color: var(--white);
  font-size: 1.18rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.admin-form {
  width: 100%;
  margin: 0;
}

.admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.admin-cards {
  margin-top: 22px;
}

.admin-canvas {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  min-height: 100vh;
}

.brand-panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(240, 0, 19, 0.18), transparent 34%),
    radial-gradient(circle at 32% 78%, rgba(240, 0, 19, 0.2), transparent 24%),
    #030303;
}

.brand-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: clamp(28px, 6vw, 72px);
}

.logo {
  width: min(100%, 520px);
  height: auto;
  display: block;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--red);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  max-width: 620px;
  font-size: clamp(2.4rem, 5.4vw, 5.4rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.intro {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 560px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.status-strip span {
  min-height: 52px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  border-right: 1px solid var(--line);
}

.status-strip span:last-child {
  border-right: 0;
}

.form-panel {
  padding: clamp(24px, 5vw, 72px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 260px),
    var(--ink);
}

form {
  width: min(100%, 860px);
  margin: 0 auto;
}

.form-head {
  margin-bottom: 28px;
}

.form-intro {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.photo-panel,
.credential-preview,
.confirmation-panel {
  margin: 10px 0 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.photo-guidance {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.crop-preview {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 18px;
  align-items: center;
}

.crop-frame {
  position: relative;
  width: 156px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #efefef;
}

.crop-frame img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  opacity: 0;
}

.crop-preview.is-ready .crop-frame img {
  opacity: 1;
}

.crop-frame span {
  z-index: 1;
  max-width: 110px;
  color: #7a7a7a;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.3;
}

.crop-preview.is-ready .crop-frame span {
  display: none;
}

.crop-controls {
  display: grid;
  gap: 10px;
}

.crop-controls label {
  margin: 0;
}

.crop-controls input {
  min-height: 30px;
  accent-color: var(--red);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.preview-head h3,
.confirmation-panel h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
}

.card-tabs {
  display: none;
  gap: 8px;
}

.card-tabs button,
.secondary-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--white);
  background: var(--panel);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.card-tabs button.is-active,
.secondary-button {
  border-color: var(--red);
  background: var(--red);
}

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

.id-card {
  position: relative;
  aspect-ratio: 85.6 / 53.98;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.id-card-front {
  display: grid;
  place-items: center;
  background: #000000;
}

.id-card-front img {
  width: 56%;
  height: auto;
}

.red-bar {
  position: absolute;
  top: 0;
  width: 4.2%;
  height: 100%;
  background: var(--red);
}

.red-bar.left {
  left: 0;
}

.id-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4.2%;
  height: 100%;
  background: var(--red);
}

.site-line {
  position: absolute;
  left: 32%;
  right: 32%;
  bottom: 20%;
  height: 2px;
  background: var(--red);
}

.id-card-front strong {
  position: absolute;
  bottom: 10%;
  color: var(--white);
  font-size: clamp(0.72rem, 1.7vw, 1.05rem);
}

.id-card-back {
  background: #ffffff;
  color: #111111;
}

.id-card-back header {
  position: absolute;
  left: 4.2%;
  right: 4.2%;
  top: 0;
  height: 18.4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 7%;
  color: var(--white);
  background: #111111;
}

.id-card-back header strong {
  font-size: clamp(0.68rem, 1.4vw, 1rem);
}

.id-card-back header span {
  color: var(--red);
  font-size: clamp(0.52rem, 1vw, 0.72rem);
  font-weight: 900;
  white-space: nowrap;
}

.id-photo {
  position: absolute;
  left: 9%;
  top: 24%;
  width: 25%;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #c5c5c5;
  border-radius: 5%;
  background: #eeeeee;
  background-size: cover;
  background-position: center;
}

.id-photo span {
  width: 80%;
  color: #8a8a8a;
  text-align: center;
  font-size: clamp(0.46rem, 1vw, 0.7rem);
  line-height: 1.2;
}

.id-photo.has-photo span {
  display: none;
}

.id-info {
  position: absolute;
  left: 39%;
  top: 24%;
  right: 12%;
  display: grid;
  gap: 3px;
}

.id-info small {
  color: #a5a5a5;
  font-size: clamp(0.5rem, 1vw, 0.7rem);
  font-weight: 900;
}

.id-info b,
.id-info em {
  overflow-wrap: anywhere;
  color: #111111;
  font-style: normal;
  line-height: 1.05;
}

.id-info b {
  min-height: 2.2em;
  font-size: clamp(0.82rem, 2vw, 1.42rem);
  font-weight: 900;
}

.id-info em {
  font-size: clamp(0.58rem, 1.35vw, 0.92rem);
  font-weight: 800;
}

.id-info strong {
  color: var(--red);
  font-size: clamp(1.25rem, 3.3vw, 2.35rem);
  line-height: 1;
}

.qr-box {
  position: absolute;
  right: 9%;
  bottom: 20%;
  width: 13%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid #111111;
  color: #111111;
  font-weight: 900;
  font-size: clamp(0.55rem, 1.2vw, 0.8rem);
}

.id-card-back footer {
  position: absolute;
  left: 4.2%;
  right: 4.2%;
  bottom: 0;
  height: 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7%;
  color: var(--white);
  background: #111111;
}

.id-card-back footer span,
.id-card-back footer strong {
  font-size: clamp(0.5rem, 1.1vw, 0.76rem);
  font-weight: 900;
}

.face-label {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.confirmation-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.setup-notice {
  display: none;
  margin: 0 0 24px;
  padding: 14px 16px;
  border-left: 4px solid var(--red);
  color: #f5f5f5;
  background: rgba(240, 0, 19, 0.12);
}

.setup-notice.is-visible {
  display: block;
}

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

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

label {
  display: block;
  margin-bottom: 18px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #ededed;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--white);
  background: var(--panel);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--focus);
  background: var(--panel-soft);
}

::placeholder {
  color: #7e7e7e;
}

.checks {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.terms-panel {
  margin: 10px 0 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.terms-panel h3 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.terms-panel p {
  color: var(--muted);
  line-height: 1.58;
}

.payment-box {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid rgba(240, 0, 19, 0.5);
  border-radius: 6px;
  background: rgba(240, 0, 19, 0.1);
}

.payment-box strong {
  color: var(--white);
  font-size: 1.05rem;
}

.payment-box span {
  color: #f1f1f1;
  line-height: 1.5;
}

.rules-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.rules-list li::marker {
  color: var(--red);
  font-weight: 900;
}

.terms-note {
  margin-bottom: 0;
  color: #ededed;
  font-weight: 700;
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.check-row input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--red);
}

.check-row span {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.submit-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 6px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.submit-button:hover {
  filter: brightness(1.08);
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35) brightness(0.7);
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.form-message.is-error {
  color: #ff9da5;
}

.form-message.is-success {
  color: #ffffff;
}

.submission-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 920px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    position: relative;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-content {
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

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

  .readonly-grid {
    grid-template-columns: 1fr;
  }

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

  .crop-frame {
    width: min(220px, 100%);
    margin: 0 auto;
  }

  .preview-head {
    display: grid;
  }

  .card-tabs {
    display: flex;
  }

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

  .id-card {
    display: none;
  }

  .id-card.is-active {
    display: block;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .status-strip span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-strip span:last-child {
    border-bottom: 0;
  }
}
