/* form.css — 表單 + 欄位驗證 + 密碼強度 */

/* ── Form ── */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    background: #0f0f17;
    border: 1px solid #2a2a3e;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group input::placeholder {
    color: #475569;
}

/* ── Field Validation ── */

.field-error {
    font-size: 0.75rem;
    color: #f87171;
    margin-top: 6px;
    line-height: 1.4;
}

.field-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.field-valid {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
}

/* ── Password Strength ── */

.password-strength {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strength-rule {
    font-size: 0.75rem;
    line-height: 1.6;
    padding: 1px 0;
    transition: color 0.15s;
}

.strength-rule.passed {
    color: #4ade80;
}

.strength-rule.failed {
    color: #64748b;
}
