:root {
  --bg: #f1f1f1;
  --line: #d7d7d4;
  --text: #2a2a2a;
  --muted: #7a7a77;
  --brand: #6e6b67;
  --orange: #f0a11a;
  --yellow: #f1d31e;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
}

body {
  min-height: 100vh;
}

button {
  font: inherit;
}

.kdp-page {
  min-height: 100vh;
  background: var(--bg);
}

.kdp-shell {
  width: 100%;
  min-height: 100vh;
  padding: 18px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-left: 0;
  margin-top: 2px;
  padding-left: 0;
}

.kdp-logo {
  display: block;
  width: min(360px, calc(100vw - 48px));
  height: auto;
}

.brand-wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 0.8;
  letter-spacing: -0.08em;
  color: var(--orange);
  font-weight: 700;
  transform: translateY(-2px);
}

.brand-divider {
  width: 1px;
  height: 68px;
  background: #c9c6c3;
  margin: 0 18px 0 16px;
  transform: translateY(2px);
}

.brand-subtitle {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  letter-spacing: -0.06em;
  transform: translateY(6px);
}

.brand-subtitle span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 500;
  color: #7b7a75;
}

.brand-subtitle span:first-child {
  color: #7b7a75;
}

.security-card {
  width: min(460px, calc(100vw - 30px));
  height: 600px;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 18px 0 24px;
  padding: 20px 20px 18px 20px;
  text-align: center;
}

.security-card h1 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #2c2c2c;
}

.security-card p {
  margin: 0;
  max-width: 390px;
  align-self: center;
  color: rgba(42,42,42,0.82);
  font-size: 17px;
  line-height: 1.38;
  letter-spacing: -0.02em;
  text-align: center;
}

.security-actions {
  display: grid;
  gap: 16px;
  width: 100%;
  margin-top: auto;
  padding-top: 30px;
}

.security-actions button,
.activate-button {
  appearance: none;
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--yellow);
  color: #222;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
  text-align: center;
  text-decoration: none;
  display: grid;
  place-items: center;
}

@media (max-width: 640px) {
  .brand-row {
    margin-left: 0;
  }

  .brand-wordmark {
    font-size: 32px;
  }

  .brand-divider {
    height: 52px;
  }

  .brand-subtitle span {
    font-size: 28px;
  }

  .security-card {
    width: calc(100vw - 30px);
    height: 600px;
    margin-left: 0;
    padding: 18px 16px 16px;
  }

  .security-card p {
    font-size: 16px;
  }
}

.admin-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px 16px;
}

.card {
  background: #fff;
  border: 1px solid #d7d7d4;
  border-radius: 14px;
}

.admin-card {
  width: min(700px, 100%);
  padding: clamp(24px, 5vw, 48px);
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #2364aa;
}

.admin-card h1 {
  margin: 10px 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.1;
}

.muted {
  color: #65748a;
}

form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  border: 1px solid #ccd6e4;
  border-radius: 10px;
  padding: 12px 13px;
  color: #152238;
  background: #fff;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.button {
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  background: #152238;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.status {
  min-height: 24px;
  color: #b33a3a;
}

.status.success {
  color: #18794e;
}

.result {
  margin-top: 22px;
  padding: 18px;
  background: #f0f7ff;
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.result-button {
  display: flex;
  justify-content: center;
  margin: 14px 0 10px;
  text-decoration: none;
}

.result-url {
  display: block;
  font-size: 13px;
}

.hidden {
  display: none;
}

.direct-payment-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.direct-payment-card {
  width: min(520px, 100%);
  padding: 32px;
  background: #fff;
  border: 1px solid #d7d7d4;
  border-radius: 14px;
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  color: #65748a;
  text-decoration: none;
}

.direct-payment-card h1 {
  margin: 10px 0;
}

.direct-total {
  display: flex;
  justify-content: space-between;
  margin: 28px 0 20px;
  padding: 18px 0;
  border-top: 1px solid #e5eaf0;
  border-bottom: 1px solid #e5eaf0;
}

.direct-total strong {
  font-size: 22px;
}

.direct-payment-card .button {
  width: 100%;
  margin-top: 18px;
}

@media (max-width: 560px) {
  .direct-payment-card {
    padding: 24px 18px;
  }
}

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