/* Shared form polish: consistent rhythm, control sizing and responsive layouts. */
:root {
  --control-border: #aeb5ca;
  --control-border-hover: #76809c;
  --control-focus: #f08a18;
  --control-radius: 4px;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: #fff;
  color: #10183d;
  box-shadow: inset 0 1px 2px rgba(16, 25, 67, .05);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
select:hover,
textarea:hover { border-color: var(--control-border-hover); }

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  border-color: #10183d;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(240, 138, 24, .2);
}

textarea { resize: vertical; line-height: 1.5; }
select { padding-right: 38px; }

.admin-card label:not(.check-row),
.admin-product-form > label,
.shipment-fields label,
.order-search label,
.order-filters label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #242d4c;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .015em;
}

.admin-card label:not(.check-row) > input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.admin-card label:not(.check-row) > select,
.admin-card label:not(.check-row) > textarea,
.shipment-fields input,
.order-search input,
.order-filters select { width: 100%; }

.check-row {
  gap: 10px !important;
  min-height: 28px;
  line-height: 1.35;
}

.check-row input[type="checkbox"],
.terms-check input[type="checkbox"],
.newsletter-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px !important;
  height: 20px;
  min-height: 0;
  margin: 0;
  accent-color: #10183d;
}

.newsletter-page {
  width: min(100%, 680px);
  margin: clamp(44px, 9vw, 100px) auto;
  padding: clamp(26px, 6vw, 54px);
  border: 1px solid #d3d7e3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(13, 25, 65, .1);
}
.newsletter-page h1 { margin: 8px 0 12px; font-size: clamp(2rem, 7vw, 4.3rem); line-height: .98; }
.newsletter-page > p { color: #59627d; font-size: 1.05rem; }
.newsletter-form { display: grid; gap: 18px; margin-top: 28px; }
.newsletter-form label { display: grid; gap: 8px; font-weight: 800; }
.newsletter-form input { width: 100%; }
.newsletter-form button { justify-self: start; }
.newsletter-form small { max-width: 58ch; color: #59627d; line-height: 1.5; }

.newsletter-code-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 620px);
  padding: clamp(30px, 6vw, 52px);
}
.newsletter-code-page > .eyebrow { margin: 0; }
.newsletter-code-page h1 {
  margin: 10px 0 0;
  font-size: clamp(2.35rem, 7vw, 3.8rem);
  line-height: 1;
}
.newsletter-code-page > .newsletter-code-intro {
  max-width: 52ch;
  margin: 18px 0 0;
  color: #414b69;
  font-size: 1.08rem;
  line-height: 1.6;
}
.newsletter-code-page > .newsletter-code-notice {
  margin: 26px 0 0;
  padding: 16px 18px;
  border-left: 4px solid #f08a18;
  border-radius: 4px;
  background: #f4f5f9;
  color: #4f5873;
  font-size: .94rem;
  line-height: 1.5;
}
.newsletter-code-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 260px);
  margin: 30px 0 0;
}
.newsletter-code-form label {
  display: block;
  margin: 0 0 10px;
  color: #242d4c;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.4;
}
.newsletter-code-input {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 8px;
  color: #10183d;
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: .32em;
  line-height: 1;
  text-align: center;
  text-indent: .32em;
}
.newsletter-code-submit {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  border-radius: 8px;
  background: #10183d;
  border-color: #10183d;
  color: #fff;
}
.newsletter-code-submit:hover,
.newsletter-code-submit:focus-visible {
  background: #f08a18;
  border-color: #f08a18;
  color: #10183d;
}
.newsletter-code-resend {
  width: min(100%, 260px);
  margin: 12px 0 0;
  text-align: center;
}
.newsletter-code-resend button {
  display: inline-block;
  width: auto;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #59627d;
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.newsletter-code-resend button:hover,
.newsletter-code-resend button:focus-visible {
  background: transparent;
  box-shadow: none;
  color: #10183d;
}

.admin-login {
  width: min(100%, 540px);
  margin: clamp(42px, 8vw, 90px) auto;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid #d3d7e3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(13, 25, 65, .1);
}

.admin-login h1 { margin: 8px 0 6px; font-size: clamp(2rem, 6vw, 3rem); }
.admin-login > p { margin: 0 0 28px; color: #59627d; }
.admin-login form { display: grid; gap: 18px; }
.admin-login label {
  display: grid;
  gap: 7px;
  color: #242d4c;
  font-size: .82rem;
  font-weight: 800;
}
.admin-login input { width: 100%; }
.admin-login button { justify-self: start; min-width: 120px; }

.help-page { padding: clamp(42px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
.help-hero { position: static; display: block; max-width: 780px; padding: 0 0 clamp(34px, 6vw, 62px); border: 0; background: transparent; }
.help-hero h1 { margin: .12em 0 .2em; font-size: clamp(3rem, 8vw, 6.4rem); line-height: .9; letter-spacing: -.06em; }
.help-hero p { max-width: 650px; margin: 0; color: #59627d; font-size: clamp(1.05rem, 2vw, 1.25rem); }
.help-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: start; gap: clamp(26px, 5vw, 64px); }
.help-contact { padding: clamp(24px, 4vw, 44px); border: 1px solid #d3d7e3; border-radius: 18px; background: #fff; box-shadow: 0 14px 38px rgba(13, 25, 65, .08); }
.help-section-heading h2 { margin: 8px 0 10px; color: #10183d; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1; }
.help-section-heading p { max-width: 58ch; margin: 0; color: #59627d; }
.help-contact-form { display: grid; gap: 22px; margin-top: 28px; }
.help-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.help-form-grid label { display: grid; align-content: start; gap: 7px; color: #242d4c; font-size: .84rem; font-weight: 800; }
.help-form-grid label em { color: #6a7186; font-size: .76rem; font-weight: 400; }
.help-form-grid input,.help-form-grid select,.help-form-grid textarea { width: 100%; }
.help-message-field { grid-column: 1 / -1; }
.help-contact-form button { justify-self: start; }
.help-privacy-note { max-width: 66ch; margin: -4px 0 0; color: #656d84; font-size: .78rem; line-height: 1.5; }
.help-field-error { color: #8b1721; font-size: .78rem; font-weight: 700; line-height: 1.4; }
.help-form-alert { padding: 14px 16px; border-left: 5px solid #8b1721; background: #fff0f1; color: #671018; }
.help-form-alert p { margin: 3px 0 0; }
.help-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.help-topics { display: grid; gap: 0; border-top: 1px solid #cfd3df; }
.help-topics section { padding: 22px 0; border-bottom: 1px solid #cfd3df; }
.help-topics h2 { margin: 0 0 7px; color: #10183d; font-size: 1.08rem; }
.help-topics p { margin: 0 0 10px; color: #59627d; font-size: .91rem; line-height: 1.55; }
.help-topics a { color: #10183d; font-weight: 800; text-underline-offset: 4px; }
.help-legal-links p { margin: 0; }
.help-confirmation { width: min(100%, 720px); margin: clamp(48px, 10vw, 110px) auto; padding: clamp(28px, 6vw, 58px); border: 1px solid #d3d7e3; border-radius: 18px; background: #fff; box-shadow: 0 14px 38px rgba(13, 25, 65, .1); }
.help-confirmation h1 { margin: 10px 0 14px; font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: .96; letter-spacing: -.04em; }
.help-confirmation > p { max-width: 58ch; color: #59627d; font-size: 1.05rem; }
.help-confirmation .help-reference { color: #10183d; font-size: .9rem; }
.help-confirmation-actions { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.help-confirmation-actions > a:not(.button) { font-weight: 800; }

.order-search button,
.order-filters button { min-height: 46px; white-space: nowrap; }

.shipping-defaults label { margin: 0; }
.shipping-defaults input { width: 100%; }
.shipping-rate-row input { width: 100%; }

.shipment-fields label { margin: 0; }
.admin-table input[type="number"] { width: 82px; }

@media (max-width: 720px) {
  .admin-login { margin: 28px auto 48px; }
  .admin-login button { width: 100%; }
  .order-search { align-items: stretch; flex-direction: column; }
  .order-search button { width: 100%; }
  .help-layout { grid-template-columns: 1fr; }
  .help-topics { margin-top: 10px; }
}

@media (max-width: 480px) {
  .admin-login { width: calc(100% + 4vw); margin-left: -2vw; border-radius: 14px; }
  .newsletter-page { width: calc(100% + 8vw); margin-left: -4vw; border-radius: 0; border-left: 0; border-right: 0; }
  .newsletter-form button { width: 100%; }
  .newsletter-page.newsletter-code-page {
    width: 100%;
    margin: 24px auto 48px;
    padding: 26px 20px;
    border: 1px solid #d3d7e3;
    border-radius: 14px;
  }
  .newsletter-code-page h1 { font-size: clamp(2.2rem, 12vw, 3rem); }
  .newsletter-code-page > .newsletter-code-intro { font-size: 1rem; }
  .newsletter-code-page > .newsletter-code-notice { margin-top: 22px; padding: 15px 16px; }
  .newsletter-code-form { width: 100%; margin-top: 26px; }
  .newsletter-code-input { min-height: 68px; font-size: 1.9rem; }
  .newsletter-code-submit { width: 100%; }
  .newsletter-code-resend { width: 100%; }
  .newsletter-code-resend button { width: auto; }
  .help-page { width: calc(100% + 8vw); margin-left: -4vw; padding-top: 30px; }
  .help-hero { padding-right: 4vw; padding-left: 4vw; }
  .help-contact { border-right: 0; border-left: 0; border-radius: 0; padding: 28px 4vw; }
  .help-form-grid { grid-template-columns: 1fr; }
  .help-message-field { grid-column: auto; }
  .help-contact-form button { width: 100%; }
  .help-topics { margin-right: 4vw; margin-left: 4vw; }
  .help-confirmation-actions { align-items: stretch; flex-direction: column; }
}
