:root {
  color-scheme: dark;
  --background: #040405;
  --panel: #0d0d0f;
  --panel-raised: #111114;
  --border: #303035;
  --white: #f6f6f7;
  --silver: #c9c9ce;
  --muted: #93939b;
  --red: #e1262f;
  --red-bright: #ff3039;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 50% 0, rgba(225, 38, 47, .08), transparent 480px), var(--background);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(3, 3, 4, .92);
}

.header-inner, .footer-inner {
  width: min(1320px, calc(100% - 96px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-inner { min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 17px; font-weight: 760; letter-spacing: .5px; }
.brand img { display: block; width: 150px; height: auto; }
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 550; }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--white); }

.auth-main {
  width: min(100%, 1220px);
  min-height: calc(100vh - 145px);
  margin: 0 auto;
  padding: clamp(54px, 8vw, 106px) 24px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-shell { width: min(100%, 475px); }
.account-shell { width: min(100%, 700px); }
.eyebrow { margin: 0 0 15px; color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: 2px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 60px); line-height: 1; letter-spacing: -2.5px; }
.intro { margin: 19px 0 30px; color: var(--muted); font-size: 16px; line-height: 1.65; }

.panel {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #28282d;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--panel-raised), #080809);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 9px; color: var(--silver); font-size: 13px; font-weight: 650; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: #09090b;
  color: var(--white);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input::placeholder { color: #686871; }
.field input:hover { border-color: #4b4b52; }
.field input:focus-visible { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225, 38, 47, .17); }
.field input[aria-invalid="true"] { border-color: var(--red-bright); }
.field-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.turnstile-wrap { min-height: 70px; margin: 3px 0 18px; }
.message { min-height: 23px; margin: 0 0 15px; color: #ff7c83; font-size: 13px; line-height: 1.5; }
.message:empty { visibility: hidden; }
.success-message { margin: 0 0 20px; color: #d5f1dc; font-size: 13px; line-height: 1.5; }
.auth-state h2 { margin: 0 0 12px; font-size: 23px; letter-spacing: -.4px; }
.auth-state p { margin: 0 0 22px; color: var(--silver); font-size: 14px; line-height: 1.65; }
.auth-followup, #resend-actions { margin-top: 15px; }
.auth-followup .message, #resend-actions .message { margin: 12px 0 0; }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.primary-button { width: 100%; border: 1px solid #ee3b43; background: #bd1d25; color: white; box-shadow: 0 8px 24px rgba(225, 38, 47, .12); }
.primary-button:hover:not(:disabled) { background: #d7222b; transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--border); background: #101012; color: var(--silver); }
.secondary-button:hover:not(:disabled) { border-color: rgba(225, 38, 47, .6); color: white; }
.full-width { width: 100%; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .7; }

.switch-page { margin: 25px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.switch-page a { color: var(--white); font-weight: 650; text-decoration-color: var(--red); text-underline-offset: 4px; }

.account-details { padding-bottom: 28px; border-bottom: 1px solid #26262b; }
.account-details h2, .products h2 { margin: 0 0 13px; font-size: 17px; letter-spacing: .3px; }
.account-details p { margin: 0; color: var(--silver); line-height: 1.6; overflow-wrap: anywhere; }
.account-details .customer-name { color: var(--white); font-size: 24px; font-weight: 700; }
.products { padding: 29px 0; }
.products p { margin: 0; color: var(--muted); line-height: 1.6; }
.products .message { color: #ff7c83; }
.products .success-message { color: #d5f1dc; }
.products .message:empty, .products .success-message:empty { display: none; }
.product-card { margin-top: 19px; padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: #0a0a0c; }
.product-card h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: .2px; }
.product-card .product-type { color: var(--silver); font-size: 14px; }
.product-card .product-seats { margin-top: 12px; color: var(--white); font-size: 14px; font-weight: 700; }
.product-download { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.product-download h4 { margin: 0 0 7px; font-size: 14px; }
.product-download p { margin: 0 0 12px; color: var(--silver); font-size: 13px; }
.product-card .machines-empty { margin-top: 21px; font-size: 13px; }
.machine-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.machine-details h4 { margin: 0 0 5px; font-size: 15px; }
.machine-details p { font-size: 12px; overflow-wrap: anywhere; }
.machine-deactivate { flex: none; min-height: 40px; font-size: 12px; }
.deactivate-dialog { width: min(440px, calc(100% - 32px)); padding: 28px; border: 1px solid #3b3b42; border-radius: 14px; background: linear-gradient(145deg, var(--panel-raised), #080809); color: var(--white); box-shadow: 0 28px 80px rgba(0, 0, 0, .7); }
.deactivate-dialog::backdrop { background: rgba(0, 0, 0, .78); }
.deactivate-dialog h2 { margin: 0 0 18px; font-size: 23px; }
.deactivate-dialog p { color: var(--silver); font-size: 14px; line-height: 1.6; }
.deactivate-dialog .message { color: #ff7c83; }
.deactivate-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.deactivate-actions .primary-button { width: auto; }

.activation-details { margin: 0 0 24px; border-top: 1px solid var(--border); }
.activation-details div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.activation-details dt { color: var(--muted); font-size: 13px; }
.activation-details dd { margin: 0; color: var(--white); font-size: 13px; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.activation-actions { display: grid; gap: 12px; }

.site-footer { border-top: 1px solid #171719; }
.footer-inner { min-height: 72px; color: #74747c; font-size: 12px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--white); }

@media (max-width: 1024px) {
  .header-inner, .footer-inner { width: min(1320px, calc(100% - 64px)); }
}

@media (max-width: 650px) {
  .header-inner, .footer-inner { width: calc(100% - 40px); }
  .brand img { width: 125px; }
  .header-inner { flex-wrap: wrap; justify-content: flex-start; gap: 12px 20px; padding: 16px 0; }
  .header-nav { gap: 14px; flex-wrap: wrap; }
  .header-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
  .auth-main { padding: 56px 16px 70px; }
  .panel { padding: 24px 20px; }
  .product-card { padding: 18px; }
  .machine-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .deactivate-actions { flex-direction: column-reverse; }
  .deactivate-actions button { width: 100%; }
  .footer-inner { flex-direction: column; justify-content: center; gap: 8px; padding: 20px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
