/* Contractor sign-in page. Mobile first. Colours are the site's own (styles.css :root and the
   representative phone sign-in in affiliate-dashboard.css): dark ink page, light card, green actions.
   Every tap target is at least 44 px tall and inputs use a 16 px font so iOS does not zoom. */

.csign-page {
  background: var(--ink, #09130c);
  color: var(--text-light, #f7faf7);
  min-height: 100vh;
  min-width: 0;
  overflow-x: clip;
}

.csign-header {
  background: #09170e;
  border-bottom: 1px solid #23452f;
}

.csign-header-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  max-width: 100%;
  min-height: 72px;
  min-width: 0;
}

.csign-header .brand {
  color: #ffffff;
  min-width: 0;
  text-decoration: none;
}

.csign-header .brand img {
  height: 44px;
  width: 44px;
}

.csign-header .brand-copy small {
  color: #b8c9bd;
}

.csign-back {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  text-underline-offset: 5px;
}

.csign-main {
  box-sizing: border-box;
  min-width: 0;
  padding: 24px 16px 48px;
  width: 100%;
}

.csign-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: var(--shadow, 0 24px 70px rgba(4, 12, 7, 0.22));
  color: #10281f;
  margin: 0 auto;
  max-width: 480px;
  min-width: 0;
  padding: 24px 20px;
  width: 100%;
}

.csign-kicker {
  color: #2f7a49;
  font: 800 12px/1.2 var(--font-mono, "JetBrains Mono", monospace);
  margin: 0 0 8px;
  text-transform: uppercase;
}

.csign-title {
  color: #10281f;
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

.csign-lead,
.csign-note {
  color: #3d4c43;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.csign-note {
  font-size: 0.95rem;
}

.csign-message {
  border-left: 4px solid #5a685f;
  background: #f1f5f2;
  color: #10281f;
  font-size: 1rem;
  line-height: 1.45;
  margin: 0 0 16px;
  padding: 10px 12px;
  word-break: break-word;
}

.csign-message[data-tone="ok"] {
  background: #eff8f2;
  border-left-color: #075b3a;
  color: #075b3a;
  font-weight: 600;
}

.csign-message[data-tone="failed"] {
  background: #fff4ef;
  border-left-color: #8c1d18;
  color: #8c1d18;
  font-weight: 600;
}

.csign-invite {
  background: #edf5ff;
  border-left-color: #2667b8;
  color: #173d6b;
}

.csign-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.csign-field {
  color: #5a685f;
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  font-weight: 700;
  gap: 6px;
}

.csign-field input {
  background: #ffffff;
  border: 1px solid #98aa9b;
  border-radius: 8px;
  box-sizing: border-box;
  color: #10281f;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}

.csign-field input:focus {
  border-color: #075b3a;
  outline: 2px solid #075b3a;
  outline-offset: 1px;
}

.csign-check {
  align-items: center;
  color: #10281f;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  gap: 12px;
  min-height: 44px;
}

.csign-check input {
  accent-color: #075b3a;
  height: 24px;
  margin: 0;
  width: 24px;
}

.csign-button {
  background: #075b3a;
  border: 1px solid #075b3a;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  min-height: 48px;
  padding: 12px 18px;
  width: 100%;
}

.csign-button-link {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
  text-align: center;
  text-decoration: none;
}

.csign-button:hover,
.csign-button:focus-visible {
  background: #0b6b42;
  outline: 3px solid rgba(245, 154, 47, 0.5);
  outline-offset: 2px;
}

.csign-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.csign-button-quiet {
  background: #ffffff;
  color: #075b3a;
}

.csign-button-quiet:hover,
.csign-button-quiet:focus-visible {
  background: #eff8f2;
}

.csign-other {
  border-top: 1px solid #dbe4dd;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  padding-top: 12px;
}

.csign-link {
  background: transparent;
  border: 0;
  color: #075b3a;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  min-height: 44px;
  padding: 8px 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.csign-link:focus-visible {
  outline: 2px solid #075b3a;
  outline-offset: 2px;
}

.csign-code-box {
  background: #fff7e9;
  border: 2px solid #d59a45;
  border-radius: 10px;
  margin: 0 0 16px;
  padding: 16px;
  text-align: center;
}

.csign-code-label {
  color: #5a685f;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.csign-code {
  color: #10281f;
  font-family: var(--font-mono, "JetBrains Mono", Consolas, monospace);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  user-select: all;
}

.csign-code-warning {
  color: #8c1d18;
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.csign-signed-in {
  color: #075b3a;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 14px;
}

.csign-panel {
  background: #eff8f2;
  border-left: 4px solid #0b6b42;
  color: #173d29;
  margin: 0 0 18px;
  padding: 12px 14px;
}

.csign-panel[data-approval="PENDING_APPROVAL"] {
  background: #fff7e9;
  border-left-color: #d59a45;
}

.csign-panel[data-approval="REJECTED"],
.csign-panel[data-approval="SUSPENDED"] {
  background: #fff4ef;
  border-left-color: #8c1d18;
}

.csign-panel p {
  margin: 0;
}

.csign-panel-title {
  font-weight: 800;
  margin-bottom: 4px !important;
}

[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .csign-main {
    padding: 48px 24px 64px;
  }

  .csign-card {
    padding: 32px 32px;
  }
}

@media (max-width: 420px) {
  .csign-header-inner {
    gap: 10px;
    padding-inline: 14px;
  }

  .csign-header .brand {
    gap: 8px;
  }

  .csign-header .brand-copy strong {
    font-size: .84rem;
  }

  .csign-header .brand-copy small {
    display: none;
  }

  .csign-back {
    flex: 0 0 auto;
    font-size: .9rem;
  }
}
