/* auth blueprint — registration page (Phase 1-E, 18 Apr 2026).
   Feature-scoped; all colors through design-system tokens (Rule 15).
   Class prefix .auth-* — no collision with .ar-* / .g24-* / .btn-*. */

.auth-register-wrap {
    max-width: 560px;
    margin: 28px auto 48px auto;
    padding: 0 16px;
}

.auth-register-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 28px 30px;
}

.auth-register-head h1 {
    font-size: var(--text-display);
    color: var(--brand-accent);
    margin: 0 0 8px 0;
    padding: 0;
    border-bottom: none;
}

.auth-register-lede {
    font-size: var(--text-compact);
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 22px 0;
}

.auth-register-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: none;
    padding: 0;
    margin: 0;
}

.auth-field > label,
.auth-field > legend {
    font-size: var(--text-compact);
    font-weight: var(--weight-semibold);
    color: var(--text);
    padding: 0;
}

.auth-optional {
    font-weight: var(--weight-regular);
    color: var(--text-dim);
    font-size: var(--text-xs);
    margin-left: 4px;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="tel"],
.auth-field textarea {
    padding: 9px 12px;
    background: var(--input-bg, var(--card-bg));
    border: 1px solid var(--input-border, var(--card-border));
    border-radius: 7px;
    color: var(--text);
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color .15s;
}

.auth-field input:focus,
.auth-field textarea:focus {
    outline: none;
    border-color: var(--brand-accent);
}

.auth-field textarea {
    resize: vertical;
    min-height: 64px;
}

.auth-helper {
    font-size: var(--text-xs);
    color: var(--text-dim);
    line-height: 1.5;
}

/* Role picker — 3 stacked cards */
.auth-roles {
    gap: 10px;
    display: flex;
    flex-direction: column;
}

.auth-roles legend {
    margin-bottom: 6px;
}

.auth-role-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--card-bg);
    cursor: pointer;
    transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}

.auth-role-card:hover {
    transform: translateY(-1px);
    border-color: var(--brand-accent);
    background: var(--hover-bg);
}

.auth-role-card input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--brand-accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.auth-role-card.is-selected {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 2px var(--overlay-on-accent, var(--hover-bg)) inset;
}

.auth-role-body {
    flex: 1;
    min-width: 0;
}

.auth-role-title {
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    color: var(--text);
    margin: 0 0 3px 0;
}

.auth-role-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.auth-role-note {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    padding: 2px 8px;
    border-radius: 8px;
    letter-spacing: .2px;
    border: 1px solid transparent;
}

.auth-role-note-wait {
    background: var(--tone-info-bg);
    color: var(--tone-info-fg);
    border-color: var(--tone-info-border, var(--tone-info-fg));
}

.auth-role-note-instant {
    background: var(--tone-success-bg);
    color: var(--tone-success-fg);
    border-color: var(--tone-success-border, var(--tone-success-fg));
}

/* Submit row */
.auth-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.auth-submit {
    min-width: 160px;
    font-weight: var(--weight-semibold);
}

.auth-submit[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

/* Status area */
.auth-status {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: var(--text-compact);
    line-height: 1.55;
    border: 1px solid transparent;
}

.auth-status.is-success {
    background: var(--tone-success-bg);
    color: var(--tone-success-fg);
    border-color: var(--tone-success-border, var(--tone-success-fg));
}

.auth-status.is-error {
    background: var(--tone-danger-bg);
    color: var(--tone-danger-fg);
    border-color: var(--tone-danger-border, var(--tone-danger-fg));
}

.auth-status.is-info {
    background: var(--tone-info-bg);
    color: var(--tone-info-fg);
    border-color: var(--tone-info-border, var(--tone-info-fg));
}

/* Hide company row entirely when not needed (trial_user flow). */
.auth-field.is-hidden {
    display: none;
}

@media (max-width: 560px) {
    .auth-register-card { padding: 20px 18px; }
    .auth-register-head h1 { font-size: var(--text-page); }
    .auth-actions { justify-content: stretch; }
    .auth-submit { width: 100%; }
}
