/* NetSheet.org — auth screens (log in, create account, reset password, callback).
   Builds on site.css: .auth / .auth-main / .auth-box / .auth-aside, forms, notices. */

/* ------------------------------------------------------------ box details */

.auth-box h1 { text-wrap: balance; }
.auth-box .lead { max-width: 38ch; }
.auth-box form > .btn-block { margin-top: 0.4rem; min-height: 48px; }
.auth-box .auth-foot { margin-bottom: 0; }

/* The alert slot: collapse when empty so it doesn't add a gap. */
.auth-alerts:empty { display: none; }

/* ------------------------------------------------------ password strength */

.password-strength-bar { height: 4px; background: var(--rule); border-radius: 2px; margin-top: 0.6rem; overflow: hidden; }
.password-strength-fill { height: 100%; width: 0; background: var(--danger); border-radius: 2px; transition: width 0.2s ease, background-color 0.2s ease; }
.password-strength-text { display: block; min-height: 1.3em; font-size: var(--step--1); font-weight: 600; margin-top: 0.3rem; }
.password-strength-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.password-strength-row .hint { margin-top: 0.3rem; }

/* ------------------------------------------------------- activation code */

.activation-code-section { border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--paper); margin-bottom: 1.1rem; }
.activation-code-section > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 48px; padding: 0.6rem 0.85rem; font-weight: 600; font-size: 0.95rem;
}
.activation-code-section > summary::-webkit-details-marker { display: none; }
.activation-code-section > summary::after {
  content: ""; width: 9px; height: 9px; flex: none; margin-right: 0.2rem;
  border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2);
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease;
}
.activation-code-section[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.activation-code-section > summary .summary-note { color: var(--muted); font-weight: 400; font-size: var(--step--1); margin-left: auto; }
.activation-code-body { padding: 0 0.85rem 0.9rem; }
.activation-code-body .hint { margin-top: 0; margin-bottom: 0.6rem; }
.activation-code-input { font-variant-numeric: tabular-nums; letter-spacing: 0.12em; text-transform: uppercase; }

.activation-preview, .activation-error { display: none; margin-top: 0.6rem; font-size: 0.925rem; }
.activation-preview.show, .activation-error.show { display: block; }
.activation-preview { background: var(--ok-soft); border: 1px solid #c4dccd; color: #1c4a33; border-radius: var(--radius-sm); padding: 0.6rem 0.75rem; }
.activation-preview-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-weight: 600; }
.activation-preview .muted { font-size: var(--step--1); margin-top: 0.15rem; }
.activation-error { color: var(--danger); font-weight: 500; }
.plan-badge { font-size: 0.8rem; font-weight: 600; color: var(--green); background: var(--paper); border: 1px solid #c4dccd; padding: 0.15rem 0.55rem; border-radius: 999px; white-space: nowrap; }

/* ------------------------------------------------------------------ terms */

.terms-wrapper { padding: 0.25rem 0; }
.terms-wrapper .check { cursor: pointer; margin: 0; }
.terms-wrapper.is-invalid .check { color: var(--danger); }
.terms-wrapper.is-invalid .check input { outline: 2px solid var(--danger); outline-offset: 1px; }

/* ------------------------------------------------------- reset password */

.auth-box .step { display: none; }
.auth-box .step.active { display: block; }

.step-indicator { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin: -0.75rem 0 1.5rem; max-width: 12rem; }
.step-dot { height: 4px; border-radius: 2px; background: var(--rule); }
.step-dot.active { background: var(--green); }
.step-dot.completed { background: var(--leaf); }

.code-input { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.45em; font-variant-numeric: tabular-nums; text-align: left; padding-left: 1rem; }
.code-input::placeholder { letter-spacing: 0.45em; color: #b7c3bc; }

.sent-to { color: var(--ink-2); margin-bottom: 1.1rem; overflow-wrap: anywhere; }
.resend-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.25rem 1rem; margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }
.resend-row p { margin: 0; font-variant-numeric: tabular-nums; }

.password-requirements { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1rem; font-size: var(--step--1); color: var(--muted); }
.password-requirements .requirement { display: flex; align-items: center; gap: 0.45rem; }
.password-requirements .requirement::before {
  content: ""; width: 12px; height: 12px; flex: none; border-radius: 50%; border: 1.5px solid var(--rule-strong);
}
.password-requirements .requirement.valid { color: var(--green); }
.password-requirements .requirement.valid::before {
  border-color: var(--green); background: var(--green)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}
@media (max-width: 400px) { .password-requirements { grid-template-columns: 1fr; } }

.success-mark {
  width: 48px; height: 48px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem;
}
.success-mark svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ aside */

.auth-aside .aside-copy h2 { margin-bottom: 0.6rem; }
.auth-aside .aside-copy p { margin: 0; }
.auth-aside .sheet-body { padding-top: 0.25rem; }
.auth-aside a { color: #fff; }

.plan-lines { list-style: none; margin: 0; padding: 0; max-width: 440px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.plan-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 1.25rem; padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.plan-lines h3 { color: #fff; margin: 0; font-size: 1.1rem; }
.plan-lines .price { grid-column: 2; grid-row: 1; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-lines p { grid-column: 1 / -1; margin: 0; color: #cfe0d6; font-size: 0.95rem; }

/* --------------------------------------------------------- single column */

.auth-single { grid-template-columns: 1fr; min-height: calc(70vh - 4rem); }
.auth-status { display: flex; align-items: center; gap: 0.75rem; color: var(--ink-2); margin-bottom: 1rem; }
.auth-status .spinner { color: var(--green); width: 1.25rem; height: 1.25rem; }

@media (max-width: 900px) {
  .auth-main { align-items: flex-start; padding-block: 2rem 3rem; }
}

.auth-box .h-step { font-size: var(--step-2); margin-bottom: 0.4rem; }
/* site.css colors every aside <p> for the green ground; restore sheet text colors. */
.auth-aside .sheet .sheet-title { color: var(--ink); }
.auth-aside .sheet .sheet-sub { color: var(--muted); }
.password-strength-row .hint { margin: 0.35rem 0 0; }
.password-strength-row .password-strength-text { margin-top: 0.35rem; min-height: 0; line-height: 1.4; }
.plan-lines li { align-items: baseline; }
